Ignore:
Timestamp:
Mar 1, 2011, 4:19:44 PM (14 years ago)
Author:
plg
Message:

if a pending photo belongs to an album that has been deleted, the photo becomes orphan and it does not display an error on admin_pendings, but a message "no album, this photo is orphan"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/admin_pendings.php

    r9372 r9453  
    215215    $dimensions = $websize_props;
    216216  }
     217
     218  $album = null;
     219  if (isset($category_for_image[ $row['id'] ]))
     220  {
     221    $album = $category_for_image[ $row['id'] ];
     222  }
     223  else
     224  {
     225    $album = '<em>'.l10n('No album, this photo is orphan').'</em>';
     226  }
    217227 
    218228  $template->append(
     
    229239      'FILE' => $row['file'],
    230240      'DATE_CREATION' => format_date($row['date_creation']),
    231       'ALBUM' => $category_for_image[ $row['id'] ],
     241      'ALBUM' => $album,
    232242      )
    233243    );
Note: See TracChangeset for help on using the changeset viewer.