summaryrefslogtreecommitdiff
path: root/includes/deferred/SquidUpdate.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/deferred/SquidUpdate.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/deferred/SquidUpdate.php')
-rw-r--r--includes/deferred/SquidUpdate.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/includes/deferred/SquidUpdate.php b/includes/deferred/SquidUpdate.php
index 0dcff44a..950a264a 100644
--- a/includes/deferred/SquidUpdate.php
+++ b/includes/deferred/SquidUpdate.php
@@ -52,41 +52,6 @@ class SquidUpdate {
}
/**
- * Create a SquidUpdate from the given Title object.
- *
- * The resulting SquidUpdate will purge the given Title's URLs as well as
- * the pages that link to it. Capped at $wgMaxSquidPurgeTitles total URLs.
- *
- * @param Title $title
- * @return SquidUpdate
- */
- public static function newFromLinksTo( Title $title ) {
- global $wgMaxSquidPurgeTitles;
- wfProfileIn( __METHOD__ );
-
- # Get a list of URLs linking to this page
- $dbr = wfGetDB( DB_SLAVE );
- $res = $dbr->select( array( 'links', 'page' ),
- array( 'page_namespace', 'page_title' ),
- array(
- 'pl_namespace' => $title->getNamespace(),
- 'pl_title' => $title->getDBkey(),
- 'pl_from=page_id' ),
- __METHOD__ );
- $blurlArr = $title->getSquidURLs();
- if ( $res->numRows() <= $wgMaxSquidPurgeTitles ) {
- foreach ( $res as $BL ) {
- $tobj = Title::makeTitle( $BL->page_namespace, $BL->page_title );
- $blurlArr[] = $tobj->getInternalURL();
- }
- }
-
- wfProfileOut( __METHOD__ );
-
- return new SquidUpdate( $blurlArr );
- }
-
- /**
* Create a SquidUpdate from an array of Title objects, or a TitleArray object
*
* @param array $titles
@@ -145,8 +110,6 @@ class SquidUpdate {
self::HTCPPurge( $urlArr );
}
- wfProfileIn( __METHOD__ );
-
// Remove duplicate URLs
$urlArr = array_unique( $urlArr );
// Maximum number of parallel connections per squid
@@ -172,7 +135,6 @@ class SquidUpdate {
}
$pool->run();
- wfProfileOut( __METHOD__ );
}
/**
@@ -183,7 +145,6 @@ class SquidUpdate {
*/
public static function HTCPPurge( $urlArr ) {
global $wgHTCPRouting, $wgHTCPMulticastTTL;
- wfProfileIn( __METHOD__ );
// HTCP CLR operation
$htcpOpCLR = 4;
@@ -201,7 +162,6 @@ class SquidUpdate {
$errstr = socket_strerror( socket_last_error() );
wfDebugLog( 'squid', __METHOD__ .
": Error opening UDP socket: $errstr" );
- wfProfileOut( __METHOD__ );
return;
}
@@ -223,7 +183,6 @@ class SquidUpdate {
foreach ( $urlArr as $url ) {
if ( !is_string( $url ) ) {
- wfProfileOut( __METHOD__ );
throw new MWException( 'Bad purge URL' );
}
$url = self::expand( $url );
@@ -240,7 +199,6 @@ class SquidUpdate {
}
foreach ( $conf as $subconf ) {
if ( !isset( $subconf['host'] ) || !isset( $subconf['port'] ) ) {
- wfProfileOut( __METHOD__ );
throw new MWException( "Invalid HTCP rule for URL $url\n" );
}
}
@@ -272,7 +230,6 @@ class SquidUpdate {
$subconf['host'], $subconf['port'] );
}
}
- wfProfileOut( __METHOD__ );
}
/**