Changeset 2579
- Timestamp:
- Sep 24, 2008, 3:27:49 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r2574 r2579 88 88 'U_RATING'=> $link_start.'rating', 89 89 'U_CADDIE'=> $link_start.'element_set&cat=caddie', 90 'U_RECENT_SET'=> $link_start.'element_set&cat=recent', 90 91 'U_TAGS'=> $link_start.'tags', 91 92 'U_THUMBNAILS'=> $link_start.'thumbnail', -
trunk/admin/element_set.php
r2299 r2579 25 25 * Management of elements set. Elements can belong to a category or to the 26 26 * user caddie. 27 * 27 * 28 28 */ 29 29 30 30 if (!defined('PHPWG_ROOT_PATH')) 31 31 { … … 103 103 // To element_set_(global|unit).php, we must provide the elements id of the 104 104 // managed category in $page['cat_elements_id'] array. 105 105 $page['cat_elements_id'] = array(); 106 106 if (is_numeric($_GET['cat'])) 107 107 { … … 112 112 false 113 113 ); 114 114 115 115 $query = ' 116 116 SELECT image_id … … 123 123 { 124 124 $page['title'] = l10n('caddie'); 125 125 126 126 $query = ' 127 127 SELECT element_id … … 134 134 { 135 135 $page['title'] = l10n('Elements_not_linked'); 136 136 137 137 // we are searching elements not linked to any virtual category 138 138 $query = ' … … 160 160 $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual); 161 161 } 162 else163 {164 $page['cat_elements_id'] = array();165 }166 162 } 167 163 else if ('duplicates' == $_GET['cat']) 168 164 { 169 165 $page['title'] = l10n('Duplicates'); 170 166 171 167 // we are searching related elements twice or more to physical categories 172 168 // 1 - Retrieve Files 173 169 $query = ' 174 170 SELECT DISTINCT(file) 175 FROM '.IMAGES_TABLE.' 176 GROUP BY file 177 HAVING COUNT(DISTINCT storage_category_id) > 1 178 ;'; 171 FROM '.IMAGES_TABLE.' 172 GROUP BY file 173 HAVING COUNT(DISTINCT storage_category_id) > 1 174 ;'; 179 175 180 176 $duplicate_files = array_from_query($query, 'file'); … … 183 179 $query = ' 184 180 SELECT id, file 185 FROM '.IMAGES_TABLE.' 181 FROM '.IMAGES_TABLE.' 186 182 WHERE file IN (\''.implode("','", $duplicate_files).'\') 187 183 ORDER BY file, id … … 189 185 190 186 $page['cat_elements_id'] = array_from_query($query, 'id'); 191 $page['cat_elements_id'][] = 0; 192 } 187 } 188 elseif ('recent'== $_GET['cat']) 189 { 190 $page['title'] = l10n('recent_pics_cat'); 191 $query = 'SELECT MAX(date_available) AS date 192 FROM '.IMAGES_TABLE; 193 if ($row=mysql_fetch_array( pwg_query($query) ) ) 194 { 195 $query = 'SELECT id 196 FROM '.IMAGES_TABLE.' 197 WHERE date_available BETWEEN DATE_SUB("'.$row['date'].'", INTERVAL 1 DAY) AND "'.$row['date'].'"'; 198 $page['cat_elements_id'] = array_from_query($query, 'id'); 199 } 200 } 201 193 202 // +-----------------------------------------------------------------------+ 194 203 // | first element to display | -
trunk/admin/template/goto/admin.tpl
r2574 r2579 65 65 <li><a href="{$U_TAGS}">{'Tags'|@translate}</a></li> 66 66 <li><a href="{$U_CADDIE}">{'Caddie'|@translate}</a></li> 67 <li><a href="{$U_RECENT_SET}">{'recent_pics_cat'|@translate}</a></li> 67 68 </ul> 68 69 </dd> -
trunk/admin/template/goto/theme/roma/themeconf.inc.php
r2530 r2579 18 18 case 'cat_move': 19 19 case 'cat_options': 20 case 'element_set':21 20 case 'cat_perm': 22 21 case 'permalinks': 22 return 2; 23 case 'element_set': 24 if (isset($_GET['cat']) and is_numeric($_GET['cat']) ) { 25 return 2; 26 } 23 27 case 'picture_modify': 24 if (isset($_GET['cat']) and $_GET['cat']=='caddie') { 25 return 3; 26 } 27 return 2; 28 return 3; 28 29 case 'comments': 29 30 case 'upload':
Note: See TracChangeset
for help on using the changeset viewer.