Use EXTR_SKIP when extracting. see #4468

git-svn-id: http://svn.automattic.com/wordpress/trunk@5708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-06-14 22:45:40 +00:00
parent 7f44512c5d
commit 9d3d20f063
15 changed files with 33 additions and 33 deletions

View File

@ -82,7 +82,7 @@ switch($step) {
<?php
$result = wp_install($weblog_title, 'admin', $admin_email, $public);
extract($result);
extract($result, EXTR_SKIP);
?>
<p><em><?php _e('Finished!'); ?></em></p>

View File

@ -370,7 +370,7 @@ function wp_list_authors($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract($r);
extract($r, EXTR_SKIP);
$return = '';

View File

@ -25,7 +25,7 @@ function wp_get_links($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
return get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, $echo);
} // end wp_get_links
@ -247,7 +247,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
foreach ( (array) $bookmarks as $bookmark ) {
if ( !isset($bookmark->recently_updated) )
@ -327,7 +327,7 @@ function wp_list_bookmarks($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$output = '';

View File

@ -35,7 +35,7 @@ function get_bookmarks($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$key = md5( serialize( $r ) );
if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) )

View File

@ -506,7 +506,7 @@ class Walker_Page extends Walker {
function start_el($output, $page, $depth, $current_page, $args) {
if ( $depth )
$indent = str_repeat("\t", $depth);
extract($args);
extract($args, EXTR_SKIP);
$css_class = 'page_item';
$_current_page = get_page( $current_page );
if ( $page->ID == $current_page )
@ -694,7 +694,7 @@ class WP_Ajax_Response {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
if ( is_wp_error($id) ) {
$data = $id;

View File

@ -285,7 +285,7 @@ function comments_template( $file = '/comments.php' ) {
$req = get_option('require_name_email');
$commenter = wp_get_current_commenter();
extract($commenter);
extract($commenter, EXTR_SKIP);
// TODO: Use API instead of SELECTs.
if ( $user_ID) {

View File

@ -181,7 +181,7 @@ function sanitize_comment_cookies() {
function wp_allow_comment($commentdata) {
global $wpdb;
extract($commentdata);
extract($commentdata, EXTR_SKIP);
// Simple duplicate check
$dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' ";
@ -334,7 +334,7 @@ function wp_get_current_commenter() {
function wp_insert_comment($commentdata) {
global $wpdb;
extract($commentdata);
extract($commentdata, EXTR_SKIP);
if ( ! isset($comment_author_IP) )
$comment_author_IP = preg_replace( '/[^0-9., ]/', '',$_SERVER['REMOTE_ADDR'] );
@ -469,7 +469,7 @@ function wp_update_comment($commentarr) {
$commentarr = wp_filter_comment( $commentarr );
// Now extract the merged array.
extract($commentarr);
extract($commentarr, EXTR_SKIP);
$comment_content = apply_filters('comment_save_pre', $comment_content);
@ -531,7 +531,7 @@ function discover_pingback_server_uri($url, $timeout_bytes = 2048) {
$x_pingback_str = 'x-pingback: ';
$pingback_href_original_pos = 27;
extract(parse_url($url));
extract(parse_url($url), EXTR_SKIP);
if ( !isset($host) ) // Not an URL. This should never happen.
return false;

View File

@ -330,7 +330,7 @@ function wp_get_archives($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
if ( '' == $type )
$type = 'monthly';

View File

@ -168,7 +168,7 @@ function wp_mail( $to, $subject, $message, $headers = '' ) {
}
// Compact the input, apply the filters, and extract them back out
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ) );
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ), EXTR_SKIP );
// Default headers
if ( empty( $headers ) ) {

View File

@ -143,7 +143,7 @@ function wp_link_pages($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
global $post, $id, $page, $numpages, $multipage, $more, $pagenow;
if ( $more_file != '' )
@ -256,7 +256,7 @@ function wp_dropdown_pages($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$pages = get_pages($r);
$output = '';
@ -287,7 +287,7 @@ function wp_list_pages($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$output = '';
$current_page = 0;

View File

@ -185,7 +185,7 @@ function get_posts($args) {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$numberposts = (int) $numberposts;
$offset = (int) $offset;
@ -495,7 +495,7 @@ function wp_insert_post($postarr = array()) {
$postarr = get_object_vars($postarr);
// export array as variables
extract($postarr);
extract($postarr, EXTR_SKIP);
// Are we updating or creating?
$update = false;
@ -863,7 +863,7 @@ function trackback_url_list($tb_list, $post_id) {
$postdata = wp_get_single_post($post_id, ARRAY_A);
// import postdata as variables
extract($postdata);
extract($postdata, EXTR_SKIP);
// form an excerpt
$excerpt = strip_tags($post_excerpt?$post_excerpt:$post_content);
@ -1050,7 +1050,7 @@ function &get_pages($args = '') {
);
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$key = md5( serialize( $r ) );
if ( $cache = wp_cache_get( 'get_pages', 'page' ) )
@ -1204,7 +1204,7 @@ function wp_insert_attachment($object, $file = false, $post_parent = 0) {
$object = get_object_vars($object);
// Export array as variables
extract($object);
extract($object, EXTR_SKIP);
// Get the basics.
$post_content = apply_filters('content_save_pre', $post_content);

View File

@ -45,7 +45,7 @@ function validate_username( $username ) {
function wp_insert_user($userdata) {
global $wpdb;
extract($userdata);
extract($userdata, EXTR_SKIP);
// Are we updating or creating?
if ( !empty($ID) ) {

View File

@ -44,7 +44,7 @@ function wp_count_terms( $taxonomy, $args = array() ) {
$defaults = array('ignore_empty' => false);
$args = wp_parse_args($args, $defaults);
extract($args);
extract($args, EXTR_SKIP);
$where = '';
if ( $ignore_empty )
@ -69,7 +69,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
$args = wp_parse_args($args, $defaults);
$args['name'] = $term;
$args = sanitize_term($args, $taxonomy, 'db');
extract($args);
extract($args, EXTR_SKIP);
if ( empty($slug) )
$slug = sanitize_title($name);
@ -153,7 +153,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
$defaults = array();
$args = wp_parse_args($args, $defaults);
extract($args);
extract($args, EXTR_SKIP);
if ( isset($default) ) {
$default = (int) $default;
@ -214,7 +214,7 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
$defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
$args = wp_parse_args($args, $defaults);
extract($args);
extract($args, EXTR_SKIP);
if ( empty($slug) )
$slug = sanitize_title($name);
@ -382,7 +382,7 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
$defaults = array('order' => 'ASC');
$args = wp_parse_args( $args, $defaults );
extract($args);
extract($args, EXTR_SKIP);
$terms = array_map('intval', $terms);
@ -427,7 +427,7 @@ function get_object_terms($object_ids, $taxonomies, $args = array()) {
$defaults = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
$args = wp_parse_args( $args, $defaults );
extract($args);
extract($args, EXTR_SKIP);
if ( 'count' == $orderby )
$orderby = 'tt.count';
@ -489,7 +489,7 @@ function &get_terms($taxonomies, $args = '') {
$args['hide_empty'] = 0;
$args['hierarchical'] = false;
}
extract($args);
extract($args, EXTR_SKIP);
if ( $child_of ) {
$hierarchy = _get_term_hierarchy($taxonomies[0]);

View File

@ -192,7 +192,7 @@ function wp_dropdown_users( $args = '' ) {
$defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0;
$r = wp_parse_args( $args, $defaults );
extract( $r );
extract( $r, EXTR_SKIP );
$query = "SELECT * FROM $wpdb->users";

View File

@ -389,7 +389,7 @@ function wp_widget_pages_control() {
function wp_widget_links($args) {
global $wp_db_version;
extract($args);
extract($args, EXTR_SKIP);
if ( $wp_db_version < 3582 ) {
// This ONLY works with li/h2 sidebars.
get_links_list();