Ignore:
Timestamp:
May 1, 2008, 3:12:34 AM (16 years ago)
Author:
rvelices
Message:
  • move #categories.date_last and nb_images to #user_cache_categories
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r2299 r2324  
    204204$category['is_virtual'] = empty($category['dir']) ? true : false;
    205205
     206$query = 'SELECT DISTINCT category_id
     207  FROM '.IMAGE_CATEGORY_TABLE.'
     208  WHERE category_id = '.$_GET['cat_id'].'
     209  LIMIT 1';
     210$result = pwg_query($query);
     211$category['has_images'] = mysql_num_rows($result)>0 ? true : false;
    206212
    207213// Navigation path
     
    265271
    266272// manage category elements link
    267 if ($category['nb_images'] > 0)
     273if ($category['has_images'])
    268274{
    269275  $template->assign( 'U_MANAGE_ELEMENTS',
     
    345351
    346352// representant management
    347 if ($category['nb_images'] > 0
     353if ($category['has_images']
    348354    or !empty($category['representative_picture_id']))
    349355{
     
    372378
    373379  // can the admin choose to set a new random representant ?
    374   $tpl_representant['ALLOW_SET_RANDOM'] = ($category['nb_images']>0) ? true : false;
     380  $tpl_representant['ALLOW_SET_RANDOM'] = ($category['has_images']) ? true : false;
    375381
    376382  // can the admin delete the current representant ?
    377383  if (
    378     ($category['nb_images'] > 0
     384    ($category['has_images']
    379385     and $conf['allow_random_representative'])
    380386    or
    381     ($category['nb_images'] == 0
     387    (!$category['has_images']
    382388     and !empty($category['representative_picture_id'])))
    383389  {
Note: See TracChangeset for help on using the changeset viewer.