@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function __construct( $args = array() ) { |
27 | 27 | |
28 | - parent::__construct(); |
|
28 | + parent::__construct(); |
|
29 | 29 | |
30 | 30 | } |
31 | 31 | |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function set_upgrader( &$upgrader ) { |
40 | 40 | |
41 | - if ( is_object( $upgrader ) ) { |
|
42 | - $this->upgrader =& $upgrader; |
|
43 | - } |
|
41 | + if ( is_object( $upgrader ) ) { |
|
42 | + $this->upgrader =& $upgrader; |
|
43 | + } |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function set_result( $result ) { |
55 | 55 | |
56 | - $this->result = $result; |
|
56 | + $this->result = $result; |
|
57 | 57 | |
58 | 58 | } |
59 | 59 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | public function set_upgrader( &$upgrader ) { |
40 | 40 | |
41 | 41 | if ( is_object( $upgrader ) ) { |
42 | - $this->upgrader =& $upgrader; |
|
42 | + $this->upgrader = & $upgrader; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } |
@@ -97,7 +97,8 @@ discard block |
||
97 | 97 | */ |
98 | 98 | $options = apply_filters( 'upgrader_package_options', $options ); |
99 | 99 | |
100 | - if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times |
|
100 | + if ( ! $options['is_multi'] ) { |
|
101 | +// call $this->header separately if running multiple times |
|
101 | 102 | $this->skin->header(); |
102 | 103 | } |
103 | 104 | |
@@ -288,7 +289,8 @@ discard block |
||
288 | 289 | return $reply; |
289 | 290 | } |
290 | 291 | |
291 | - if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote? |
|
292 | + if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { |
|
293 | +//Local file or remote? |
|
292 | 294 | return $package; //must be a local file.. |
293 | 295 | } |
294 | 296 | |
@@ -443,11 +445,13 @@ discard block |
||
443 | 445 | $remote_destination = $wp_filesystem->find_folder( $local_destination ); |
444 | 446 | |
445 | 447 | //Locate which directory to copy to the new folder, This is based on the actual folder holding the files. |
446 | - if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents. |
|
448 | + if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { |
|
449 | +//Only one folder? Then we want its contents. |
|
447 | 450 | $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] ); |
448 | 451 | } elseif ( count( $source_files ) == 0 ) { |
449 | 452 | return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files? |
450 | - } else { // It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename. |
|
453 | + } else { |
|
454 | +// It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename. |
|
451 | 455 | $source = trailingslashit( $args['source'] ); |
452 | 456 | } |
453 | 457 |