<!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>[15306] trunk/wp-admin/export.php: Avoid variable clash in export.php.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15306">15306</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-06-23 07:17:49 +0000 (Wed, 23 Jun 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Avoid variable clash in export.php. see <a href="http://trac.wordpress.org/ticket/14026">#14026</a> for trunk.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminexportphp">trunk/wp-admin/export.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminexportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/export.php (15305 => 15306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/export.php        2010-06-23 05:10:45 UTC (rev 15305)
+++ trunk/wp-admin/export.php        2010-06-23 07:17:49 UTC (rev 15306)
</span><span class="lines">@@ -28,13 +28,13 @@
</span><span class="cx">                 $author = isset($_GET['author']) ? $_GET['author'] : 'all';
</span><span class="cx">                 $taxonomy = array();
</span><span class="cx">                 foreach ( get_taxonomies( array( 'show_ui' =&gt; true ) ) as $tax )
</span><del>-                        $taxonomy[ $tax ] = ! empty( $_GET['taxonomy'][ $tax ] ) ? $_GET['taxonomy'][ $tax ] : 'all';
-                $post_type = isset($_GET['post_type']) ? stripslashes_deep($_GET['post_type']) : 'all';
-                $status = isset($_GET['status']) ? stripslashes_deep($_GET['status']) : 'all';
</del><ins>+                        $taxonomy[ $tax ] = ! empty( $_GET['export_taxonomy'][ $tax ] ) ? $_GET['export_taxonomy'][ $tax ] : 'all';
+                $post_type = isset($_GET['export_post_type']) ? stripslashes_deep($_GET['export_post_type']) : 'all';
+                $status = isset($_GET['export_post_status']) ? stripslashes_deep($_GET['export_post_status']) : 'all';
</ins><span class="cx">                 $mm_start = isset($_GET['mm_start']) ? $_GET['mm_start'] : 'all';
</span><span class="cx">                 $mm_end = isset($_GET['mm_end']) ? $_GET['mm_end'] : 'all';
</span><span class="cx">                 if( $mm_start != 'all' ) {
</span><del>-                        $start_date = sprintf( &quot;%04d-%02d-%02d&quot;, substr( $mm_start, 0, 4 ), substr( $mm_start, 5, 2 ), 1 );
</del><ins>+                        $start_date = sprintf( &quot;%04d-%02d-%02d&quot;, substr( $MM._start, 0, 4 ), substr( $mm_start, 5, 2 ), 1 );
</ins><span class="cx">                 } else {
</span><span class="cx">                         $start_date = 'all';
</span><span class="cx">                 }
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> &lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> &lt;?php foreach ( get_taxonomies( array( 'show_ui' =&gt; true ), 'objects' ) as $tax_obj ) {
</span><del>-        $term_dropdown = wp_dropdown_categories( array( 'taxonomy' =&gt; $tax_obj-&gt;name, 'hide_if_empty' =&gt; true, 'show_option_all' =&gt; __( 'All Terms' ), 'name' =&gt; 'taxonomy[' . $tax_obj-&gt;name . ']', 'id' =&gt; 'taxonomy-' . $tax_obj-&gt;name, 'class' =&gt; '', 'echo' =&gt; false ) );
</del><ins>+        $term_dropdown = wp_dropdown_categories( array( 'taxonomy' =&gt; $tax_obj-&gt;name, 'hide_if_empty' =&gt; true, 'show_option_all' =&gt; __( 'All Terms' ), 'name' =&gt; 'export_taxonomy[' . $tax_obj-&gt;name . ']', 'id' =&gt; 'taxonomy-' . $tax_obj-&gt;name, 'class' =&gt; '', 'echo' =&gt; false ) );
</ins><span class="cx">         if ( $term_dropdown )
</span><span class="cx">                 echo '&lt;tr&gt;&lt;th&gt;&lt;label for=&quot;taxonomy-' . $tax_obj-&gt;name . '&quot;&gt;' . $tax_obj-&gt;labels-&gt;name . '&lt;/label&gt;&lt;/th&gt;&lt;td&gt;' . $term_dropdown . '&lt;/td&gt;&lt;/tr&gt;';
</span><span class="cx"> }
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> &lt;tr&gt;
</span><span class="cx"> &lt;th&gt;&lt;label for=&quot;post_type&quot;&gt;&lt;?php _e('Content Types'); ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx"> &lt;td&gt;
</span><del>-&lt;select name=&quot;post_type&quot; id=&quot;post_type&quot;&gt;
</del><ins>+&lt;select name=&quot;export_post_type&quot; id=&quot;post_type&quot;&gt;
</ins><span class="cx">         &lt;option value=&quot;all&quot; selected=&quot;selected&quot;&gt;&lt;?php _e('All Content'); ?&gt;&lt;/option&gt;
</span><span class="cx">         &lt;?php foreach ( get_post_types( array( 'public' =&gt; true, 'can_export' =&gt; true ), 'objects' ) as $post_type_obj ) { ?&gt;
</span><span class="cx">                 &lt;option value=&quot;&lt;?php echo $post_type_obj-&gt;name; ?&gt;&quot;&gt;&lt;?php echo $post_type_obj-&gt;labels-&gt;name; ?&gt;&lt;/option&gt;
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> &lt;tr&gt;
</span><span class="cx"> &lt;th&gt;&lt;label for=&quot;status&quot;&gt;&lt;?php _e('Statuses'); ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx"> &lt;td&gt;
</span><del>-&lt;select name=&quot;status&quot; id=&quot;status&quot;&gt;
</del><ins>+&lt;select name=&quot;export_post_status&quot; id=&quot;status&quot;&gt;
</ins><span class="cx">         &lt;option value=&quot;all&quot; selected=&quot;selected&quot;&gt;&lt;?php _e('All Statuses'); ?&gt;&lt;/option&gt;
</span><span class="cx"> &lt;?php foreach ( get_post_stati( array( 'internal' =&gt; false ), 'objects' ) as $post_status_obj ) { ?&gt;
</span><span class="cx">         &lt;option value=&quot;&lt;?php echo $post_status_obj-&gt;name; ?&gt;&quot;&gt;&lt;?php echo $post_status_obj-&gt;label; ?&gt;&lt;/option&gt;
</span></span></pre>
</div>
</div>

</body>
</html>