From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- includes/SquidUpdate.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'includes/SquidUpdate.php') 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("
\n", $urlArr) . "
\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; } } -?> + -- cgit v1.2.2