mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Merge BSF 1956:1958 into branch-1_7
Small improvement: Random selection of pictures on notifications. Caddie: Fix issue when the are not pictures attached to disassociated categories git-svn-id: http://piwigo.org/svn/branches/branch-1_7@1959 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -114,6 +114,8 @@ SELECT id
|
||||
;';
|
||||
$dissociables = array_from_query($query, 'id');
|
||||
|
||||
if (!empty($dissociables))
|
||||
{
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.IMAGE_CATEGORY_TABLE.'
|
||||
@@ -121,6 +123,7 @@ DELETE
|
||||
AND image_id IN ('.implode(',', $dissociables).')
|
||||
';
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
update_category($_POST['dissociate']);
|
||||
}
|
||||
|
||||
@@ -478,6 +478,7 @@ SELECT DISTINCT id, path, name, tn_ext, file
|
||||
'.$where_sql.'
|
||||
AND date_available="'.$dates[$i]['date_available'].'"
|
||||
AND tn_ext IS NOT NULL
|
||||
ORDER BY RAND(NOW())
|
||||
LIMIT 0,'.$max_elements.'
|
||||
;';
|
||||
$dates[$i]['elements'] = array();
|
||||
|
||||
Reference in New Issue
Block a user