aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/batch_manager_global.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index 26e0e7660..9cfd6ab14 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -502,20 +502,16 @@ else
{
// we need to know the category in which the last photo was added
$query = '
-SELECT
- category_id,
- id_uppercat
- FROM '.IMAGES_TABLE.' AS i
- JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON image_id = i.id
- JOIN '.CATEGORIES_TABLE.' AS c ON category_id = c.id
- ORDER BY i.id DESC
+SELECT category_id
+ FROM '.IMAGE_CATEGORY_TABLE.'
+ ORDER BY image_id DESC
LIMIT 1
;';
$result = pwg_query($query);
if (pwg_db_num_rows($result) > 0)
{
$row = pwg_db_fetch_assoc($result);
- $selected_category = array($row['category_id']);
+ $selected_category[] = $row['category_id'];
}
}