Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001023 [Piwigo] web API feature have not tried 2009.06.07 23:53 2011.04.17 00:12
Reporter mistic100 View Status public  
Assigned To mistic100
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 2.2.1 Product Version 2.2.0
  Target Version 2.2.1 Product Build
Summary 0001023: new API method pwg.getInfos for admins with overall statistics
Description Should add a data with overall gallery images count in the result array
(why not activated or not by a new parameter)
Steps To Reproduce
Additional Information
Tags No tags attached.
browser any
Database engine and version
PHP version
Web server Apache 1.3.x
Attached Files

- Relationships

-  Notes
(0004935)
svn (reporter)
2011.04.03 17:59

[Subversion] r10022 by mistic100 on branch 2.2

-----[Subversion commit log]----------------------------------------------------
merge r10017 from trunk to 2.2 (bug:1023)
(0004940)
plg (manager)
2011.04.05 14:01

in ws_getInfos(...), replace:

if ($conf['show_version'] or is_admin())

by

if (is_admin())
(0004942)
mistic100 (developer)
2011.04.05 14:17

why ?
it's the same condition than in ws_getVersion...
(0004943)
plg (manager)
2011.04.05 14:29

But you show *much* more than in pwg.getVersion, you show things that are only available in the administration panel.
(0004944)
mistic100 (developer)
2011.04.05 14:35
edited on: 2011.04.05 14:41

ho... you mean all the function must be restricted to an admin usage ?
If I'm right there are much than one line to change
and unless the version, I don't know if it's critical information :s

(0004945)
plg (manager)
2011.04.05 14:41

Oh sorry, I didn't read your code with enough attention. It's just the $infos['version'] that is added if $conf['show_version'] or is_admin().

With its current coding, this function should be only for admins :

if (!is_admin())
{
  return new PwgError(403, 'Forbidden');
}

Or you will have to change the list of informations depending on user status and manage permissions : the number of physical albums is not interesting for non admin users, you must not return the total number of photos for a non admin user (you have to filter based on permissions). So to make things simpler, I would simply require admin rights for this method.

What is the purpose of this method? (who is the audience?)
(0004946)
mistic100 (developer)
2011.04.05 15:00

ok I understand the deal.

I will try to make differents results : one complete serie for admin and one limited serie for guests, user specific datas is too complicated for a very limited usage.

Bassically I just want to know the number a pictures on the gallery... but It was months ago and I admit I don't remember why...
(0004947)
plg (manager)
2011.04.05 15:02

If you don't know why it's useful, I advise you to wait for the moment you remember why it's useful :-) no need add useless methods in the API.
(0004948)
svn (reporter)
2011.04.05 15:13

[Subversion] r10062 by mistic100 on branch 2.2

-----[Subversion commit log]----------------------------------------------------
merge r10061 from trunk : ws_getInfos is restrcited to admins (bug:1023)

- Issue History
Date Modified Username Field Change
2009.06.07 23:53 mistic100 New Issue
2009.06.07 23:53 mistic100 browser => any
2009.06.07 23:53 mistic100 Web server => Apache 1.3.x
2011.04.03 17:59 svn Checkin
2011.04.03 17:59 svn Note Added: 0004935
2011.04.03 18:00 mistic100 Status new => resolved
2011.04.03 18:00 mistic100 Fixed in Version => 2.2.0
2011.04.03 18:00 mistic100 Resolution open => fixed
2011.04.03 18:00 mistic100 Assigned To => mistic100
2011.04.05 14:01 plg Note Added: 0004940
2011.04.05 14:17 mistic100 Note Added: 0004942
2011.04.05 14:17 mistic100 Status resolved => feedback
2011.04.05 14:17 mistic100 Resolution fixed => reopened
2011.04.05 14:29 plg Note Added: 0004943
2011.04.05 14:35 mistic100 Note Added: 0004944
2011.04.05 14:41 mistic100 Note Edited: 0004944
2011.04.05 14:41 mistic100 Note Edited: 0004944
2011.04.05 14:41 plg Note Added: 0004945
2011.04.05 15:00 mistic100 Note Added: 0004946
2011.04.05 15:02 plg Note Added: 0004947
2011.04.05 15:13 svn Checkin
2011.04.05 15:13 svn Note Added: 0004948
2011.04.05 15:13 mistic100 Status feedback => resolved
2011.04.05 15:13 mistic100 Resolution reopened => fixed
2011.04.16 20:03 plg Status resolved => closed
2011.04.16 20:03 plg version => 2.2.0
2011.04.16 20:03 plg Fixed in Version 2.2.0 => 2.2.1
2011.04.16 20:03 plg Target Version => 2.2.1
2011.04.17 00:12 plg Summary Add images count in Webservices results => new API method pwg.getInfos for admins with overall statistics


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker