* Compatible with extension support for new ui
This commit is contained in:
@@ -404,7 +404,7 @@ class baseControl
|
||||
$methodName = strtolower(trim($methodName));
|
||||
|
||||
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
|
||||
$viewExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, $viewDir);
|
||||
$viewExtPath = $this->app->getModuleExtPath($moduleName, $viewDir);
|
||||
|
||||
$viewType = $this->viewType == 'mhtml' ? 'html' : $this->viewType;
|
||||
$mainViewFile = $modulePath . $viewDir . DS . $this->devicePrefix . $methodName . '.' . $viewType . '.php';
|
||||
@@ -443,7 +443,7 @@ class baseControl
|
||||
* Find extViewFile in ext/_$siteCode/view first, then try ext/view/.
|
||||
*/
|
||||
$moduleName = basename(dirname(dirname(realpath($viewFile))));
|
||||
$extPath = $this->app->getModuleExtPath('', $moduleName, 'view');
|
||||
$extPath = $this->app->getModuleExtPath($moduleName, 'view');
|
||||
|
||||
$checkedOrder = array('site', 'saas', 'custom', 'vision', 'xuan', 'common');
|
||||
$fileName = basename($viewFile);
|
||||
@@ -479,7 +479,7 @@ class baseControl
|
||||
$methodName = strtolower(trim($methodName));
|
||||
|
||||
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
|
||||
$cssExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'css');
|
||||
$cssExtPath = $this->app->getModuleExtPath($moduleName, 'css');
|
||||
|
||||
$clientLang = $this->app->getClientLang();
|
||||
$notCNLang = !str_contains('|zh-cn|zh-tw|', "|{$clientLang}|");
|
||||
@@ -596,7 +596,7 @@ class baseControl
|
||||
$methodName = strtolower(trim($methodName));
|
||||
|
||||
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
|
||||
$jsExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'js');
|
||||
$jsExtPath = $this->app->getModuleExtPath($moduleName, 'js');
|
||||
|
||||
$js = '';
|
||||
$mainJsFile = $modulePath . 'js' . DS . $this->devicePrefix . "common{$suffix}.js";
|
||||
@@ -803,7 +803,7 @@ class baseControl
|
||||
*/
|
||||
$modulePath = $this->app->getModulePath($appName, $moduleName);
|
||||
$moduleControlFile = $modulePath . 'control.php';
|
||||
$actionExtPath = $this->app->getModuleExtPath($appName, $moduleName, 'control');
|
||||
$actionExtPath = $this->app->getModuleExtPath($moduleName, 'control');
|
||||
$file2Included = $moduleControlFile;
|
||||
|
||||
if(!empty($actionExtPath))
|
||||
|
||||
@@ -280,7 +280,7 @@ class baseModel
|
||||
if(isset($this->$extensionClass)) return $this->$extensionClass;
|
||||
|
||||
/* 设置扩展的名字和相应的文件。Set extenson name and extension file. */
|
||||
$moduleExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, $type);
|
||||
$moduleExtPath = $this->app->getModuleExtPath($moduleName, $type);
|
||||
if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php';
|
||||
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['saas'] . 'class/' . $extensionName . '.class.php';
|
||||
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php';
|
||||
|
||||
@@ -1718,7 +1718,7 @@ class baseRouter
|
||||
* @access public
|
||||
* @return string the extension path.
|
||||
*/
|
||||
public function getModuleExtPath($appName, $moduleName, $ext)
|
||||
public function getModuleExtPath($moduleName, $ext)
|
||||
{
|
||||
$saasExtPath = $this->getExtensionRoot() . 'saas' . DS . $moduleName . DS . 'ext' . DS . $ext . DS;
|
||||
|
||||
@@ -1795,7 +1795,7 @@ class baseRouter
|
||||
*/
|
||||
public function setActionExtFile()
|
||||
{
|
||||
$moduleExtPaths = $this->getModuleExtPath('', $this->moduleName, 'control');
|
||||
$moduleExtPaths = $this->getModuleExtPath($this->moduleName, 'control');
|
||||
|
||||
/* 如果扩展目录为空,不包含任何扩展文件。If there's no ext paths return false.*/
|
||||
if(empty($moduleExtPaths)) return false;
|
||||
@@ -1839,7 +1839,7 @@ class baseRouter
|
||||
*/
|
||||
public function checkAPIFile()
|
||||
{
|
||||
$moduleExtPaths = $this->getModuleExtPath('', $this->moduleName, 'control');
|
||||
$moduleExtPaths = $this->getModuleExtPath($this->moduleName, 'control');
|
||||
|
||||
/* 如果扩展目录为空,不包含任何扩展文件。If there's no ext paths return false.*/
|
||||
if(empty($moduleExtPaths)) return false;
|
||||
@@ -1900,7 +1900,7 @@ class baseRouter
|
||||
$apiFiles = array();
|
||||
$siteExtended = false;
|
||||
|
||||
$targetExtPaths = $this->getModuleExtPath($appName, $moduleName, $class);
|
||||
$targetExtPaths = $this->getModuleExtPath($moduleName, $class);
|
||||
foreach($targetExtPaths as $extType => $targetExtPath)
|
||||
{
|
||||
if(empty($targetExtPath)) continue;
|
||||
@@ -3105,7 +3105,7 @@ class baseRouter
|
||||
$commonExtFiles = array();
|
||||
$siteExtFiles = array();
|
||||
|
||||
$extPath = $this->getModuleExtPath($appName, $moduleName, $type);
|
||||
$extPath = $this->getModuleExtPath($moduleName, $type);
|
||||
if($this->config->framework->extensionLevel >= 1)
|
||||
{
|
||||
$clientLang = $type == 'lang' ? $this->clientLang : '';
|
||||
|
||||
@@ -222,7 +222,7 @@ class control extends baseControl
|
||||
if(isset($this->$extensionClass)) return $this->$extensionClass;
|
||||
|
||||
/* 设置扩展的名字和相应的文件。Set extenson name and extension file. */
|
||||
$moduleExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, $type);
|
||||
$moduleExtPath = $this->app->getModuleExtPath($moduleName, $type);
|
||||
if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php';
|
||||
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php';
|
||||
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['saas'] . 'class/' . $extensionName . '.class.php';
|
||||
@@ -259,7 +259,7 @@ class control extends baseControl
|
||||
$methodName = strtolower(trim($methodName));
|
||||
|
||||
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
|
||||
$viewExtPath = $this->app->getModuleExtPath($moduleName, $viewDir, 'view');
|
||||
$viewExtPath = $this->app->getModuleExtPath($moduleName, $viewDir);
|
||||
|
||||
$viewType = ($this->viewType == 'mhtml' or $this->viewType == 'xhtml') ? 'html' : $this->viewType;
|
||||
$mainViewFile = $modulePath . $viewDir . DS . $this->devicePrefix . $methodName . '.' . $viewType . '.php';
|
||||
|
||||
@@ -379,7 +379,7 @@ class router extends baseRouter
|
||||
$configDirFiles = helper::ls($this->getModulePath($appName, $moduleName) . DS . 'config', '.php');
|
||||
|
||||
/* 查找扩展配置文件。Get extension config files. */
|
||||
if($config->framework->extensionLevel > 0) $extConfigPath = $this->getModuleExtPath($appName, $moduleName, 'config');
|
||||
if($config->framework->extensionLevel > 0) $extConfigPath = $this->getModuleExtPath($moduleName, 'config');
|
||||
if($config->framework->extensionLevel >= 1)
|
||||
{
|
||||
if(!empty($extConfigPath['common'])) $commonExtConfigFiles = helper::ls($extConfigPath['common'], '.php');
|
||||
|
||||
@@ -56,7 +56,7 @@ class editorModel extends model
|
||||
$extensionList = array();
|
||||
foreach($this->config->editor->extSort as $ext)
|
||||
{
|
||||
$extModulePaths = $this->app->getModuleExtPath('', $moduleName, $ext);
|
||||
$extModulePaths = $this->app->getModuleExtPath($moduleName, $ext);
|
||||
foreach($extModulePaths as $extType => $extensionFullDir)
|
||||
{
|
||||
if(empty($extensionFullDir) or !is_dir($extensionFullDir)) continue;
|
||||
|
||||
@@ -25,7 +25,7 @@ $('#subNavbar li').not('[data-id=<?php echo $groupID;?>]').removeClass('active')
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if($this->config->edition == 'biz' or $this->config->edition == 'max'):?>
|
||||
<?php $pivotPath = $this->app->getModuleExtPath('', 'pivot', 'view');?>
|
||||
<?php $pivotPath = $this->app->getModuleExtPath('pivot', 'view');?>
|
||||
<?php include $pivotPath['common'] . 'exportdata.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user