aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_cats.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-07-13 22:02:49 +0000
committerplegall <plg@piwigo.org>2011-07-13 22:02:49 +0000
commit9fa420ea240e188c3e70a41660a7e5fd99ac6f06 (patch)
tree75a5e05264d9e090357e1352257e455caab2a236 /include/category_cats.inc.php
parenta4f8880e045d4dfdc9f4addf1a63ca2f53cd4744 (diff)
bug 2375 fixed: ability to deactivate representative cache on sub-albums (['representative_cache_on_subcats']) or when searching for another representative due to privacy level (['representative_cache_on_level'])
git-svn-id: http://piwigo.org/svn/branches/2.2@11738 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_cats.inc.php')
-rw-r--r--include/category_cats.inc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index 4271ad9be..db5b4c115 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -122,7 +122,7 @@ while ($row = pwg_db_fetch_assoc($result))
if (isset($image_id))
{
- if ($row['user_representative_picture_id'] != $image_id)
+ if ($conf['representative_cache_on_subcats'] and $row['user_representative_picture_id'] != $image_id)
{
$user_representative_updates_for[ $user['id'].'#'.$row['id'] ] = $image_id;
}
@@ -212,8 +212,11 @@ SELECT id, path, tn_ext, level
{
array_push($new_image_ids, $image_id);
}
-
- $user_representative_updates_for[ $user['id'].'#'.$category['id'] ] = $image_id;
+
+ if ($conf['representative_cache_on_level'])
+ {
+ $user_representative_updates_for[ $user['id'].'#'.$category['id'] ] = $image_id;
+ }
$category['representative_picture_id'] = $image_id;
}