r38757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38756‎ | r38757 | r38758 >
Date:09:01, 7 August 2008
Author:aaron
Status:old
Tags:
Comment:
Tweak diff use on edit
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -101,13 +101,22 @@
102102 }
103103
104104 /**
105 - * Is this user shown the stable version by default for this page?
 105+ * Is the stable version shown by default for this page?
106106 */
107107 public function showStableByDefault() {
108108 # Get page configuration
109109 $config = $this->getVisibilitySettings();
110110 return (bool)$config['override'];
111111 }
 112+
 113+ /**
 114+ * Is this user shown the stable version by default for this page?
 115+ */
 116+ public function showStableByDefaultUser() {
 117+ # Get page configuration
 118+ $config = $this->getVisibilitySettings();
 119+ return ( $config['override'] && !FlaggedRevs::ignoreDefaultVersion() );
 120+ }
112121
113122 /**
114123 * Is this page less open than the site defaults?
@@ -572,6 +581,9 @@
573582 $wgOut->addHTML( $tag . $warning );
574583
575584 # Show diff to stable, to make things less confusing.
 585+ if( !$this->showStableByDefaultUser() && !$wgUser->isAllowed('review') ) {
 586+ return true;
 587+ }
576588 if( $frev->getRevId() == $revId )
577589 return true; // nothing to show here
578590 # Don't show for old revisions, diff, preview, or undo.

Status & tagging log