Merge "Add user rights 'viewmywatchlist', 'editmywatchlist'"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 26 Jun 2013 23:19:28 +0000 (23:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Jun 2013 23:19:28 +0000 (23:19 +0000)
1  2 
RELEASE-NOTES-1.22
includes/specials/SpecialMovepage.php
includes/specials/SpecialRecentchangeslinked.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

diff --combined RELEASE-NOTES-1.22
@@@ -28,9 -28,9 +28,9 @@@ production
  * $wgLogAutopatrol added to allow disabling logging of autopatrol edits in the logging table.
    default for $wgLogAutopatrol is true.
  * The 'edit' right no longer allows for editing a user's own CSS and JS.
- * New rights 'editmyusercss' and 'editmyuserjs' restrict actions that were
-   formerly allowed by default. They have been added to the default for
-   $wgGroupPermissions['*'].
+ * New rights 'editmyusercss', 'editmyuserjs', 'viewmywatchlist',
+   and 'editmywatchlist' restrict actions that were formerly allowed by default.
+   They have been added to the default for $wgGroupPermissions['*'].
  
  === New features in 1.22 ===
  * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes.
    for extensions such as OAuth:
  ** editmyusercss controls whether a user may edit their own CSS subpages.
  ** editmyuserjs controls whether a user may edit their own JS subpages.
+ ** viewmywatchlist controls whether a user may view their watchlist.
+ ** editmywatchlist controls whether a user may edit their watchlist.
  * Add new hook AbortTalkPageEmailNotification, this will be used to determine
    whether to send the regular talk page email notification
  * (bug 46513) Vector: Add the collapsibleTabs script from the Vector extension.
    warning will instead be issued if 'title' is non-default, unless no props are
    requested.
  * Special:Recentchangeslinked will now include upload log entries
 +* (bug 41281) Fixed ugly output if file size could not be extracted for multi-page media.
  
  === API changes in 1.22 ===
  * (bug 25553) The JSON output formatter now leaves forward slashes unescaped
@@@ -624,7 -624,7 +624,7 @@@ class MovePageForm extends UnlistedSpec
                $extraOutput = array();
                $count = 1;
                foreach ( $extraPages as $oldSubpage ) {
 -                      if ( $ot->equals( $oldSubpage ) ) {
 +                      if ( $ot->equals( $oldSubpage ) || $nt->equals( $oldSubpage ) ) {
                                # Already did this one.
                                continue;
                        }
                }
  
                # Deal with watches (we don't watch subpages)
-               if ( $this->watch && $user->isLoggedIn() ) {
-                       $user->addWatch( $ot );
-                       $user->addWatch( $nt );
-               } else {
-                       $user->removeWatch( $ot );
-                       $user->removeWatch( $nt );
-               }
+               WatchAction::doWatchOrUnwatch( $this->watch, $ot, $user );
+               WatchAction::doWatchOrUnwatch( $this->watch, $nt, $user );
  
                # Re-clear the file redirect cache, which may have been polluted by
                # parsing in messages above. See CR r56745.
@@@ -72,7 -72,7 +72,7 @@@ class SpecialRecentchangeslinked extend
                $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->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div>", 'allpagesbadtitle' );
                        return false;
                }
  
@@@ -99,7 -99,7 +99,7 @@@
  
                // 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(
@@@ -2095,6 -2095,8 +2095,8 @@@ Your email address is not revealed whe
  'right-edituserjs'            => "Edit other users' JavaScript files",
  'right-editmyusercss'         => 'Edit your own user CSS files',
  'right-editmyuserjs'          => 'Edit your own user JavaScript files',
+ 'right-viewmywatchlist'       => 'View your own watchlist',
+ 'right-editmywatchlist'       => 'Edit your own watchlist. Note some actions will still add pages even without this right.',
  'right-rollback'              => 'Quickly rollback the edits of the last user who edited a particular page',
  'right-markbotedits'          => 'Mark rolled-back edits as bot edits',
  'right-noratelimit'           => 'Not be affected by rate limits',
  'action-userrights-interwiki' => 'edit user rights of users on other wikis',
  'action-siteadmin'            => 'lock or unlock the database',
  'action-sendemail'            => 'send emails',
+ 'action-viewmywatchlist'      => 'view your watchlist',
+ 'action-editmywatchlist'      => 'edit your watchlist',
  
  # Recent changes
  'nchanges'                          => '$1 {{PLURAL:$1|change|changes}}',
@@@ -4595,7 -4599,7 +4599,7 @@@ Please confirm that you really want to 
  'semicolon-separator' => ';&#32;', # only translate this message to other languages if you have to change it
  'comma-separator'     => ',&#32;', # only translate this message to other languages if you have to change it
  'colon-separator'     => ':&#32;', # only translate this message to other languages if you have to change it
 -'autocomment-prefix'  => '-&#32;', # only translate this message to other languages if you have to change it
 +'autocomment-prefix'  => '', # only translate this message to other languages if you have to change it
  'pipe-separator'      => '&#32;|&#32;', # only translate this message to other languages if you have to change it
  'word-separator'      => '&#32;', # only translate this message to other languages if you have to change it
  'ellipsis'            => '...', # only translate this message to other languages if you have to change it
@@@ -2914,6 -2914,8 +2914,8 @@@ See also {{msg-mw|Right-editusercss}}'
  'right-editmyuserjs' => '{{doc-right|editmyuserjs}}
  
  See also {{msg-mw|Right-edituserjs}}',
+ 'right-viewmywatchlist' => '{{doc-right|viewmywatchlist}}',
+ 'right-editmywatchlist' => '{{doc-right|editmywatchlist}}',
  'right-rollback' => '{{doc-right|rollback}}
  {{Identical|Rollback}}',
  'right-markbotedits' => '{{doc-right|markbotedits}}
@@@ -2986,6 -2988,8 +2988,8 @@@ This action allows editing of all of th
  'action-userrights-interwiki' => '{{Doc-action|userrights-interwiki}}',
  'action-siteadmin' => '{{Doc-action|siteadmin}}',
  'action-sendemail' => '{{doc-action|sendemail}}',
+ 'action-editmywatchlist' => '{{doc-action|editmywatchlist}}',
+ 'action-viewmywatchlist' => '{{doc-action|viewmywatchlist}}',
  
  # Recent changes
  'nchanges' => 'Appears on the [[Special:RecentChanges]] special page in brackets after pages having more than one change on that date. $1 is the number of changes on that day.',
@@@ -5842,10 -5846,8 +5846,10 @@@ See also
  'movepagebtn' => "Button label on the special 'Move page'.
  
  {{Identical|Move page}}",
 -'pagemovedsub' => 'Message displayed as aheader of the body, after succesfully moving a page from source to target name.',
 -'movepage-moved' => 'Message displayed after succesfully moving a page from source to target name. Parameters:
 +'pagemovedsub' => 'Message displayed as aheader of the body, after successfully moving a page from source to target name.',
 +'movepage-moved' => 'Message displayed after successfully moving a page from source to target name.
 +
 +Parameters:
  * $1 - the source page as a link with display name
  * $2 - the target page as a link with display name
  * $3 - (optional) the source page name without a link