Merge "Renamed "Your name" to "Your username" to match with the Media wiki login...
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index 062e09d..f37ea20 100644 (file)
@@ -72,7 +72,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
                $outputPage = $this->getOutput();
                $title = Title::newFromURL( $target );
                if ( !$title || $title->getInterwiki() != '' ) {
-                       $outputPage->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
+                       $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )->parse() . '</div>' );
                        return false;
                }
 
@@ -99,7 +99,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
 
                // left join with watchlist table to highlight watched rows
                $uid = $this->getUser()->getId();
-               if ( $uid ) {
+               if ( $uid && $this->getUser()->isAllowed( 'viewmywatchlist' ) ) {
                        $tables[] = 'watchlist';
                        $select[] = 'wl_user';
                        $join_conds['watchlist'] = array( 'LEFT JOIN', array(
@@ -226,21 +226,21 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
        }
 
        /**
-        * @param $opts FormOptions
+        * Get options to be displayed in a form
+        *
+        * @param FormOptions $opts
         * @return array
         */
        function getExtraOptions( $opts ) {
-               $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) );
-               $extraOpts = array();
-               $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
+               $extraOpts = parent::getExtraOptions( $opts );
+
+               $opts->consumeValues( array( 'showlinkedto', 'target' ) );
+
                $extraOpts['target'] = array( $this->msg( 'recentchangeslinked-page' )->escaped(),
                        Xml::input( 'target', 40, str_replace( '_', ' ', $opts['target'] ) ) .
                        Xml::check( 'showlinkedto', $opts['showlinkedto'], array( 'id' => 'showlinkedto' ) ) . ' ' .
                        Xml::label( $this->msg( 'recentchangeslinked-to' )->text(), 'showlinkedto' ) );
-               $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] );
-               if ( $tagFilter ) {
-                       $extraOpts['tagfilter'] = $tagFilter;
-               }
+
                return $extraOpts;
        }
 
@@ -265,10 +265,4 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
                        $this->getOutput()->addBacklinkSubtitle( $target );
                }
        }
-
-       function setBottomText( FormOptions $opts ) {
-               if ( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
-                       $this->getOutput()->addWikiMsg( 'recentchangeslinked-noresult' );
-               }
-       }
 }