Make WordPress Core

Changeset 14546


Ignore:
Timestamp:
05/10/2010 08:41:14 PM (15 years ago)
Author:
nacin
Message:

Fix double-tabbing in get_dropins.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r14545 r14546  
    335335            if ( isset( $_dropins[ $file ] ) )
    336336                $plugin_files[] = $file;
    337             }
     337        }
    338338    } else {
    339339        return $dropins;
     
    346346
    347347    foreach ( $plugin_files as $plugin_file ) {
    348             if ( !is_readable( WP_CONTENT_DIR . "/$plugin_file" ) )
    349                     continue;
    350             $plugin_data = get_plugin_data( WP_CONTENT_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached.
    351             if ( empty ( $plugin_data['Name'] ) )
    352                 $plugin_data['Name'] = $plugin_file;
    353             $dropins[ $plugin_file ] = $plugin_data;
     348        if ( !is_readable( WP_CONTENT_DIR . "/$plugin_file" ) )
     349            continue;
     350        $plugin_data = get_plugin_data( WP_CONTENT_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached.
     351        if ( empty( $plugin_data['Name'] ) )
     352            $plugin_data['Name'] = $plugin_file;
     353        $dropins[ $plugin_file ] = $plugin_data;
    354354    }
    355355
  • trunk/wp-includes/meta.php

    r14308 r14546  
    2222 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    2323 * @param int $object_id ID of the object metadata is for
    24  * @param string $meta_key Metadata key
     24 * @param string $meta_key Metadata key. Expected unslashed.
    2525 * @param string $meta_value Metadata value
    2626 * @param bool $unique Optional, default is false.  Whether the specified metadata key should be
     
    4343    $column = esc_sql($meta_type . '_id');
    4444
    45     // expected_slashed ($meta_key)
    46     $meta_key = stripslashes($meta_key);
    47 
    4845    if ( $unique && $wpdb->get_var( $wpdb->prepare(
    4946        "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d",
     
    8380 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    8481 * @param int $object_id ID of the object metadata is for
    85  * @param string $meta_key Metadata key
     82 * @param string $meta_key Metadata key. Expected unslashed.
    8683 * @param string $meta_value Metadata value
    8784 * @param string $prev_value Optional.  If specified, only update existing metadata entries with
     
    103100    $column = esc_sql($meta_type . '_id');
    104101    $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
    105 
    106     // expected_slashed ($meta_key)
    107     $meta_key = stripslashes($meta_key);
    108102
    109103    if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) )
     
    144138 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    145139 * @param int $object_id ID of the object metadata is for
    146  * @param string $meta_key Metadata key
     140 * @param string $meta_key Metadata key. Expected unslashed.
    147141 * @param string $meta_value Optional. Metadata value.  If specified, only delete metadata entries
    148142 *      with this value.  Otherwise, delete all entries with the specified meta_key.
     
    166160    $type_column = esc_sql($meta_type . '_id');
    167161    $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
    168     // expected_slashed ($meta_key)
    169     $meta_key = stripslashes($meta_key);
     162
    170163    $meta_value = maybe_serialize( stripslashes_deep($meta_value) );
    171164
Note: See TracChangeset for help on using the changeset viewer.