Skip to content

Commit

Permalink
bug 867 fixed: if the caddie is under management in admin/element_set,
Browse files Browse the repository at this point in the history
dissociating any image from a category doesn't hide from the caddie.


git-svn-id: http://piwigo.org/svn/trunk@2576 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Sep 23, 2008
1 parent 52f0cce commit 93629d0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions admin/element_set_global.php
Expand Up @@ -113,7 +113,6 @@
)
;';
$dissociables = array_from_query($query, 'id');
echo '<pre>'; print_r($dissociables); echo '</pre>';

if (!empty($dissociables))
{
Expand All @@ -125,10 +124,15 @@
';
pwg_query($query);

$page['cat_elements_id'] = array_diff(
$page['cat_elements_id'],
$dissociables
);
// we remove the dissociated images if we are currently displaying the
// category to dissociate from.
if (is_numeric($_GET['cat']) and $_POST['dissociate'] == $_GET['cat'])
{
$page['cat_elements_id'] = array_diff(
$page['cat_elements_id'],
$dissociables
);
}
}

update_category($_POST['dissociate']);
Expand Down

0 comments on commit 93629d0

Please sign in to comment.