Changeset 2719:116bb4bd1b88
- Timestamp:
- 06/14/14 11:52:47 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r2711 r2719 103 103 $post_dt = date('Y-m-d H:i',strtotime($post->post_dt)); 104 104 $post_format = $post->post_format; 105 # try to retrieve editor from post meta106 $meta_editor = $core->meta->getMetaStr($post->post_meta,'editor');107 if (!empty($meta_editor)) {108 $post_editor = $meta_editor;109 }110 105 $post_password = $post->post_password; 111 106 $post_url = $post->post_url; … … 200 195 # Format excerpt and content 201 196 elseif (!empty($_POST) && $can_edit_post) { 202 203 if (strpos($_POST['post_format'], ':')!==false) { 204 list($post_editor, $post_format) = explode(':', $_POST['post_format']); 205 } else { 206 $post_format = $_POST['post_format']; 207 $post_editor = ''; 208 } 209 197 list(, $post_format) = explode(':', $_POST['post_format']); 210 198 $post_excerpt = $_POST['post_excerpt']; 211 199 $post_content = $_POST['post_content']; … … 295 283 $cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : ''; 296 284 $cur->post_format = $post_format; 297 $cur->post_meta = serialize(array('editor' => $post_editor));298 285 $cur->post_password = $post_password; 299 286 $cur->post_lang = $post_lang; … … 316 303 if ($post_id) { 317 304 try { 318 $meta = $core->meta;319 $meta->delPostMeta($post_id,'editor');320 $meta->setPostMeta($post_id,'editor',$post_editor);321 322 305 # --BEHAVIOR-- adminBeforePostUpdate 323 306 $core->callBehavior('adminBeforePostUpdate',$cur,$post_id); … … 343 326 344 327 $return_id = $core->blog->addPost($cur); 345 346 $meta = $core->meta;347 $meta->delPostMeta($return_id,'editor');348 $meta->setPostMeta($return_id,'editor',$post_editor);349 328 350 329 # --BEHAVIOR-- adminAfterPostCreate … … 483 462 if ($can_edit_post) { 484 463 if (count($formaters_combo)>0 && ($core->auth->getOption('editor') && $core->auth->getOption('editor')!='')) { 485 // temporay removed until we can switch easily editor 486 // $post_format_field = form::combo('post_format',$formaters_combo,"$post_editor:$post_format",'maximal'); 487 488 $post_format_field = sprintf('%s (%s)', $post_format, $post_editor); 489 $post_format_field .= form::hidden('post_format',"$post_editor:$post_format"); 464 $post_format_field = form::combo('post_format',$formaters_combo,"$post_editor:$post_format",'maximal'); 490 465 } else { 491 466 $post_format_field = sprintf(__('Choose an active editor in %s.'),
Note: See TracChangeset
for help on using the changeset viewer.