Changeset 8403
- Timestamp:
- Dec 31, 2010, 12:58:14 PM (14 years ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager.php
r8399 r8403 55 55 if (isset($_POST['filter_prefilter_use'])) 56 56 { 57 $prefilters = array('caddie', 'last import', 'with no album', 'with no tag' );57 $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album'); 58 58 if (in_array($_POST['filter_prefilter'], $prefilters)) 59 59 { … … 144 144 ); 145 145 } 146 } 147 148 if ('with no virtual album' == $_SESSION['bulk_manager_filter']['prefilter']) 149 { 150 // we are searching elements not linked to any virtual category 151 $query = ' 152 SELECT id 153 FROM '.IMAGES_TABLE.' 154 ;'; 155 $all_elements = array_from_query($query, 'id'); 156 157 $query = ' 158 SELECT id 159 FROM '.CATEGORIES_TABLE.' 160 WHERE dir IS NULL 161 ;'; 162 $virtual_categories = array_from_query($query, 'id'); 163 if (!empty($virtual_categories)) 164 { 165 $query = ' 166 SELECT DISTINCT(image_id) 167 FROM '.IMAGE_CATEGORY_TABLE.' 168 WHERE category_id IN ('.implode(',', $virtual_categories).') 169 ;'; 170 $linked_to_virtual = array_from_query($query, 'image_id'); 171 } 172 173 array_push( 174 $filter_sets, 175 array_diff($all_elements, $linked_to_virtual) 176 ); 146 177 } 147 178 } … … 195 226 // $page['cat_elements_id'] = array(); 196 227 197 // else if ('not_linked' == $_GET['cat'])198 // {199 // $page['title'] = l10n('Not linked elements');200 // $template->assign(array('U_ACTIVE_MENU' => 5 ));201 //202 // // we are searching elements not linked to any virtual category203 // $query = '204 // SELECT id205 // FROM '.IMAGES_TABLE.'206 // ;';207 // $all_elements = array_from_query($query, 'id');208 //209 // $linked_to_virtual = array();210 //211 // $query = '212 // SELECT id213 // FROM '.CATEGORIES_TABLE.'214 // WHERE dir IS NULL215 // ;';216 // $virtual_categories = array_from_query($query, 'id');217 // if (!empty($virtual_categories))218 // {219 // $query = '220 // SELECT DISTINCT(image_id)221 // FROM '.IMAGE_CATEGORY_TABLE.'222 // WHERE category_id IN ('.implode(',', $virtual_categories).')223 // ;';224 // $linked_to_virtual = array_from_query($query, 'image_id');225 // }226 //227 // $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual);228 // }229 228 // else if ('duplicates' == $_GET['cat']) 230 229 // { -
trunk/admin/batch_manager_global.php
r8398 r8403 121 121 array($_POST['associate']) 122 122 ); 123 124 $_SESSION['page_infos'] = array( 125 l10n('Information data registered in database') 126 ); 127 128 // let's refresh the page because we the current set might be modified 129 $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; 130 redirect($redirect_url); 123 131 } 124 132 … … 150 158 pwg_query($query); 151 159 152 // we remove the dissociated images if we are currently displaying the 153 // category to dissociate from. 154 // 155 // TODO we can display the photo of a given album without the $_GET['cat'] 156 if (is_numeric($_GET['cat']) and $_POST['dissociate'] == $_GET['cat']) 157 { 158 $page['cat_elements_id'] = array_diff( 159 $page['cat_elements_id'], 160 $dissociables 161 ); 162 } 163 } 164 165 update_category($_POST['dissociate']); 160 update_category($_POST['dissociate']); 161 162 $_SESSION['page_infos'] = array( 163 l10n('Information data registered in database') 164 ); 165 166 // let's refresh the page because we the current set might be modified 167 $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; 168 redirect($redirect_url); 169 } 166 170 } 167 171 -
trunk/admin/maintenance.php
r8126 r8403 154 154 $advanced_features, 155 155 array( 156 'CAPTION' => l10n('Not linked elements'),157 'URL' => get_root_url().'admin.php?page=element_set&cat=not_linked'158 )159 );160 161 array_push(162 $advanced_features,163 array(164 156 'CAPTION' => l10n('Files with same name in more than one physical album'), 165 157 'URL' => get_root_url().'admin.php?page=element_set&cat=duplicates' -
trunk/admin/themes/default/template/batch_manager_global.tpl
r8398 r8403 354 354 <option value="caddie" {if $filter.prefilter eq 'caddie'}selected="selected"{/if}>caddie</option> 355 355 <option value="last import" {if $filter.prefilter eq 'last import'}selected="selected"{/if}>last import</option> 356 {if $ENABLE_SYNCHRONIZATION} 357 <option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>with no virtual album</option> 358 {/if} 356 359 <!-- <option value="with no album">with no album</option> --> 357 360 <!-- <option value="with no virtual album">with no virtual album</option> -->
Note: See TracChangeset
for help on using the changeset viewer.