Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10229
wmf10.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
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
wmf10.patch
View Options
From cc417531b890f1983c446027289c2277d501102b Mon Sep 17 00:00:00 2001
From: Alex Monk <krenair@gmail.com>
Date: Sun, 30 Dec 2012 13:59:48 +0000
Subject: [PATCH] (bug 43518) API action=unblock should return the user name,
not the full user object
Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d
---
includes/api/ApiUnblock.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index bc7f6e7..55e7331 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -75,7 +75,7 @@ class ApiUnblock extends ApiBase {
$res['id'] = $block->getId();
$target = $block->getType() == Block::TYPE_AUTO ? '' : $block->getTarget();
- $res['user'] = $target;
+ $res['user'] = $target instanceof User ? $target->getName() : $target;
$res['userid'] = $target instanceof User ? $target->getId() : 0;
$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
9714
Default Alt Text
wmf10.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