Changeset 8404
- Timestamp:
- Dec 31, 2010, 1:34:01 PM (13 years ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager.php
r8403 r8404 55 55 if (isset($_POST['filter_prefilter_use'])) 56 56 { 57 $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album' );57 $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album', 'duplicates'); 58 58 if (in_array($_POST['filter_prefilter'], $prefilters)) 59 59 { … … 174 174 $filter_sets, 175 175 array_diff($all_elements, $linked_to_virtual) 176 ); 177 } 178 179 if ('duplicates' == $_SESSION['bulk_manager_filter']['prefilter']) 180 { 181 // we could use the group_concat MySQL function to retrieve the list of 182 // image_ids but it would not be compatible with PostgreSQL, so let's 183 // perform 2 queries instead. We hope there are not too many duplicates. 184 185 $query = ' 186 SELECT file 187 FROM '.IMAGES_TABLE.' 188 GROUP BY file 189 HAVING COUNT(*) > 1 190 ;'; 191 $duplicate_files = array_from_query($query, 'file'); 192 193 $query = ' 194 SELECT id 195 FROM '.IMAGES_TABLE.' 196 WHERE file IN (\''.implode("','", $duplicate_files).'\') 197 ;'; 198 199 array_push( 200 $filter_sets, 201 array_from_query($query, 'id') 176 202 ); 177 203 } -
trunk/admin/batch_manager_global.php
r8403 r8404 528 528 } 529 529 530 if (isset($_SESSION['bulk_manager_filter']['prefilter']) 531 and 'duplicates' == $_SESSION['bulk_manager_filter']['prefilter']) 532 { 533 $conf['order_by'] = ' ORDER BY file, id'; 534 } 535 536 530 537 $query = ' 531 538 SELECT id,path,tn_ext,file,filesize,level,name -
trunk/admin/maintenance.php
r8403 r8404 151 151 $advanced_features = array(); 152 152 153 array_push(154 $advanced_features,155 array(156 'CAPTION' => l10n('Files with same name in more than one physical album'),157 'URL' => get_root_url().'admin.php?page=element_set&cat=duplicates'158 )159 );160 161 153 //$advanced_features is array of array composed of CAPTION & URL 162 154 $advanced_features = trigger_event( -
trunk/admin/themes/default/template/batch_manager_global.tpl
r8403 r8404 357 357 <option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>with no virtual album</option> 358 358 {/if} 359 <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>duplicates</option> 359 360 <!-- <option value="with no album">with no album</option> --> 360 <!-- <option value="with no virtual album">with no virtual album</option> -->361 361 <!-- <option value="with no tag">with no tag</option> --> 362 362 </select>
Note: See TracChangeset
for help on using the changeset viewer.