Reverting r16861; incompatible change to message texts, breaks a lot of toggle displa...
[lhc/web/wiklou.git] / includes / LinkCache.php
index 355f157..8e56225 100644 (file)
 class LinkCache {
        // Increment $mClassVer whenever old serialized versions of this class
        // becomes incompatible with the new version.
-       private
-               $mBadLinks,
-               $mClassVer = 3,
-               $mForUpdate,
-               $mGoodLinks,
-               $mPageLinks ;
+       /* private */ var $mClassVer = 3;
+
+       /* private */ var $mPageLinks;
+       /* private */ var $mGoodLinks, $mBadLinks;
+       /* private */ var $mForUpdate;
 
        /**
         * Get an instance of this class
         */
-       function &singleton() {
+       static function &singleton() {
                static $instance;
                if ( !isset( $instance ) ) {
                        $instance = new LinkCache;
@@ -38,8 +37,7 @@ class LinkCache {
        }
 
        /* private */ function getKey( $title ) {
-               global $wgDBname;
-               return $wgDBname.':lc:title:'.$title;
+               return wfMemcKey( 'lc', 'title', $title );
        }
 
        /**