Changeset 2736:09dd799a19bd for admin/post.php
- Timestamp:
- 08/25/14 09:20:20 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r2722 r2736 60 60 $img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />'; 61 61 62 # Formaters combo 63 $formaters_combo = dcAdminCombos::getFormatersCombo(); 64 foreach ($formaters_combo as $editor => $formats) { 62 # Formats combo 63 $core_formaters = $core->getFormaters(); 64 $available_formats = array('' => ''); 65 foreach ($core_formaters as $editor => $formats) { 65 66 foreach ($formats as $format) { 66 $formaters_combo[$editor][$format] = "$editor:$format";67 67 $available_formats[$format] = $format; 68 } 68 69 } 69 70 … … 78 79 $TB = new dcTrackback($core); 79 80 $tb_urls = $tb_excerpt = ''; 80 81 if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') {82 dcPage::addNotice("message",83 sprintf(__('Choose an active editor in %s.'),84 '<a href="'.$core->adminurl->get("admin.user.preferences").'#user-options">'.__('your preferences').'</a>'85 )86 );87 }88 81 89 82 # Get entry informations … … 195 188 # Format excerpt and content 196 189 elseif (!empty($_POST) && $can_edit_post) { 197 list(, $post_format) = explode(':', $_POST['post_format']);190 $post_format = $_POST['post_format']; 198 191 $post_excerpt = $_POST['post_excerpt']; 199 192 $post_content = $_POST['post_content']; … … 382 375 383 376 $admin_post_behavior = ''; 384 if (($core->auth->getOption('editor')==$post_editor) 385 && in_array($post_format, $core->getFormaters($core->auth->getOption('editor')))) { 386 $admin_post_behavior = $core->callBehavior('adminPostEditor'); 377 if (!empty($core->auth->getOption('editor')) && !empty($core->auth->getOption('editor')[$post_format])) { 378 $admin_post_behavior = $core->callBehavior('adminPostEditor', $core->auth->getOption('editor')[$post_format]); 387 379 } 388 380 … … 461 453 -------------------------------------------------------- */ 462 454 if ($can_edit_post) { 463 if (count($formaters_combo)>0 && ($core->auth->getOption('editor') && $core->auth->getOption('editor')!='')) {464 $post_format_field = form::combo('post_format',$formaters_combo,"$post_editor:$post_format",'maximal');465 } else {466 $post_format_field = sprintf(__('Choose an active editor in %s.'),467 '<a href="'.$core->adminurl->get("admin.user.preferences").'#user-options">'.__('your preferences').'</a>'468 );469 $post_format_field .= form::hidden('post_format','xhtml');470 }471 472 455 $sidebar_items = new ArrayObject(array( 473 456 'status-box' => array( … … 489 472 '<div>'. 490 473 '<h5 id="label_format"><label for="post_format" class="classic">'.__('Text formatting').'</label></h5>'. 491 '<p>'. $post_format_field.'</p>'.474 '<p>'.form::combo('post_format',$available_formats,$post_format,'maximal').'</p>'. 492 475 '<p class="format_control control_no_xhtml">'. 493 476 '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="'.
Note: See TracChangeset
for help on using the changeset viewer.