projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6c4867
)
Need to be in Normal view_mode to accurately get a count of subgalleries.
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Wed, 8 Sep 2010 23:22:36 +0000
(19:22 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Wed, 8 Sep 2010 23:22:36 +0000
(19:22 -0400)
Fixes a bug that would cause subgalleries to become inaccessable in certain
conditions
ansel/lib/Gallery.php
patch
|
blob
|
history
diff --git
a/ansel/lib/Gallery.php
b/ansel/lib/Gallery.php
index
dc40517
..
99225fb
100644
(file)
--- a/
ansel/lib/Gallery.php
+++ b/
ansel/lib/Gallery.php
@@
-824,7
+824,14
@@
class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
$old = $this->getParent();
$reset_has_subgalleries = false;
if (!is_null($old)) {
+ $vMode = $old->get('view_mode');
+ if ($vMode != 'Normal') {
+ $old->set('view_mode', 'Normal');
+ }
$cnt = $old->countGalleryChildren(Horde_Perms::READ, true);
+ if ($vMode != 'Normal') {
+ $old->set('view_mode', $vMode);
+ }
if ($cnt == 1) {
/* Count is 1, and we are about to delete it */
$reset_has_subgalleries = true;