X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSquidUpdate.php;h=700fc8ef421c9246c47152fd0d0d9631af4b0f32;hb=4e250a20b9fde4e72128f391fae65760196795fb;hp=3821cd51fb3b597a4b9f4b8b112b7eb3f2b0ce10;hpb=32308a5de228f5b138e8e002d1f9ec922c6ccfa8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php index 3821cd51fb..700fc8ef42 100644 --- a/includes/SquidUpdate.php +++ b/includes/SquidUpdate.php @@ -1,17 +1,15 @@ mMaxTitles = $wgMaxSquidPurgeTitles; @@ -29,9 +27,7 @@ class SquidUpdate { wfProfileIn( $fname ); # Get a list of URLs linking to this page - $id = $title->getArticleID(); - - $dbr =& wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( array( 'links', 'page' ), array( 'page_namespace', 'page_title' ), array( @@ -201,9 +197,11 @@ class SquidUpdate { $htcpOpCLR = 4; // HTCP CLR // FIXME PHP doesn't support these socket constants (include/linux/in.h) - define( "IPPROTO_IP", 0 ); - define( "IP_MULTICAST_LOOP", 34 ); - define( "IP_MULTICAST_TTL", 33 ); + if( !defined( "IPPROTO_IP" ) ) { + define( "IPPROTO_IP", 0 ); + define( "IP_MULTICAST_LOOP", 34 ); + define( "IP_MULTICAST_TTL", 33 ); + } // pfsockopen doesn't work because we need set_sock_opt $conn = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP ); @@ -215,6 +213,9 @@ class SquidUpdate { $wgHTCPMulticastTTL ); foreach ( $urlArr as $url ) { + if( !is_string( $url ) ) { + wfDebugDieBacktrace( 'Bad purge URL' ); + } $url = SquidUpdate::expand( $url ); // Construct a minimal HTCP request diagram