diff options
author | mistic100 <mistic@piwigo.org> | 2011-04-05 13:12:57 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2011-04-05 13:12:57 +0000 |
commit | 5dfc3b350a85a77664dc6e6bf009676b26a899ec (patch) | |
tree | 93196f8c61137730bdede9c205f3173831e3ea35 /include/ws_functions.inc.php | |
parent | 50e512954e372813249afe648c6c2e9aea56ffef (diff) |
merge r10061 from trunk : ws_getInfos is restrcited to admins (bug:1023)
git-svn-id: http://piwigo.org/svn/branches/2.2@10062 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/ws_functions.inc.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index b69da5826..a0982becb 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -186,12 +186,12 @@ function ws_getVersion($params, &$service) */ function ws_getInfos($params, &$service) { - global $conf; - - if ($conf['show_version'] or is_admin()) + if (!is_admin()) { - $infos['version'] = PHPWG_VERSION; + return new PwgError(403, 'Forbidden'); } + + $infos['version'] = PHPWG_VERSION; $query = 'SELECT COUNT(*) FROM '.IMAGES_TABLE.';'; list($infos['nb_elements']) = pwg_db_fetch_row(pwg_query($query)); @@ -231,7 +231,7 @@ function ws_getInfos($params, &$service) } // unvalidated comments - if ($infos['nb_comments'] > 0 and is_admin()) + if ($infos['nb_comments'] > 0) { $query = 'SELECT COUNT(*) FROM '.COMMENTS_TABLE.' WHERE validated=\'false\';'; list($infos['nb_unvalidated_comments']) = pwg_db_fetch_row(pwg_query($query)); |