Merge "Limit the Title backlink cache to two instances."
[lhc/web/wiklou.git] / includes / Title.php
index cd9eb94..1b5e21d 100644 (file)
@@ -84,7 +84,6 @@ class Title {
        var $mLength = -1;                // /< The page length, 0 for special pages
        var $mRedirect = null;            // /< Is the article at this title a redirect?
        var $mNotificationTimestamp = array(); // /< Associative array of user ID -> timestamp/false
-       var $mBacklinkCache = null;       // /< Cache of links to this title
        var $mHasSubpage;                 // /< Whether a page has any subpages
        // @}
 
@@ -4482,11 +4481,8 @@ class Title {
         *
         * @return BacklinkCache
         */
-       function getBacklinkCache() {
-               if ( is_null( $this->mBacklinkCache ) ) {
-                       $this->mBacklinkCache = new BacklinkCache( $this );
-               }
-               return $this->mBacklinkCache;
+       public function getBacklinkCache() {
+               return BacklinkCache::get( $this );
        }
 
        /**