Changeset 1813
- Timestamp:
- 10/18/2004 03:58:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1812 r1813 44 44 die('You are not allowed to create posts or drafts on this blog.'); 45 45 } 46 47 $post_ID = $wpdb->get_var("SELECT MAX(ID) FROM $wpdb->posts") + 1;48 46 49 47 $post_pingback = intval($_POST['post_pingback']); … … 74 72 $post_password = $_POST['post_password']; 75 73 76 if ( empty($post_name) ) {77 if ( !empty($post_title) )78 $post_name = sanitize_title($post_title, $post_ID);79 } else {80 $post_name = sanitize_title($post_name, $post_ID);81 }82 83 74 $trackback = $_POST['trackback_url']; 84 75 $trackback = preg_replace('|\s+|', "\n", $trackback); … … 108 99 if ('' != $_POST['advanced']) $post_status = 'draft'; 109 100 if ('' != $_POST['savepage']) $post_status = 'static'; 101 102 $id_result = $wpdb->get_row("SHOW TABLE STATUS LIKE '$wpdb->posts'"); 103 $post_ID = $id_result->Auto_increment; 104 105 if ( empty($post_name) ) { 106 if ( !empty($post_title) ) 107 $post_name = sanitize_title($post_title, $post_ID); 108 } else { 109 $post_name = sanitize_title($post_name, $post_ID); 110 } 110 111 111 112 $postquery ="INSERT INTO $wpdb->posts
Note: See TracChangeset
for help on using the changeset viewer.