r44539 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44538‎ | r44539 | r44540 >
Date:19:46, 13 December 2008
Author:nad
Status:deferred
Tags:
Comment:
dont try and validate row if empty oldid property
Modified paths:
  • /trunk/extensions/SimpleSecurity/SimpleSecurity.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php
@@ -21,7 +21,7 @@
2222 if (!defined('MEDIAWIKI')) die('Not an entry point.');
2323 if (version_compare($wgVersion, '1.11.0') < 0) die('Sorry, this extension requires at least MediaWiki version 1.11.0');
2424
25 -define('SIMPLESECURITY_VERSION', '4.2.14, 2008-09-12');
 25+define('SIMPLESECURITY_VERSION', '4.2.15, 2008-12-14');
2626
2727 # Global security settings
2828 $wgSecurityMagicIf = "ifusercan"; # the name for doing a permission-based conditional
@@ -273,7 +273,7 @@
274274 public function validateRow(&$row) {
275275 global $wgUser;
276276 $groups = $wgUser->getEffectiveGroups();
277 - if (in_array('sysop', $groups)) return;
 277+ if (in_array('sysop', $groups) || empty($row->old_id)) return;
278278
279279 # Obtain a title object from the old_id
280280 $dbr =& wfGetDB(DB_SLAVE);

Status & tagging log