[#11229] Api getGalleries function return empty array
Summary Api getGalleries function return empty array
Queue Ansel
Queue Version 2.0.1
Type Bug
State Resolved
Priority 1. Low
Owners Michael Rubinsky <mrubinsk (at) horde (dot) org>
Requester maxime (at) chavagne (dot) net
Created 06/22/2012 (334 days ago)
Due
Updated 08/29/2012 (266 days ago)
Assigned
Resolved 07/21/2012 (305 days ago)
Attachments ansel-api-getGalleries-2.0.1.patch Download
Milestone
Patch Yes

History
08/29/2012 12:44:26 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 9374a66acca60810b07005f0f73d66f8fafc7319
Author: maxime@chavagne.net <maxime@chavagne.net>
Date:   Fri Jul 20 23:45:56 2012 -0400

     Bug: 11229 Fix getting gallery data via the API.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  ansel/lib/Api.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/9374a66acca60810b07005f0f73d66f8fafc7319
07/21/2012 03:53:55 AM Michael Rubinsky Comment #4
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
Committed (finally), thanks!
07/21/2012 03:49:57 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_4):

commit e11e72b40ebe594c73e6945a0e0c73610aad4f76
Author: maxime@chavagne.net <maxime@chavagne.net>
Date:   Fri Jul 20 23:45:56 2012 -0400

     Bug: 11229 Fix getting gallery data via the API.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  ansel/lib/Api.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/e11e72b40ebe594c73e6945a0e0c73610aad4f76
07/21/2012 03:46:41 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (develop):

commit 9374a66acca60810b07005f0f73d66f8fafc7319
Author: maxime@chavagne.net <maxime@chavagne.net>
Date:   Fri Jul 20 23:45:56 2012 -0400

     Bug: 11229 Fix getting gallery data via the API.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  ansel/lib/Api.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/9374a66acca60810b07005f0f73d66f8fafc7319
06/22/2012 10:39:24 PM maxime (at) chavagne (dot) net Comment #1
State ⇒ Unconfirmed
New Attachment: ansel-api-getGalleries-2.0.1.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ Api getGalleries function return empty array
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Hello.

When trying to retrieve gallery datas via the api I get an empty array :
ansel/lib/Api.php on line 759

         $galleries = array();
         foreach ($results as $gallery) {
             $galleries[$gallery->id] = array_merge(
                 $gallery->data,
                 array('crumbs' => $gallery->getGalleryCrumbData()));
         }

I think it should be  :

         $galleries = array();
         foreach ($results as $gallery) {
             $galleries[$gallery->id] = array_merge(
                 $gallery->toArray(),
                 array('crumbs' => $gallery->getGalleryCrumbData()));
         }