<!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>[15508] trunk/wp-admin: Fix the Trash quickling in edit-comments.php.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15508">15508</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-08-18 22:26:22 +0000 (Wed, 18 Aug 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix the Trash quickling in edit-comments.php. See <a href="http://trac.wordpress.org/ticket/14637">#14637</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadminincludesdefaultlisttablesphp">trunk/wp-admin/includes/default-list-tables.php</a></li>
<li><a href="#trunkwpadminincludeslisttablephp">trunk/wp-admin/includes/list-table.php</a></li>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (15507 => 15508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-08-18 21:02:24 UTC (rev 15507)
+++ trunk/wp-admin/admin-ajax.php        2010-08-18 22:26:22 UTC (rev 15508)
</span><span class="lines">@@ -639,7 +639,7 @@
</span><span class="cx">         foreach ( $table-&gt;items as $comment ) {
</span><span class="cx">                 get_comment( $comment );
</span><span class="cx">                 ob_start();
</span><del>-                        $table-&gt;single_row( $comment-&gt;comment_ID, $mode, $status, true, true );
</del><ins>+                        $table-&gt;single_row( $comment-&gt;comment_ID, $mode, $comment_status, true, true );
</ins><span class="cx">                         $comment_list_item = ob_get_contents();
</span><span class="cx">                 ob_end_clean();
</span><span class="cx">                 $x-&gt;add( array(
</span></span></pre></div>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (15507 => 15508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-08-18 21:02:24 UTC (rev 15507)
+++ trunk/wp-admin/edit-comments.php        2010-08-18 22:26:22 UTC (rev 15508)
</span><span class="lines">@@ -257,9 +257,9 @@
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;comment_status&quot; value=&quot;&lt;?php echo esc_attr($comment_status); ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;pagegen_timestamp&quot; value=&quot;&lt;?php echo esc_attr(current_time('mysql', 1)); ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span><del>-&lt;input type=&quot;hidden&quot; name=&quot;_total&quot; value=&quot;&lt;?php echo esc_attr($total); ?&gt;&quot; /&gt;
-&lt;input type=&quot;hidden&quot; name=&quot;_per_page&quot; value=&quot;&lt;?php echo esc_attr($comments_per_page); ?&gt;&quot; /&gt;
-&lt;input type=&quot;hidden&quot; name=&quot;_page&quot; value=&quot;&lt;?php echo esc_attr($page); ?&gt;&quot; /&gt;
</del><ins>+&lt;input type=&quot;hidden&quot; name=&quot;_total&quot; value=&quot;&lt;?php echo esc_attr( $table-&gt;get_pagination_arg('total_items') ); ?&gt;&quot; /&gt;
+&lt;input type=&quot;hidden&quot; name=&quot;_per_page&quot; value=&quot;&lt;?php echo esc_attr( $table-&gt;get_pagination_arg('per_page') ); ?&gt;&quot; /&gt;
+&lt;input type=&quot;hidden&quot; name=&quot;_page&quot; value=&quot;&lt;?php echo esc_attr( $table-&gt;get_pagination_arg('page') ); ?&gt;&quot; /&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;?php if ( isset($_REQUEST['paged']) ) { ?&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;paged&quot; value=&quot;&lt;?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?&gt;&quot; /&gt;
</span><span class="lines">@@ -278,8 +278,8 @@
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;s&quot; value=&quot;&lt;?php echo esc_attr($search); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;&lt;?php echo esc_attr($mode); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;comment_status&quot; value=&quot;&lt;?php echo esc_attr($comment_status); ?&gt;&quot; /&gt;
</span><del>-        &lt;input type=&quot;hidden&quot; name=&quot;page&quot; value=&quot;&lt;?php echo esc_attr($page); ?&gt;&quot; /&gt;
-        &lt;input type=&quot;hidden&quot; name=&quot;per_page&quot; value=&quot;&lt;?php echo esc_attr($comments_per_page); ?&gt;&quot; /&gt;
</del><ins>+        &lt;input type=&quot;hidden&quot; name=&quot;page&quot; value=&quot;&lt;?php echo esc_attr( $table-&gt;get_pagination_arg('page') ); ?&gt;&quot; /&gt;
+        &lt;input type=&quot;hidden&quot; name=&quot;per_page&quot; value=&quot;1&quot; /&gt;
</ins><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;p&quot; value=&quot;&lt;?php echo esc_attr( $post_id ); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;comment_type&quot; value=&quot;&lt;?php echo esc_attr( $comment_type ); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/default-list-tables.php (15507 => 15508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/default-list-tables.php        2010-08-18 21:02:24 UTC (rev 15507)
+++ trunk/wp-admin/includes/default-list-tables.php        2010-08-18 22:26:22 UTC (rev 15508)
</span><span class="lines">@@ -1941,7 +1941,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function prepare_items() {
</span><del>-                global $post_id, $comment_status, $mode;
</del><ins>+                global $post_id, $comment_status, $mode, $search;
</ins><span class="cx"> 
</span><span class="cx">                 $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -1955,8 +1955,8 @@
</span><span class="cx"> 
</span><span class="cx">                 $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
</span><span class="cx"> 
</span><del>-                if ( isset( $_POST['num'] ) )
-                        $comments_per_page = $_POST['num'];
</del><ins>+                if ( isset( $_POST['per_page'] ) )
+                        $comments_per_page = $_POST['per_page'];
</ins><span class="cx">                 else
</span><span class="cx">                         $comments_per_page = (int) get_user_option( 'edit_comments_per_page' );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminincludeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/list-table.php (15507 => 15508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table.php        2010-08-18 21:02:24 UTC (rev 15507)
+++ trunk/wp-admin/includes/list-table.php        2010-08-18 22:26:22 UTC (rev 15508)
</span><span class="lines">@@ -136,6 +136,22 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><ins>+         * Access the pagination args
+         *
+         * @since 3.1.0
+         * @access public
+         *
+         * @param string $key
+         * @return array
+         */
+        function get_pagination_arg( $key ) {
+                if ( 'page' == $key )
+                        return $this-&gt;get_pagenum();
+
+                return @$this-&gt;_pagination_args[ $key ];
+        }
+
+        /**
</ins><span class="cx">          * Wether the table has items to display or not
</span><span class="cx">          *
</span><span class="cx">          * @since 3.1.0
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (15507 => 15508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2010-08-18 21:02:24 UTC (rev 15507)
+++ trunk/wp-admin/js/edit-comments.dev.js        2010-08-18 22:26:22 UTC (rev 15508)
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
</span><del>-//                $('#get-extra-comments').submit(); See http://core.trac.wordpress.org/ticket/14637
</del><ins>+                $('#get-extra-comments').submit();
</ins><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
</span></span></pre>
</div>
</div>

</body>
</html>