mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 18:01:31 +02:00
new: WebService method pwg.tags.getAdminList was added. The difference with
pwg.tags.getList is that this new method doesn't take permissions into account, and so is available only for administrator connected users. git-svn-id: http://piwigo.org/svn/trunk@2584 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1192,6 +1192,33 @@ function ws_tags_getList($params, &$service)
|
||||
return array('tags' => new PwgNamedArray($tags, 'tag', array('id','url_name','url', 'counter' )) );
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the list of tags as you can see them in administration (web
|
||||
* service method).
|
||||
*
|
||||
* Only admin can run this method and permissions are not taken into
|
||||
* account.
|
||||
*/
|
||||
function ws_tags_getAdminList($params, &$service)
|
||||
{
|
||||
if (!is_admin())
|
||||
{
|
||||
return new PwgError(401, 'Access denied');
|
||||
}
|
||||
|
||||
$tags = get_all_tags();
|
||||
return array(
|
||||
'tags' => new PwgNamedArray(
|
||||
$tags,
|
||||
'tag',
|
||||
array(
|
||||
'name',
|
||||
'id',
|
||||
'url_name',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a list of images for tags (web service method)
|
||||
|
||||
Reference in New Issue
Block a user