Changeset 10062


Ignore:
Timestamp:
04/05/11 15:12:57 (7 years ago)
Author:
mistic100
Message:

merge r10061 from trunk : ws_getInfos is restrcited to admins (bug:1023)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/include/ws_functions.inc.php

    r10022 r10062  
    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.