From: Brion Vibber Date: Fri, 14 Nov 2008 02:21:45 +0000 (+0000) Subject: Revert class cruft in r43327 :) X-Git-Tag: 1.31.0-rc.0~44348 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=1e6d22e509ab00a051d51afcb8bbebbb75747df6;p=lhc%2Fweb%2Fwiklou.git Revert class cruft in r43327 :) I think I'd rather see consistent classes for common UI elements, regardless of where they appear. For instance 'mw-rc-usertoollinks' ... We have user tool links in a hojillion places; they should all have *the same* class. If you need to distinguish those on RC from those on another page, you use a fancier selector that grabs only those in the special you want. --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 84596edb02..469b067428 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -114,10 +114,10 @@ class ChangesList { protected function insertMove( &$s, $rc ) { # Diff - $s .= '(' . $this->message['diff'] . ') ('; + $s .= '(' . $this->message['diff'] . ') ('; # Hist $s .= $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), $this->message['hist'], 'action=history' ) . - ') . . '; + ') . . '; # "[[x]] moved to [[y]]" $msg = ( $rc->mAttribs['rc_type'] == RC_MOVE ) ? '1movedto2' : '1movedto2_redir'; @@ -142,7 +142,7 @@ class ChangesList { protected function insertLog(&$s, $title, $logtype) { $logname = LogPage::logName( $logtype ); - $s .= '(' . $this->skin->makeKnownLinkObj( $title, $logname ) . ')'; + $s .= '(' . $this->skin->makeKnownLinkObj($title, $logname ) . ')'; } protected function insertDiffHist(&$s, &$rc, $unpatrolled) { @@ -163,14 +163,14 @@ class ChangesList { $rcidparam ), '', '', ' tabindex="'.$rc->counter.'"'); } - $s .= '('.$diffLink.') ('; + $s .= '('.$diffLink.') ('; # History link $s .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['hist'], wfArrayToCGI( array( 'curid' => $rc->mAttribs['rc_cur_id'], 'action' => 'history' ) ) ); - $s .= ') . . '; + $s .= ') . . '; } protected function insertArticleLink(&$s, &$rc, $unpatrolled, $watched) { @@ -184,10 +184,10 @@ class ChangesList { $articlelink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params ); $articlelink = ''.$articlelink.''; } else { - $articlelink = ' '. $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params ); + $articlelink = ' '. $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params ); } - $articlelink = $this->maybeWatchedLink( $articlelink, $watched ); - + if( $watched ) + $articlelink = "{$articlelink}"; global $wgContLang; $articlelink .= $wgContLang->getDirMark(); @@ -204,15 +204,12 @@ class ChangesList { } /** Insert links to user page, user talk page and eventually a blocking link */ - public function insertUserRelatedLinks( &$s, &$rc ) { - if ( $this->isDeleted( $rc,Revision::DELETED_USER ) ) { - $s .= ' ' . wfMsgHtml( 'rev-deleted-user' ) . ''; + public function insertUserRelatedLinks(&$s, &$rc) { + if ( $this->isDeleted($rc,Revision::DELETED_USER) ) { + $s .= ' ' . wfMsgHtml('rev-deleted-user') . ''; } else { - $s .= '' . - $this->skin->userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ) . - '' . - $this->skin->userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ) . - ''; + $s .= $this->skin->userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); + $s .= $this->skin->userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); } }