Changeset 8827 for extensions/pwg_images_addSimple
- Timestamp:
- Jan 21, 2011, 2:47:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pwg_images_addSimple/main.inc.php
r7780 r8827 365 365 $image_ids_linked = array_from_query($query, 'image_id'); 366 366 367 $query = ' 367 if (count($image_ids_linked) > 0) 368 { 369 $query = ' 368 370 SELECT 369 371 DISTINCT(image_id) … … 372 374 AND category_id NOT IN ('.implode(',', $all_category_ids).') 373 375 ;'; 374 $image_ids_not_orphans = array_from_query($query, 'image_id');375 376 $image_ids_orphans = array_diff($image_ids_linked, $image_ids_not_orphans);377 378 // print_r($image_ids_not_orphans); exit();376 $image_ids_not_orphans = array_from_query($query, 'image_id'); 377 $image_ids_orphans = array_diff($image_ids_linked, $image_ids_not_orphans); 378 379 // print_r($image_ids_not_orphans); exit(); 380 } 379 381 380 382 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); … … 382 384 update_global_rank(); 383 385 384 delete_elements($image_ids_orphans, true); 386 if (isset($image_ids_orphans)) 387 { 388 delete_elements($image_ids_orphans, true); 389 } 385 390 } 386 391
Note: See TracChangeset
for help on using the changeset viewer.