Changeset 7146
- Timestamp:
- 03/04/2008 12:05:30 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
wp-admin/admin-ajax.php (modified) (2 diffs)
-
wp-admin/edit-form-advanced.php (modified) (1 diff)
-
wp-admin/edit-page-form.php (modified) (1 diff)
-
wp-admin/includes/post.php (modified) (2 diffs)
-
wp-admin/page.php (modified) (1 diff)
-
wp-admin/post.php (modified) (1 diff)
-
wp-admin/wp-admin.css (modified) (1 diff)
-
wp-includes/js/autosave.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r7145 r7146 473 473 global $current_user; 474 474 475 $_POST['post_content'] = $_POST['content'];476 $_POST['post_excerpt'] = $_POST['excerpt'];477 475 $_POST['post_status'] = 'draft'; 478 476 $_POST['post_category'] = explode(",", $_POST['catslist']); … … 522 520 } 523 521 if ( $do_autosave ) { 524 $id = wp_update_post($_POST);522 $id = edit_post(); 525 523 $data = $message; 526 524 } else { -
trunk/wp-admin/edit-form-advanced.php
r7145 r7146 152 152 <?php if ($post_ID): ?> 153 153 <?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?> 154 <br class="clear" /> 154 155 <?php endif; ?> 155 156 <span id="autosave"></span> -
trunk/wp-admin/edit-page-form.php
r7145 r7146 130 130 <?php if ($post_ID): ?> 131 131 <?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?> 132 <br class="clear" /> 132 133 <?php endif; ?> 133 134 <span id="autosave"></span> -
trunk/wp-admin/includes/post.php
r7139 r7146 113 113 // Now that we have an ID we can fix any attachment anchor hrefs 114 114 _fix_attachment_links( $post_ID ); 115 116 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 115 117 116 118 return $post_ID; … … 322 324 _fix_attachment_links( $post_ID ); 323 325 326 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 327 324 328 return $post_ID; 325 329 } -
trunk/wp-admin/page.php
r7116 r7146 61 61 $last_user = get_userdata( $last ); 62 62 $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); 63 $message = sprintf( __( ' %s is currently editing this page' ), wp_specialchars( $last_user_name ) );63 $message = sprintf( __( 'Warning: %s is currently editing this page' ), wp_specialchars( $last_user_name ) ); 64 64 $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" ); 65 65 add_action('admin_notices', create_function( '', "echo '$message';" ) ); -
trunk/wp-admin/post.php
r7103 r7146 70 70 $last_user = get_userdata( $last ); 71 71 $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); 72 $message = sprintf( __( ' %s is currently editing this post' ), wp_specialchars( $last_user_name ) );72 $message = sprintf( __( 'Warning: %s is currently editing this post' ), wp_specialchars( $last_user_name ) ); 73 73 $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" ); 74 74 add_action('admin_notices', create_function( '', "echo '$message';" ) ); -
trunk/wp-admin/wp-admin.css
r7145 r7146 1216 1216 } 1217 1217 1218 .submitbox #autosave .error { 1219 color: #333; 1220 } 1221 1218 1222 /* Categories */ 1219 1223 -
trunk/wp-includes/js/autosave.js
r7145 r7146 1 1 var autosaveLast = ''; 2 2 var autosavePeriodical; 3 var autosaveOldMessage = ''; 3 4 4 5 jQuery(function($) { … … 18 19 // called when autosaving pre-existing post 19 20 function autosave_saved(response) { 20 var oldMessage = jQuery('#autosave').html();21 21 var res = wpAjax.parseAjaxResponse(response, 'autosave'); // parse the ajax response 22 22 var message = ''; … … 40 40 } 41 41 if ( message ) { jQuery('#autosave').html(message); } // update autosave message 42 else if ( oldMessage && res ) { jQuery('#autosave').html( oldMessage ); }42 else if ( autosaveOldMessage && res ) { jQuery('#autosave').html( autosaveOldMessage ); } 43 43 autosave_enable_buttons(); // re-enable disabled form buttons 44 44 return res; … … 181 181 } 182 182 183 autosaveOldMessage = jQuery('#autosave').html(); 184 183 185 jQuery.ajax({ 184 186 data: post_data,
Note: See TracChangeset
for help on using the changeset viewer.