Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r1536 r1535  
    326326     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    327327     { 
    328           # Getting categories 
    329           $categories_combo = array(__('(No cat)') => ''); 
     328          $categories_combo = array(' ' => ''); 
    330329          try { 
    331330               $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                    ); 
    339337               } 
    340338          } catch (Exception $e) { } 
    341            
     339      
    342340          echo 
    343341          '<div id="quick">'. 
     
    354352          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    355353          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                : ''). 
    367354          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    368355          ($core->auth->check('publish',$core->blog->id) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map