Changeset 26557 for extensions/community/admin_pendings.php
- Timestamp:
- Jan 9, 2014, 8:44:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/admin_pendings.php
r23744 r26557 121 121 // | pending photos list | 122 122 // +-----------------------------------------------------------------------+ 123 124 // just in case (because we had a bug in Community plugin up to version 125 // 2.5.c) let's remove rows in community_pendings table if related photos 126 // has been deleted 127 $query = ' 128 SELECT 129 image_id 130 FROM '.COMMUNITY_PENDINGS_TABLE.' 131 LEFT JOIN '.IMAGES_TABLE.' ON id = image_id 132 WHERE id IS NULL 133 ;'; 134 $to_delete = array_from_query($query, 'image_id'); 135 136 if (count($to_delete) > 0) 137 { 138 $query = ' 139 DELETE 140 FROM '.COMMUNITY_PENDINGS_TABLE.' 141 WHERE image_id IN ('.implode(',', $to_delete).') 142 ;'; 143 pwg_query($query); 144 } 123 145 124 146 $list = array();
Note: See TracChangeset
for help on using the changeset viewer.