mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
merge r2921 from branch 2.0 to trunk
bug 907 fixed: avoid PHP warning when pwg.images.add adds a photo in a category that either contains no "ranked" image or when category is empty. git-svn-id: http://piwigo.org/svn/trunk@2922 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1613,6 +1613,11 @@ SELECT
|
||||
|
||||
foreach ($cat_ids as $cat_id)
|
||||
{
|
||||
if (!isset($current_rank_of[$cat_id]))
|
||||
{
|
||||
$current_rank_of[$cat_id] = 0;
|
||||
}
|
||||
|
||||
if ('auto' == $rank_on_category[$cat_id])
|
||||
{
|
||||
$rank_on_category[$cat_id] = $current_rank_of[$cat_id] + 1;
|
||||
|
||||
Reference in New Issue
Block a user