Changeset 1389:c2041909fff4
- Timestamp:
- 08/15/13 19:22:51 (10 years ago)
- Branch:
- 2.5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts_actions.php
r1345 r1389 247 247 echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 248 248 249 # categories list250 249 # Getting categories 251 $categories_combo = array( ' '=> '');250 $categories_combo = array(__('(No cat)') => ''); 252 251 try { 253 252 $categories = $core->blog->getCategories(array('post_type'=>'post')); 254 while ($categories->fetch()) { 255 $categories_combo[] = new formSelectOption( 256 str_repeat(' ',$categories->level-1). 257 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 258 $categories->cat_id 259 ); 253 if (!$categories->isEmpty()) { 254 $l = $categories->level; 255 $full_name = array($categories->cat_title); 256 257 while ($categories->fetch()) { 258 if ($categories->level < $l) { 259 $full_name = array(); 260 } elseif ($categories->level == $l) { 261 array_pop($full_name); 262 } 263 $full_name[] = html::escapeHTML($categories->cat_title); 264 $categories_combo[implode(' / ',$full_name)] = $categories->cat_id; 265 $l = $categories->level; 266 } 260 267 } 261 268 } catch (Exception $e) { }
Note: See TracChangeset
for help on using the changeset viewer.