Changeset 2324 for trunk/admin/cat_modify.php
- Timestamp:
- May 1, 2008, 3:12:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r2299 r2324 204 204 $category['is_virtual'] = empty($category['dir']) ? true : false; 205 205 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; 206 212 207 213 // Navigation path … … 265 271 266 272 // manage category elements link 267 if ($category[' nb_images'] > 0)273 if ($category['has_images']) 268 274 { 269 275 $template->assign( 'U_MANAGE_ELEMENTS', … … 345 351 346 352 // representant management 347 if ($category[' nb_images'] > 0353 if ($category['has_images'] 348 354 or !empty($category['representative_picture_id'])) 349 355 { … … 372 378 373 379 // 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; 375 381 376 382 // can the admin delete the current representant ? 377 383 if ( 378 ($category[' nb_images'] > 0384 ($category['has_images'] 379 385 and $conf['allow_random_representative']) 380 386 or 381 ( $category['nb_images'] == 0387 (!$category['has_images'] 382 388 and !empty($category['representative_picture_id']))) 383 389 {
Note: See TracChangeset
for help on using the changeset viewer.