From a56e83373dcbbb302310c6a525eba976b76eb988 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 12 Sep 2013 02:42:10 +0000 Subject: [PATCH] Consistently call skin methods in WP_Upgrader. fixes #25254. git-svn-id: https://develop.svn.wordpress.org/trunk@25370 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-upgrader.php | 22 ++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index a5e78ae8a5..b9f66a009c 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -299,21 +299,26 @@ class WP_Upgrader { if ( ! $res ) //Mainly for non-connected filesystem. return false; - if ( is_wp_error($res) ) { - $this->skin->error($res); - return $res; - } - - if ( !$is_multi ) // call $this->header separately if running multiple times + if ( ! $is_multi ) // call $this->header separately if running multiple times $this->skin->header(); $this->skin->before(); + if ( is_wp_error($res) ) { + $this->skin->error($res); + $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); + return $res; + } + //Download the package (Note, This just returns the filename of the file if the package is a local file) $download = $this->download_package( $package ); if ( is_wp_error($download) ) { $this->skin->error($download); $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); return $download; } @@ -324,6 +329,8 @@ class WP_Upgrader { if ( is_wp_error($working_dir) ) { $this->skin->error($working_dir); $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); return $working_dir; } @@ -345,9 +352,10 @@ class WP_Upgrader { //Install Succeeded $this->skin->feedback('process_success'); } + $this->skin->after(); - if ( !$is_multi ) + if ( ! $is_multi ) $this->skin->footer(); return $result;