// type of logger field
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -62,7 +62,7 @@ class LoggerCore extends ObjectModel
|
||||
'fields' => array(
|
||||
'severity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true),
|
||||
'error_code' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'required' => true),
|
||||
'message' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true),
|
||||
'object_id' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'object_type' => array('type' => self::TYPE_STRING, 'validate' => 'isName'),
|
||||
|
||||
Reference in New Issue
Block a user