Ignore:
Timestamp:
Jun 12, 2011, 5:56:09 PM (13 years ago)
Author:
mistic100
Message:

clean code, use TokenInput

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/init_cat_list.php

    r11290 r11333  
    1313 
    1414  /* get categories with smart filters */
    15   $query = "SELECT DISTINCT id, name
    16     FROM ".CATEGORIES_TABLE." AS c
    17     INNER JOIN ".CATEGORY_FILTERS_TABLE." AS cf
    18     ON c.id = cf.category_id";
     15  $query = '
     16SELECT DISTINCT id, name
     17  FROM '.CATEGORIES_TABLE.' AS c
     18    INNER JOIN '.CATEGORY_FILTERS_TABLE.' AS cf
     19      ON c.id = cf.category_id';
    1920  if (!isset($_GET['parent_id']))
    2021  {
     
    2425  else
    2526  {
    26     $query.= '
    27     WHERE uppercats LIKE \'%'.$_GET['parent_id'].'%\'';
     27    $query .= '
     28  WHERE uppercats LIKE \'%'.$_GET['parent_id'].'%\'';
    2829  }
     30  $query .= '
     31;';
    2932 
    3033  $result = pwg_query($query);
     
    4548      {
    4649        $associated_images = smart_make_associations($cat);
    47         array_push($page['infos'], l10n_args(get_l10n_args(
    48           '%d photos associated to album «%s»',
    49           array(count($associated_images), $name)
    50         )));
     50        array_push(
     51          $page['infos'],
     52          l10n_args(get_l10n_args(
     53            '%d photos associated to album «%s»',
     54            array(count($associated_images), $name)
     55            ))
     56          );
    5157      }
    5258    }
     
    5561    {
    5662      $associated_images = smart_make_associations($_GET['smart_generate']);   
    57       array_push($page['infos'], l10n_args(get_l10n_args(
    58         '%d photos associated to album «%s»',
    59         array(count($associated_images), $smart_cats[$_GET['smart_generate']])
    60       )));
     63      array_push(
     64        $page['infos'],
     65        l10n_args(get_l10n_args(
     66          '%d photos associated to album «%s»',
     67          array(count($associated_images), $smart_cats[$_GET['smart_generate']])
     68          ))
     69        );
    6170    }
    6271   
Note: See TracChangeset for help on using the changeset viewer.