Changeset 18579
- Timestamp:
- Oct 9, 2012, 9:47:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/permalinks.php
r13282 r18579 118 118 SELECT 119 119 id, permalink, 120 '.pwg_db_concat(array('id', '\' - \'', 'name')).'AS name,120 CONCAT(id, " - ", name, IF(permalink IS NULL, "", " √") ) AS name, 121 121 uppercats, global_rank 122 122 FROM '.CATEGORIES_TABLE; -
trunk/include/functions_category.inc.php
r13839 r18579 129 129 $row['icon_ts'] = get_icon($row['max_date_last'], $child_date_last); 130 130 } 131 array_push($cats, $row);131 $cats[] = $row; 132 132 if ($row['id']==@$page['category']['id']) //save the number of subcats for later optim 133 133 $page['category']['count_categories'] = $row['count_categories']; … … 196 196 else 197 197 { 198 $names = array();199 198 $query = ' 200 199 SELECT id, name, permalink … … 208 207 foreach ($upper_ids as $cat_id) 209 208 { 210 array_push( $cat['upper_names'], $names[$cat_id]);209 $cat['upper_names'][] = $names[$cat_id]; 211 210 } 212 211 } … … 220 219 { 221 220 global $conf, $page; 222 221 223 222 return trigger_event('get_category_preferred_image_orders', array( 224 223 array(l10n('Default'), '', true), … … 226 225 array(l10n('Photo title, Z → A'), 'name DESC', true), 227 226 array(l10n('Date created, new → old'), 'date_creation DESC', true), 228 array(l10n('Date created, old → new'), 'date_creation ASC', true), 227 array(l10n('Date created, old → new'), 'date_creation ASC', true), 229 228 array(l10n('Date posted, new → old'), 'date_available DESC', true), 230 229 array(l10n('Date posted, old → new'), 'date_available ASC', true), … … 247 246 foreach ($categories as $category) 248 247 { 249 if (!empty($category['permalink']))250 {251 $category['name'] .= ' √';252 }253 248 if ($fullname) 254 249 { … … 284 279 $fullname = true) 285 280 { 286 $result = pwg_query($query); 287 $categories = array(); 288 if (!empty($result)) 289 { 290 while ($row = pwg_db_fetch_assoc($result)) 291 { 292 array_push($categories, $row); 293 } 294 } 281 $categories = array_from_query($query); 295 282 usort($categories, 'global_rank_compare'); 296 283 display_select_categories($categories, $selecteds, $blockname, $fullname); … … 325 312 $query.= ' 326 313 ;'; 327 $result = pwg_query($query); 328 329 $subcats = array(); 330 while ($row = pwg_db_fetch_assoc($result)) 331 { 332 array_push($subcats, $row['id']); 333 } 334 return $subcats; 314 return array_from_query($query, 'id'); 335 315 } 336 316
Note: See TracChangeset
for help on using the changeset viewer.