projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bea4d11
)
return the gallery's parent id too
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Mon, 3 Jan 2011 17:18:42 +0000
(12:18 -0500)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Mon, 3 Jan 2011 18:25:05 +0000
(13:25 -0500)
ansel/lib/Gallery.php
patch
|
blob
|
history
diff --git
a/ansel/lib/Gallery.php
b/ansel/lib/Gallery.php
index
872696d
..
37ce737
100644
(file)
--- a/
ansel/lib/Gallery.php
+++ b/
ansel/lib/Gallery.php
@@
-999,6
+999,15
@@
class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical implements Seria
$json->d = $this->get('desc');
$json->ki = Ansel::getImageUrl($this->getKeyImage(), 'mini', false, Ansel::getStyleDefinition('ansel_default'))->toString();
+ // Parent
+ $parents = $this->get('parents');
+ if (empty($parents)) {
+ $json->p = null;
+ } else {
+ $parents = explode(':', $parents);
+ $json->p = array_pop($parents);
+ }
+
if ($full) {
$json->sg = array();
if ($this->hasSubGalleries()) {