Ignore:
Timestamp:
Sep 24, 2008, 11:30:33 PM (16 years ago)
Author:
plg
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r2583 r2584  
    11931193}
    11941194
     1195/**
     1196 * returns the list of tags as you can see them in administration (web
     1197 * service method).
     1198 *
     1199 * Only admin can run this method and permissions are not taken into
     1200 * account.
     1201 */
     1202function ws_tags_getAdminList($params, &$service)
     1203{
     1204  if (!is_admin())
     1205  {
     1206    return new PwgError(401, 'Access denied');
     1207  }
     1208 
     1209  $tags = get_all_tags();
     1210  return array(
     1211    'tags' => new PwgNamedArray(
     1212      $tags,
     1213      'tag',
     1214      array(
     1215        'name',
     1216        'id',
     1217        'url_name',
     1218        )
     1219      )
     1220    );
     1221}
    11951222
    11961223/**
Note: See TracChangeset for help on using the changeset viewer.