mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
bug 3163: pwg.tags.getImages mysql error if order parameter is provided
git-svn-id: http://piwigo.org/svn/trunk@30359 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -110,11 +110,16 @@ function ws_tags_getImages($params, &$service)
|
||||
$where_clauses = implode(' AND ', $where_clauses);
|
||||
}
|
||||
|
||||
$order_by = ws_std_image_sql_order($params, 'i.');
|
||||
if (!empty($order_by))
|
||||
{
|
||||
$order_by = 'ORDER BY '.$order_by;
|
||||
}
|
||||
$image_ids = get_image_ids_for_tags(
|
||||
$tag_ids,
|
||||
$params['tag_mode_and'] ? 'AND' : 'OR',
|
||||
$where_clauses,
|
||||
ws_std_image_sql_order($params)
|
||||
$order_by
|
||||
);
|
||||
|
||||
$count_set = count($image_ids);
|
||||
@@ -136,7 +141,6 @@ SELECT image_id, GROUP_CONCAT(tag_id) AS tag_ids
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$row['image_id'] = (int)$row['image_id'];
|
||||
$image_ids[] = $row['image_id'];
|
||||
$image_tag_map[ $row['image_id'] ] = explode(',', $row['tag_ids']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user