6.0.0-beta1
8/7/25

[#11228] Api listGalleries return galleries in bad order (compared to ansel h3)
Summary Api listGalleries return galleries in bad order (compared to ansel h3)
Queue Ansel
Queue Version 2.0.1
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester maxime (at) chavagne (dot) net
Created 06/22/2012 (4794 days ago)
Due
Updated 06/22/2012 (4794 days ago)
Assigned
Resolved 06/22/2012 (4794 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
06/22/2012 09:38:13 PM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Not A Bug
Reply to this comment
This was done on purpose. The data structure returned from api calls 
was standardized on returning indexed arrays.
06/22/2012 09:26:10 PM maxime (at) chavagne (dot) net Comment #1
Priority ⇒ 1. Low
New Attachment: ansel-api-listgalleries-2.0.1.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ Api listGalleries return galleries in bad order (compared to ansel h3)
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
ansel/lib/Api.php on line 722/723

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

The old api was more like this :
         foreach ($galleries as $gallery) {
             $return[$gallery->id] = array_merge(
                 $gallery->toArray(),
                 array('crumbs' => $gallery->getGalleryCrumbData()));
         }

Saved Queries