Required changes to get ArmorySync back working

Posts from previous Beta sessions

Required changes to get ArmorySync back working

Postby poetter » Fri Nov 23, 2007 9:27 am

Hi,

to get ArmorySync back working i need some changes to armory.class.php and functions.lib.php.


Code: Select all
--- C:/Dokumente und Einstellungen/Daniel/Lokale Einstellungen/Temp/armory.class.php-revBASE.svn000.tmp.php   Fri Nov 23 01:19:24 2007
+++ D:/xampp/roster.com/htdocs/lib/armory.class.php   Thu Nov 22 10:07:06 2007
@@ -862,7 +862,7 @@
             break;
          case 3:
          case 'guild-info':
-            $mode = 'guild-info.xml?r=' . urlencode($realm) . '&n=' . urlencode($guild);
+            $mode = 'guild-info.xml?r=' . urlencode($realm) . '&n=' . urlencode($guild). '&p=1';
             break;
          case 4:
          case 'character-talents':



and

Code: Select all
--- C:/Dokumente und Einstellungen/Daniel/Lokale Einstellungen/Temp/functions.lib.php-revBASE.svn000.tmp.php   Fri Nov 23 01:23:15 2007
+++ D:/xampp/roster.com/htdocs/lib/functions.lib.php   Fri Nov 23 01:14:34 2007
@@ -1178,6 +1175,7 @@
          fwrite($file, $header);
          stream_set_timeout($file, $timeout);
          $inHeader = true;
+         $redirect = false;
          while( !feof($file) )
          {
             $chunk = fgets($file, 256);
@@ -1189,12 +1187,19 @@
                   $contents .= substr( $chunk, $pos, strlen($chunk) );
                   $inHeader = false;
                }
+               if ( preg_match ( '/^(?:Location:\s)(.+)/', $chunk, $redirect ) ) {
+                  break;
+               }
                continue;
             }
             $contents .= $chunk;
          }
          fclose($file);
+         if ( isset($redirect[1]) ) {
+            return urlgrabber( $redirect[1], $timeout, $user_agent );
+         } else {
          return $contents;
+         }
       }
    }
    elseif( $contents = file_get_contents($url) )


Can any of the devs check this changes and if found good commit them to the trunk?

Greets poetter
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Required changes to get ArmorySync back working

Postby zanix » Fri Nov 23, 2007 2:22 pm

Looks ok to me

Added svn[1462]
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Required changes to get ArmorySync back working

Postby poetter » Mon Nov 26, 2007 7:51 am

Hi zanix,

one more change is needed to handle redirect with curl:

Code: Select all
--- C:/Dokumente und Einstellungen/Daniel/Lokale Einstellungen/Temp/functions.lib.php-revBASE.svn000.tmp.php   Sun Nov 25 23:49:04 2007
+++ D:/xampp/roster.com/htdocs/lib/functions.lib.php   Sun Nov 25 23:48:52 2007
@@ -1138,6 +1138,7 @@
 
       curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
       if( $user_agent )
       {
          curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Required changes to get ArmorySync back working

Postby tuigii » Mon Nov 26, 2007 8:15 am

poetter wrote:one more change is needed to handle redirect with curl:....


Yeeeaaaah :wink:
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Required changes to get ArmorySync back working

Postby zanix » Mon Nov 26, 2007 10:58 am

Fixed svn[1478]
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron