Merge pull request #15007 from hregis/develop_bug2
FIX avoid spaces in file name
This commit is contained in:
commit
fe19eea540
@ -265,14 +265,19 @@ $db->close();
|
|||||||
*/
|
*/
|
||||||
function getActivatedExtensions()
|
function getActivatedExtensions()
|
||||||
{
|
{
|
||||||
$file = getConfigFilePath();
|
$file = trim(getConfigFilePath());
|
||||||
$handle = fopen(GetConfigFilePath(), "r");
|
$handle = fopen($file, "r");
|
||||||
$content = fread($handle, filesize($file));
|
$content = fread($handle, filesize($file));
|
||||||
|
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
|
|
||||||
$configLines = explode("\r", $content);
|
$configLines = explode("\r", $content);
|
||||||
|
|
||||||
|
// For compatibility with LF (Line Feed)
|
||||||
|
if (empty($configLines) || count($configLines) < 2) {
|
||||||
|
$configLines = explode("\n", $content);
|
||||||
|
}
|
||||||
|
|
||||||
$extensions = array();
|
$extensions = array();
|
||||||
$lastLine = "";
|
$lastLine = "";
|
||||||
|
|
||||||
@ -281,11 +286,13 @@ function getActivatedExtensions()
|
|||||||
$line = trim($line);
|
$line = trim($line);
|
||||||
|
|
||||||
// ignore comment lines
|
// ignore comment lines
|
||||||
if (substr($line, 0, 1) === ";")
|
if (substr($line, 0, 1) === ";" || empty($line))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// var_dump($line);
|
||||||
|
|
||||||
// extension
|
// extension
|
||||||
if (substr($line, 0, 9) === "extension" && substr($line, 0, 10) !== "extension_")
|
if (substr($line, 0, 9) === "extension" && substr($line, 0, 10) !== "extension_")
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user