// 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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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').'">
|
||||
|
||||
@@ -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"> </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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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 />';
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user