X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/message.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=5691e50608d5cfbe5978cab8b42734b20ba75fc4;hb=d55b1505b0e21116b995808c20cbbd2004959add;hp=1db1d047e76044ad36163de4c6101f784f4da4c2;hpb=08fee4ce2f1bbf362c8422a3e306a905c8775094;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 1db1d047e7..5691e50608 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -83,7 +83,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { @@ -258,7 +258,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { // the necessary rights. if ( !$user->isAllowed( 'deletedhistory' ) ) { $bitmask = LogPage::DELETED_ACTION; - } elseif ( !$user->isAllowed( 'suppressrevision' ) ) { + } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; } else { $bitmask = 0; @@ -395,12 +395,12 @@ class SpecialWatchlist extends ChangesListSpecialPage { } /** - * Return the text to be displayed above the changes + * Set the text to be displayed above the changes * * @param FormOptions $opts - * @return string XHTML + * @param int $numRows Number of rows in the result to show after this header */ - public function doHeader( $opts ) { + public function doHeader( $opts, $numRows ) { $user = $this->getUser(); $this->getOutput()->addSubtitle( @@ -414,7 +414,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { $wlInfo = ''; if ( $opts['days'] > 0 ) { $timestamp = wfTimestampNow(); - $wlInfo = $this->msg( 'wlnote2' )->numParams( round( $opts['days'] * 24 ) )->params( + $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $opts['days'] * 24 ) )->params( $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user ) )->parse() . "
\n"; }