Changeset 1536:31b45740bf86 for admin/index.php
- Timestamp:
- 08/20/13 21:27:34 (11 years ago)
- 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. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r1488 r1536 223 223 ' '.__('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.'). 224 224 '</p>'; 225 } 226 227 $err = array(); 228 229 # Check cache directory 230 if (!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 237 if (!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 244 if (count($err) > 0) { 245 echo '<div class="error"><p><strong>Erreur :</strong></p>'. 246 '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; 225 247 } 226 248 -
admin/index.php
r1535 r1536 326 326 if ($core->auth->check('usage,contentadmin',$core->blog->id)) 327 327 { 328 $categories_combo = array(' ' => ''); 328 # Getting categories 329 $categories_combo = array(__('(No cat)') => ''); 329 330 try { 330 331 $categories = $core->blog->getCategories(array('post_type'=>'post')); 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 ); 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 } 337 339 } 338 340 } catch (Exception $e) { } 339 341 340 342 echo 341 343 '<div id="quick">'. … … 352 354 '<p><label for="cat_id" class="classic">'.__('Category:').' '. 353 355 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 : ''). 354 367 '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 355 368 ($core->auth->check('publish',$core->blog->id)
Note: See TracChangeset
for help on using the changeset viewer.