Ignore:
Timestamp:
Jun 10, 2011, 11:02:04 AM (13 years ago)
Author:
mistic100
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/include/count_images.php

    r10980 r11290  
    1010include_once(SMART_PATH.'include/functions.inc.php');
    1111
    12 $filters = array();
    13 $limit_is_set = false;
    14 foreach ($_POST['filters'] as $filter)
     12if (isset($_POST['filters']))
    1513{
    16   if (($filter = smart_check_filter($filter)) != false)
     14  $filters = array();
     15  $limit_is_set = false;
     16  foreach ($_POST['filters'] as $filter)
    1717  {
    18     array_push($filters, $filter);
     18    if (($filter = smart_check_filter($filter)) != false)
     19    {
     20      array_push($filters, $filter);
     21    }
    1922  }
     23
     24  $associated_images = smart_get_pictures($_POST['cat_id'], $filters);
     25}
     26else
     27{
     28  $associated_images = array();
    2029}
    2130
    22 $associated_images = smart_get_pictures($_POST['cat_id'], $filters);
    2331echo l10n_dec('%d photo', '%d photos', count($associated_images));
    2432
Note: See TracChangeset for help on using the changeset viewer.