Changeset 2737:23dda5f89c36
- Timestamp:
- 08/25/14 14:40:28 (10 years ago)
- Branch:
- default
- Location:
- plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php
r2736 r2737 15 15 protected static $p_url = 'index.php?pf=dcLegacyEditor'; 16 16 17 public static function adminPostEditor($editor ) {17 public static function adminPostEditor($editor='') { 18 18 global $core; 19 19 20 if ( $editor!='dcLegacyEditor') {20 if (empty($editor) || $editor!='dcLegacyEditor') { 21 21 return; 22 22 } -
plugins/pages/page.php
r2694 r2737 59 59 60 60 # Formaters combo 61 $formaters_combo = dcAdminCombos::getFormatersCombo($editor); 61 $core_formaters = $core->getFormaters(); 62 $available_formats = array('' => ''); 63 foreach ($core_formaters as $editor => $formats) { 64 foreach ($formats as $format) { 65 $available_formats[$format] = $format; 66 } 67 } 62 68 63 69 # Languages combo … … 67 73 # Validation flag 68 74 $bad_dt = false; 69 70 if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') {71 dcPage::addNotice("message",72 sprintf(__('Choose an active editor in %s.'),73 '<a href="preferences.php#user-options">'.__('your preferences').'</a>'74 )75 );76 77 }78 75 79 76 # Get page informations … … 287 284 } 288 285 286 $admin_post_behavior = ''; 287 if (!empty($core->auth->getOption('editor')) && !empty($core->auth->getOption('editor')[$post_format])) { 288 $admin_post_behavior = $core->callBehavior('adminPostEditor', $core->auth->getOption('editor')[$post_format]); 289 } 290 289 291 ?> 290 292 <html> … … 300 302 dcPage::jsModal(). 301 303 dcPage::jsLoad('js/_post.js'). 302 $ core->callBehavior('adminPostEditor').304 $admin_post_behavior. 303 305 dcPage::jsConfirmClose('entry-form','comment-form'). 304 306 # --BEHAVIOR-- adminPageHeaders … … 413 415 '<div>'. 414 416 '<h5 id="label_format"><label for="post_format" class="classic">'.__('Text formatting').'</label></h5>'. 415 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 416 '</p>'. 417 '<p>'.form::combo('post_format',$available_formats,$post_format,'maximal').'</p>'. 417 418 '<p class="format_control control_wiki">'. 418 419 '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? ' hide' : '').
Note: See TracChangeset
for help on using the changeset viewer.