diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl
index 4b25301ab..f19882529 100644
--- a/admin-dev/themes/default/template/controllers/modules/list.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/list.tpl
@@ -55,14 +55,14 @@
{if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'}
confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if}
- class="noborder">
+ class="noborder" title="{l s='Module %1s '|sprintf:$module->name}" />
{/if}
-
+
|
-
+
{$module->categoryName}
diff --git a/classes/Cart.php b/classes/Cart.php
index 4c678c978..cc170a81d 100644
--- a/classes/Cart.php
+++ b/classes/Cart.php
@@ -152,7 +152,11 @@ class CartCore extends ObjectModel
public function __construct($id = null, $id_lang = null)
{
- parent::__construct($id, $id_lang);
+ parent::__construct($id);
+
+ if (!is_null($id_lang))
+ $this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
+
if ($this->id_customer)
{
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
diff --git a/classes/Employee.php b/classes/Employee.php
index 3ee83a2dd..48b990dc7 100644
--- a/classes/Employee.php
+++ b/classes/Employee.php
@@ -122,7 +122,10 @@ class EmployeeCore extends ObjectModel
public function __construct($id = null, $id_lang = null, $id_shop = null)
{
- parent::__construct($id, $id_lang, $id_shop);
+ parent::__construct($id, null, $id_shop);
+
+ if (!is_null($id_lang))
+ $this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
if ($this->id)
$this->associated_shops = $this->getAssociatedShops();
diff --git a/classes/Media.php b/classes/Media.php
index f58889220..4b3ae32e1 100755
--- a/classes/Media.php
+++ b/classes/Media.php
@@ -45,6 +45,7 @@ class MediaCore
'ui.tabs' => array('fileName' => 'jquery.ui.tabs.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true),
'ui.datepicker' => array('fileName' => 'jquery.ui.datepicker.min.js', 'dependencies' => array('ui.core'), 'theme' => true),
'ui.progressbar' => array('fileName' => 'jquery.ui.progressbar.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true),
+ 'ui.tooltip' => array('fileName' => 'jquery.ui.tooltip.min.js', 'dependencies' => array('ui.core', 'ui.widget','ui.position','effects.core'), 'theme' => true),
'effects.core' => array('fileName' => 'jquery.effects.core.min.js', 'dependencies' => array(), 'theme' => false),
'effects.blind' => array('fileName' => 'jquery.effects.blind.min.js', 'dependencies' => array('effects.core'), 'theme' => false),
'effects.bounce' => array('fileName' => 'jquery.effects.bounce.min.js', 'dependencies' => array('effects.core'), 'theme' => false),
diff --git a/classes/Store.php b/classes/Store.php
index 22a43ed66..3df3ec905 100644
--- a/classes/Store.php
+++ b/classes/Store.php
@@ -114,7 +114,7 @@ class StoreCore extends ObjectModel
public function __construct($id_store = null, $id_lang = null)
{
- parent::__construct($id_store, $id_lang);
+ parent::__construct($id_store);
$this->id_image = ($this->id && file_exists(_PS_STORE_IMG_DIR_.(int)$this->id.'.jpg')) ? (int)$this->id : false;
$this->image_dir = _PS_STORE_IMG_DIR_;
}
diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php
index 9a3b8db6f..98f64cc6d 100644
--- a/classes/controller/AdminController.php
+++ b/classes/controller/AdminController.php
@@ -1993,7 +1993,7 @@ class AdminControllerCore extends Controller
}
// Execute Hook AdminController SetMedia
- Hook::exec('actionAdminControllerSetMedia', array());
+ Hook::exec('actionAdminControllerSetMedia');
}
/**
diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php
index eea4a1bf1..fee2d0924 100644
--- a/classes/controller/FrontController.php
+++ b/classes/controller/FrontController.php
@@ -330,7 +330,7 @@ class FrontControllerCore extends Controller
'cart_qties' => (int)$cart->nbProducts(),
'currencies' => Currency::getCurrencies(),
'languages' => $languages,
- 'meta_language' => implode('-', $meta_language),
+ 'meta_language' => implode(',', $meta_language),
'priceDisplay' => Product::getTaxCalculationMethod((int)$this->context->cookie->id_customer),
'add_prod_display' => (int)Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'shop_name' => Configuration::get('PS_SHOP_NAME'),
diff --git a/classes/module/ModuleGraph.php b/classes/module/ModuleGraph.php
index f8937fcd2..5790a92e5 100644
--- a/classes/module/ModuleGraph.php
+++ b/classes/module/ModuleGraph.php
@@ -222,7 +222,8 @@ abstract class ModuleGraphCore extends Module
protected function _displayCsv()
{
- ob_end_clean();
+ if (ob_get_length())
+ ob_end_clean();
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"');
echo $this->_csv;
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index 94c66caa4..fe73d44b9 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -394,7 +394,7 @@ class AdminModulesControllerCore extends AdminController
foreach($zip_folders as $folder)
if (!in_array($folder, array('.', '..', '.svn', '.git', '__MACOSX')) && !Module::getInstanceByName($folder))
{
- $this->errors[] = Tools::displayError('The \'.$folder.\' you uploaded is not a module');
+ $this->errors[] = sprintf(Tools::displayError('The folder %1$s you uploaded is not a module.'), $folder);
$this->recursiveDeleteOnDisk(_PS_MODULE_DIR_.$folder);
}
diff --git a/controllers/front/AttachmentController.php b/controllers/front/AttachmentController.php
index 3c5daedda..8461be1f5 100644
--- a/controllers/front/AttachmentController.php
+++ b/controllers/front/AttachmentController.php
@@ -32,6 +32,8 @@ class AttachmentControllerCore extends FrontController
if (!$a->id)
Tools::redirect('index.php');
+ Hook::exec('actionDownloadAttachment', array('attachment' => &$a);
+
if (ob_get_level())
ob_end_clean();
diff --git a/pdf/invoice-b2b.tpl b/pdf/invoice-b2b.tpl
index 6f7ba9462..5a2ad8da4 100755
--- a/pdf/invoice-b2b.tpl
+++ b/pdf/invoice-b2b.tpl
@@ -134,7 +134,7 @@
{foreach $order_details as $order_detail}
{cycle values='#FFF,#DDD' assign=bgcolor}
- | {$order_detail.product_name} |
+ {$order_detail.product_name}{if isset($order_detail.product_reference) && !empty($order_detail.product_reference)} ({l s='Reference :' pdf='true'} {$order_detail.product_reference}){/if} |
{if !$tax_excluded_display}
diff --git a/pdf/invoice.tpl b/pdf/invoice.tpl
index 3fd3f0773..80c03716c 100755
--- a/pdf/invoice.tpl
+++ b/pdf/invoice.tpl
@@ -130,7 +130,7 @@
{foreach $order_details as $order_detail}
{cycle values='#FFF,#DDD' assign=bgcolor}
|
- | {$order_detail.product_name} |
+ {$order_detail.product_name}{if isset($order_detail.product_reference) && !empty($order_detail.product_reference)} ({l s='Reference :' pdf='true'} {$order_detail.product_reference}){/if} |
{if !$tax_excluded_display}
diff --git a/themes/default-bootstrap/js/tools.js b/themes/default-bootstrap/js/tools.js
index ae11f36be..04a7d5ee9 100644
--- a/themes/default-bootstrap/js/tools.js
+++ b/themes/default-bootstrap/js/tools.js
@@ -30,12 +30,12 @@ function ps_round(value, precision)
if (typeof(precision) === 'undefined')
precision = 2;
- method = roundMode;
+ var method = roundMode;
if (method === 0)
return ceilf(value, precision);
else if (method === 1)
return floorf(value, precision);
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
return Math.round(value * precisionFactor) / precisionFactor;
}
@@ -43,9 +43,9 @@ function ceilf(value, precision)
{
if (typeof(precision) === 'undefined')
precision = 0;
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
- tmp = value * precisionFactor;
- tmp2 = tmp.toString();
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var tmp = value * precisionFactor;
+ var tmp2 = tmp.toString();
if (tmp2[tmp2.length - 1] === 0)
return value;
return Math.ceil(value * precisionFactor) / precisionFactor;
@@ -55,9 +55,9 @@ function floorf(value, precision)
{
if (typeof(precision) === 'undefined')
precision = 0;
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
- tmp = value * precisionFactor;
- tmp2 = tmp.toString();
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var tmp = value * precisionFactor;
+ var tmp2 = tmp.toString();
if (tmp2[tmp2.length - 1] === 0)
return value;
return Math.floor(value * precisionFactor) / precisionFactor;
@@ -81,7 +81,7 @@ function formatedNumberToFloat(price, currencyFormat, currencySign)
function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
{
// if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class)
- blank = '';
+ var blank = '';
price = parseFloat(price.toFixed(6));
price = ps_round(price, priceDisplayPrecision);
if (currencyBlank > 0)
@@ -95,7 +95,7 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
if (currencyFormat == 4)
return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
if (currencyFormat == 5)
- return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign);
+ return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '\'', '.'));
return price;
}
diff --git a/themes/default/js/tools.js b/themes/default/js/tools.js
index 7b670168c..3399f8a2d 100644
--- a/themes/default/js/tools.js
+++ b/themes/default/js/tools.js
@@ -30,12 +30,12 @@ function ps_round(value, precision)
if (typeof(precision) === 'undefined')
precision = 2;
- method = roundMode;
+ var method = roundMode;
if (method === 0)
return ceilf(value, precision);
else if (method === 1)
return floorf(value, precision);
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
return Math.round(value * precisionFactor) / precisionFactor;
}
@@ -43,9 +43,9 @@ function ceilf(value, precision)
{
if (typeof(precision) === 'undefined')
precision = 0;
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
- tmp = value * precisionFactor;
- tmp2 = tmp.toString();
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var tmp = value * precisionFactor;
+ var tmp2 = tmp.toString();
if (tmp2[tmp2.length - 1] === 0)
return value;
return Math.ceil(value * precisionFactor) / precisionFactor;
@@ -55,9 +55,9 @@ function floorf(value, precision)
{
if (typeof(precision) === 'undefined')
precision = 0;
- precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
- tmp = value * precisionFactor;
- tmp2 = tmp.toString();
+ var precisionFactor = precision === 0 ? 1 : Math.pow(10, precision);
+ var tmp = value * precisionFactor;
+ var tmp2 = tmp.toString();
if (tmp2[tmp2.length - 1] === 0)
return value;
return Math.floor(value * precisionFactor) / precisionFactor;
@@ -81,7 +81,7 @@ function formatedNumberToFloat(price, currencyFormat, currencySign)
function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
{
// if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class)
- blank = '';
+ var blank = '';
price = parseFloat(price.toFixed(6));
price = ps_round(price, priceDisplayPrecision);
if (currencyBlank > 0)
@@ -212,7 +212,7 @@ function in_array(value, array)
function resizeAddressesBox(nameBox)
{
- maxHeight = 0;
+ var maxHeight = 0;
if (typeof(nameBox) === 'undefined')
nameBox = '.address';
| |