From 4c03ff3e33952abc0a6c787518c934cd52af8fc5 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 16 Apr 2007 15:29:37 +0000 Subject: [PATCH] Remove obsoletes Title::getRelatedCache, Title:touchArray --- RELEASE-NOTES | 1 + includes/FakeTitle.php | 1 - includes/Title.php | 66 ------------------------------------------ 3 files changed, 1 insertion(+), 67 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b87a58a565..fd15d0d500 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -317,6 +317,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 3366) Require skins based on SkinTemplate to override the skinname property. * (bug 9220) Removed obsoletes functions in install-utils.inc. +* Removed obsoletes Title::getRelatedCache and Title:touchArray == Maintenance == diff --git a/includes/FakeTitle.php b/includes/FakeTitle.php index 079c635cf7..293bdaf0af 100644 --- a/includes/FakeTitle.php +++ b/includes/FakeTitle.php @@ -14,7 +14,6 @@ class FakeTitle { function getInterwikiCached() { $this->error(); } function isLocal() { $this->error(); } function isTrans() { $this->error(); } - function touchArray( $titles, $timestamp = '' ) { $this->error(); } function getText() { $this->error(); } function getPartialURL() { $this->error(); } function getDBkey() { $this->error(); } diff --git a/includes/Title.php b/includes/Title.php index bd3d7d5831..d7b29ec34b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -497,60 +497,6 @@ class Title { return (bool)(Title::$interwikiCache[$k]->iw_trans); } - /** - * Update the page_touched field for an array of title objects - * @todo Inefficient unless the IDs are already loaded into the - * link cache - * @param array $titles an array of Title objects to be touched - * @param string $timestamp the timestamp to use instead of the - * default current time - * @static - * @access public - */ - function touchArray( $titles, $timestamp = '' ) { - - if ( count( $titles ) == 0 ) { - return; - } - $dbw = wfGetDB( DB_MASTER ); - if ( $timestamp == '' ) { - $timestamp = $dbw->timestamp(); - } - /* - $page = $dbw->tableName( 'page' ); - $sql = "UPDATE $page SET page_touched='{$timestamp}' WHERE page_id IN ("; - $first = true; - - foreach ( $titles as $title ) { - if ( $wgUseFileCache ) { - $cm = new HTMLFileCache($title); - @unlink($cm->fileCacheName()); - } - - if ( ! $first ) { - $sql .= ','; - } - $first = false; - $sql .= $title->getArticleID(); - } - $sql .= ')'; - if ( ! $first ) { - $dbw->query( $sql, 'Title::touchArray' ); - } - */ - // hack hack hack -- brion 2005-07-11. this was unfriendly to db. - // do them in small chunks: - $fname = 'Title::touchArray'; - foreach( $titles as $title ) { - $dbw->update( 'page', - array( 'page_touched' => $timestamp ), - array( - 'page_namespace' => $title->getNamespace(), - 'page_title' => $title->getDBkey() ), - $fname ); - } - } - /** * Escape a text fragment, say from a link, for a URL */ @@ -2501,18 +2447,6 @@ class Title { return $touched; } - /** - * Get a cached value from a global cache that is invalidated when this page changes - * @param string $key the key - * @param callback $callback A callback function which generates the value on cache miss - * - * @deprecated use DependencyWrapper - */ - function getRelatedCache( $memc, $key, $expiry, $callback, $params = array() ) { - return DependencyWrapper::getValueFromCache( $memc, $key, $expiry, $callback, - $params, new TitleDependency( $this ) ); - } - public function trackbackURL() { global $wgTitle, $wgScriptPath, $wgServer; -- 2.20.1