Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -303,7 +303,7 @@ class AdminHomeControllerCore extends AdminController
|
||||
|
||||
public function getMonthlyStatistics()
|
||||
{
|
||||
$currency = Tools::setCurrency($this->context->cookie);
|
||||
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders
|
||||
FROM `'._DB_PREFIX_.'orders`
|
||||
@@ -400,7 +400,7 @@ class AdminHomeControllerCore extends AdminController
|
||||
$chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']);
|
||||
$chart->setSize(580, 170);
|
||||
$chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd');
|
||||
$currency = Tools::setCurrency($this->context->cookie);
|
||||
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||
$chart->getCurve(1)->setLabel($this->l('Sales + Tax').' ('.strtoupper($currency->iso_code).')');
|
||||
|
||||
$content .= $chart->fetch();
|
||||
|
||||
@@ -455,8 +455,8 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
}
|
||||
|
||||
$this->separator = substr(strval(trim(Tools::getValue('separator', ';'))), 0, 1);
|
||||
$this->multiple_value_separator = substr(strval(trim(Tools::getValue('multiple_value_separator', ','))), 0, 1);
|
||||
$this->separator = Tools::substr(strval(trim(Tools::getValue('separator', ';'))), 0, 1);
|
||||
$this->multiple_value_separator = Tools::substr(strval(trim(Tools::getValue('multiple_value_separator', ','))), 0, 1);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -632,7 +632,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$html .= '<tr id="table_'.$current_table.'_line_'.$current_line.'" style="padding: 4px">';
|
||||
foreach ($line as $nb_c => $column)
|
||||
if ((MAX_COLUMNS * (int)$current_table <= $nb_c) && ((int)$nb_c < MAX_COLUMNS * ((int)$current_table + 1)))
|
||||
$html .= '<td>'.htmlentities(substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>';
|
||||
$html .= '<td>'.htmlentities(Tools::substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
@@ -2111,7 +2111,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$country->active = 1;
|
||||
$country->name = AdminImportController::createMultiLangField($address->country);
|
||||
$country->id_zone = 0; // Default zone for country to create
|
||||
$country->iso_code = strtoupper(substr($address->country, 0, 2)); // Default iso for country to create
|
||||
$country->iso_code = Tools::strtoupper(Tools::substr($address->country, 0, 2)); // Default iso for country to create
|
||||
$country->contains_states = 0; // Default value for country to create
|
||||
$lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true);
|
||||
if (($field_error = $country->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||
@@ -2142,7 +2142,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$state->name = $address->state;
|
||||
$state->id_country = isset($country->id) ? (int)$country->id : 0;
|
||||
$state->id_zone = 0; // Default zone for state to create
|
||||
$state->iso_code = strtoupper(substr($address->state, 0, 2)); // Default iso for state to create
|
||||
$state->iso_code = Tools::strtoupper(Tools::substr($address->state, 0, 2)); // Default iso for state to create
|
||||
$state->tax_behavior = 0;
|
||||
if (($field_error = $state->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||
($lang_field_error = $state->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $state->add())
|
||||
|
||||
@@ -401,7 +401,7 @@ class AdminMetaControllerCore extends AdminController
|
||||
{
|
||||
fwrite($write_fd, "# Directories\n");
|
||||
foreach ($this->rb_data['Directories'] as $dir)
|
||||
fwrite($write_fd, 'Disallow: /*'.$dir."\n");
|
||||
fwrite($write_fd, 'Disallow: */'.$dir."\n");
|
||||
}
|
||||
|
||||
// Files
|
||||
|
||||
@@ -367,9 +367,9 @@ class AdminProductsControllerCore extends AdminController
|
||||
{
|
||||
if (is_array($default_product->$field_name))
|
||||
foreach ($default_product->$field_name as $key => $value)
|
||||
$this->object->{$field_name}[$key] = ObjectModel::formatValue($value, $def['fields'][$field_name]['type']);
|
||||
$this->object->{$field_name}[$key] = $value;
|
||||
else
|
||||
$this->object->$field_name = ObjectModel::formatValue($default_product->$field_name, $def['fields'][$field_name]['type']);
|
||||
$this->object->$field_name = $default_product->$field_name;
|
||||
}
|
||||
}
|
||||
$this->object->loadStockData();
|
||||
|
||||
Reference in New Issue
Block a user