fix sysGeneric to avoid mime-type errors for js, css and woff files
This commit is contained in:
@@ -132,9 +132,13 @@ if (file_exists($requestFile)) {
|
|||||||
$ext_file = "application/octet-stream";
|
$ext_file = "application/octet-stream";
|
||||||
} elseif ($ext_file == "tar") {
|
} elseif ($ext_file == "tar") {
|
||||||
$ext_file = "application/x-tar";
|
$ext_file = "application/x-tar";
|
||||||
|
} elseif ($ext_file == "woff") {
|
||||||
|
$ext_file = "application/font-woff";
|
||||||
|
} elseif ($ext_file == "js") {
|
||||||
|
$ext_file = "text/javascript";
|
||||||
} elseif ($ext_file=="css") {
|
} elseif ($ext_file=="css") {
|
||||||
//may this line be innecesary, all the .css are been generated at run time
|
//may this line be innecesary, all the .css are been generated at run time
|
||||||
$ext_file = 'css/'.$ext_file;
|
$ext_file = 'text/css';
|
||||||
} else {
|
} else {
|
||||||
$ext_file = "application/octet-stream";
|
$ext_file = "application/octet-stream";
|
||||||
}
|
}
|
||||||
@@ -273,7 +277,7 @@ define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/downlo
|
|||||||
try {
|
try {
|
||||||
Bootstrap::initVendors();
|
Bootstrap::initVendors();
|
||||||
$config = Bootstrap::getSystemConfiguration();
|
$config = Bootstrap::getSystemConfiguration();
|
||||||
|
|
||||||
// starting session
|
// starting session
|
||||||
if (isset($config['session.gc_maxlifetime'])) {
|
if (isset($config['session.gc_maxlifetime'])) {
|
||||||
$timelife = $config['session.gc_maxlifetime'];
|
$timelife = $config['session.gc_maxlifetime'];
|
||||||
@@ -1026,7 +1030,7 @@ try {
|
|||||||
//transactionLog($restConfig.PATH_DATA_SITE.SYS_TARGET); // ====> ??? this concat is very rare
|
//transactionLog($restConfig.PATH_DATA_SITE.SYS_TARGET); // ====> ??? this concat is very rare
|
||||||
|
|
||||||
$RBAC->initRBAC();
|
$RBAC->initRBAC();
|
||||||
|
|
||||||
Bootstrap::dispatchApiService(SYS_TARGET, API_VERSION);
|
Bootstrap::dispatchApiService(SYS_TARGET, API_VERSION);
|
||||||
} else {
|
} else {
|
||||||
//NewRelic Snippet - By JHL
|
//NewRelic Snippet - By JHL
|
||||||
@@ -1048,7 +1052,7 @@ try {
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//g::pr($e->getTrace()); die;
|
//g::pr($e->getTrace()); die;
|
||||||
Bootstrap::renderTemplate('error.tpl', array(
|
Bootstrap::renderTemplate('error.tpl', array(
|
||||||
'title' => 'ProcessMaker Bootstrap Exception',
|
'title' => 'ProcessMaker Bootstrap Exception',
|
||||||
'message' => nl2br($e->getMessage()),
|
'message' => nl2br($e->getMessage()),
|
||||||
'exceptionClass' => get_class($e),
|
'exceptionClass' => get_class($e),
|
||||||
'trace' => $e->getTrace()
|
'trace' => $e->getTrace()
|
||||||
|
|||||||
Reference in New Issue
Block a user