r34590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34589‎ | r34590 | r34591 >
Date:17:06, 10 May 2008
Author:aaron
Status:old
Tags:
Comment:
Add edit notice back
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -408,7 +408,7 @@
409409 $tag = $warning = '';
410410 # Check the newest stable version
411411 $frev = $this->getStableRev();
412 - if( !is_null($frev) && $frev->getRevId() != $revid ) {
 412+ if( !is_null($frev) ) {
413413 global $wgLang, $wgUser, $wgFlaggedRevsAutoReview;
414414
415415 $time = $wgLang->date( $frev->getTimestamp(), true );
@@ -427,26 +427,28 @@
428428 wfMsgExt($msg,array('parseinline')) . "</div>";
429429 }
430430 }
431 - # Streamlined UI
432 - if( FlaggedRevs::useSimpleUI() ) {
433 - $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic';
434 - $tag = "<span class='fr-checkbox'></span>" .
435 - wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revs_since );
436 - $tag = "<div id='mw-revisiontag-edit' class='flaggedrevs_editnotice plainlinks'>$tag</div>";
437 - # Standard UI
438 - } else {
439 - $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic';
440 - $tag = "<span class='fr-checkbox'></span>" .
441 - wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revs_since );
442 - # Hide clutter
443 - if( !empty($flags) ) {
444 - $tag .= " <span id='mw-revisiontoggle' class='flaggedrevs_toggle' style='display:none;'" .
445 - " onclick='toggleRevRatings()' title='" . wfMsgHtml('revreview-toggle-title') . "' >" .
446 - wfMsg( 'revreview-toggle' ) . "</span>";
447 - $tag .= '<span id="mw-revisionratings" style="display:block;">' .
448 - wfMsg('revreview-oldrating') . FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 431+ if( $frev->getRevId() != $revid ) {
 432+ # Streamlined UI
 433+ if( FlaggedRevs::useSimpleUI() ) {
 434+ $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic';
 435+ $tag = "<span class='fr-checkbox'></span>" .
 436+ wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revs_since );
 437+ $tag = "<div id='mw-revisiontag-edit' class='flaggedrevs_editnotice plainlinks'>$tag</div>";
 438+ # Standard UI
 439+ } else {
 440+ $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic';
 441+ $tag = "<span class='fr-checkbox'></span>" .
 442+ wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revs_since );
 443+ # Hide clutter
 444+ if( !empty($flags) ) {
 445+ $tag .= " <span id='mw-revisiontoggle' class='flaggedrevs_toggle' style='display:none;'" .
 446+ " onclick='toggleRevRatings()' title='" . wfMsgHtml('revreview-toggle-title') . "' >" .
 447+ wfMsg( 'revreview-toggle' ) . "</span>";
 448+ $tag .= '<span id="mw-revisionratings" style="display:block;">' .
 449+ wfMsg('revreview-oldrating') . FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 450+ }
 451+ $tag = "<div id='mw-revisiontag-edit' class='flaggedrevs_editnotice plainlinks'>$tag</div>";
449452 }
450 - $tag = "<div id='mw-revisiontag-edit' class='flaggedrevs_editnotice plainlinks'>$tag</div>";
451453 }
452454 $wgOut->addHTML( $tag . $warning );
453455 # Show diff to stable, to make things less confusing

Status & tagging log