Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10230
REL_119.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 22 2014, 1:12 AM
2014-11-22 01:12:29 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
REL_119.patch
View Options
From bb99263aebd8437de3b3c1f10913fd4f39aca774 Mon Sep 17 00:00:00 2001
From: csteipp <csteipp@wikimedia.org>
Date: Fri, 15 Feb 2013 17:02:27 -0800
Subject: [PATCH] (bug 43518) API action=unblock should return the user name,
not the full user object
Change-Id: I2209faccfedf244af7056a81c0b5f0d7d5cc6706
---
includes/api/ApiUnblock.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index db94fd5..d0ad3a8 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -78,7 +78,8 @@ class ApiUnblock extends ApiBase {
}
$res['id'] = $block->getId();
- $res['user'] = $block->getType() == Block::TYPE_AUTO ? '' : $block->getTarget();
+ $target = $block->getType() == Block::TYPE_AUTO ? '' : $block->getTarget();
+ $res['user'] = $target instanceof User ? $target->getName() : $target;
$res['reason'] = $params['reason'];
$this->getResult()->addValue( null, $this->getModuleName(), $res );
}
--
1.7.5.4
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9715
Default Alt Text
REL_119.patch (1 KB)
Attached To
Mode
T45518: api.php?action=unblock returns the full user object
Attached
Detach File
Event Timeline
Log In to Comment