- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r1536 r1535 326 326 if ($core->auth->check('usage,contentadmin',$core->blog->id)) 327 327 { 328 # Getting categories 329 $categories_combo = array(__('(No cat)') => ''); 328 $categories_combo = array(' ' => ''); 330 329 try { 331 330 $categories = $core->blog->getCategories(array('post_type'=>'post')); 332 if (!$categories->isEmpty()) { 333 while ($categories->fetch()) { 334 $catparents_combo[] = $categories_combo[] = new formSelectOption( 335 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 336 $categories->cat_id 337 ); 338 } 331 while ($categories->fetch()) { 332 $categories_combo[] = new formSelectOption( 333 str_repeat(' ',$categories->level-1). 334 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 335 $categories->cat_id 336 ); 339 337 } 340 338 } catch (Exception $e) { } 341 339 342 340 echo 343 341 '<div id="quick">'. … … 354 352 '<p><label for="cat_id" class="classic">'.__('Category:').' '. 355 353 form::combo('cat_id',$categories_combo).'</label></p>'. 356 ($core->auth->check('categories', $core->blog->id)357 ? '<div>'.358 '<p id="new_cat">'.__('Add a new category').'</p>'.359 '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'.360 '<p><label for="new_cat_title">'.__('Title:').' '.361 form::field('new_cat_title',30,255,'','maximal').'</label></p>'.362 '<p><label for="new_cat_parent">'.__('Parent:').' '.363 form::combo('new_cat_parent',$categories_combo,'','maximal').364 '</label></p>'.365 '</div>'366 : '').367 354 '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 368 355 ($core->auth->check('publish',$core->blog->id)
Note: See TracChangeset
for help on using the changeset viewer.