Changeset 5087 for trunk/app.php
- Timestamp:
- 03/23/2007 12:59:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/app.php
r5000 r5087 418 418 $this->auth_required('Sorry, you do not have the right to edit/publish new posts.'); 419 419 420 $blog_ID = $current_blog->blog_id;420 $blog_ID = (int )$current_blog->blog_id; 421 421 $post_status = ($publish) ? 'publish' : 'draft'; 422 $post_author = $user->ID;422 $post_author = (int) $user->ID; 423 423 $post_title = $entry->title; 424 424 $post_content = $entry->content; … … 431 431 log_app('Inserting Post. Data:', print_r($post_data,true)); 432 432 433 $postID = wp_insert_post($post_data);433 $postID = (int) wp_insert_post($post_data); 434 434 435 435 if (!$postID) { … … 583 583 584 584 // Save the data 585 $postID = wp_insert_attachment($attachment, $file, $post);585 $postID = (int) wp_insert_attachment($attachment, $file, $post); 586 586 587 587 if (!$postID) { … … 789 789 if(!isset($postID)) { 790 790 global $post; 791 $postID = $GLOBALS['post']->ID;791 $postID = (int) $GLOBALS['post']->ID; 792 792 } 793 793 … … 811 811 if(!isset($postID)) { 812 812 global $post; 813 $postID = $GLOBALS['post']->ID;813 $postID = (int) $GLOBALS['post']->ID; 814 814 } 815 815 … … 886 886 $wp_query = $GLOBALS['wp_query']; 887 887 $wpdb = $GLOBALS['wpdb']; 888 $blog_id = $GLOBALS['blog_id'];888 $blog_id = (int) $GLOBALS['blog_id']; 889 889 $post_cache = $GLOBALS['post_cache']; 890 890
Note: See TracChangeset
for help on using the changeset viewer.