From e189306d5141113416472b949ec07763d55416fb Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Mon, 6 Oct 2014 10:18:32 -0400 Subject: [PATCH] Remove SquidUpdate::newFromLinksTo() This has been broken since r9199 / e0ce5a322e41; a DB query error will occur because the links table no longer exists, and even if the table were to exist, the pl_* columns would not exist in that table. There is no usage in core or Gerrit-hosted extensions. Change-Id: I4922f85417bfb4d40f08662ba100ab5b78edd5fb --- includes/deferred/SquidUpdate.php | 35 ------------------------------- 1 file changed, 35 deletions(-) diff --git a/includes/deferred/SquidUpdate.php b/includes/deferred/SquidUpdate.php index 0dcff44a7d..d4fc7a006a 100644 --- a/includes/deferred/SquidUpdate.php +++ b/includes/deferred/SquidUpdate.php @@ -51,41 +51,6 @@ class SquidUpdate { $this->urlArr = $urlArr; } - /** - * 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 * -- 2.20.1