Page MenuHomePhabricator

15527.diff

Authored By
bzimport
Nov 21 2014, 10:24 PM
Size
621 B
Referenced Files
None
Subscribers
None

15527.diff

Index: includes/api/ApiRollback.php
===================================================================
--- includes/api/ApiRollback.php (revision 40580)
+++ includes/api/ApiRollback.php (working copy)
@@ -55,7 +55,10 @@
if(!$titleObj->exists())
$this->dieUsageMsg(array('notanarticle'));
- $username = User::getCanonicalName($params['user']);
+ #We need to be able to revert IPs, but getCanonicalName rejects them
+ $username = User::isIP($params['user'])
+ ? $params['user']
+ : User::getCanonicalName($params['user']);
if(!$username)
$this->dieUsageMsg(array('invaliduser', $params['user']));

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4815
Default Alt Text
15527.diff (621 B)

Event Timeline