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/class-wp-upgrader.php

    r28956 r29206  
    191191
    192192        $args = wp_parse_args($args, $defaults);
    193         // these were previously extract()'d
     193
     194        // These were previously extract()'d.
    194195        $source = $args['source'];
    195196        $destination = $args['destination'];
     
    250251        }
    251252
    252         //Has the source location changed? If so, we need a new source_files list.
     253        // Has the source location changed? If so, we need a new source_files list.
    253254        if ( $source !== $remote_source ) {
    254255            $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
    255256        }
    256         // Protection against deleting files in any important base directories.
    257         // Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the destination directory (WP_PLUGIN_DIR / wp-content/themes)
    258         // intending to copy the directory into the directory, whilst they pass the source as the actual files to copy.
     257        /*
     258         * Protection against deleting files in any important base directories.
     259         * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
     260         * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
     261         * to copy the directory into the directory, whilst they pass the source
     262         * as the actual files to copy.
     263         */
    259264        $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
     265
    260266        if ( is_array( $wp_theme_directories ) ) {
    261267            $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
     
    717723    }
    718724
    719     //return plugin info.
     725    // Return plugin info.
    720726    public function plugin_info() {
    721727        if ( ! is_array($this->result) )
     
    12671273        $this->update_current = 0;
    12681274
    1269         // The filesystem's mkdir() is not recursive. Make sure WP_LANG_DIR exists,
    1270         // as we then may need to create a /plugins or /themes directory inside of it.
     1275        /*
     1276         * The filesystem's mkdir() is not recursive. Make sure WP_LANG_DIR exists,
     1277         * as we then may need to create a /plugins or /themes directory inside of it.
     1278         */
    12711279        $remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR );
    12721280        if ( ! $wp_filesystem->exists( $remote_destination ) )
     
    14701478            if ( is_wp_error( $result ) ) {
    14711479                $error_code = $result->get_error_code();
    1472                 // Not all errors are equal. These codes are critical: copy_failed__copy_dir,
    1473                 // mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
    1474                 // do_rollback allows for update_core() to trigger a rollback if needed.
     1480                /*
     1481                 * Not all errors are equal. These codes are critical: copy_failed__copy_dir,
     1482                 * mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
     1483                 * do_rollback allows for update_core() to trigger a rollback if needed.
     1484                 */
    14751485                if ( false !== strpos( $error_code, 'do_rollback' ) )
    14761486                    $try_rollback = true;
     
    16021612            if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) )
    16031613                return false;
    1604             // else fall through to minor + major branches below
     1614            // Else fall through to minor + major branches below.
    16051615        }
    16061616
     
    16931703            );
    16941704
    1695             // Save the data
     1705            // Save the data.
    16961706            $this->id = wp_insert_attachment( $object, $file['file'] );
    16971707
    1698             // schedule a cleanup for 2 hours from now in case of failed install
     1708            // Schedule a cleanup for 2 hours from now in case of failed install.
    16991709            wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
    17001710
     
    20192029        $upgrade_result = $upgrader->upgrade( $upgrader_item, array(
    20202030            'clear_update_cache' => false,
    2021             'pre_check_md5'      => false, /* always use partial builds if possible for core updates */
    2022             'attempt_rollback'   => true, /* only available for core updates */
     2031            // Always use partial builds if possible for core updates.
     2032            'pre_check_md5'      => false,
     2033            // Only available for core updates.
     2034            'attempt_rollback'   => true,
    20232035        ) );
    20242036
    2025         // if the filesystem is unavailable, false is returned.
     2037        // If the filesystem is unavailable, false is returned.
    20262038        if ( false === $upgrade_result ) {
    20272039            $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
    20282040        }
    20292041
    2030         // Core doesn't output this, so lets append it so we don't get confused
     2042        // Core doesn't output this, so lets append it so we don't get confused.
    20312043        if ( 'core' == $type ) {
    20322044            if ( is_wp_error( $upgrade_result ) ) {
Note: See TracChangeset for help on using the changeset viewer.