// Merge -> revision 8800
This commit is contained in:
@@ -215,7 +215,7 @@ class AdminAddresses extends AdminTab
|
||||
WHERE 1 '.(isset($this->_where) ? $this->_where.' ' : '').(($this->deleted OR $this->table == 'currency') ? 'AND a.`deleted` = 0 ' : '').$this->_filter.'
|
||||
'.(isset($this->_group) ? $this->_group.' ' : '').'
|
||||
'.(isset($this->addressType) ? 'AND a.id_'.strval($this->addressType).' != 0' : '').'
|
||||
ORDER BY '.(($orderBy == 'id_'.$this->table) ? 'a.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).'
|
||||
ORDER BY '.(($orderBy == 'id_'.$this->table) ? 'a.' : '').'`'.bqSQL($orderBy).'` '.bqSQL($orderWay).'
|
||||
LIMIT '.(int)($start).','.(int)($limit));
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class AdminAttributes extends AdminTab
|
||||
<label>'.$this->l('Current texture:').' </label>
|
||||
<div class="margin-form">
|
||||
<p>'.(file_exists(_PS_IMG_DIR_.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg')
|
||||
? '<img src="../img/'.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg" alt="" title="" /> <a href="'.$_SERVER['REQUEST_URI'].'&deleteImage=1"><img src="../img/admin/delete.gif" alt="'.$this->l('delete').'" title="" /></a>'
|
||||
? '<img src="../img/'.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg" alt="" title="" /> <a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&deleteImage=1"><img src="../img/admin/delete.gif" alt="'.$this->l('delete').'" title="" /></a>'
|
||||
: $this->l('None')
|
||||
).'</p>
|
||||
</div>
|
||||
|
||||
@@ -114,7 +114,7 @@ class AdminDb extends AdminPreferences
|
||||
if ($engineType == $tables_engine[$table])
|
||||
$this->_errors[] = $table.' '.$this->l('is already in').' '.$engineType;
|
||||
else
|
||||
if (!Db::getInstance()->Execute('ALTER TABLE '.pSQL($table).' ENGINE='.pSQL($engineType)))
|
||||
if (!Db::getInstance()->Execute('ALTER TABLE `'.bqSQL($table).'` ENGINE=`'.bqSQL($engineType).'`'))
|
||||
$this->_errors[] = $this->l('Can\'t change engine for').' '.$table;
|
||||
else
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Engine change of').' '.$table.' '.$this->l('to').' '.$engineType.'</div>';
|
||||
|
||||
@@ -891,7 +891,7 @@ class AdminOrders extends AdminTab
|
||||
$slips = OrderSlip::getOrdersSlip($order->id_customer, $order->id);
|
||||
echo '
|
||||
<div style="float: left">
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'&token='.$this->token.'" method="post" onsubmit="if (getE(\'visibility\').checked == true) return confirm(\''.$this->l('Do you want to send this message to the customer?', __CLASS__, true, false).'\');">
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&token='.$this->token.'" method="post" onsubmit="if (getE(\'visibility\').checked == true) return confirm(\''.$this->l('Do you want to send this message to the customer?', __CLASS__, true, false).'\');">
|
||||
<fieldset style="width: 400px;">
|
||||
<legend style="cursor: pointer;" onclick="$(\'#message\').slideToggle();$(\'#message_m\').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> '.$this->l('New message').'</legend>
|
||||
<div id="message_m" style="display: '.(Tools::getValue('message') ? 'none' : 'block').'; overflow: auto; width: 400px;">
|
||||
@@ -926,7 +926,7 @@ class AdminOrders extends AdminTab
|
||||
{
|
||||
echo '<div style="overflow:auto; width:400px;" '.($message['is_new_for_me'] ?'class="new_message"':'').'>';
|
||||
if ($message['is_new_for_me'])
|
||||
echo '<a class="new_message" title="'.$this->l('Mark this message as \'viewed\'').'" href="'.$_SERVER['REQUEST_URI'].'&token='.$this->token.'&messageReaded='.(int)($message['id_message']).'"><img src="../img/admin/enabled.gif" alt="" /></a>';
|
||||
echo '<a class="new_message" title="'.$this->l('Mark this message as \'viewed\'').'" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&token='.$this->token.'&messageReaded='.(int)($message['id_message']).'"><img src="../img/admin/enabled.gif" alt="" /></a>';
|
||||
echo $this->l('At').' <i>'.Tools::displayDate($message['date_add'], $this->context->language->id, true);
|
||||
echo '</i> '.$this->l('from').' <b>'.(($message['elastname']) ? ($message['efirstname'].' '.$message['elastname']) : ($message['cfirstname'].' '.$message['clastname'])).'</b>';
|
||||
echo ((int)($message['private']) == 1 ? '<span style="color:red; font-weight:bold;">'.$this->l('Private:').'</span>' : '');
|
||||
|
||||
@@ -40,7 +40,7 @@ class AdminPreferences extends AdminTab
|
||||
$taxes[] = array('id' => 0, 'name' => $this->l('None'));
|
||||
foreach (Tax::getTaxes($this->context->language->id) as $tax)
|
||||
$taxes[] = array('id' => $tax['id_tax'], 'name' => $tax['name']);
|
||||
|
||||
|
||||
$order_process_type = array(
|
||||
array(
|
||||
'value' => PS_ORDER_PROCESS_STANDARD,
|
||||
@@ -51,7 +51,7 @@ class AdminPreferences extends AdminTab
|
||||
'name' => $this->l('One page checkout')
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$round_mode = array(
|
||||
array(
|
||||
'value' => PS_ROUND_UP,
|
||||
@@ -66,7 +66,7 @@ class AdminPreferences extends AdminTab
|
||||
'name' => $this->l('classical')
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$cms_tab = array(0 =>
|
||||
array(
|
||||
'id' => 0,
|
||||
@@ -75,7 +75,7 @@ class AdminPreferences extends AdminTab
|
||||
);
|
||||
foreach (CMS::listCms($this->context->language->id) as $cms_file)
|
||||
$cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']);
|
||||
|
||||
|
||||
$fields = array(
|
||||
'PS_SHOP_ENABLE' => array('title' => $this->l('Enable Shop'), 'desc' => $this->l('Activate or deactivate your shop. Deactivate your shop while you perform maintenance on it. Please note that the webservice will not be disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'),
|
||||
'PS_MAINTENANCE_IP' => array('title' => $this->l('Maintenance IP'), 'desc' => $this->l('IP addresses allowed to access the Front Office even if shop is disabled. Use a comma to separate them (e.g., 42.24.4.2,127.0.0.1,99.98.97.96)'), 'validation' => 'isGenericName', 'type' => 'maintenance_ip', 'size' => 30, 'default' => ''),
|
||||
@@ -103,17 +103,17 @@ class AdminPreferences extends AdminTab
|
||||
'PS_SHOW_NEW_CUSTOMERS' => array('title' => $this->l('Show notifications for new customers'), 'desc' => $this->l('This will display notifications when new customers will register on your shop'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'),
|
||||
'PS_SHOW_NEW_MESSAGES' => array('title' => $this->l('Show notifications for new messages'), 'desc' => $this->l('This will display notifications when new messages will be posted on your shop'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'),
|
||||
);
|
||||
|
||||
|
||||
if (function_exists('date_default_timezone_set'))
|
||||
$fields['PS_TIMEZONE'] = array('title' => $this->l('Time Zone:'), 'validation' => 'isAnything', 'type' => 'select', 'list' => $timezones, 'identifier' => 'name', 'visibility' => Shop::CONTEXT_ALL);
|
||||
|
||||
|
||||
// No HTTPS activation if you haven't already.
|
||||
if (!Tools::usingSecureMode())
|
||||
{
|
||||
$fields['PS_SSL_ENABLED']['type'] = 'disabled';
|
||||
$fields['PS_SSL_ENABLED']['disabled'] = '<a href="https://'.Tools::getShopDomainSsl().$_SERVER['REQUEST_URI'].'">'.$this->l('Please click here to use HTTPS protocol before enabling SSL.').'</a>';
|
||||
$fields['PS_SSL_ENABLED']['disabled'] = '<a href="https://'.Tools::getShopDomainSsl().Tools::safeOutput($_SERVER['REQUEST_URI']).'">'.$this->l('Please click here to use HTTPS protocol before enabling SSL.').'</a>';
|
||||
}
|
||||
|
||||
|
||||
$this->optionsList = array(
|
||||
'general' => array(
|
||||
'title' => $this->l('General'),
|
||||
@@ -171,7 +171,7 @@ class AdminPreferences extends AdminTab
|
||||
$uploadMaxSize = (int)str_replace('M', '',ini_get('upload_max_filesize'));
|
||||
$postMaxSize = (int)str_replace('M', '', ini_get('post_max_size'));
|
||||
$maxSize = $uploadMaxSize < $postMaxSize ? $uploadMaxSize : $postMaxSize;
|
||||
|
||||
|
||||
Configuration::update('PS_ATTACHMENT_MAXIMUM_SIZE', ($maxSize < Tools::getValue('PS_ATTACHMENT_MAXIMUM_SIZE')) ? $maxSize : Tools::getValue('PS_ATTACHMENT_MAXIMUM_SIZE'));
|
||||
}
|
||||
|
||||
@@ -183,14 +183,14 @@ class AdminPreferences extends AdminTab
|
||||
echo '<script type="text/javascript">
|
||||
function addRemoteAddr()
|
||||
{
|
||||
var length = $(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\').length;
|
||||
var length = $(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\').length;
|
||||
if (length > 0)
|
||||
$(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\',$(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\') +\','.Tools::getRemoteAddr().'\');
|
||||
else
|
||||
$(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\',\''.Tools::getRemoteAddr().'\');
|
||||
}
|
||||
</script>';
|
||||
|
||||
|
||||
$this->displayOptionTypeText($key, $field, $value);
|
||||
echo (isset($field['next']) ? ' '.strval($field['next']) : '');
|
||||
echo '  <a href="#" class="button" onclick="addRemoteAddr(); return false;">'.$this->l('Add my IP').'</a>';
|
||||
|
||||
@@ -100,7 +100,7 @@ abstract class AdminStatsTab extends AdminPreferences
|
||||
$arrayGridEngines = ModuleGridEngine::getGridEngines();
|
||||
|
||||
echo '
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset style="width: 200px;"><legend><img src="../img/admin/tab-preferences.gif" />'.$this->l('Settings', 'AdminStatsTab').'</legend>';
|
||||
echo '<p><strong>'.$this->l('Graph engine', 'AdminStatsTab').' </strong><br />';
|
||||
if (sizeof($arrayGraphEngines))
|
||||
@@ -153,7 +153,7 @@ abstract class AdminStatsTab extends AdminPreferences
|
||||
return '
|
||||
<fieldset style="width: 200px; font-size:13px;"><legend><img src="../img/admin/date.png" /> '.$translations['Calendar'].'</legend>
|
||||
<div>
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<input type="submit" name="submitDateDay" class="button" value="'.$translations['Day'].'">
|
||||
<input type="submit" name="submitDateMonth" class="button" value="'.$translations['Month'].'">
|
||||
<input type="submit" name="submitDateYear" class="button" value="'.$translations['Year'].'"><br />
|
||||
|
||||
@@ -843,13 +843,13 @@ class AdminTranslations extends AdminTab
|
||||
<script type="text/javascript">';
|
||||
if (Tools::getValue('type') == 'mails')
|
||||
$str_output .= '$(document).ready(function(){
|
||||
openCloseAllDiv(\''.$_GET['type'].'_div\', this.value == openAll); toggleElemValue(this.id, openAll, closeAll);
|
||||
openCloseAllDiv(\''.Tools::safeOutput($_GET['type']).'_div\', this.value == openAll); toggleElemValue(this.id, openAll, closeAll);
|
||||
});';
|
||||
$str_output .= '
|
||||
var openAll = \''.html_entity_decode($this->l('Expand all fieldsets'), ENT_NOQUOTES, 'UTF-8').'\';
|
||||
var closeAll = \''.html_entity_decode($this->l('Close all fieldsets'), ENT_NOQUOTES, 'UTF-8').'\';
|
||||
</script>
|
||||
<input type="button" class="button" id="buttonall" onclick="openCloseAllDiv(\''.$_GET['type'].'_div\', this.value == openAll); toggleElemValue(this.id, openAll, closeAll);" />
|
||||
<input type="button" class="button" id="buttonall" onclick="openCloseAllDiv(\''.Tools::safeOutput($_GET['type']).'_div\', this.value == openAll); toggleElemValue(this.id, openAll, closeAll);" />
|
||||
<script type="text/javascript">toggleElemValue(\'buttonall\', '.($closed ? 'openAll' : 'closeAll').', '.($closed ? 'closeAll' : 'openAll').');</script>';
|
||||
return $str_output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user