r42964 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r42963 | r42964 (on ViewVC) | r42965 >
Date:00:00, 1 November 2008
Author:mrzman
Status:ok
Tags:api 
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
Views
Toolbox