Dotclear


Ignore:
Timestamp:
08/20/13 21:27:34 (11 years ago)
Author:
Lepeltier kévin
Branch:
ticket #1406-2
Parents:
1535:5878d21ef9b9 (diff), 1495:cf4e36db13a6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Fusion avec 2.5

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r1488 r1536  
    223223     ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). 
    224224     '</p>'; 
     225} 
     226 
     227$err = array(); 
     228 
     229# Check cache directory 
     230if (!is_dir(DC_TPL_CACHE)) { 
     231     $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 
     232} else if (!is_writable(DC_TPL_CACHE)) { 
     233     $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 
     234} 
     235 
     236# Check public directory 
     237if (!is_dir($core->blog->public_path)) { 
     238     $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 
     239} else if (!is_writable($core->blog->public_path)) { 
     240     $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 
     241} 
     242 
     243# Error list 
     244if (count($err) > 0) { 
     245     echo '<div class="error"><p><strong>Erreur&nbsp;:</strong></p>'. 
     246     '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; 
    225247} 
    226248 
  • admin/index.php

    r1535 r1536  
    326326     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    327327     { 
    328           $categories_combo = array('&nbsp;' => ''); 
     328          # Getting categories 
     329          $categories_combo = array(__('(No cat)') => ''); 
    329330          try { 
    330331               $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    331                while ($categories->fetch()) { 
    332                     $categories_combo[] = new formSelectOption( 
    333                          str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    334                          ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    335                          $categories->cat_id 
    336                     ); 
     332               if (!$categories->isEmpty()) { 
     333                    while ($categories->fetch()) { 
     334                         $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     335                              str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     336                              $categories->cat_id 
     337                         ); 
     338                    } 
    337339               } 
    338340          } catch (Exception $e) { } 
    339       
     341           
    340342          echo 
    341343          '<div id="quick">'. 
     
    352354          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    353355          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               : ''). 
    354367          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    355368          ($core->auth->check('publish',$core->blog->id) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map