Improvemenet name file support
This commit is contained in:
@@ -5309,7 +5309,8 @@ class G
|
|||||||
return $arrayData;
|
return $arrayData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function buildFrom($configuration, $from = '') {
|
public static function buildFrom($configuration, $from = '')
|
||||||
|
{
|
||||||
if (!isset($configuration['MESS_FROM_NAME'])) {
|
if (!isset($configuration['MESS_FROM_NAME'])) {
|
||||||
$configuration['MESS_FROM_NAME'] = '';
|
$configuration['MESS_FROM_NAME'] = '';
|
||||||
}
|
}
|
||||||
@@ -5352,7 +5353,8 @@ class G
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function verifyInputDocExtension($InpDocAllowedFiles, $filesName, $filesTmpName){
|
public function verifyInputDocExtension($InpDocAllowedFiles, $filesName, $filesTmpName)
|
||||||
|
{
|
||||||
$allowedTypes = explode(", ", $InpDocAllowedFiles);
|
$allowedTypes = explode(", ", $InpDocAllowedFiles);
|
||||||
$flag = 0;
|
$flag = 0;
|
||||||
$res = new stdclass();
|
$res = new stdclass();
|
||||||
@@ -5522,7 +5524,8 @@ class G
|
|||||||
/**
|
/**
|
||||||
* Get the actual browser.
|
* Get the actual browser.
|
||||||
*/
|
*/
|
||||||
public function getActualBrowser(){
|
public function getActualBrowser ()
|
||||||
|
{
|
||||||
$browser=array("TRIDENT","IE","OPERA","MOZILLA","NETSCAPE","FIREFOX","SAFARI","CHROME");
|
$browser=array("TRIDENT","IE","OPERA","MOZILLA","NETSCAPE","FIREFOX","SAFARI","CHROME");
|
||||||
$info['browser'] = "OTHER";
|
$info['browser'] = "OTHER";
|
||||||
|
|
||||||
@@ -5539,15 +5542,15 @@ class G
|
|||||||
$info['version'] = $version;
|
$info['version'] = $version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$info['browser'] = ($info['browser']=='RV')? 'IE':$info['browser'];
|
$info['browser'] = ($info['browser']=='RV')? 'IE':$info['browser'];
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Check the browser compativility
|
* Check the browser compativility
|
||||||
*/
|
*/
|
||||||
public function checkBrowserCompatibility($browser = null, $version = null){
|
public function checkBrowserCompatibility($browser = null, $version = null)
|
||||||
|
{
|
||||||
if ($browser == null || $version == null) {
|
if ($browser == null || $version == null) {
|
||||||
$info = G::getActualBrowser();
|
$info = G::getActualBrowser();
|
||||||
$browser = $info['browser'];
|
$browser = $info['browser'];
|
||||||
@@ -5561,6 +5564,23 @@ class G
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* $string - The string to sanitize.
|
||||||
|
* $lowercase - Force the string to lowercase?
|
||||||
|
* $alpha - If set to *true*, will remove all non-alphanumeric characters.
|
||||||
|
*/
|
||||||
|
public function sanitizeString ($string, $lowercase = true, $alpha = false)
|
||||||
|
{
|
||||||
|
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
|
||||||
|
"}", "\\", "|", ";", ":", "\"", "'", "‘", "’", "“", "”", "–", "—",
|
||||||
|
"—", "–", ",", "<", ".", ">", "/", "?");
|
||||||
|
$clean = trim(str_replace($strip, "", strip_tags($string)));
|
||||||
|
$clean = preg_replace('/\s+/', "-", $clean);
|
||||||
|
$clean = ($alpha) ? preg_replace("/[^a-zA-Z0-9]/", "", $clean) : $clean ;
|
||||||
|
$clean = ($force_lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean;
|
||||||
|
return $clean;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1399,13 +1399,21 @@ class adminProxy extends HttpProxyController
|
|||||||
//Database server Version (MySQL version)
|
//Database server Version (MySQL version)
|
||||||
$installer = new Installer();
|
$installer = new Installer();
|
||||||
$systemInfo = $installer->getSystemInfo();
|
$systemInfo = $installer->getSystemInfo();
|
||||||
$params['dbVersion'] = mysql_get_server_info();//$systemInfo->mysql->version;
|
try {
|
||||||
|
$params['dbVersion'] = mysql_get_server_info();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$params['dbVersion'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
//PHP Version
|
//PHP Version
|
||||||
$params['php'] = $systemInfo->php->version;
|
$params['php'] = $systemInfo->php->version;
|
||||||
|
|
||||||
//Apache - IIS Version
|
//Apache - IIS Version
|
||||||
|
try {
|
||||||
$params['apache'] = apache_get_version();
|
$params['apache'] = apache_get_version();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$params['apache'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
//Installed Plugins (license info?)
|
//Installed Plugins (license info?)
|
||||||
$arrayAddon = array ();
|
$arrayAddon = array ();
|
||||||
@@ -1472,7 +1480,7 @@ class adminProxy extends HttpProxyController
|
|||||||
//Country/city (Timezone)
|
//Country/city (Timezone)
|
||||||
$params["Timezone"] = (defined('TIME_ZONE') && TIME_ZONE != "Unknown") ? TIME_ZONE : date_default_timezone_get();
|
$params["Timezone"] = (defined('TIME_ZONE') && TIME_ZONE != "Unknown") ? TIME_ZONE : date_default_timezone_get();
|
||||||
|
|
||||||
$support = PATH_DATA_SITE . SYS_SYS . '-' . date('YmdHis') . '.spm';
|
$support = PATH_DATA_SITE . G::sanitizeString($licenseManager->info['FIRST_NAME'] . '-' . $licenseManager->info['LAST_NAME'] . '-' . SYS_SYS . '-' . date('YmdHis'), false, false) . '.spm';
|
||||||
file_put_contents($support, serialize($params));
|
file_put_contents($support, serialize($params));
|
||||||
G::streamFile($support, true);
|
G::streamFile($support, true);
|
||||||
G::rm_dir($support);
|
G::rm_dir($support);
|
||||||
|
|||||||
Reference in New Issue
Block a user