Changeset 17980


Ignore:
Timestamp:
Sep 18, 2012, 1:43:36 PM (12 years ago)
Author:
plg
Message:

little code refactoring over r17424

bug fixed on Edit Photo page when associating with no album.

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r17765 r17980  
    16031603    JOIN '.IMAGES_TABLE.' ON image_id=id
    16041604  WHERE id IN ('.implode(',', $images).')
    1605     '.((is_array($categories) and count($categories)>0) ? 'AND category_id NOT IN ('.implode(',', $categories).')' : null).'
     1605';
     1606 
     1607  if (is_array($categories) and count($categories) > 0)
     1608  {
     1609    $query.= '
     1610    AND category_id NOT IN ('.implode(',', $categories).')
     1611';
     1612  }
     1613
     1614  $query.= '
    16061615    AND (storage_category_id IS NULL OR storage_category_id != category_id)
    16071616;';
  • trunk/admin/picture_modify.php

    r16334 r17980  
    172172
    173173  // association to albums
     174  if (!isset($_POST['associate']))
     175  {
     176    $_POST['associate'] = array();
     177  }
    174178  move_images_to_categories(array($_GET['image_id']), $_POST['associate']);
    175179
Note: See TracChangeset for help on using the changeset viewer.