Remove obsoletes Title::getRelatedCache, Title:touchArray
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 16 Apr 2007 15:29:37 +0000 (15:29 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 16 Apr 2007 15:29:37 +0000 (15:29 +0000)
RELEASE-NOTES
includes/FakeTitle.php
includes/Title.php

index b87a58a..fd15d0d 100644 (file)
@@ -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 ==
 
index 079c635..293bdaf 100644 (file)
@@ -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(); }
index bd3d7d5..d7b29ec 100644 (file)
@@ -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;