X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fchanges%2FChangesList.php;h=cd43f82934ac500c75e7636144f3b7ffc620dc27;hb=0971c0aca2b66cb0d7a33c6db49694b4fae506fd;hp=99b60bbf055dc440dc214852880246bc63d1b119;hpb=768c1e2abf86bcdd5464f0e4df16ecfe3e5cced7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 99b60bbf05..cd43f82934 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -57,7 +57,7 @@ class ChangesList extends ContextSource { * Some users might want to use an enhanced list format, for instance * * @param IContextSource $context - * @return ChangesList derivative + * @return ChangesList */ public static function newFromContext( IContextSource $context ) { $user = $context->getUser(); @@ -74,14 +74,14 @@ class ChangesList extends ContextSource { /** * Sets the list to use a "
  • " tag - * @param $value Boolean + * @param bool $value */ public function setWatchlistDivs( $value = true ) { $this->watchlist = $value; } /** - * @return bool true when setWatchlistDivs has been called + * @return bool True when setWatchlistDivs has been called * @since 1.23 */ public function isWatchlist() { @@ -106,7 +106,7 @@ class ChangesList extends ContextSource { /** * Returns the appropriate flags for new page, minor change and patrolling * @param array $flags Associative array of 'flag' => Bool - * @param string $nothing to use for empty space + * @param string $nothing To use for empty space * @return string */ public function recentChangesFlags( $flags, $nothing = ' ' ) { @@ -236,8 +236,8 @@ class ChangesList extends ContextSource { /** * Format the character difference of one or several changes. * - * @param $old RecentChange - * @param $new RecentChange last change to use, if not provided, $old will be used + * @param RecentChange $old + * @param RecentChange $new Last change to use, if not provided, $old will be used * @return string HTML fragment */ public function formatCharacterDifference( RecentChange $old, RecentChange $new = null ) { @@ -258,7 +258,7 @@ class ChangesList extends ContextSource { /** * Returns text for the end of RC - * @return String + * @return string */ public function endRecentChangesList() { $out = $this->rclistOpen ? "\n" : ''; @@ -269,7 +269,7 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc_timestamp mixed + * @param mixed $rc_timestamp */ public function insertDateHeader( &$s, $rc_timestamp ) { # Make date header if necessary @@ -286,8 +286,8 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $title Title - * @param $logtype string + * @param Title $title + * @param string $logtype */ public function insertLog( &$s, $title, $logtype ) { $page = new LogPage( $logtype ); @@ -297,8 +297,8 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc RecentChange - * @param $unpatrolled + * @param RecentChange $rc + * @param bool $unpatrolled */ public function insertDiffHist( &$s, &$rc, $unpatrolled ) { # Diff link @@ -338,12 +338,15 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc RecentChange - * @param $unpatrolled - * @param $watched + * @param RecentChange $rc + * @param bool $unpatrolled + * @param bool $watched */ public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) { $params = array(); + if ( $rc->getTitle()->isRedirect() ) { + $params = array( 'redirect' => 'no' ); + } $articlelink = Linker::linkKnown( $rc->getTitle(), @@ -369,7 +372,7 @@ class ChangesList extends ContextSource { * Get the timestamp from $rc formatted with current user's settings * and a separator * - * @param $rc RecentChange + * @param RecentChange $rc * @return string HTML fragment */ public function getTimestamp( $rc ) { @@ -385,7 +388,7 @@ class ChangesList extends ContextSource { * Insert time timestamp string from $rc into $s * * @param string $s HTML to update - * @param $rc RecentChange + * @param RecentChange $rc */ public function insertTimestamp( &$s, $rc ) { $s .= $this->getTimestamp( $rc ); @@ -394,8 +397,8 @@ class ChangesList extends ContextSource { /** * Insert links to user page, user talk page and eventually a blocking link * - * @param &$s String HTML to update - * @param &$rc RecentChange + * @param string &$s HTML to update + * @param RecentChange &$rc */ public function insertUserRelatedLinks( &$s, &$rc ) { if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { @@ -411,7 +414,7 @@ class ChangesList extends ContextSource { /** * Insert a formatted action * - * @param $rc RecentChange + * @param RecentChange $rc * @return string */ public function insertLogEntry( $rc ) { @@ -425,17 +428,15 @@ class ChangesList extends ContextSource { /** * Insert a formatted comment - * @param $rc RecentChange + * @param RecentChange $rc * @return string */ public function insertComment( $rc ) { - if ( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) { - if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) { - return ' ' . - $this->msg( 'rev-deleted-comment' )->escaped() . ''; - } else { - return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() ); - } + if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) { + return ' ' . + $this->msg( 'rev-deleted-comment' )->escaped() . ''; + } else { + return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() ); } return ''; @@ -445,7 +446,7 @@ class ChangesList extends ContextSource { * Check whether to enable recent changes patrol features * * @deprecated since 1.22 - * @return Boolean + * @return bool */ public static function usePatrol() { global $wgUser; @@ -501,8 +502,8 @@ class ChangesList extends ContextSource { } /** - * @param $link string - * @param $watched bool + * @param string $link + * @param bool $watched * @return string */ protected function maybeWatchedLink( $link, $watched = false ) { @@ -515,8 +516,8 @@ class ChangesList extends ContextSource { /** Inserts a rollback link * - * @param $s string - * @param $rc RecentChange + * @param string $s + * @param RecentChange $rc */ public function insertRollback( &$s, &$rc ) { if ( $rc->mAttribs['rc_type'] == RC_EDIT @@ -542,9 +543,9 @@ class ChangesList extends ContextSource { } /** - * @param $s string - * @param $rc RecentChange - * @param $classes + * @param string $s + * @param RecentChange $rc + * @param array $classes */ public function insertTags( &$s, &$rc, &$classes ) { if ( empty( $rc->mAttribs['ts_tags'] ) ) {