diff --git a/www/system/app/Frontend/Controller/Backoffice.php b/www/system/app/Frontend/Controller/Backoffice.php index 0a6f8643..3ab4f692 100644 --- a/www/system/app/Frontend/Controller/Backoffice.php +++ b/www/system/app/Frontend/Controller/Backoffice.php @@ -168,8 +168,6 @@ protected function loginAction() public function indexAction() { - var_dump($this->_module); - $this->_resource->addInlineJs(' var canEdit = ' . intval($this->_user->canEdit($this->_module)) . '; var canDelete = ' . intval($this->_user->canDelete($this->_module)) . '; diff --git a/www/system/config/versions.php b/www/system/config/versions.php index b0828c45..c1d4a352 100644 --- a/www/system/config/versions.php +++ b/www/system/config/versions.php @@ -1,6 +1,6 @@ '0.9.5.1', + 'core'=>'0.9.5.2', 'designer'=>'0.11', 'reports'=>'0.3.1', 'medialib'=>'0.4', diff --git a/www/system/library/Designer/Factory.php b/www/system/library/Designer/Factory.php index e6840171..1f6c1d57 100644 --- a/www/system/library/Designer/Factory.php +++ b/www/system/library/Designer/Factory.php @@ -122,21 +122,21 @@ static public function runProject($projectFile , Config_Abstract $designerConfig { foreach ($projectData['includes'] as $file) { - if(File::getExt($file) == '.css') - { - if(strpos($file , '?') === false){ - $file = $file .'?'. $cachedKey; - } + if(File::getExt($file) == '.css') + { + if(strpos($file , '?') === false){ + $file = $file .'?'. $cachedKey; + } - $resource->addCss($file , false); - }else{ + $resource->addCss($file , false); + }else{ - if(strpos($file , '?') === false){ - $file = $file .'?'. $cachedKey; - } + if(strpos($file , '?') === false){ + $file = $file .'?'. $cachedKey; + } - $resource->addJs($file , false, false); - } + $resource->addJs($file , false, false); + } } } $resource->addInlineJs($initCode); @@ -163,40 +163,40 @@ static public function getProjectIncludes($cacheKey , Designer_Project $project // include langs if(isset($projectConfig['langs']) && !empty($projectConfig['langs'])) { - $language = Lang::getDefaultDictionary(); - $lansPath = $designerConfig->get('langs_path'); - $langsUrl = $designerConfig->get('langs_url'); - - foreach ($projectConfig['langs'] as $k=>$file) - { - $file = $language.'/'.$file.'.js'; - if(file_exists($lansPath.$file)){ - $includes[] = $langsUrl . $file . '?' . filemtime($lansPath.$file); - } - } + $language = Lang::getDefaultDictionary(); + $lansPath = $designerConfig->get('langs_path'); + $langsUrl = $designerConfig->get('langs_url'); + + foreach ($projectConfig['langs'] as $k=>$file) + { + $file = $language.'/'.$file.'.js'; + if(file_exists($lansPath.$file)){ + $includes[] = $langsUrl . $file . '?' . filemtime($lansPath.$file); + } + } } if(isset($projectConfig['files']) && !empty($projectConfig['files'])) { - foreach ($projectConfig['files'] as $file) + foreach ($projectConfig['files'] as $file) + { + $ext = File::getExt($file); + + if($ext === '.js' || $ext === '.css') { - $ext = File::getExt($file); - - if($ext === '.js' || $ext === '.css') - { - $includes[] = $designerConfig->get('js_url') . $file; - - }else - { - $projectFile = $designerConfig->get('configs') . $file; - $subProject = Designer_Factory::loadProject($designerConfig, $projectFile); - $projectKey = self::getProjectCacheKey($projectFile); - $files = self::getProjectIncludes($projectKey , $subProject , true , $replace); - unset($subProject); - if(!empty($files)) - $includes = array_merge($includes , $files); - } + $includes[] = $designerConfig->get('js_url') . $file; + + }else + { + $projectFile = $designerConfig->get('configs') . $file; + $subProject = Designer_Factory::loadProject($designerConfig, $projectFile); + $projectKey = self::getProjectCacheKey($projectFile); + $files = self::getProjectIncludes($projectKey , $subProject , true , $replace); + unset($subProject); + if(!empty($files)) + $includes = array_merge($includes , $files); } + } } Ext_Code::setRunNamespace($projectConfig['runnamespace']); @@ -223,7 +223,7 @@ static public function getProjectIncludes($cacheKey , Designer_Project $project */ $mTime = 0; if(file_exists('.'.$actionFile)) - $mTime = filemtime('.'.$actionFile); + $mTime = filemtime('.'.$actionFile); $includes[] = $actionFile . '?' . $mTime; return $includes; @@ -249,17 +249,17 @@ static public function getProjectCacheKey($projectFile) */ static public function replaceCodeTemplates(array $replaces , $code) { - if(!empty($replaces)) - { - $k = array(); - $v = array(); - foreach ($replaces as $item) - { - $k[] = $item['tpl']; - $v[] = $item['value']; - } - return str_replace($k , $v , $code); - } + if(!empty($replaces)) + { + $k = array(); + $v = array(); + foreach ($replaces as $item) + { + $k[] = $item['tpl']; + $v[] = $item['value']; + } + return str_replace($k , $v , $code); + } return $code; } } \ No newline at end of file