Skip to content

Commit a56e833

Browse files
Consistently call skin methods in WP_Upgrader. fixes #25254.
git-svn-id: https://develop.svn.wordpress.org/trunk@25370 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c05412b commit a56e833

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/wp-admin/includes/class-wp-upgrader.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,21 +299,26 @@ function run($options) {
299299
if ( ! $res ) //Mainly for non-connected filesystem.
300300
return false;
301301

302+
if ( ! $is_multi ) // call $this->header separately if running multiple times
303+
$this->skin->header();
304+
305+
$this->skin->before();
306+
302307
if ( is_wp_error($res) ) {
303308
$this->skin->error($res);
309+
$this->skin->after();
310+
if ( ! $is_multi )
311+
$this->skin->footer();
304312
return $res;
305313
}
306314

307-
if ( !$is_multi ) // call $this->header separately if running multiple times
308-
$this->skin->header();
309-
310-
$this->skin->before();
311-
312315
//Download the package (Note, This just returns the filename of the file if the package is a local file)
313316
$download = $this->download_package( $package );
314317
if ( is_wp_error($download) ) {
315318
$this->skin->error($download);
316319
$this->skin->after();
320+
if ( ! $is_multi )
321+
$this->skin->footer();
317322
return $download;
318323
}
319324

@@ -324,6 +329,8 @@ function run($options) {
324329
if ( is_wp_error($working_dir) ) {
325330
$this->skin->error($working_dir);
326331
$this->skin->after();
332+
if ( ! $is_multi )
333+
$this->skin->footer();
327334
return $working_dir;
328335
}
329336

@@ -345,9 +352,10 @@ function run($options) {
345352
//Install Succeeded
346353
$this->skin->feedback('process_success');
347354
}
355+
348356
$this->skin->after();
349357

350-
if ( !$is_multi )
358+
if ( ! $is_multi )
351359
$this->skin->footer();
352360

353361
return $result;

0 commit comments

Comments
 (0)