// Fixed htmlentities in KPIs
This commit is contained in:
@@ -1972,14 +1972,13 @@ class AdminControllerCore extends Controller
|
||||
* @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8')
|
||||
* @return string the translation if available, or the english default text.
|
||||
*/
|
||||
protected function l($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true)
|
||||
protected function l($string, $class = null, $addslashes = false, $htmlentities = true)
|
||||
{
|
||||
// classname has changed, from AdminXXX to AdminXXXController
|
||||
// So we remove 10 characters and we keep same keys
|
||||
if (strtolower(substr($class, -10)) == 'controller')
|
||||
$class = substr($class, 0, -10);
|
||||
elseif ($class == 'AdminTab')
|
||||
if ($class === null || $class == 'AdminTab')
|
||||
$class = substr(get_class($this), 0, -10);
|
||||
// classname has changed, from AdminXXX to AdminXXXController, so we remove 10 characters and we keep same keys
|
||||
elseif (strtolower(substr($class, -10)) == 'controller')
|
||||
$class = substr($class, 0, -10);
|
||||
return Translate::getAdminTranslation($string, $class, $addslashes, $htmlentities);
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$helper->id = 'box-disabled-categories';
|
||||
$helper->icon = 'icon-off';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Disabled Categories');
|
||||
$helper->title = $this->l('Disabled Categories', null, null, false);
|
||||
if (ConfigurationKPI::get('DISABLED_CATEGORIES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('DISABLED_CATEGORIES');
|
||||
if (ConfigurationKPI::get('DISABLED_CATEGORIES_EXPIRE') < $time)
|
||||
@@ -367,7 +367,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$helper->id = 'box-empty-categories';
|
||||
$helper->icon = 'icon-bookmark-empty';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Empty Categories');
|
||||
$helper->title = $this->l('Empty Categories', null, null, false);
|
||||
if (ConfigurationKPI::get('EMPTY_CATEGORIES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('EMPTY_CATEGORIES');
|
||||
if (ConfigurationKPI::get('EMPTY_CATEGORIES_EXPIRE') < $time)
|
||||
@@ -378,8 +378,8 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$helper->id = 'box-top-category';
|
||||
$helper->icon = 'icon-money';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Top Category');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('Top Category', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('TOP_CATEGORY', $this->context->employee->id_lang) !== false)
|
||||
$helper->value = ConfigurationKPI::get('TOP_CATEGORY', $this->context->employee->id_lang);
|
||||
if (ConfigurationKPI::get('TOP_CATEGORY_EXPIRE', $this->context->employee->id_lang) < $time)
|
||||
|
||||
@@ -478,7 +478,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$helper->id = 'box-pending-messages';
|
||||
$helper->icon = 'icon-envelope';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Pending Messages');
|
||||
$helper->title = $this->l('Pending Messages', null, null, false);
|
||||
if (ConfigurationKPI::get('PENDING_MESSAGES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('PENDING_MESSAGES');
|
||||
if (ConfigurationKPI::get('PENDING_MESSAGES_EXPIRE') < $time)
|
||||
@@ -489,8 +489,8 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$helper->id = 'box-age';
|
||||
$helper->icon = 'icon-time';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Average Response Time');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('Average Response Time', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('AVG_MSG_RESPONSE_TIME') !== false)
|
||||
$helper->value = ConfigurationKPI::get('AVG_MSG_RESPONSE_TIME');
|
||||
if (ConfigurationKPI::get('AVG_MSG_RESPONSE_TIME_EXPIRE') < $time)
|
||||
@@ -501,8 +501,8 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$helper->id = 'box-messages-per-thread';
|
||||
$helper->icon = 'icon-copy';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Messages per Thread');
|
||||
$helper->subtitle = $this->l('30 day');
|
||||
$helper->title = $this->l('Messages per Thread', null, null, false);
|
||||
$helper->subtitle = $this->l('30 day', null, null, false);
|
||||
if (ConfigurationKPI::get('MESSAGES_PER_THREAD') !== false)
|
||||
$helper->value = ConfigurationKPI::get('MESSAGES_PER_THREAD');
|
||||
if (ConfigurationKPI::get('MESSAGES_PER_THREAD_EXPIRE') < $time)
|
||||
|
||||
@@ -545,8 +545,8 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$helper->id = 'box-gender';
|
||||
$helper->icon = 'icon-male';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Customers');
|
||||
$helper->subtitle = $this->l('All Time');
|
||||
$helper->title = $this->l('Customers', null, null, false);
|
||||
$helper->subtitle = $this->l('All Time', null, null, false);
|
||||
if (ConfigurationKPI::get('CUSTOMER_MAIN_GENDER') !== false)
|
||||
$helper->value = ConfigurationKPI::get('CUSTOMER_MAIN_GENDER');
|
||||
if (ConfigurationKPI::get('CUSTOMER_MAIN_GENDER_EXPIRE') < $time)
|
||||
@@ -557,8 +557,8 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$helper->id = 'box-age';
|
||||
$helper->icon = 'icon-calendar';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Average Age');
|
||||
$helper->subtitle = $this->l('All Time');
|
||||
$helper->title = $this->l('Average Age', 'AdminTab', null, false);
|
||||
$helper->subtitle = $this->l('All Time', null, null, false);
|
||||
if (ConfigurationKPI::get('AVG_CUSTOMER_AGE') !== false)
|
||||
$helper->value = ConfigurationKPI::get('AVG_CUSTOMER_AGE');
|
||||
if (ConfigurationKPI::get('AVG_CUSTOMER_AGE_EXPIRE') < $time)
|
||||
@@ -569,8 +569,8 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$helper->id = 'box-orders';
|
||||
$helper->icon = 'icon-retweet';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Orders per Customer');
|
||||
$helper->subtitle = $this->l('All Time');
|
||||
$helper->title = $this->l('Orders per Customer', null, null, false);
|
||||
$helper->subtitle = $this->l('All Time', null, null, false);
|
||||
if (ConfigurationKPI::get('ORDERS_PER_CUSTOMER') !== false)
|
||||
$helper->value = ConfigurationKPI::get('ORDERS_PER_CUSTOMER');
|
||||
if (ConfigurationKPI::get('ORDERS_PER_CUSTOMER_EXPIRE') < $time)
|
||||
@@ -581,8 +581,8 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$helper->id = 'box-newsletter';
|
||||
$helper->icon = 'icon-envelope';
|
||||
$helper->color = 'color4';
|
||||
$helper->title = $this->l('Newsletter Registrations');
|
||||
$helper->subtitle = $this->l('All Time');
|
||||
$helper->title = $this->l('Newsletter Registrations', null, null, false);
|
||||
$helper->subtitle = $this->l('All Time', null, null, false);
|
||||
if (ConfigurationKPI::get('NEWSLETTER_REGISTRATIONS') !== false)
|
||||
$helper->value = ConfigurationKPI::get('NEWSLETTER_REGISTRATIONS');
|
||||
if (ConfigurationKPI::get('NEWSLETTER_REGISTRATIONS_EXPIRE') < $time)
|
||||
|
||||
@@ -987,7 +987,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
$helper->id = 'box-installed-modules';
|
||||
$helper->icon = 'icon-puzzle-piece';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = html_entity_decode($this->l('Installed Modules'));
|
||||
$helper->title = $this->l('Installed Modules', null, null, false);
|
||||
if (ConfigurationKPI::get('INSTALLED_MODULES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('INSTALLED_MODULES');
|
||||
if (ConfigurationKPI::get('INSTALLED_MODULES_EXPIRE') < $time)
|
||||
@@ -998,7 +998,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
$helper->id = 'box-disabled-modules';
|
||||
$helper->icon = 'icon-off';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = html_entity_decode($this->l('Disabled Modules'));
|
||||
$helper->title = $this->l('Disabled Modules', null, null, false);
|
||||
if (ConfigurationKPI::get('DISABLED_MODULES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('DISABLED_MODULES');
|
||||
if (ConfigurationKPI::get('DISABLED_MODULES_EXPIRE') < $time)
|
||||
@@ -1009,7 +1009,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
$helper->id = 'box-update-modules';
|
||||
$helper->icon = 'icon-refresh';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = html_entity_decode($this->l('Modules to update'));
|
||||
$helper->title = $this->l('Modules to update', null, null, false);
|
||||
if (ConfigurationKPI::get('UPDATE_MODULES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('UPDATE_MODULES');
|
||||
if (ConfigurationKPI::get('UPDATE_MODULES_EXPIRE') < $time)
|
||||
|
||||
@@ -1263,8 +1263,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$helper->icon = 'icon-sort-by-attributes-alt';
|
||||
//$helper->chart = true;
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Conversion Rate');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('Conversion Rate', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('CONVERSION_RATE') !== false)
|
||||
$helper->value = ConfigurationKPI::get('CONVERSION_RATE');
|
||||
if (ConfigurationKPI::get('CONVERSION_RATE_CHART') !== false)
|
||||
@@ -1277,8 +1277,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$helper->id = 'box-carts';
|
||||
$helper->icon = 'icon-shopping-cart';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Abandoned Carts');
|
||||
$helper->subtitle = $this->l('Today');
|
||||
$helper->title = $this->l('Abandoned Carts', null, null, false);
|
||||
$helper->subtitle = $this->l('Today', null, null, false);
|
||||
$helper->href = $this->context->link->getAdminLink('AdminCarts');
|
||||
if (ConfigurationKPI::get('ABANDONED_CARTS') !== false)
|
||||
$helper->value = ConfigurationKPI::get('ABANDONED_CARTS');
|
||||
@@ -1290,8 +1290,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$helper->id = 'box-average-order';
|
||||
$helper->icon = 'icon-money';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Average Order Value');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('Average Order Value', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('AVG_ORDER_VALUE') !== false)
|
||||
$helper->value = ConfigurationKPI::get('AVG_ORDER_VALUE');
|
||||
if (ConfigurationKPI::get('AVG_ORDER_VALUE_EXPIRE') < $time)
|
||||
@@ -1302,8 +1302,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$helper->id = 'box-net-profit-visitor';
|
||||
$helper->icon = 'icon-user';
|
||||
$helper->color = 'color4';
|
||||
$helper->title = $this->l('Net Profit per Visitor');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('Net Profit per Visitor', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('NETPROFIT_VISITOR') !== false)
|
||||
$helper->value = ConfigurationKPI::get('NETPROFIT_VISITOR');
|
||||
if (ConfigurationKPI::get('NETPROFIT_VISITOR_EXPIRE') < $time)
|
||||
|
||||
@@ -2311,7 +2311,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$helper->id = 'box-products-stock';
|
||||
$helper->icon = 'icon-archive';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Items in Stock');
|
||||
$helper->title = $this->l('Items in Stock', null, null, false);
|
||||
if (ConfigurationKPI::get('PERCENT_PRODUCT_STOCK') !== false)
|
||||
$helper->value = ConfigurationKPI::get('PERCENT_PRODUCT_STOCK');
|
||||
if (ConfigurationKPI::get('PERCENT_PRODUCT_STOCK_EXPIRE') < $time)
|
||||
@@ -2323,7 +2323,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$helper->id = 'box-avg-gross-margin';
|
||||
$helper->icon = 'icon-tags';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Average Gross Margin');
|
||||
$helper->title = $this->l('Average Gross Margin', null, null, false);
|
||||
if (ConfigurationKPI::get('PRODUCT_AVG_GROSS_MARGIN') !== false)
|
||||
$helper->value = ConfigurationKPI::get('PRODUCT_AVG_GROSS_MARGIN');
|
||||
if (ConfigurationKPI::get('PRODUCT_AVG_GROSS_MARGIN_EXPIRE') < $time)
|
||||
@@ -2334,8 +2334,8 @@ class AdminProductsControllerCore extends AdminController
|
||||
$helper->id = 'box-8020-sales-catalog';
|
||||
$helper->icon = 'icon-beaker';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('80% of your sales');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
$helper->title = $this->l('80% of your sales', null, null, false);
|
||||
$helper->subtitle = $this->l('30 days', null, null, false);
|
||||
if (ConfigurationKPI::get('8020_SALES_CATALOG') !== false)
|
||||
$helper->value = ConfigurationKPI::get('8020_SALES_CATALOG');
|
||||
if (ConfigurationKPI::get('8020_SALES_CATALOG_EXPIRE') < $time)
|
||||
@@ -2346,7 +2346,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$helper->id = 'box-disabled-products';
|
||||
$helper->icon = 'icon-off';
|
||||
$helper->color = 'color4';
|
||||
$helper->title = $this->l('Disabled Products');
|
||||
$helper->title = $this->l('Disabled Products', null, null, false);
|
||||
if (ConfigurationKPI::get('DISABLED_PRODUCTS') !== false)
|
||||
$helper->value = ConfigurationKPI::get('DISABLED_PRODUCTS');
|
||||
if (ConfigurationKPI::get('DISABLED_PRODUCTS_EXPIRE') < $time)
|
||||
|
||||
@@ -1294,7 +1294,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$helper->id = 'box-languages';
|
||||
$helper->icon = 'icon-microphone';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Enabled Languages');
|
||||
$helper->title = $this->l('Enabled Languages', null, null, false);
|
||||
if (ConfigurationKPI::get('ENABLED_LANGUAGES') !== false)
|
||||
$helper->value = ConfigurationKPI::get('ENABLED_LANGUAGES');
|
||||
if (ConfigurationKPI::get('ENABLED_LANGUAGES_EXPIRE') < $time)
|
||||
@@ -1305,8 +1305,8 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$helper->id = 'box-country';
|
||||
$helper->icon = 'icon-home';
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Main Country');
|
||||
$helper->subtitle = $this->l('30 Days');
|
||||
$helper->title = $this->l('Main Country', null, null, false);
|
||||
$helper->subtitle = $this->l('30 Days', null, null, false);
|
||||
if (ConfigurationKPI::get('MAIN_COUNTRY', $this->context->language->id) !== false)
|
||||
$helper->value = ConfigurationKPI::get('MAIN_COUNTRY', $this->context->language->id);
|
||||
if (ConfigurationKPI::get('MAIN_COUNTRY_EXPIRE', $this->context->language->id) < $time)
|
||||
@@ -1317,7 +1317,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$helper->id = 'box-translations';
|
||||
$helper->icon = 'icon-list';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Front Office Translations');
|
||||
$helper->title = $this->l('Front Office Translations', null, null, false);
|
||||
if (ConfigurationKPI::get('FRONTOFFICE_TRANSLATIONS') !== false)
|
||||
$helper->value = ConfigurationKPI::get('FRONTOFFICE_TRANSLATIONS');
|
||||
if (ConfigurationKPI::get('FRONTOFFICE_TRANSLATIONS_EXPIRE') < $time)
|
||||
|
||||
Reference in New Issue
Block a user