// Fix #PSFV-30 + context part 24

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7792 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-28 14:12:17 +00:00
parent 31ed17058c
commit a1a32714ab
22 changed files with 47 additions and 55 deletions
+6 -6
View File
@@ -70,7 +70,7 @@ function displayJavascriptAlert($s){echo '<script type="text/javascript">alert(\
if (isset($_GET['ajaxProductManufacturers']))
{
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$manufacturers = Manufacturer::getManufacturers();
if ($manufacturers)
{
@@ -87,7 +87,7 @@ if (isset($_GET['ajaxReferrers']))
if (isset($_GET['ajaxProductSuppliers']))
{
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$suppliers = Supplier::getSuppliers();
if ($suppliers)
{
@@ -100,7 +100,7 @@ if (isset($_GET['ajaxProductSuppliers']))
if (isset($_GET['ajaxProductAccessories']))
{
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$jsonArray = array();
$products = Db::getInstance()->ExecuteS('
@@ -122,7 +122,7 @@ if (isset($_GET['ajaxProductAccessories']))
if (isset($_GET['ajaxDiscountCustomers']))
{
$currentIndex = 'index.php?tab=AdminDiscounts';
AdminTab::$currentIndex = 'index.php?tab=AdminDiscounts';
$jsonArray = array();
$filter = Tools::getValue('filter');
@@ -180,14 +180,14 @@ if ($step = (int)(Tools::getValue('ajaxProductTab')))
die (Tools::displayError('Product cannot be loaded'));
$switchArray = array(3 => 'displayFormPrices', 4 => 'displayFormAttributes', 5 => 'displayFormFeatures', 6 => 'displayFormCustomization', 7 => 'displayFormAttachments');
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
if (key_exists($step, $switchArray))
$admin->{$switchArray[$step]}($product, $languages, $defaultLanguage);
}
if (isset($_GET['getAvailableFields']) and isset($_GET['entity']))
{
$currentIndex = 'index.php?tab=AdminImport';
AdminTab::$currentIndex = 'index.php?tab=AdminImport';
$jsonArray = array();
require_once(dirname(__FILE__).'/tabs/AdminImport.php');
$import = new AdminImport();
+2 -4
View File
@@ -137,12 +137,10 @@ class AdminAttachments extends AdminTab
parent::getList((int)$id_lang, $orderBy, $orderWay, $start, $limit);
if(sizeof($this->_list))
$this->_productAttachements = Attachment::getProductAttached((int)$id_lang, $this->_list);
}
}
protected function _displayDeleteLink($token = NULL, $id)
{
global $currentIndex;
$_cacheLang['Delete'] = $this->l('Delete');
$_cacheLang['DeleteItem'] = $this->l('Delete item #', __CLASS__, TRUE, FALSE);
@@ -161,7 +159,7 @@ class AdminAttachments extends AdminTab
return false;
}
</script>
<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token!=NULL ? $token : $this->token).'"
<a href="'.self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token!=NULL ? $token : $this->token).'"
onclick="'.(isset($this->_productAttachements[$id]) ? 'return confirmProductAttached(\''.$productList.'\')' : 'return confirm(\''.$_cacheLang['DeleteItem'].$id.' ?'.(!is_null($this->specificConfirmDelete) ? '\r'.rtrim($this->specificConfirmDelete, ', ') : '').'\')' ).'">
<img src="../img/admin/delete.gif" alt="'.$_cacheLang['Delete'].'" title="'.$_cacheLang['Delete'].'" /></a>';
}
+1 -1
View File
@@ -347,7 +347,7 @@ class AdminDiscounts extends AdminTab
if ($(\'#filter\').val())
filterValue = $(\'#filter\').val();
$.getJSON("'.dirname($currentIndex).'/ajax.php",{ajaxDiscountCustomers:1,filter:filterValue},
$.getJSON("'.dirname(self::$currentIndex).'/ajax.php",{ajaxDiscountCustomers:1,filter:filterValue},
function(obj) {
var groups_length = obj.groups.length;
if (obj.groups.length == 0)
+2 -2
View File
@@ -168,13 +168,13 @@ class AdminGroups extends AdminTab
public function viewgroup()
{
$context = Context::getContext();
$currentIndex = 'index.php?tab=AdminGroups';
self::$currentIndex = 'index.php?tab=AdminGroups';
if (!($obj = $this->loadObject(true)))
return;
echo '
<fieldset style="width: 400px">
<div style="float: right"><a href="'.$currentIndex.'&updategroup&id_group='.$obj->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a></div>
<div style="float: right"><a href="'.self::$currentIndex.'&updategroup&id_group='.$obj->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a></div>
<span style="font-weight: bold; font-size: 14px;">'.strval($obj->name[(int)$context->language->id]).'</span>
<div class="clear">&nbsp;</div>
'.$this->l('Discount:').' '.(float)($obj->reduction).$this->l('%').'
+3 -4
View File
@@ -71,7 +71,7 @@ class AdminImages extends AdminTab
if ($this->tabAccess['edit'] === '1')
{
if($this->_moveImagesToNewFileSystem())
Tools::redirectAdmin($currentIndex.'&conf=25'.'&token='.$this->token);
Tools::redirectAdmin(self::$currentIndex.'&conf=25'.'&token='.$this->token);
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
@@ -90,7 +90,7 @@ class AdminImages extends AdminTab
|| !Configuration::updateValue('PS_PNG_QUALITY', Tools::getValue('PS_PNG_QUALITY')))
$this->_errors[] = Tools::displayError('Unknown error.');
else
Tools::redirectAdmin($currentIndex.'&token='.Tools::getValue('token').'&conf=4');
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
@@ -487,9 +487,8 @@ class AdminImages extends AdminTab
*/
public function displayImagePreferences()
{
global $currentIndex;
echo '<br />
<form action="'.$currentIndex.'&token='.$this->token.'" method="post">
<form action="'.self::$currentIndex.'&token='.$this->token.'" method="post">
<fieldset class="width4">
<legend><img src="../img/admin/picture.gif" /> '.$this->l('Images').'</legend>'.'
<p>'.$this->l('JPEG images have a small file size and standard quality. PNG images have a bigger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
+1 -1
View File
@@ -1188,7 +1188,7 @@ class AdminProducts extends AdminTab
$this->_errors[] = Tools::displayError('An error occurred while adding tags.');
elseif ($id_image = $this->addProductImage($object, Tools::getValue('resizer')))
{
$currentIndex .= '&image_updated='.(int)Tools::getValue('id_image');
self::$currentIndex .= '&image_updated='.(int)Tools::getValue('id_image');
Hook::updateProduct($object);
Search::indexation(false, $object->id);
if (Tools::getValue('resizer') == 'man' && isset($id_image) AND is_int($id_image) AND $id_image)
+1 -1
View File
@@ -105,7 +105,7 @@ class AdminReturn extends AdminTab
Mail::Send((int)$order->id_lang, 'order_return_state', Mail::l('Your order return state has changed', $order->id_lang),
$vars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL,
NULL, _PS_MAIL_DIR_, true);
Tools::redirectAdmin($currentIndex.'&conf=4&token='.$this->token);
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
}
}
else
+1 -1
View File
@@ -127,7 +127,7 @@ class AdminThemes extends AdminPreferences
echo '<br /><br />';
if (@ini_get('allow_url_fopen') AND @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
echo '<script type="text/javascript">
$.post("'.dirname($currentIndex).'/ajax.php",{page:"themes"},function(a){getE("prestastore-content").innerHTML="<legend><img src=\"../img/admin/prestastore.gif\" class=\"middle\" /> '.$this->l('Live from PrestaShop Addons!').'</legend>"+a;});
$.post("'.dirname(self::$currentIndex).'/ajax.php",{page:"themes"},function(a){getE("prestastore-content").innerHTML="<legend><img src=\"../img/admin/prestastore.gif\" class=\"middle\" /> '.$this->l('Live from PrestaShop Addons!').'</legend>"+a;});
</script>
<fieldset id="prestastore-content" class="width3"></fieldset>';
else
+1 -3
View File
@@ -1347,7 +1347,6 @@ echo '</script>';
{
$this->displayWarning('This function is experimental. It\'s currently recommended to make a backup of your files and database.');
global $currentIndex;
if ($this->apacheModExists('mod_evasive'))
sleep(1);
// update['name'] = version name
@@ -1370,7 +1369,6 @@ echo '</script>';
private function _getJsInit()
{
global $currentIndex;
$js = '';
$js .= '
function ucFirst(str) {
@@ -1509,7 +1507,7 @@ function afterBackupFiles()
function doAjaxRequest(action, nextParams){
req = $.ajax({
type:"POST",
url : "'.str_replace('index','ajax-tab',$currentIndex).'",
url : "'.str_replace('index', 'ajax-tab', self::$currentIndex).'",
async: true,
data : {
dir:"'.$this->adminDir.'",
+1 -1
View File
@@ -1355,7 +1355,7 @@ abstract class AdminTabCore
{
// Cleaning links
if (Tools::getValue($this->table.'Orderby') && Tools::getValue($this->table.'Orderway'))
self::$currentIndex = preg_replace('/&'.$this->table.'Orderby=([a-z _]*)&'.$this->table.'Orderway=([a-z]*)/i', '', $currentIndex);
self::$currentIndex = preg_replace('/&'.$this->table.'Orderby=([a-z _]*)&'.$this->table.'Orderway=([a-z]*)/i', '', self::$currentIndex);
echo ' <br />
<a href="'.self::$currentIndex.'&'.$this->identifier.'='.$id_cat.'&'.$this->table.'Orderby='.urlencode($key).'&'.$this->table.'Orderway=desc&token='.$token.'"><img border="0" src="../img/admin/down'.((isset($this->_orderBy) AND ($key == $this->_orderBy) AND ($this->_orderWay == 'DESC')) ? '_d' : '').'.gif" /></a>
<a href="'.self::$currentIndex.'&'.$this->identifier.'='.$id_cat.'&'.$this->table.'Orderby='.urlencode($key).'&'.$this->table.'Orderway=asc&token='.$token.'"><img border="0" src="../img/admin/up'.((isset($this->_orderBy) AND ($key == $this->_orderBy) AND ($this->_orderWay == 'ASC')) ? '_d' : '').'.gif" /></a>';
+2 -2
View File
@@ -74,7 +74,7 @@ class GCheckout extends PaymentModule
public function getContent()
{
global $currentIndex, $cookie;
global $cookie;
if (Tools::isSubmit('submitGoogleCheckout'))
{
@@ -100,7 +100,7 @@ class GCheckout extends PaymentModule
Configuration::updateValue('GCHECKOUT_NO_SHIPPING', 0);
if (!sizeof($errors))
Tools::redirectAdmin($currentIndex.'&configure=gcheckout&token='.Tools::getValue('token').'&conf=4');
Tools::redirectAdmin(AdminTab::$currentIndex.'&configure=gcheckout&token='.Tools::getValue('token').'&conf=4');
foreach ($errors as $error)
echo $error;
}
+3 -3
View File
@@ -320,7 +320,7 @@ class Hipay extends PaymentModule
public function getContent()
{
global $currentIndex, $cookie;
global $cookie;
$currencies = DB::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT c.iso_code, c.name, c.sign FROM '._DB_PREFIX_.'currency c');
@@ -421,7 +421,7 @@ class Hipay extends PaymentModule
</div>';
}
$link = $currentIndex.'&configure='.$this->name.'&token='.Tools::getValue('token');
$link = AdminTab::$currentIndex.'&configure='.$this->name.'&token='.Tools::getValue('token');
$form = '
<style>
.hipay_label {float:none;font-weight:normal;padding:0;text-align:left;width:100%;line-height:30px}
@@ -528,7 +528,7 @@ class Hipay extends PaymentModule
<fieldset>
<legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->l('Zones restrictions').'</legend>
'.$this->l('Select the authorized shipping zones').'<br /><br />
<form action="'.$currentIndex.'&configure=hipay&token='.Tools::getValue('token').'" method="post">
<form action="'.AdminTab::$currentIndex.'&configure=hipay&token='.Tools::getValue('token').'" method="post">
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('ID').'</th>
+2 -4
View File
@@ -396,13 +396,11 @@ class MailAlerts extends Module
private function _displayForm()
{
global $currentIndex;
$tab = Tools::getValue('tab');
$token = Tools::getValue('token');
$this->_html .= '
<form action="'.$currentIndex.'&token='.$token.'&configure=mailalerts" method="post">
<form action="'.AdminTab::$currentIndex.'&token='.$token.'&configure=mailalerts" method="post">
<fieldset class="width3"><legend><img src="'.$this->_path.'logo.gif" />'.$this->l('Customer notification').'</legend>
<label>'.$this->l('Product availability:').' </label>
<div class="margin-form">
@@ -415,7 +413,7 @@ class MailAlerts extends Module
</fieldset>
</form>
<br />
<form action="'.$currentIndex.'&token='.$token.'&configure=mailalerts" method="post">
<form action="'.AdminTab::$currentIndex.'&token='.$token.'&configure=mailalerts" method="post">
<fieldset class="width3"><legend><img src="'.$this->_path.'logo.gif" />'.$this->l('Merchant notification').'</legend>
<label>'.$this->l('New order:').' </label>
<div class="margin-form">
+6 -6
View File
@@ -879,7 +879,7 @@ class PayPal extends PaymentModule
private function _postProcess()
{
global $currentIndex, $cookie;
global $cookie;
if (Tools::isSubmit('submitPayPal'))
{
@@ -944,7 +944,7 @@ class PayPal extends PaymentModule
if ($response['ACK'] == 'Success')
{
if ($response['PAYMENTSTATUS'] == 'Completed' OR $response['PAYMENTSTATUS'] == 'Reversed' OR ($response['PAYMENTSTATUS'] == 'Pending' AND $response['PENDINGREASON'] == 'authorization'))
Tools::redirectAdmin($currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=validationOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
Tools::redirectAdmin(AdminTab::$currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=validationOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
else
$this->_html .= '<p><b>'.$this->l('Status').':</b> '.$response['PAYMENTSTATUS'].' ('.$this->l('Reason:').' '.$response['PENDINGREASON'].')</p>';
}
@@ -962,9 +962,9 @@ class PayPal extends PaymentModule
if ($response['ACK'] == 'Success')
{
if ($response['PAYMENTSTATUS'] == 'Completed')
Tools::redirectAdmin($currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=captureOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
Tools::redirectAdmin(AdminTab::$currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=captureOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
else
Tools::redirectAdmin($currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=captureError&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
Tools::redirectAdmin(AdminTab::$currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=captureError&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
}
else
$this->_html .= '<p style="color:red;">'.$this->l('Error from PayPal: ').$response['L_LONGMESSAGE0'].' (#'.$response['L_ERRORCODE0'].')</p>';
@@ -980,9 +980,9 @@ class PayPal extends PaymentModule
if ($response['ACK'] == 'Success')
{
if ($response['REFUNDTRANSACTIONID'] != '')
Tools::redirectAdmin($currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=refundOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
Tools::redirectAdmin(AdminTab::$currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=refundOk&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
else
Tools::redirectAdmin($currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=refundError&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
Tools::redirectAdmin(AdminTab::$currentIndex.'&id_order='.(int)(Tools::getValue('id_order')).'&vieworder&paypal=refundError&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)));
}
else
$this->_html .= '<p style="color:red;">'.$this->l('Error from PayPal: ').$response['L_LONGMESSAGE0'].' (#'.$response['L_ERRORCODE0'].')</p>';
@@ -115,7 +115,7 @@ class Secuvad_connection
public function send_transaction()
{
global $currentIndex, $cookie;
global $cookie;
$flag_rep = false;
$response = str_replace("\n", "", $this->send('bulk_transactions'));
+2 -2
View File
@@ -244,7 +244,7 @@ class Secuvad extends Module
public function hookAdminOrder($params)
{
global $cookie, $currentIndex;
global $cookie;
if ($this->check_assoc() != '')
return '
@@ -276,7 +276,7 @@ class Secuvad extends Module
'.($secuvad_order['is_fraud'] ? '<br /><b>'.$this->l('Unpaid transmitted:').'</b> '.$this->_getFraudStatusHtml((int)($secuvad_order['is_fraud'])) : '').'
</p>
<form method="POST" action="'.$currentIndex.'&id_order='.Tools::getValue('id_order').'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'">
<form method="POST" action="'.AdminTab::$currentIndex.'&id_order='.Tools::getValue('id_order').'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'">
<p class="center">
<input type="hidden" name="id_secuvad_order" value="'.(int)($params['id_order']).'" />
<input type="submit" class="button" name="send_to_secuvad" value="'.$this->l('Update Secuvad status').'">
+3 -3
View File
@@ -54,7 +54,7 @@ class StatsCheckUp extends Module
function hookAdminStatsModules()
{
global $cookie, $currentIndex;
global $cookie;
if (Tools::isSubmit('submitCheckup'))
{
@@ -148,7 +148,7 @@ class StatsCheckUp extends Module
table.checkup td {padding:5px 10px}
table.checkup2 td {text-align:right}
</style>
<form action="'.$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'" method="post" class="checkup">
<form action="'.AdminTab::$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'" method="post" class="checkup">
<table class="table checkup" border="0" cellspacing="0" cellspacing="0">
<tr><th></th><th>'.$arrayColors[0].' '.$this->l('Not enough').'</th><th>'.$arrayColors[2].' '.$this->l('Alright').'</th></tr>';
foreach ($arrayConf as $conf => $translations)
@@ -161,7 +161,7 @@ class StatsCheckUp extends Module
<div><input type="submit" name="submitCheckup" class="button" value="'.$this->l(' Save ').'" /></div>
</form>
<div class="clear">&nbsp;</div>
<form action="'.$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'" method="post">
<form action="'.AdminTab::$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'" method="post">
'.$this->l('Order by').'
<select name="submitCheckupOrder" onchange="this.form.submit();" style="width:100px">
<option value="1">'.$this->l('ID').'</option>
+2 -2
View File
@@ -65,8 +65,8 @@ class StatsForecast extends Module
public function hookAdminStatsModules()
{
global $cookie, $currentIndex;
$ru = $currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token');
global $cookie;
$ru = AdminTab::$currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token');
$db = Db::getInstance();
+2 -2
View File
@@ -148,7 +148,7 @@ class StatsProduct extends ModuleGraph
public function hookAdminStatsModules($params)
{
global $cookie, $currentIndex;
global $cookie;
$id_category = (int)(Tools::getValue('id_category'));
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
@@ -265,7 +265,7 @@ class StatsProduct extends ModuleGraph
</tr>
</thead><tbody>';
foreach ($this->getProducts($cookie->id_lang) AS $product)
$this->_html .= '<tr><td>'.$product['reference'].'</td><td><a href="'.$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'&id_product='.$product['id_product'].'">'.$product['name'].'</a></td><td>'.$product['quantity'].'</td></tr>';
$this->_html .= '<tr><td>'.$product['reference'].'</td><td><a href="'.AdminTab::$currentIndex.'&token='.Tools::getValue('token').'&module='.$this->name.'&id_product='.$product['id_product'].'">'.$product['name'].'</a></td><td>'.$product['quantity'].'</td></tr>';
$this->_html .= '</tbody></table><br /></div><br />
<a href="'.$_SERVER['REQUEST_URI'].'&export=1"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a><br />';
}
+2 -2
View File
@@ -51,12 +51,12 @@ class StatsStock extends Module
function hookAdminStatsModules()
{
global $cookie, $currentIndex;
global $cookie;
if (Tools::isSubmit('submitCategory'))
$cookie->statsstock_id_category = Tools::getValue('statsstock_id_category');
$ru = $currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token');
$ru = AdminTab::$currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token');
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
$filter = ((int)$cookie->statsstock_id_category ? ' AND p.id_product IN (SELECT cp.id_product FROM '._DB_PREFIX_.'category_product cp WHERE cp.id_category = '.(int)$cookie->statsstock_id_category.')' : '');
@@ -162,7 +162,7 @@ class ThemeInstallator extends Module
private function init_defines()
{
global $currentIndex, $cookie;
global $cookie;
define('_EXPORT_FOLDER_', dirname(__FILE__).'/export/');
define('_IMPORT_FOLDER_', dirname(__FILE__).'/import/');
@@ -174,7 +174,7 @@ class ThemeInstallator extends Module
if (!Tools::isSubmit('cancelExport') AND (Tools::isSubmit('exportTheme') OR Tools::isSubmit('submitExport')))
$this->page = 'exportPage';
$this->_html = '<form action="'.$currentIndex.'&configure='.$this->name.'&token='.Tools::htmlentitiesUTF8(Tools::getValue('token')).'" method="POST" enctype=multipart/form-data>';
$this->_html = '<form action="'.AdminTab::$currentIndex.'&configure='.$this->name.'&token='.Tools::htmlentitiesUTF8(Tools::getValue('token')).'" method="POST" enctype=multipart/form-data>';
if (Tools::isSubmit('modulesToExport') OR Tools::isSubmit('submitModules'))
$this->to_export = Tools::getValue('modulesToExport');
+1 -2
View File
@@ -117,8 +117,7 @@ class Twenga extends PaymentModule
public function __construct()
{
// Basic vars
global $currentIndex;
$this->current_index = $currentIndex;
$this->current_index = AdminTab::$currentIndex;
$this->token = Tools::getValue('token');
$this->name = 'twenga';
$this->tab = 'smart_shopping';