r61030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61029‎ | r61030 | r61031 >
Date:22:08, 13 January 2010
Author:aaron
Status:ok
Tags:
Comment:
Added plainlinks class to rating table output
Modified paths:
  • /trunk/extensions/ReaderFeedback/specialpages/ReaderFeedback_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReaderFeedback/specialpages/ReaderFeedback_body.php
@@ -24,7 +24,8 @@
2525
2626 public function execute( $par ) {
2727 global $wgRequest, $wgUser, $wgOut;
28 - $confirm = $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
 28+ $confirm = $wgRequest->wasPosted()
 29+ && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
2930 if( $wgUser->isAllowed( 'feedback' ) ) {
3031 if( $wgUser->isBlocked( !$confirm ) ) {
3132 $wgOut->blockedPage();
@@ -96,7 +97,8 @@
9798 // Basic permission check
9899 if( $wgUser->isAllowed( 'feedback' ) ) {
99100 if( $wgUser->isBlocked() ) {
100 - return '<err#><h2>' . wfMsgHtml('blockedtitle') . '</h2>' . wfMsg('badaccess-group0');
 101+ return '<err#><h2>' . wfMsgHtml('blockedtitle') . '</h2>' .
 102+ wfMsg('badaccess-group0');
101103 }
102104 } else {
103105 return '<err#><strong>' . wfMsg('badaccess-group0') . '</<strong>';
@@ -165,7 +167,8 @@
166168 if( $form->validatedParams != self::validationKey( $form->oldid, $wgUser->getId() ) ) {
167169 return '<err#>' . wfMsg('formerror');
168170 }
169 - $graphLink = SpecialPage::getTitleFor( 'RatingHistory' )->getFullUrl( 'target='.$form->page->getPrefixedUrl() );
 171+ $rhist = SpecialPage::getTitleFor( 'RatingHistory' );
 172+ $graphLink = $rhist->getFullUrl( 'target='.$form->page->getPrefixedUrl() );
170173 $talk = $form->page->getTalkPage();
171174
172175 wfLoadExtensionMessages( 'RatingHistory' );
@@ -181,15 +184,27 @@
182185 $dbw->commit();
183186 switch( $ok ) {
184187 case self::REVIEW_OK:
185 - return '<suc#>'.wfMsgExt( 'readerfeedback-success', array('parseinline'),
186 - $form->page->getPrefixedText(), $graphLink, $talk->getFullUrl( 'action=edit&section=new' ) ) .
187 - '<h4>'.wfMsgHtml('ratinghistory-table')."</h4>\n$tallyTable";
 188+ return '<suc#>' .
 189+ "<div class='plainlinks'>" .
 190+ wfMsgExt( 'readerfeedback-success', array('parseinline'),
 191+ $form->page->getPrefixedText(), $graphLink,
 192+ $talk->getFullUrl( 'action=edit&section=new' ) ) .
 193+ '<h4>'.wfMsgHtml('ratinghistory-table')."</h4>\n$tallyTable" .
 194+ "</div>";
188195 case self::REVIEW_DUP:
189 - return '<err#>'.wfMsgExt( 'readerfeedback-voted', array('parseinline'),
190 - $form->page->getPrefixedText(), $graphLink, $talk->getFullUrl( 'action=edit&section=new' ) );
 196+ return '<err#>' .
 197+ "<div class='plainlinks'>" .
 198+ wfMsgExt( 'readerfeedback-voted', array('parseinline'),
 199+ $form->page->getPrefixedText(), $graphLink,
 200+ $talk->getFullUrl( 'action=edit&section=new' ) ) .
 201+ "</div>";
191202 default:
192 - return '<err#>'.wfMsgExt( 'readerfeedback-error', array('parseinline'),
193 - $form->page->getPrefixedText(), $graphLink, $talk->getFullUrl( 'action=edit&section=new' ) );
 203+ return '<err#>' .
 204+ "<div class='plainlinks'>" .
 205+ wfMsgExt( 'readerfeedback-error', array('parseinline'),
 206+ $form->page->getPrefixedText(), $graphLink,
 207+ $talk->getFullUrl( 'action=edit&section=new' ) ) .
 208+ "</div>";
194209 }
195210 }
196211

Status & tagging log