diff --git a/admin-dev/ajaxfilemanager/ajax_file_upload.php b/admin-dev/ajaxfilemanager/ajax_file_upload.php
index b21a39c13..c942991ed 100755
--- a/admin-dev/ajaxfilemanager/ajax_file_upload.php
+++ b/admin-dev/ajaxfilemanager/ajax_file_upload.php
@@ -22,26 +22,18 @@
$upload->setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS));
if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD)
- {
$error = SYS_DISABLED;
- }
elseif(empty($_GET['folder']) || !isUnderRoot($_GET['folder']))
- {
$error = ERR_FOLDER_PATH_NOT_ALLOWED;
- }else if(!$upload->isFileUploaded('file'))
- {
+ elseif (!$upload->isFileUploaded('file'))
$error = ERR_FILE_NOT_UPLOADED;
- }else if(!$upload->moveUploadedFile($_GET['folder']))
- {
- $error = ERR_FILE_MOVE_FAILED;
- }
- elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS)))
- {
+ elseif (!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS)))
$error = ERR_FILE_TYPE_NOT_ALLOWED;
- }elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE))
- {
+ elseif (defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE))
$error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE));
- }else
+ elseif (!$upload->moveUploadedFile($_GET['folder']))
+ $error = ERR_FILE_MOVE_FAILED;
+ else
{
include_once(CLASS_FILE);
$path = $upload->getFilePath();
diff --git a/admin-dev/ajaxfilemanager/ajax_get_file_listing.php b/admin-dev/ajaxfilemanager/ajax_get_file_listing.php
index c72110344..bb85caada 100755
--- a/admin-dev/ajaxfilemanager/ajax_get_file_listing.php
+++ b/admin-dev/ajaxfilemanager/ajax_get_file_listing.php
@@ -24,7 +24,8 @@
if(!empty($_GET['search']))
{
include_once(CLASS_SEARCH);
-
+ if (!preg_match('/^'.Tools::pRegexp(realpath(dirname(__FILE__).'/'.$_GET['search_folder']), '/').'/i', _PS_ROOT_DIR_.'/img/cms'))
+ exit;
$search = new Search($_GET['search_folder']);
$search->addSearchKeyword('recursive', @$_GET['search_recursively']);
$search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']);
diff --git a/admin-dev/ajaxfilemanager/inc/config.base.php b/admin-dev/ajaxfilemanager/inc/config.base.php
index 28155f21e..5b57feed0 100755
--- a/admin-dev/ajaxfilemanager/inc/config.base.php
+++ b/admin-dev/ajaxfilemanager/inc/config.base.php
@@ -78,9 +78,9 @@
define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid
define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
- define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png');// //
+ define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png');// //
//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');//
- define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,jpg,png');
+ define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,jpg,jpeg,jpeg,png');
//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); //
define('CONFIG_UPLOAD_INVALID_EXTS', '');
diff --git a/admin-dev/ajaxfilemanager/inc/config.php b/admin-dev/ajaxfilemanager/inc/config.php
index 2f30ed245..09b4e4200 100755
--- a/admin-dev/ajaxfilemanager/inc/config.php
+++ b/admin-dev/ajaxfilemanager/inc/config.php
@@ -10,6 +10,9 @@
//FILESYSTEM CONFIG
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.auth.php");
+ if (_PS_MODE_DEMO_)
+ die('This functionality has been disabled.');
+
define('CONFIG_QUERY_STRING_ENABLE', true); //Enable passed query string to setting the system configuration
if(!isset($_SESSION))
{
diff --git a/admin-dev/ajaxfilemanager/inc/config.tinymce.php b/admin-dev/ajaxfilemanager/inc/config.tinymce.php
index c406f47e5..9070323a2 100755
--- a/admin-dev/ajaxfilemanager/inc/config.tinymce.php
+++ b/admin-dev/ajaxfilemanager/inc/config.tinymce.php
@@ -73,9 +73,9 @@
define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid
define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
- define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); //
+ define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png,txt'); //
//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');//
- define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf');
+ define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,jpeg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf');
//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); //
define('CONFIG_UPLOAD_INVALID_EXTS', '');
diff --git a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl
index 9a0b01041..a9087d5dc 100644
--- a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl
+++ b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl
@@ -35,7 +35,7 @@
$.ajax({
type: "POST",
url: "index.php",
- data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}¬e="+noteContent,
+ data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}¬e="+encodeURIComponent(noteContent),
async : true,
success: function(r) {
$('#note_feedback').html('').hide();
diff --git a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl
index 09a50329f..94c2938df 100644
--- a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl
+++ b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl
@@ -77,6 +77,7 @@
{l s='Sample Addresses file'}
{l s='Sample Manufacturers file'}
{l s='Sample Suppliers file'}
+ {l s='Sample Alias file'}
{if $PS_ADVANCED_STOCK_MANAGEMENT}
{l s='Supply Orders sample file'}
{l s='Supply Orders Details sample file'}
@@ -203,12 +204,12 @@
});
$("select#entity").change(function(){
- if ($("#entity > option:selected").val() == 7 || $("#entity > option:selected").val() == 8)
+ if ($("#entity > option:selected").val() == 8 || $("#entity > option:selected").val() == 9)
$("label[for=truncate],#truncate").hide();
else
$("label[for=truncate],#truncate").show();
- if ($("#entity > option:selected").val() == 8)
+ if ($("#entity > option:selected").val() == 9)
{
$(".import_supply_orders_details").show();
$('input[name=multiple_value_separator]').val('|');
@@ -219,14 +220,22 @@
$('input[name=multiple_value_separator]').val('{if isset($multiple_value_separator_selected)}{$multiple_value_separator_selected}{else},{/if}');
}
if ($("#entity > option:selected").val() == 1)
- $("label[for=match_ref], #match_ref, label[for=regenerate], #regenerate").show();
+ $("label[for=match_ref], #match_ref").show();
else
- $("label[for=match_ref], #match_ref, label[for=regenerate], #regenerate").hide();
+ $("label[for=match_ref], #match_ref").hide();
+
if ($("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 0)
- $(".import_products_categories, label[for=regenerate], #regenerate").show();
+ $(".import_products_categories").show();
else
- $(".import_products_categories, label[for=regenerate], #regenerate").hide();
- if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3 || $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6)
+ $(".import_products_categories").hide();
+
+ if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 ||
+ $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6)
+ $("label[for=regenerate], #regenerate").show()
+ else
+ $("label[for=regenerate], #regenerate").hide();
+
+ if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3 || $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6 || $("#entity > option:selected").val() == 7)
$("label[for=forceIDs], #forceIDs").show();
else
$("label[for=forceIDs], #forceIDs").hide();
@@ -260,4 +269,4 @@
});
};
});
-
\ No newline at end of file
+
diff --git a/admin-dev/themes/default/template/controllers/modules/favorites.tpl b/admin-dev/themes/default/template/controllers/modules/favorites.tpl
index 13efe0e73..911c3dd28 100755
--- a/admin-dev/themes/default/template/controllers/modules/favorites.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/favorites.tpl
@@ -59,14 +59,14 @@
{$module->categoryName} |
|
diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl
index 8fcd8cabc..62c3cc376 100644
--- a/admin-dev/themes/default/template/controllers/modules/list.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/list.tpl
@@ -46,7 +46,7 @@
|
}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}) |
-
+
{$module->displayName}{$module->name}
{if isset($module->type) && $module->type == 'addonsMustHave'}
{l s='Must Have'}
diff --git a/admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl b/admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
index 044183bf6..b76532dd0 100644
--- a/admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
+++ b/admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
@@ -34,6 +34,7 @@
+ {$module->name}
{$module->displayName|truncate:36:'…'} {$module->version}
{if isset($module->id) && $module->id gt 0 }
{if $module->active}
diff --git a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl
index 623e83dde..a10cf1145 100644
--- a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl
+++ b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl
@@ -37,7 +37,7 @@
{l s='Show'} :
| |