Changeset 933
- Timestamp:
- 03/23/07 17:46:02 (2 years ago)
- Files:
-
- trunk/app.php (modified) (4 diffs)
- trunk/wp-admin/admin-ajax.php (modified) (1 diff)
- trunk/wp-admin/admin-db.php (modified) (5 diffs)
- trunk/wp-admin/admin-functions.php (modified) (7 diffs)
- trunk/wp-admin/edit-comments.php (modified) (1 diff)
- trunk/wp-admin/import/blogger.php (modified) (1 diff)
- trunk/wp-admin/import/blogware.php (modified) (1 diff)
- trunk/wp-admin/import/dotclear.php (modified) (1 diff)
- trunk/wp-admin/import/livejournal.php (modified) (1 diff)
- trunk/wp-admin/import/mt.php (modified) (2 diffs)
- trunk/wp-admin/import/wordpress.php (modified) (2 diffs)
- trunk/wp-admin/user-edit.php (modified) (1 diff)
- trunk/wp-includes/author-template.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (1 diff)
- trunk/wp-includes/category-template.php (modified) (1 diff)
- trunk/wp-includes/comment-template.php (modified) (1 diff)
- trunk/wp-includes/comment.php (modified) (1 diff)
- trunk/wp-includes/feed.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (1 diff)
- trunk/wp-includes/functions.php (modified) (2 diffs)
- trunk/wp-includes/link-template.php (modified) (4 diffs)
- trunk/wp-includes/pluggable.php (modified) (2 diffs)
- trunk/wp-includes/post.php (modified) (12 diffs)
- trunk/wp-includes/query.php (modified) (3 diffs)
- trunk/wp-includes/registration.php (modified) (2 diffs)
- trunk/wp-includes/theme.php (modified) (1 diff)
- trunk/wp-includes/user.php (modified) (1 diff)
- trunk/wp-trackback.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (28 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app.php
r909 r933 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; … … 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 trunk/wp-admin/admin-ajax.php
r904 r933 232 232 $_POST['temp_ID'] = $_POST['post_ID']; 233 233 $id = wp_write_post(); 234 if( is_wp_error($id))234 if( is_wp_error($id) ) 235 235 die($id->get_error_message()); 236 236 else trunk/wp-admin/admin-db.php
r932 r933 251 251 return 0; 252 252 253 return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");253 return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'"); 254 254 } 255 255 … … 303 303 if ( !empty($link_id) ) 304 304 $update = true; 305 306 $link_id = (int) $link_id; 305 307 306 308 if( trim( $link_name ) == '' ) … … 365 367 } else { 366 368 $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES('$link_url','$link_name', '$link_image', '$link_target', '$link_description', '$link_visible', '$link_owner', '$link_rating', '$link_rel', '$link_notes', '$link_rss')"); 367 $link_id = $wpdb->insert_id;369 $link_id = (int) $wpdb->insert_id; 368 370 } 369 371 … … 448 450 SELECT category_id 449 451 FROM $wpdb->link2cat 450 WHERE link_id = $link_ID");452 WHERE link_id = '$link_ID'"); 451 453 452 454 if (!$old_categories) { … … 461 463 if ($delete_cats) { 462 464 foreach ($delete_cats as $del) { 465 $del = (int) $del; 463 466 $wpdb->query(" 464 467 DELETE FROM $wpdb->link2cat 465 WHERE category_id = $del466 AND link_id = $link_ID468 WHERE category_id = '$del' 469 AND link_id = '$link_ID' 467 470 "); 468 471 } trunk/wp-admin/admin-functions.php
r928 r933 115 115 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) 116 116 $draft_ids = array(); 117 if ( $draft_temp_id = array_search( $post_ID, $draft_ids ) )117 if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) ) 118 118 relocate_children( $draft_temp_id, $post_ID ); 119 119 if ( $temp_id && $temp_id != $draft_temp_id ) … … 158 158 continue; 159 159 160 $id = $id_matches[3];160 $id = (int) $id_matches[3]; 161 161 162 162 // While we have the attachment ID, let's adopt any orphans. … … 291 291 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) 292 292 $draft_ids = array(); 293 if ( $draft_temp_id = array_search( $post_ID, $draft_ids ) )293 if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) ) 294 294 relocate_children( $draft_temp_id, $post_ID ); 295 295 … … 448 448 if ( func_num_args() ) { // The hackiest hack that ever did hack 449 449 global $current_user, $wp_roles; 450 $user_id = func_get_arg( 0 );450 $user_id = (int) func_get_arg( 0 ); 451 451 452 452 if ( isset( $_POST['role'] ) ) { … … 466 466 if ( $user_id != 0 ) { 467 467 $update = true; 468 $user->ID = $user_id;468 $user->ID = (int) $user_id; 469 469 $userdata = get_userdata( $user_id ); 470 470 $user->user_login = $wpdb->escape( $userdata->user_login ); … … 804 804 if ( current_user_can( 'manage_categories' ) ) { 805 805 $edit = "<a href='categories.php?action=edit&cat_ID=$category->cat_ID' class='edit'>".__( 'Edit' )."</a></td>"; 806 $default_cat_id = get_option( 'default_category' );807 $default_link_cat_id = get_option( 'default_link_category' );806 $default_cat_id = (int) get_option( 'default_category' ); 807 $default_link_cat_id = (int) get_option( 'default_link_category' ); 808 808 809 809 if ( ($category->cat_ID != $default_cat_id ) && ($category->cat_ID != $default_link_cat_id ) ) … … 844 844 $post->post_title = wp_specialchars( $post->post_title ); 845 845 $pad = str_repeat( '— ', $level ); 846 $id = $post->ID;846 $id = (int) $post->ID; 847 847 $class = ('alternate' == $class ) ? '' : 'alternate'; 848 848 ?> trunk/wp-admin/edit-comments.php
r920 r933 57 57 foreach ($_POST['delete_comments'] as $comment) : // Check the permissions on each 58 58 $comment = (int) $comment; 59 $post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment");59 $post_id = (int) $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); 60 60 // $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); 61 61 if ( current_user_can('edit_post', $post_id) ) { trunk/wp-admin/import/blogger.php
r920 r933 547 547 } 548 548 549 $comment_post_ID = $this->blogs[$importing_blog]['posts'][$entry->old_post_permalink];549 $comment_post_ID = (int) $this->blogs[$importing_blog]['posts'][$entry->old_post_permalink]; 550 550 preg_match('#<name>(.+?)</name>.*(?:\<uri>(.+?)</uri>)?#', $entry->author, $matches); 551 551 $comment_author = addslashes( $this->no_apos( strip_tags( (string) $matches[1] ) ) ); trunk/wp-admin/import/blogware.php
r810 r933 105 105 106 106 if ( $comments ) { 107 $comment_post_ID = $post_id;107 $comment_post_ID = (int) $post_id; 108 108 $num_comments = 0; 109 109 foreach ($comments as $comment) { trunk/wp-admin/import/dotclear.php
r819 r933 438 438 439 439 // WordPressify Data 440 $comment_ID = ltrim($comment_id, '0');441 $comment_post_ID = $postarr[$post_id];440 $comment_ID = (int) ltrim($comment_id, '0'); 441 $comment_post_ID = (int) $postarr[$post_id]; 442 442 $comment_approved = "$comment_pub"; 443 443 $name = $wpdb->escape(csc ($comment_auteur)); trunk/wp-admin/import/livejournal.php
r819 r933 83 83 84 84 if ( $comments ) { 85 $comment_post_ID = $post_id;85 $comment_post_ID = (int) $post_id; 86 86 $num_comments = 0; 87 87 foreach ($comments as $comment) { trunk/wp-admin/import/mt.php
r819 r933 155 155 } 156 156 $this->file = $file['file']; 157 $this->id = $file['id'];157 $this->id = (int) $file['id']; 158 158 159 159 $this->get_entries(); … … 279 279 } 280 280 281 $comment_post_ID = $post_id;281 $comment_post_ID = (int) $post_id; 282 282 $comment_approved = 1; 283 283 trunk/wp-admin/import/wordpress.php
r881 r933 158 158 } 159 159 $this->file = $file['file']; 160 $this->id = $file['id'];160 $this->id = (int) $file['id']; 161 161 162 162 $this->get_entries(); … … 185 185 $category_parent = '0'; 186 186 else 187 $category_parent = (int)category_exists($parent);187 $category_parent = category_exists($parent); 188 188 189 189 $catarr = compact('category_nicename', 'category_parent', 'posts_private', 'links_private', 'posts_private', 'cat_name'); trunk/wp-admin/user-edit.php
r920 r933 14 14 // Only allow site admins to edit every user. 15 15 if ( !is_site_admin() && ($user_id != $current_user->ID) ) 16 $errors = new WP_Error('head', __('You do not have permission to edit this user.'));16 wp_die('You do not have permission to edit this user.'); 17 17 18 18 $user_id = (int) $user_id; trunk/wp-includes/author-template.php
r828 r933 145 145 function get_author_posts_url($author_id, $author_nicename = '') { 146 146 global $wpdb, $wp_rewrite, $post, $cache_userdata; 147 $auth_ID = $author_id;147 $auth_ID = (int) $author_id; 148 148 $link = $wp_rewrite->get_author_permastruct(); 149 149 trunk/wp-includes/bookmark-template.php
r920 r933 166 166 return ''; 167 167 168 $cat_id = $cats[0]; // Take the first cat.168 $cat_id = (int) $cats[0]; // Take the first cat. 169 169 170 170 $cat = get_category($cat_id); trunk/wp-includes/category-template.php
r915 r933 66 66 global $post, $category_cache, $blog_id; 67 67 68 $id = (int) $id; 68 69 if ( !$id ) 69 $id = $post->ID;70 $id = (int) $post->ID; 70 71 71 72 if ( !isset($category_cache[$blog_id][$id]) ) trunk/wp-includes/comment-template.php
r920 r933 151 151 152 152 if ( !$post_id ) 153 $post_id = $id;153 $post_id = (int) $id; 154 154 155 155 $post = get_post($post_id); trunk/wp-includes/comment.php
r920 r933 346 346 "); 347 347 348 $id = $wpdb->insert_id;348 $id = (int) $wpdb->insert_id; 349 349 350 350 if ( $comment_approved == 1) trunk/wp-includes/feed.php
r915 r933 107 107 108 108 function get_author_rss_link($echo = false, $author_id, $author_nicename) { 109 $auth_ID = $author_id;109 $auth_ID = (int) $author_id; 110 110 $permalink_structure = get_option('permalink_structure'); 111 111 trunk/wp-includes/formatting.php
r928 r933 1073 1073 $url = str_replace($strip, '', $url); 1074 1074 $url = str_replace(';//', '://', $url); 1075 // Append http unless a relative link starting with / or a php file. 1076 if ( strpos($url, '://') === false && 1077 substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9]+.php/i', $url) ) 1078 $url = 'http://' . $url; 1079 1075 1080 $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; 1076 1081 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); trunk/wp-includes/functions.php
r920 r933 664 664 $count = count( $post_id_array); 665 665 for ( $i = 0; $i < $count; $i++ ) { 666 $post_id = $post_id_array[ $i ];666 $post_id = (int) $post_id_array[ $i ]; 667 667 if ( isset( $category_cache[$blog_id][$post_id] ) ) { 668 668 unset( $post_id_array[ $i ] ); … … 718 718 $count = count( $post_id_array); 719 719 for ( $i = 0; $i < $count; $i++ ) { 720 $post_id = $post_id_array[ $i ];720 $post_id = (int) $post_id_array[ $i ]; 721 721 if ( isset( $post_meta_cache[$blog_id][$post_id] ) ) { // If the meta is already cached 722 722 unset( $post_id_array[ $i ] ); trunk/wp-includes/link-template.php
r931 r933 120 120 $id = (int) $id; 121 121 if ( !$id ) 122 $id = $post->ID;122 $id = (int) $post->ID; 123 123 124 124 if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) … … 135 135 136 136 if ( !$id ) 137 $id = $post->ID;137 $id = (int) $post->ID; 138 138 139 139 $pagestruct = $wp_rewrite->get_page_permastruct(); … … 157 157 158 158 if (! $id) { 159 $id = $post->ID;159 $id = (int) $post->ID; 160 160 } 161 161 … … 260 260 261 261 if ( empty($post_id) ) 262 $post_id = $id;262 $post_id = (int) $id; 263 263 264 264 if ( '' != get_option('permalink_structure') ) { trunk/wp-includes/pluggable.php
r909 r933 533 533 function wp_verify_nonce($nonce, $action = -1) { 534 534 $user = wp_get_current_user(); 535 $uid = $user->id;535 $uid = (int) $user->id; 536 536 537 537 $i = ceil(time() / 43200); … … 547 547 function wp_create_nonce($action = -1) { 548 548 $user = wp_get_current_user(); 549 $uid = $user->id;549 $uid = (int) $user->id; 550 550 551 551 $i = ceil(time() / 43200); trunk/wp-includes/post.php
r916 r933 376 376 377 377 if ( !$post_id ) 378 $post_id = $id;378 $post_id = (int) $id; 379 379 380 380 $post_id = (int) $post_id; … … 450 450 451 451 function wp_get_post_categories($post_id = 0) { 452 $post_id = (int) $post_id; 453 452 454 $cats = &get_the_category($post_id); 453 455 $cat_ids = array(); … … 461 463 462 464 // Set the limit clause, if we got a limit 465 $num = (int) $num; 463 466 if ($num) { 464 467 $limit = "LIMIT $num"; … … 473 476 function wp_get_single_post($postid = 0, $mode = OBJECT) { 474 477 global $wpdb; 478 479 $postid = (int) $postid; 475 480 476 481 $post = get_post($postid, $mode); … … 537 542 // Get the post ID. 538 543 if ( $update ) 539 $post_ID = $ID;544 $post_ID = (int) $ID; 540 545 541 546 // Create a valid post name. Drafts are allowed to have an empty … … 641 646 VALUES 642 647 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')"); 643 $post_ID = $wpdb->insert_id;648 $post_ID = (int) $wpdb->insert_id; 644 649 } 645 650 … … 769 774 function wp_set_post_categories($post_ID = 0, $post_categories = array()) { 770 775 global $wpdb; 776 777 $post_ID = (int) $post_ID; 771 778 // If $post_categories isn't already an array, make it one: 772 779 if (!is_array($post_categories) || 0 == count($post_categories) || empty($post_categories)) … … 779 786 SELECT category_id 780 787 FROM $wpdb->post2cat 781 WHERE post_id = $post_ID");788 WHERE post_id = '$post_ID'"); 782 789 783 790 if (!$old_categories) { … … 794 801 $wpdb->query(" 795 802 DELETE FROM $wpdb->post2cat 796 WHERE category_id = $del797 AND post_id = $post_ID803 WHERE category_id = '$del' 804 AND post_id = '$post_ID' 798 805 "); 799 806 } … … 1252 1259 if ( !empty($ID) ) { 1253 1260 $update = true; 1254 $post_ID = $ID;1261 $post_ID = (int) $ID; 1255 1262 } 1256 1263 … … 1347 1354 VALUES 1348 1355 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')"); 1349 $post_ID = $wpdb->insert_id;1356 $post_ID = (int) $wpdb->insert_id; 1350 1357 } 1351 1358 … … 1502 1509 if ( !$post =& get_post( $mime ) ) 1503 1510 return false; 1504 $post_id = $post->ID;1511 $post_id = (int) $post->ID; 1505 1512 $mime = $post->post_mime_type; 1506 1513 } trunk/wp-includes/query.php
r909 r933 588 588 $this->queried_object =& get_page_by_path($qv['pagename']); 589 589 if ( !empty($this->queried_object) ) 590 $this->queried_object_id = $this->queried_object->ID;590 $this->queried_object_id = (int) $this->queried_object->ID; 591 591 else 592 592 unset($this->queried_object); … … 1206 1206 $category = &get_category($cat); 1207 1207 $this->queried_object = &$category; 1208 $this->queried_object_id = $cat;1208 $this->queried_object_id = (int) $cat; 1209 1209 } else if ($this->is_posts_page) { 1210 1210 $this->queried_object = & get_page(get_option('page_for_posts')); 1211 $this->queried_object_id = $this->queried_object->ID;1211 $this->queried_object_id = (int) $this->queried_object->ID; 1212 1212 } else if ($this->is_single) { 1213 1213 $this->queried_object = $this->post; 1214 $this->queried_object_id = $this->post->ID;1214 $this->queried_object_id = (int) $this->post->ID; 1215 1215 } else if ($this->is_page) { 1216 1216 $this->queried_object = $this->post; 1217 $this->queried_object_id = $this->post->ID;1217 $this->queried_object_id = (int) $this->post->ID; 1218 1218 } else if ($this->is_author) { 1219 $author_id = $this->get('author');1219 $author_id = (int) $this->get('author'); 1220 1220 $author = get_userdata($author_id); 1221 1221 $this->queried_object = $author; … … 1286 1286 global $pagenow; 1287 1287 1288 $id = $post->ID;1288 $id = (int) $post->ID; 1289 1289 1290 1290 $authordata = get_userdata($post->post_author); trunk/wp-includes/registration.php
r828 r933 90 90 $query = apply_filters('update_user_query', $query); 91 91 $wpdb->query( $query ); 92 $user_id = $ID;92 $user_id = (int) $ID; 93 93 } else { 94 94 $query = "INSERT INTO $wpdb->users … … 98 98 $query = apply_filters('create_user_query', $query); 99 99 $wpdb->query( $query ); 100 $user_id = $wpdb->insert_id;100 $user_id = (int) $wpdb->insert_id; 101 101 } 102 102 trunk/wp-includes/theme.php
r915 r933 347 347 global $wp_query; 348 348 349 $id = $wp_query->post->ID;349 $id = (int) $wp_query->post->ID; 350 350 $template = get_post_meta($id, '_wp_page_template', true); 351 351 trunk/wp-includes/user.php
r920 r933 172 172 $userdata = $user->data; 173 173 $user_login = $user->user_login; 174 $user_level = $user->user_level;175 $user_ID = $user->ID;174 $user_level = (int) $user->user_level; 175 $user_ID = (int) $user->ID; 176 176 $user_email = $user->user_email; 177 177 $user_url = $user->user_url; trunk/wp-trackback.php
r868 r933 85 85 } 86 86 87 $comment_post_ID = $tb_id;87 $comment_post_ID = (int) $tb_id; 88 88 $comment_author = $blog_name; 89 89 $comment_author_email = ''; trunk/xmlrpc.php
r931 r933 173 173 $this->escape($args); 174 174 175 $blog_id = $args[0];176 $page_id = $args[1];175 $blog_id = (int) $args[0]; 176 $page_id = (int) $args[1]; 177 177 $username = $args[2]; 178 178 $password = $args[3]; … … 253 253 $this->escape($args); 254 254 255 $blog_id = $args[0];255 $blog_id = (int) $args[0]; 256 256 $username = $args[1]; 257 257 $password = $args[2]; … … 321 321 $this->escape($args); 322 322 323 $blog_id = $args[0];323 $blog_id = (int) $args[0]; 324 324 $username = $args[1]; 325 325 $password = $args[2]; 326 $page_id = $args[3];326 $page_id = (int) $args[3]; 327 327 328 328 if(!$this->login_pass_ok($username, $password)) { … … 361 361 function wp_editPage($args) { 362 362 // Items not escaped here will be escaped in editPost. 363 $blog_id = $args[0];364 $page_id = $this->escape( $args[1]);363 $blog_id = (int) $args[0]; 364 $page_id = $this->escape((int) $args[1]); 365 365 $username = $this->escape($args[2]); 366 366 $password = $this->escape($args[3]); … … 412 412 $this->escape($args); 413 413 414 $blog_id = $args[0];414 $blog_id = (int) $args[0]; 415 415 $username = $args[1]; 416 416 $password = $args[2]; … … 452 452 $this->escape($args); 453 453 454 $blog_id = $args[0];454 $blog_id = (int) $args[0]; 455 455 $username = $args[1]; 456 456 $password = $args[2]; … … 470 470 $this->escape($args); 471 471 472 $blog_id = $args[0];472 $blog_id = (int) $args[0]; 473 473 $username = $args[1]; 474 474 $password = $args[2]; … … 530 530 $this->escape($args); 531 531 532 $blog_id = $args[0];532 $blog_id = (int) $args[0]; 533 533 $username = $args[1]; 534 534 $password = $args[2]; … … 631 631 $this->escape($args); 632 632 633 $post_ID = $args[1];633 $post_ID = (int) $args[1]; 634 634 $user_login = $args[2]; 635 635 $user_pass = $args[3]; … … 666 666 $this->escape($args); 667 667 668 $blog_ID = $args[1]; /* though we don't use it yet */668 $blog_ID = (int) $args[1]; /* though we don't use it yet */ 669 669 $user_login = $args[2]; 670 670 $user_pass = $args[3]; … … 714 714 $this->escape($args); 715 715 716 $blog_ID = $args[1];716 $blog_ID = (int) $args[1]; 717 717 $user_login = $args[2]; 718 718 $user_pass = $args[3]; … … 748 748 $this->escape($args); 749 749 750 $blog_ID = $args[1];750 $blog_ID = (int) $args[1]; 751 751 $user_login = $args[2]; 752 752 $user_pass = $args[3]; … … 785 785 $this->escape($args); 786 786 787 $blog_ID = $args[1]; /* though we don't use it yet */787 $blog_ID = (int) $args[1]; /* though we don't use it yet */ 788 788 $user_login = $args[2]; 789 789 $user_pass = $args[3]; … … 833 833 $this->escape($args); 834 834 835 $post_ID = $args[1];835 $post_ID = (int) $args[1]; 836 836 $user_login = $args[2]; 837 837 $user_pass = $args[3]; … … 884 884 $this->escape($args); 885 885 886 $post_ID = $args[1];886 $post_ID = (int) $args[1]; 887 887 $user_login = $args[2]; 888 888 $user_pass = $args[3]; … … 925 925 $this->escape($args); 926 926 927 $blog_ID = $args[0]; // we will support this in the near future927 $blog_ID = (int) $args[0]; // we will support this in the near future 928 928 $user_login = $args[1]; 929 929 $user_pass = $args[2]; … … 1075 1075 $this->escape($args); 1076 1076 1077 $post_ID = $args[0];1077 $post_ID = (int) $args[0]; 1078 1078 $user_login = $args[1]; 1079 1079 $user_pass = $args[2]; … … 1227 1227 $this->escape($args); 1228 1228 1229 $post_ID = $args[0];1229 $post_ID = (int) $args[0]; 1230 1230 $user_login = $args[1]; 1231 1231 $user_pass = $args[2]; … … 1289 1289 $this->escape($args); 1290 1290 1291 $blog_ID = $args[0];1291 $blog_ID = (int) $args[0]; 1292 1292 $user_login = $args[1]; 1293 1293 $user_pass = $args[2]; 1294 $num_posts = $args[3];1294 $num_posts = (int) $args[3]; 1295 1295 1296 1296 if (!$this->login_pass_ok($user_login, $user_pass)) { … … 1362 1362 $this->escape($args); 1363 1363 1364 $blog_ID = $args[0];1364 $blog_ID = (int) $args[0]; 1365 1365 $user_login = $args[1]; 1366 1366 $user_pass = $args[2]; … … 1397 1397 global $wpdb; 1398 1398 1399 $blog_ID = $wpdb->escape($args[0]);1399 $blog_ID = (int) $args[0]; 1400 1400 $user_login = $wpdb->escape($args[1]); 1401 1401 $user_pass = $wpdb->escape($args[2]); … … 1474 1474 &nb
