Make WordPress Core


Ignore:
Timestamp:
12/06/2007 07:49:33 PM (17 years ago)
Author:
ryan
Message:

Remove unused vars. Props DD32. see #5418

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r6340 r6364  
    109109
    110110
    111 function get_weekstartend( $mysqlstring, $start_of_week ) {
     111function get_weekstartend( $mysqlstring, $start_of_week = '' ) {
    112112    $my = substr( $mysqlstring, 0, 4 );
    113113    $mm = substr( $mysqlstring, 8, 2 );
     
    116116    $weekday = date( 'w', $day );
    117117    $i = 86400;
    118 
    119     if ( $weekday < get_option( 'start_of_week' ) )
    120         $weekday = 7 - ( get_option( 'start_of_week' ) - $weekday );
    121 
    122     while ( $weekday > get_option( 'start_of_week' ) ) {
     118    if( !is_numeric($a) )
     119        $start_of_week = get_option( 'start_of_week' );
     120
     121    if ( $weekday < $start_of_week )
     122        $weekday = 7 - $start_of_week - $weekday;
     123
     124    while ( $weekday > $start_of_week ) {
    123125        $weekday = date( 'w', $day );
    124         if ( $weekday < get_option( 'start_of_week' ) )
    125             $weekday = 7 - ( get_option( 'start_of_week' ) - $weekday );
    126 
    127         $day = $day - 86400;
     126        if ( $weekday < $start_of_week )
     127            $weekday = 7 - $start_of_week - $weekday;
     128
     129        $day -= 86400;
    128130        $i = 0;
    129131    }
     
    489491
    490492function do_enclose( $content, $post_ID ) {
    491     global $wp_version, $wpdb;
     493    global $wpdb;
    492494    include_once( ABSPATH . WPINC . '/class-IXR.php' );
    493495
     
    10291031}
    10301032
    1031 function wp_upload_bits( $name, $type, $bits ) {
     1033function wp_upload_bits( $name, $deprecated, $bits ) {
    10321034    if ( empty( $name ) )
    10331035        return array( 'error' => __( "Empty filename" ) );
     
    10671069        return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) );
    10681070
    1069     $success = @fwrite( $ifp, $bits );
     1071    @fwrite( $ifp, $bits );
    10701072    fclose( $ifp );
    10711073    // Set correct file permissions
     
    12121214
    12131215function wp_nonce_ays( $action ) {
    1214     global $pagenow, $menu, $submenu, $parent_file, $submenu_file;
     1216    global $pagenow;
    12151217
    12161218    $adminurl = get_option( 'siteurl' ) . '/wp-admin';
     
    15001502         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    15011503
    1502          $data = curl_exec ($ch);
     1504         curl_exec($ch);
    15031505
    15041506         $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Note: See TracChangeset for help on using the changeset viewer.