MediaWiki r42964 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r42963‎ | r42964 (on ViewVC)‎ | r42965 >
Date:00:00, 1 November 2008
Author:mrzman
Status:old
Tags:
Comment:
(bug 16207) - Fix title protection in the API. $expiry is cast to an array near the start and doesn't have the correct timestamp format here anyway.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/api/ApiProtect.php
===================================================================
--- trunk/phase3/includes/api/ApiProtect.php	(revision 42963)
+++ trunk/phase3/includes/api/ApiProtect.php	(revision 42964)
@@ -109,7 +109,7 @@
 			$articleObj = new Article($titleObj);
 			$ok = $articleObj->updateRestrictions($protections, $params['reason'], $params['cascade'], $expiryarray);
 		} else
-			$ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiry);
+			$ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiryarray['create']);
 		if(!$ok)
 			// This is very weird. Maybe the article was deleted or the user was blocked/desysopped in the meantime?
 			// Just throw an unknown error in this case, as it's very likely to be a race condition

Status & tagging log

  • 17:05, 4 January 2012 Johnduhart (Talk | contribs) changed the tags for r42964 [removed: api]
  • 15:36, 12 September 2011 Meno25 (Talk | contribs) changed the status of r42964 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox