Fix exception when viewing special pages with relative related titles
[lhc/web/wiklou.git] / includes / skins / Skin.php
index d355db6..bbad648 100644 (file)
@@ -216,6 +216,7 @@ abstract class Skin extends ContextSource {
                // Preload jquery.tablesorter for mediawiki.page.ready
                if ( strpos( $out->getHTML(), 'sortable' ) !== false ) {
                        $modules['content'][] = 'jquery.tablesorter';
+                       $modules['styles']['content'][] = 'jquery.tablesorter.styles';
                }
 
                // Preload jquery.makeCollapsible for mediawiki.page.ready
@@ -274,7 +275,7 @@ abstract class Skin extends ContextSource {
 
                // Check, if the page can hold some kind of content, otherwise do nothing
                $title = $this->getRelevantTitle();
-               if ( $title->canExist() ) {
+               if ( $title->canExist() && $title->canHaveTalkPage() ) {
                        if ( $title->isTalkPage() ) {
                                $titles[] = $title->getSubjectPage();
                        } else {
@@ -388,9 +389,8 @@ abstract class Skin extends ContextSource {
 
        /**
         * Outputs the HTML generated by other functions.
-        * @param OutputPage|null $out
         */
-       abstract function outputPage( OutputPage $out = null );
+       abstract function outputPage();
 
        /**
         * @param array $data
@@ -813,9 +813,11 @@ abstract class Skin extends ContextSource {
        }
 
        /**
+        * @deprecated since 1.34, use getSearchLink() instead.
         * @return string
         */
        function escapeSearchLink() {
+               wfDeprecated( __METHOD__, '1.34' );
                return htmlspecialchars( $this->getSearchLink() );
        }