* Split tmp files for cli.
This commit is contained in:
@@ -1702,7 +1702,7 @@ class baseRouter
|
||||
$modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS;
|
||||
if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath;
|
||||
|
||||
/* 5. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */
|
||||
/* 5. 使用通用版本里的模块。 If module is in the open edition, use it. */
|
||||
return $this->getModuleRoot($appName) . $moduleName . DS;
|
||||
}
|
||||
}
|
||||
@@ -1922,7 +1922,8 @@ class baseRouter
|
||||
if(empty($extFiles) and empty($hookFiles) and empty($apiFiles)) return $mainTargetFile;
|
||||
|
||||
/* 计算合并之后的targetFile路径。Compute the merged target file path. */
|
||||
$extTargetPrefix = $this->config->edition . DS . $this->config->vision . DS;
|
||||
$runMode = PHP_SAPI == 'cli' ? '_cli' : '';
|
||||
$extTargetPrefix = $this->config->edition . $runMode . DS . $this->config->vision . DS;
|
||||
if($siteExtended and !empty($this->siteCode)) $extTargetPrefix .= $this->siteCode[0] . DS . $this->siteCode;
|
||||
|
||||
$mergedTargetDir = $this->getTmpRoot() . $class . DS . $extTargetPrefix;
|
||||
|
||||
@@ -3279,7 +3279,8 @@ EOF;
|
||||
|
||||
if($app->config->debug)
|
||||
{
|
||||
$logFile = $app->getLogRoot() . 'saas.'. date('Ymd') . '.log.php';
|
||||
$runMode = PHP_SAPI == 'cli' ? '_cli' : '';
|
||||
$logFile = $app->getLogRoot() . 'saas' . $runMode . '.' . date('Ymd') . '.log.php';
|
||||
if(!file_exists($logFile)) file_put_contents($logFile, '<?php die(); ?' . '>');
|
||||
|
||||
$fh = @fopen($logFile, 'a');
|
||||
@@ -3393,7 +3394,8 @@ EOF;
|
||||
|
||||
if($log or $app->config->debug)
|
||||
{
|
||||
$logFile = $app->getLogRoot() . 'saas.'. date('Ymd') . '.log.php';
|
||||
$runMode = PHP_SAPI == 'cli' ? '_cli' : '';
|
||||
$logFile = $app->getLogRoot() . 'saas' . $runMode . '.' . date('Ymd') . '.log.php';
|
||||
if(!file_exists($logFile)) file_put_contents($logFile, '<?php die(); ?' . '>');
|
||||
|
||||
$fh = fopen($logFile, 'a');
|
||||
|
||||
Reference in New Issue
Block a user