url encode/decode @72a098575b06f561b22bdc79abc491e16c226f2d

This commit is contained in:
Mike Jolley 2012-04-10 18:16:32 +01:00
parent e25e7b46b1
commit 79aa1eb411
1 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@
function woocommerce_reports() {
$current_tab = (isset($_GET['tab'])) ? $_GET['tab'] : 'sales';
$current_chart = (isset($_GET['chart'])) ? $_GET['chart'] : 0;
$current_tab = ( isset( $_GET['tab'] ) ) ? urldecode( $_GET['tab'] ) : 'sales';
$current_chart = ( isset( $_GET['chart'] ) ) ? urldecode( $_GET['chart'] ) : 0;
$charts = apply_filters('woocommerce_reports_charts', array(
'sales' => array(
@ -68,7 +68,7 @@ function woocommerce_reports() {
<div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
foreach ($charts as $name => $value) :
echo '<a href="'.admin_url('admin.php?page=woocommerce_reports&tab='.$name).'" class="nav-tab ';
echo '<a href="'.admin_url( 'admin.php?page=woocommerce_reports&tab=' . urlencode($name) ).'" class="nav-tab ';
if( $current_tab == $name ) echo 'nav-tab-active';
echo '">'.ucfirst($name).'</a>';
endforeach;
@ -79,7 +79,7 @@ function woocommerce_reports() {
<?php if (sizeof($charts[$current_tab])>1) : ?><ul class="subsubsub"><li><?php
$links = array();
foreach ($charts[$current_tab] as $key => $chart) :
$link = '<a href="admin.php?page=woocommerce_reports&tab='.$current_tab.'&amp;chart='.$key.'" class="';
$link = '<a href="admin.php?page=woocommerce_reports&tab=' . urlencode($current_tab) . '&amp;chart=' . urlencode($key) . '" class="';
if ($key==$current_chart) $link .= 'current';
$link .= '">'.$chart['title'].'</a>';
$links[] = $link;