diff --git a/404.php b/404.php index d90d7df7a..9fd4270f4 100644 --- a/404.php +++ b/404.php @@ -24,18 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA */ -/* Send the proper status code in HTTP headers */ -header('HTTP/1.1 404 Not Found'); -header('Status: 404 Not Found'); - -if (in_array(substr($_SERVER['REQUEST_URI'], -3), array('png', 'jpg', 'gif'))) -{ - require_once(dirname(__FILE__).'/config/settings.inc.php'); - header('Location: '.__PS_BASE_URI__.'img/404.gif'); - exit; -} -elseif (in_array(substr($_SERVER['REQUEST_URI'], -3), array('.js', 'css'))) - die(''); - require_once(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); Controller::getController('PageNotFoundController')->run(); diff --git a/admin-dev/ajax-tab.php b/admin-dev/ajax-tab.php index 684278d34..24c751f9d 100755 --- a/admin-dev/ajax-tab.php +++ b/admin-dev/ajax-tab.php @@ -25,8 +25,8 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -require(dirname(__FILE__).'/../config/config.inc.php'); -require(dirname(__FILE__).'/functions.php'); +require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/functions.php'); // For retrocompatibility with "tab" parameter if (!isset($_GET['controller']) && isset($_GET['tab'])) diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index 5ec0197ac..8f41e44cb 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -27,7 +27,7 @@ define('_PS_ADMIN_DIR_', getcwd()); include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); /* Getting cookie or logout */ -require_once(dirname(__FILE__).'/init.php'); +require_once(_PS_ADMIN_DIR_.'/init.php'); $context = Context::getContext(); diff --git a/admin-dev/ajax_products_list.php b/admin-dev/ajax_products_list.php index 64ee54211..f14a9a8c8 100644 --- a/admin-dev/ajax_products_list.php +++ b/admin-dev/ajax_products_list.php @@ -27,7 +27,7 @@ define('_PS_ADMIN_DIR_', getcwd()); include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); /* Getting cookie or logout */ -require_once(dirname(__FILE__).'/init.php'); +require_once(_PS_ADMIN_DIR_.'/init.php'); $query = Tools::getValue('q', false); if (!$query OR $query == '' OR strlen($query) < 1) diff --git a/admin-dev/backup.php b/admin-dev/backup.php index e4b451f43..8a4f66fef 100644 --- a/admin-dev/backup.php +++ b/admin-dev/backup.php @@ -33,15 +33,15 @@ if (!Context::getContext()->employee->isLoggedBack()) $tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminBackup')); if ($tabAccess['view'] !== '1') - die (Tools::displayError('You do not have permission to view here')); + die (Tools::displayError('You do not have permission to view this.')); $backupdir = realpath(_PS_ADMIN_DIR_ . '/backups/'); if ($backupdir === false) - die (Tools::displayError('"Backup" directory does not exist.')); + die (Tools::displayError('A "Backup" directory does not exist.')); if (!$backupfile = Tools::getValue('filename')) - die (Tools::displayError('No file specified')); + die (Tools::displayError('No file has been specified.')); // Check the realpath so we can validate the backup file is under the backup directory $backupfile = realpath($backupdir.'/'.$backupfile); @@ -58,7 +58,7 @@ else $fp = @fopen($backupfile, 'r'); if ($fp === false) - die (Tools::displayError('Unable to open backup file').' "'.addslashes($backupfile).'"'); + die (Tools::displayError('Unable to open backup file(s).').' "'.addslashes($backupfile).'"'); // Add the correct headers, this forces the file is saved header('Content-Type: '.$contentType); @@ -70,4 +70,4 @@ $ret = @fpassthru($fp); fclose($fp); if ($ret === false) - die (Tools::displayError('Unable to display backup file').' "'.addslashes($backupfile).'"'); \ No newline at end of file + die (Tools::displayError('Unable to display backup file(s).').' "'.addslashes($backupfile).'"'); \ No newline at end of file diff --git a/admin-dev/displayImage.php b/admin-dev/displayImage.php index e48f4f290..f873fdb22 100644 --- a/admin-dev/displayImage.php +++ b/admin-dev/displayImage.php @@ -25,8 +25,8 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -require_once(dirname(__FILE__).'/../config/config.inc.php'); -require_once(dirname(__FILE__).'/init.php'); +require_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +require_once(_PS_ADMIN_DIR_.'/init.php'); if (isset($_GET['img']) AND Validate::isMd5($_GET['img']) AND isset($_GET['name']) AND Validate::isGenericName($_GET['name']) AND file_exists(_PS_UPLOAD_DIR_.$_GET['img'])) { diff --git a/admin-dev/drawer.php b/admin-dev/drawer.php index d155d25c5..c52ea4547 100644 --- a/admin-dev/drawer.php +++ b/admin-dev/drawer.php @@ -25,7 +25,7 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -include_once(dirname(__FILE__).'/../config/config.inc.php'); +include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); $module = Tools::getValue('module'); $render = Tools::getValue('render'); diff --git a/admin-dev/functions.php b/admin-dev/functions.php index 888f9bb24..351670003 100644 --- a/admin-dev/functions.php +++ b/admin-dev/functions.php @@ -250,7 +250,7 @@ function checkingTab($tab) { if (isset(AdminTab::$tabParenting[$tab])) Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab])); - echo sprintf(Tools::displayError('Page %s cannot be found.'),$tab); + echo sprintf(Tools::displayError('Page %s cannot be found..'),$tab); return false; } diff --git a/admin-dev/get-file-admin.php b/admin-dev/get-file-admin.php index 1a6c855db..b37f691e5 100644 --- a/admin-dev/get-file-admin.php +++ b/admin-dev/get-file-admin.php @@ -25,5 +25,5 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -require(dirname(dirname(__FILE__)).'/config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/config/config.inc.php'); Controller::getController('GetFileController')->run(); \ No newline at end of file diff --git a/admin-dev/grider.php b/admin-dev/grider.php index 0ba54a8a6..6e97baf68 100644 --- a/admin-dev/grider.php +++ b/admin-dev/grider.php @@ -25,7 +25,7 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -include_once(dirname(__FILE__).'/../config/config.inc.php'); +include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); $module = Tools::getValue('module'); $render = Tools::getValue('render'); diff --git a/admin-dev/index.php b/admin-dev/index.php index 6da63272e..f5fcc246d 100644 --- a/admin-dev/index.php +++ b/admin-dev/index.php @@ -27,8 +27,8 @@ $timer_start = microtime(true); define('_PS_ADMIN_DIR_', getcwd()); -require(dirname(__FILE__).'/../config/config.inc.php'); -require(dirname(__FILE__).'/functions.php'); +require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/functions.php'); //small test to clear cache after upgrade if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) diff --git a/admin-dev/searchcron.php b/admin-dev/searchcron.php index d3f75c9b4..c6a772464 100644 --- a/admin-dev/searchcron.php +++ b/admin-dev/searchcron.php @@ -25,7 +25,7 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -include(dirname(__FILE__).'/../config/config.inc.php'); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token')) diff --git a/admin-dev/themes/default/css/admin.css b/admin-dev/themes/default/css/admin.css index b057f2c6e..349f6e998 100644 --- a/admin-dev/themes/default/css/admin.css +++ b/admin-dev/themes/default/css/admin.css @@ -199,7 +199,7 @@ a.module_toggle_all{color: #268CCD;} /*toolbarBox*/ .toolbar-placeholder {position:relative} -.toolbarBox {background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;position:relative;width: auto !important;} +.toolbarBox {background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;position:relative} .toolbarBox .pageTitle { margin-left:10px; line-height:48px} .toolbarBox .pageTitle h3 {font-size: 1.6em; font-weight: normal; line-height: 52px; margin: 0; padding: 0; text-shadow:0 1px 0 #fff;} .toolbarBox ul.cc_button {float:right;margin:0 5px 0 0;padding:0;} @@ -243,7 +243,7 @@ a.module_toggle_all{color: #268CCD;} .toolbarReduced {margin-right:221px} #modules_list_button {width:211px;height:63px;border:none;position:absolute;top:0;right:0;background-image:url('../img/modules_list_button.png');font-size: 1.6em;cursor:pointer;padding-left:45px} -#modules_list_container { +.toolbarBox #modules_list_container { background: none repeat scroll 0 0 #FFF; border: solid 1px #CCC; display: block; @@ -252,7 +252,7 @@ a.module_toggle_all{color: #268CCD;} width: 300px; position: absolute; right: 13px; - top: 83px; + top: 63px; z-index: 100; padding: 10px; box-shadow: 1px 5px 5px #CCCCCC; @@ -261,29 +261,29 @@ a.module_toggle_all{color: #268CCD;} opacity: 1; } -#modules_list_container #modules_list_container_content +.toolbarBox #modules_list_container #modules_list_container_content { max-height: 500px; overflow: auto; } -#modules_list_container #modules_list_container_tab {margin-top: 10px;width: auto;height: auto; } -#modules_list_container #modules_list_container_tab table {width: 100%;border-spacing: 0px; } -#modules_list_container #modules_list_container_tab tr { height: auto} -#modules_list_container #modules_list_container_tab tr.rowalt {background-color: #EEE} -#modules_list_container #modules_list_container_tab #tab_module_switch {margin-bottom: 10px;} -#modules_list_container #modules_list_loader {margin-top: 10px} -#modules_list_container .nav-tabs-modules:after {clear:both} -#modules_list_container .nav-tabs-modules > li {height: 19px;float:left} -#modules_list_container .nav-tabs-modules > li > a { +.toolbarBox #modules_list_container #modules_list_container_tab {margin-top: 10px;width: auto;height: auto; } +.toolbarBox #modules_list_container #modules_list_container_tab table {width: 100%;border-spacing: 0px; } +.toolbarBox #modules_list_container #modules_list_container_tab tr { height: auto} +.toolbarBox #modules_list_container #modules_list_container_tab tr.rowalt {background-color: #EEE} +.toolbarBox #modules_list_container #modules_list_container_tab #tab_module_switch {margin-bottom: 10px;} +.toolbarBox #modules_list_container #modules_list_loader {margin-top: 10px} +.toolbarBox #modules_list_container .nav-tabs-modules:after {clear: both;} +.toolbarBox #modules_list_container .nav-tabs-modules > li {height: 19px;} +.toolbarBox #modules_list_container .nav-tabs-modules > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } -#modules_list_container .nav-tabs-modules > li > a { +.toolbarBox #modules_list_container .nav-tabs-modules > li > a { padding-top: 8px; padding-bottom: 7px; border: 1px solid transparent; @@ -293,15 +293,15 @@ a.module_toggle_all{color: #268CCD;} border-radius: 4px 4px 0 0; } -#modules_list_container .nav-tabs-modules > li > a:hover { +.toolbarBox #modules_list_container .nav-tabs-modules > li > a:hover { border-color: #C0C0C0; background-color: #ffffff; } -#modules_list_container .nav-tabs-modules > li > a {border: 1px solid #ddd;border-bottom:none;} +.toolbarBox #modules_list_container .nav-tabs-modules > li > a {border: 1px solid #ddd;border-bottom:none;} -#modules_list_container .nav-tabs-modules > .active > a, -#modules_list_container .nav-tabs-modules > .active > a:hover { +.toolbarBox #modules_list_container .nav-tabs-modules > .active > a, +.toolbarBox #modules_list_container .nav-tabs-modules > .active > a:hover { color: #555555; cursor: default; background-color: #EEE; @@ -312,7 +312,7 @@ a.module_toggle_all{color: #268CCD;} -div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:500;width:90% !important;margin:auto} +div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:500;margin:auto} /*button upload files*/ #content .qq-upload-button { diff --git a/admin-dev/themes/default/template/controllers/backup/download/view.tpl b/admin-dev/themes/default/template/controllers/backup/download/view.tpl index d5ecb1bac..3a3fe6fbb 100644 --- a/admin-dev/themes/default/template/controllers/backup/download/view.tpl +++ b/admin-dev/themes/default/template/controllers/backup/download/view.tpl @@ -51,7 +51,7 @@
{l s='How to restore a database Backup in 10 easy steps:'}
+{l s='How to restore a database backup in 10 easy steps:'}
{l s='How to restore a database Backup in 10 easy steps:'}
+{l s='How to restore a database backup in 10 easy steps:'}
{l s='The cart rule will be applied to the first X customers only.'}
+{l s='The cart rule will be applied to the first "X" customers only.'}
{l s='A customer will only be able to use the cart rule X time(s).'}
+{l s='A customer will only be able to use the cart rule "X" time(s).'}
{l s='Unselected carriers'}
- {l s='If the voucher is not yet in the cart, it will be displayed under the cart in the cart summary.'} + {l s='If the voucher is not yet in the cart, it will be displayed in the cart summary.'}
diff --git a/admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl b/admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl index 0ff7e7f70..9c5d80438 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/product_rule.tpl @@ -8,7 +8,7 @@ {* Everything is on a single line in order to avoid a empty space between the [ ] and the word *} - [{if $product_rule_type == 'products'}{l s='Products:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers:'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}] + [{if $product_rule_type == 'products'}{l s='Products:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}]
{else}
{/if}
{else}
{/if}
{else}
{/if}
{if $customer->isGuest()}