r72048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72047‎ | r72048 | r72049 >
Date:20:51, 31 August 2010
Author:aaron
Status:ok
Tags:
Comment:
* $parserOptions always needed (and given) for parseStableText now
* Don't reserve space where unaccept button is
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -515,7 +515,7 @@
516516 * @param int $id Source revision Id
517517 * @return ParserOutput
518518 */
519 - public static function parseStableText( Title $title, $text, $id, $parserOptions = null ) {
 519+ public static function parseStableText( Title $title, $text, $id, $parserOptions ) {
520520 global $wgParser;
521521 # Notify Parser if includes should be stabilized
522522 $resetManager = false;
@@ -532,8 +532,6 @@
533533 }
534534 }
535535 # Parse the new body, wikitext -> html
536 - if ( is_null( $parserOptions ) )
537 - $parserOptions = self::makeParserOptions(); // default options
538536 $parserOut = $wgParser->parse( $text, $title, $parserOptions, true, true, $id );
539537 # Stable parse done!
540538 if ( $resetManager ) {
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -891,6 +891,9 @@
892892 wfMsg( 'revreview-ak-review' ) . ']'
893893 ) + ( ( $disabled || ( $frev && !$rereview ) ) ? $disAttrib : array() )
894894 );
 895+ # UNDO BUTTON: revert from a pending revision to the stable
 896+ # @TODO...
 897+
895898 # UNACCEPT BUTTON: revoke a revisions acceptance
896899 # Hide if revision is not flagged
897900 $s .= ' ';
@@ -899,7 +902,7 @@
900903 'name' => 'wpUnapprove',
901904 'id' => 'mw-fr-submitunreview',
902905 'title' => wfMsg( 'revreview-tt-unflag' ),
903 - 'style' => $frev ? '' : 'visibility: hidden;'
 906+ 'style' => $frev ? '' : 'display:none;'
904907 ) + ( $disabled ? $disAttrib : array() )
905908 );
906909 } else {
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -496,9 +496,9 @@
497497 # Check if this is a redirect...
498498 $redirHtml = $this->getRedirectHtml( $text );
499499 if ( $redirHtml == '' ) {
 500+ $parserOptions = FlaggedRevs::makeParserOptions();
500501 $parserOut = FlaggedRevs::parseStableText(
501 - $this->article->getTitle(), $text, $frev->getRevId(),
502 - FlaggedRevs::makeParserOptions() );
 502+ $this->article->getTitle(), $text, $frev->getRevId(), $parserOptions );
503503 }
504504 # Construct some tagging for non-printable outputs. Note that the pending
505505 # notice has all this info already, so don't do this if we added that already.

Status & tagging log