<!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' => 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( "%04d-%02d-%02d", substr( $mm_start, 0, 4 ), substr( $mm_start, 5, 2 ), 1 );
</del><ins>+                        $start_date = sprintf( "%04d-%02d-%02d", 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"> </td>
</span><span class="cx"> </tr>
</span><span class="cx"> <?php foreach ( get_taxonomies( array( 'show_ui' => true ), 'objects' ) as $tax_obj ) {
</span><del>-        $term_dropdown = wp_dropdown_categories( array( 'taxonomy' => $tax_obj->name, 'hide_if_empty' => true, 'show_option_all' => __( 'All Terms' ), 'name' => 'taxonomy[' . $tax_obj->name . ']', 'id' => 'taxonomy-' . $tax_obj->name, 'class' => '', 'echo' => false ) );
</del><ins>+        $term_dropdown = wp_dropdown_categories( array( 'taxonomy' => $tax_obj->name, 'hide_if_empty' => true, 'show_option_all' => __( 'All Terms' ), 'name' => 'export_taxonomy[' . $tax_obj->name . ']', 'id' => 'taxonomy-' . $tax_obj->name, 'class' => '', 'echo' => false ) );
</ins><span class="cx">         if ( $term_dropdown )
</span><span class="cx">                 echo '<tr><th><label for="taxonomy-' . $tax_obj->name . '">' . $tax_obj->labels->name . '</label></th><td>' . $term_dropdown . '</td></tr>';
</span><span class="cx"> }
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> <tr>
</span><span class="cx"> <th><label for="post_type"><?php _e('Content Types'); ?></label></th>
</span><span class="cx"> <td>
</span><del>-<select name="post_type" id="post_type">
</del><ins>+<select name="export_post_type" id="post_type">
</ins><span class="cx">         <option value="all" selected="selected"><?php _e('All Content'); ?></option>
</span><span class="cx">         <?php foreach ( get_post_types( array( 'public' => true, 'can_export' => true ), 'objects' ) as $post_type_obj ) { ?>
</span><span class="cx">                 <option value="<?php echo $post_type_obj->name; ?>"><?php echo $post_type_obj->labels->name; ?></option>
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> <tr>
</span><span class="cx"> <th><label for="status"><?php _e('Statuses'); ?></label></th>
</span><span class="cx"> <td>
</span><del>-<select name="status" id="status">
</del><ins>+<select name="export_post_status" id="status">
</ins><span class="cx">         <option value="all" selected="selected"><?php _e('All Statuses'); ?></option>
</span><span class="cx"> <?php foreach ( get_post_stati( array( 'internal' => false ), 'objects' ) as $post_status_obj ) { ?>
</span><span class="cx">         <option value="<?php echo $post_status_obj->name; ?>"><?php echo $post_status_obj->label; ?></option>
</span></span></pre>
</div>
</div>
</body>
</html>