Update mediawiki/mediawiki-codesniffer to 0.7.1
[lhc/web/wiklou.git] / includes / skins / Skin.php
index e5b9cb9..d70a6b9 100644 (file)
@@ -387,8 +387,9 @@ abstract class Skin extends ContextSource {
                }
 
                $name = Sanitizer::escapeClass( 'page-' . $title->getPrefixedText() );
+               $root = Sanitizer::escapeClass( 'rootpage-' . $title->getRootTitle()->getPrefixedText() );
 
-               return "$numeric $type $name";
+               return "$numeric $type $name $root";
        }
 
        /**
@@ -1199,7 +1200,9 @@ abstract class Skin extends ContextSource {
                        $cache = ObjectCache::getMainWANInstance();
                        $sidebar = $cache->getWithSetCallback(
                                $cache->makeKey( 'sidebar', $this->getLanguage()->getCode() ),
-                               $wgSidebarCacheExpiry,
+                               MessageCache::singleton()->isDisabled()
+                                       ? $cache::TTL_UNCACHEABLE // bug T133069
+                                       : $wgSidebarCacheExpiry,
                                $callback,
                                [ 'lockTSE' => 30 ]
                        );
@@ -1560,24 +1563,56 @@ abstract class Skin extends ContextSource {
                return $result;
        }
 
-       /**
-        * Use PHP's magic __call handler to intercept legacy calls to the linker
-        * for backwards compatibility.
-        *
-        * @param string $fname Name of called method
-        * @param array $args Arguments to the method
-        * @throws MWException
-        * @return mixed
-        */
-       function __call( $fname, $args ) {
-               $realFunction = [ 'Linker', $fname ];
-               if ( is_callable( $realFunction ) ) {
-                       wfDeprecated( get_class( $this ) . '::' . $fname, '1.21' );
-                       return call_user_func_array( $realFunction, $args );
-               } else {
-                       $className = get_class( $this );
-                       throw new MWException( "Call to undefined method $className::$fname" );
-               }
+       /** @deprecated in 1.21 */
+       public function commentBlock( $comment, $title = null, $local = false, $wikiId = null ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::commentBlock( $comment, $title, $local, $wikiId );
+       }
+
+       /** @deprecated in 1.21 */
+       public function generateRollback(
+               $rev,
+               IContextSource $context = null,
+               $options = [ 'verify' ]
+       ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::generateRollback( $rev, $context, $options );
+       }
+
+       /** @deprecated in 1.21 */
+       public function link( $target, $html = null, $customAttribs = [], $query = [], $options = [] ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::link( $target, $html, $customAttribs, $query, $options );
+       }
+
+       /** @deprecated in 1.21 */
+       public function linkKnown(
+               $target,
+               $html = null,
+               $customAttribs = [],
+               $query = [],
+               $options = [ 'known', 'noclasses' ]
+       ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::linkKnown( $target, $html, $customAttribs, $query, $options );
+       }
+
+       /** @deprecated in 1.21 */
+       public function userLink( $userId, $userName, $altUserName = false ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::userLink( $userId, $userName, $altUserName );
+       }
+
+       /** @deprecated in 1.21 */
+       public function userToolLinks(
+               $userId,
+               $userText,
+               $redContribsWhenNoEdits = false,
+               $flags = 0,
+               $edits = null
+       ) {
+               wfDeprecated( __METHOD__, '1.21' );
+               return Linker::userToolLinks( $userId, $userText, $redContribsWhenNoEdits, $flags, $edits );
        }
 
 }