bug 867 fixed: if the caddie is under management in admin/element_set,
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
This commit is contained in:
parent
52f0cce24f
commit
93629d04a7
1 changed files with 9 additions and 5 deletions
|
@ -113,7 +113,6 @@ SELECT id
|
|||
)
|
||||
;';
|
||||
$dissociables = array_from_query($query, 'id');
|
||||
echo '<pre>'; print_r($dissociables); echo '</pre>';
|
||||
|
||||
if (!empty($dissociables))
|
||||
{
|
||||
|
@ -125,10 +124,15 @@ DELETE
|
|||
';
|
||||
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']);
|
||||
|
|
Loading…
Add table
Reference in a new issue