mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
issue #2164 updated & fixed bugs on batch manager
Added dark mode for unit mode Templatized filter block for both unit and global mode Optimized JS functions and added extensibility for unit mode Modified images.setInfo method so unit mode could save orphan images Fixed a bug where php would break if filter selection was empty in unit mode
This commit is contained in:
parent
c27d166d46
commit
12ca607727
12 changed files with 450 additions and 439 deletions
|
@ -29,6 +29,18 @@ function ws_add_image_category_relations($image_id, $categories_string, $replace
|
|||
$rank_on_category = array();
|
||||
$search_current_ranks = false;
|
||||
|
||||
if (empty($categories_string)) {
|
||||
if ($replace_mode) {
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.IMAGE_CATEGORY_TABLE.'
|
||||
WHERE image_id = '.$image_id.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
update_category([]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
$tokens = explode(';', $categories_string);
|
||||
foreach ($tokens as $token)
|
||||
{
|
||||
|
@ -57,9 +69,16 @@ function ws_add_image_category_relations($image_id, $categories_string, $replace
|
|||
|
||||
if (count($cat_ids) == 0)
|
||||
{
|
||||
return new PwgError(500,
|
||||
'[ws_add_image_category_relations] there is no category defined in "'.$categories_string.'"'
|
||||
);
|
||||
if ($replace_mode) {
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.IMAGE_CATEGORY_TABLE.'
|
||||
WHERE image_id = '.$image_id.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
update_category([]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$query = '
|
||||
|
@ -157,6 +176,7 @@ SELECT category_id, MAX(`rank`) AS max_rank
|
|||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
update_category($new_cat_ids);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue