Changeset 10061


Ignore:
Timestamp:
Apr 5, 2011, 3:10:52 PM (10 years ago)
Author:
mistic100
Message:

ws_getInfos is restricted to admins

File:
1 edited

Legend:

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

    r10017 r10061  
    187187function ws_getInfos($params, &$service)
    188188{
    189   global $conf;
    190  
    191   if ($conf['show_version'] or is_admin())
    192   {
    193     $infos['version'] = PHPWG_VERSION;
    194   }
     189  if (!is_admin())
     190  {
     191    return new PwgError(403, 'Forbidden');
     192  }
     193
     194  $infos['version'] = PHPWG_VERSION;
    195195       
    196196  $query = 'SELECT COUNT(*) FROM '.IMAGES_TABLE.';';
     
    232232
    233233  // unvalidated comments
    234   if ($infos['nb_comments'] > 0 and is_admin())
     234  if ($infos['nb_comments'] > 0)
    235235  {
    236236    $query = 'SELECT COUNT(*) FROM '.COMMENTS_TABLE.' WHERE validated=\'false\';';
Note: See TracChangeset for help on using the changeset viewer.