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/branches/2.0@2921 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
031276b4c2
commit
f4f4f9724a
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue