Make WordPress Core


Ignore:
Timestamp:
07/17/2014 09:13:53 AM (11 years ago)
Author:
DrewAPicture
Message:

Fix syntax for single- and multi-line comments in wp-admin-directory files.

See #28931.

File:
1 edited

Legend:

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

    r28893 r29206  
    180180            wp_die( __( 'Sorry, that file cannot be edited.' ) );
    181181
    182         //case 2 :
    183         //  wp_die( __('Sorry, can’t call files with their real path.' ));
     182        // case 2 :
     183        // wp_die( __('Sorry, can’t call files with their real path.' ));
    184184
    185185        case 3 :
     
    258258        __( "File upload stopped by extension." ));
    259259
    260     // this may not have orignially been intended to be overrideable, but historically has been
     260    /*
     261     * This may not have orignially been intended to be overrideable,
     262     * but historically has been.
     263     */
    261264    if ( isset( $overrides['upload_error_strings'] ) ) {
    262265        $upload_error_strings = $overrides['upload_error_strings'];
     
    268271    $test_upload = isset( $overrides['test_upload'] ) ? $overrides['test_upload'] : true;
    269272
    270     // If you override this, you must provide $ext and $type!!!!
     273    // If you override this, you must provide $ext and $type!!
    271274    $test_type = isset( $overrides['test_type'] ) ? $overrides['test_type'] : true;
    272275    $mimes = isset( $overrides['mimes'] ) ? $overrides['mimes'] : false;
     
    315318    }
    316319
    317     // A writable uploads dir will pass this test. Again, there's no point overriding this one.
     320    /*
     321     * A writable uploads dir will pass this test. Again, there's no point
     322     * overriding this one.
     323     */
    318324    if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) )
    319325        return call_user_func($upload_error_handler, $file, $uploads['error'] );
     
    321327    $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
    322328
    323     // Move the file to the uploads dir
     329    // Move the file to the uploads dir.
    324330    $new_file = $uploads['path'] . "/$filename";
    325331    if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) {
     
    332338    }
    333339
    334     // Set correct file permissions
     340    // Set correct file permissions.
    335341    $stat = stat( dirname( $new_file ));
    336342    $perms = $stat['mode'] & 0000666;
    337343    @ chmod( $new_file, $perms );
    338344
    339     // Compute the URL
     345    // Compute the URL.
    340346    $url = $uploads['url'] . "/$filename";
    341347
     
    10521058    $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? wp_unslash( $_POST['private_key'] ) : '');
    10531059
    1054     //sanitize the hostname, Some people might pass in odd-data:
     1060    // Sanitize the hostname, Some people might pass in odd-data:
    10551061    $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off
    10561062
Note: See TracChangeset for help on using the changeset viewer.