r49531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49530‎ | r49531 | r49532 >
Date:21:28, 15 April 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
* Fixed stable config expiration
* Fixed silly JS bug with 'other time'
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1002,7 +1002,8 @@
10031003 if( !$expiry || $expiry < $now ) {
10041004 $row = null;
10051005 self::purgeExpiredConfigurations();
1006 - $title->invalidateCache();
 1006+ self::titleLinksUpdate( $title ); // re-find stable version
 1007+ $title->invalidateCache(); // purge squid/memcached
10071008 }
10081009 }
10091010 if( !$row ) {
Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php
@@ -118,9 +118,7 @@
119119 if( val == 'existing' )
120120 document.getElementById('mwStabilize-expiry').value = ".
121121 Xml::encodeJsVar($this->oldExpiry).";
122 - else if( val == 'othertime' )
123 - document.getElementById('mwStabilize-expiry').value = '';
124 - else
 122+ else if( val != 'othertime' )
125123 document.getElementById('mwStabilize-expiry').value = val;
126124 }
127125 </script>"

Comments

#Comment by Tim Starling (talk | contribs)   15:17, 25 May 2009

Use braces in your "if" blocks, even when you are writing embedded JavaScript.

Status & tagging log