<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12107] trunk/wp-admin: Add subtitles and opening/
 closing DIVs on GUU results screen, see #10973</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12107">12107</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2009-10-26 07:04:30 +0000 (Mon, 26 Oct 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add subtitles and opening/closing DIVs on GUU results screen, see <a href="http://trac.wordpress.org/ticket/10973">#10973</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesclasswpupgraderphp">trunk/wp-admin/includes/class-wp-upgrader.php</a></li>
<li><a href="#trunkwpadminupdatecorephp">trunk/wp-admin/update-core.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesclasswpupgraderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-upgrader.php (12106 => 12107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-upgrader.php        2009-10-25 20:54:13 UTC (rev 12106)
+++ trunk/wp-admin/includes/class-wp-upgrader.php        2009-10-26 07:04:30 UTC (rev 12107)
</span><span class="lines">@@ -271,6 +271,7 @@
</span><span class="cx">                                                         'destination' =&gt; '', //And this
</span><span class="cx">                                                         'clear_destination' =&gt; false,
</span><span class="cx">                                                         'clear_working' =&gt; true,
</span><ins>+                                                        'is_multi' =&gt; false,
</ins><span class="cx">                                                         'hook_extra' =&gt; array() //Pass any extra $hook_extra args here, this will be passed to any hooked filters.
</span><span class="cx">                                                 );
</span><span class="cx"> 
</span><span class="lines">@@ -287,7 +288,9 @@
</span><span class="cx">                         return $res;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                $this-&gt;skin-&gt;header();
</del><ins>+                if ( !$is_multi ) // call $this-&gt;header separately if running multiple times
+                        $this-&gt;skin-&gt;header();
+
</ins><span class="cx">                 $this-&gt;skin-&gt;before();
</span><span class="cx"> 
</span><span class="cx">                 //Download the package (Note, This just returns the filename of the file if the package is a local file)
</span><span class="lines">@@ -321,7 +324,10 @@
</span><span class="cx">                         $this-&gt;skin-&gt;feedback('process_success');
</span><span class="cx">                 }
</span><span class="cx">                 $this-&gt;skin-&gt;after();
</span><del>-                $this-&gt;skin-&gt;footer();
</del><ins>+
+                if ( !$is_multi )
+                        $this-&gt;skin-&gt;footer();
+
</ins><span class="cx">                 return $result;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -355,6 +361,7 @@
</span><span class="cx"> 
</span><span class="cx">         var $result;
</span><span class="cx">         var $bulk = true;
</span><ins>+        var $show_before = '';
</ins><span class="cx"> 
</span><span class="cx">         function upgrade_strings() {
</span><span class="cx">                 $this-&gt;strings['up_to_date'] = __('The plugin is at the latest version.');
</span><span class="lines">@@ -447,7 +454,14 @@
</span><span class="cx">                 add_filter('upgrader_pre_install', array(&amp;$this, 'deactivate_plugin_before_upgrade'), 10, 2);
</span><span class="cx">                 add_filter('upgrader_clear_destination', array(&amp;$this, 'delete_old_plugin'), 10, 4);
</span><span class="cx"> 
</span><ins>+                $this-&gt;skin-&gt;header();
+                $all = count($plugins);
+                $i = 1;
</ins><span class="cx">                 foreach ( $plugins as $plugin ) {
</span><ins>+
+                        $this-&gt;show_before = sprintf( '&lt;h4&gt;' . __('Updating plugin %d of %d...') . '&lt;/h4&gt;', $i, $all );
+                        $i++;
+
</ins><span class="cx">                         if ( !isset( $current-&gt;response[ $plugin ] ) ) {
</span><span class="cx">                                 $this-&gt;skin-&gt;set_result(false);
</span><span class="cx">                                 $this-&gt;skin-&gt;error('up_to_date');
</span><span class="lines">@@ -466,17 +480,19 @@
</span><span class="cx">                                                 'destination' =&gt; WP_PLUGIN_DIR,
</span><span class="cx">                                                 'clear_destination' =&gt; true,
</span><span class="cx">                                                 'clear_working' =&gt; true,
</span><ins>+                                                'is_multi' =&gt; true,
</ins><span class="cx">                                                 'hook_extra' =&gt; array(
</span><span class="cx">                                                                         'plugin' =&gt; $plugin
</span><span class="cx">                                                 )
</span><span class="cx">                                         ));
</span><del>-                                
</del><ins>+
</ins><span class="cx">                         $results[$plugin] = $this-&gt;result;
</span><span class="cx"> 
</span><span class="cx">                         // Prevent credentials auth screen from displaying multiple times
</span><span class="cx">                         if ( false === $result )
</span><span class="cx">                                 break;
</span><span class="cx">                 }
</span><ins>+                $this-&gt;skin-&gt;footer();
</ins><span class="cx"> 
</span><span class="cx">                 //Cleanup our hooks, incase something else does a upgrade on this connection.
</span><span class="cx">                 remove_filter('upgrader_pre_install', array(&amp;$this, 'deactivate_plugin_before_upgrade'));
</span><span class="lines">@@ -902,11 +918,11 @@
</span><span class="cx">                         $this-&gt;feedback('&lt;strong&gt;' . __('Actions:') . '&lt;/strong&gt; ' . implode(' | ', (array)$update_actions));
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function footer() {
-                if ( $this-&gt;upgrader-&gt;bulk )
-                        return;
-
-                echo '&lt;/div&gt;';
</del><ins>+        function before() {
+                if ( $this-&gt;upgrader-&gt;show_before ) {
+                        echo $this-&gt;upgrader-&gt;show_before;
+                        $this-&gt;upgrader-&gt;show_before = '';
+                }
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminupdatecorephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/update-core.php (12106 => 12107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/update-core.php        2009-10-25 20:54:13 UTC (rev 12106)
+++ trunk/wp-admin/update-core.php        2009-10-26 07:04:30 UTC (rev 12107)
</span><span class="lines">@@ -126,10 +126,10 @@
</span><span class="cx">         }
</span><span class="cx">         echo '&lt;/ul&gt;';
</span><span class="cx">         dismissed_updates();
</span><del>-        echo '&lt;/div&gt;';
</del><span class="cx"> 
</span><span class="cx">         list_plugin_updates();
</span><span class="cx">         //list_theme_updates();
</span><ins>+        echo '&lt;/div&gt;';
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function list_plugin_updates() {
</span></span></pre>
</div>
</div>

</body>
</html>