summaryrefslogtreecommitdiff
path: root/includes/SquidUpdate.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SquidUpdate.php')
-rw-r--r--includes/SquidUpdate.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php
index 700fc8ef..5d7350a9 100644
--- a/includes/SquidUpdate.php
+++ b/includes/SquidUpdate.php
@@ -22,7 +22,7 @@ class SquidUpdate {
$this->urlArr = $urlArr;
}
- /* static */ function newFromLinksTo( &$title ) {
+ static function newFromLinksTo( &$title ) {
$fname = 'SquidUpdate::newFromLinksTo';
wfProfileIn( $fname );
@@ -49,7 +49,7 @@ class SquidUpdate {
return new SquidUpdate( $blurlArr );
}
- /* static */ function newFromTitles( &$titles, $urlArr = array() ) {
+ static function newFromTitles( &$titles, $urlArr = array() ) {
global $wgMaxSquidPurgeTitles;
if ( count( $titles ) > $wgMaxSquidPurgeTitles ) {
$titles = array_slice( $titles, 0, $wgMaxSquidPurgeTitles );
@@ -60,7 +60,7 @@ class SquidUpdate {
return new SquidUpdate( $urlArr );
}
- /* static */ function newSimplePurge( &$title ) {
+ static function newSimplePurge( &$title ) {
$urlArr = $title->getSquidURLs();
return new SquidUpdate( $urlArr );
}
@@ -74,16 +74,21 @@ class SquidUpdate {
(example: $urlArr[] = 'http://my.host/something')
XXX report broken Squids per mail or log */
- /* static */ function purge( $urlArr ) {
+ static function purge( $urlArr ) {
global $wgSquidServers, $wgHTCPMulticastAddress, $wgHTCPPort;
/*if ( (@$wgSquidServers[0]) == 'echo' ) {
echo implode("<br />\n", $urlArr) . "<br />\n";
return;
}*/
+
+ if( empty( $urlArr ) ) {
+ return;
+ }
- if ( $wgHTCPMulticastAddress && $wgHTCPPort )
- SquidUpdate::HTCPPurge( $urlArr );
+ if ( $wgHTCPMulticastAddress && $wgHTCPPort ) {
+ return SquidUpdate::HTCPPurge( $urlArr );
+ }
$fname = 'SquidUpdate::purge';
wfProfileIn( $fname );
@@ -189,7 +194,7 @@ class SquidUpdate {
wfProfileOut( $fname );
}
- /* static */ function HTCPPurge( $urlArr ) {
+ static function HTCPPurge( $urlArr ) {
global $wgHTCPMulticastAddress, $wgHTCPMulticastTTL, $wgHTCPPort;
$fname = 'SquidUpdate::HTCPPurge';
wfProfileIn( $fname );
@@ -277,4 +282,4 @@ class SquidUpdate {
return $url;
}
}
-?>
+