Changeset 1391:4c5e04fe40b9 for admin
- Timestamp:
- 08/15/13 19:30:05 (12 years ago)
- Branch:
- 2.5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r1247 r1391 304 304 if ($core->auth->check('usage,contentadmin',$core->blog->id)) 305 305 { 306 $categories_combo = array(' ' => ''); 306 # Getting categories 307 $categories_combo = array(__('(No cat)') => ''); 307 308 try { 308 309 $categories = $core->blog->getCategories(array('post_type'=>'post')); 309 while ($categories->fetch()) { 310 $categories_combo[] = new formSelectOption( 311 str_repeat(' ',$categories->level-1). 312 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 313 $categories->cat_id 314 ); 310 if (!$categories->isEmpty()) { 311 $l = $categories->level; 312 $full_name = array($categories->cat_title); 313 314 while ($categories->fetch()) { 315 if ($categories->level < $l) { 316 $full_name = array(); 317 } elseif ($categories->level == $l) { 318 array_pop($full_name); 319 } 320 $full_name[] = html::escapeHTML($categories->cat_title); 321 $categories_combo[implode(' / ',$full_name)] = $categories->cat_id; 322 $l = $categories->level; 323 } 315 324 } 316 325 } catch (Exception $e) { } 317 326 318 327 echo 319 328 '<div id="quick">'.
Note: See TracChangeset
for help on using the changeset viewer.