diff --git a/module/common/model.php b/module/common/model.php index 2a2b822195..39604d6e16 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2664,6 +2664,7 @@ EOF; if($errors) commonModel::$requestErrors[] = $errors; + if(!$response) $response = ''; return $httpCode ? array($response, $httpCode, 'body' => $body, 'header' => $newHeader, 'errno' => $errno, 'info' => $info, 'response' => $response) : $response; } diff --git a/module/repo/zen.php b/module/repo/zen.php index de70ebf1b2..4130f3bf5f 100644 --- a/module/repo/zen.php +++ b/module/repo/zen.php @@ -850,6 +850,7 @@ class repoZen extends repo $scm->setEngine($repo); $branches = isset($branchInfo) && $branchInfo !== false ? $branchInfo : $scm->branch(); $initTags = isset($tagInfo) && $tagInfo !== false ? $tagInfo : $scm->tags(''); + $tags = array(); foreach($initTags as $tag) $tags[$tag] = $tag; if(empty($branchID) and $this->cookie->repoBranch && $this->session->repoID == $repo->id) $branchID = $this->cookie->repoBranch; diff --git a/module/space/control.php b/module/space/control.php index 8aa0ebc374..62a1b1b264 100644 --- a/module/space/control.php +++ b/module/space/control.php @@ -121,35 +121,39 @@ class space extends control $this->app->loadLang('sonarqube'); $this->app->loadLang('jenkins'); - $this->loadModel('cne'); - $pagedApps = $this->loadModel('store')->searchApps('', '', array(), 1, 10000); $apps = array(); $defaultApp = ''; - foreach($pagedApps->apps as $app) + if($this->config->inQuickon) { - if(strpos($app->name, 'zentao') === 0 || strpos($app->name, 'zdoo') === 0 || strpos($app->name, 'xuanxuan') === 0) continue; - if(!$appID && $app->alias == 'GitLab') $defaultApp = $app->id; + $this->loadModel('cne'); + $pagedApps = $this->loadModel('store')->searchApps('', '', array(), 1, 10000); + foreach($pagedApps->apps as $app) + { + if(strpos($app->name, 'zentao') === 0 || strpos($app->name, 'zdoo') === 0 || strpos($app->name, 'xuanxuan') === 0) continue; + if(!$appID && $app->alias == 'GitLab') $defaultApp = $app->id; - $apps[$app->id] = $app->alias; + $apps[$app->id] = $app->alias; + } + + $mysqlList = $this->cne->sharedDBList('mysql'); + $pgList = $this->cne->sharedDBList('postgresql'); + $versionList = $this->store->getVersionPairs($appID); + $cloudApp = $this->loadModel('store')->getAppInfo($appID); + $showDb = !empty($cloudApp) && ((!empty($cloudApp->dependencies->mysql) && $mysqlList) || (!empty($cloudApp->dependencies->postgresql) && $pgList)); + + $this->view->pgList = $pgList; + $this->view->mysqlList = $mysqlList; + $this->view->versionList = $versionList; + $this->view->showDb = $showDb; + $this->view->thirdDomain = $this->loadModel('instance')->randThirdDomain(); } - $mysqlList = $this->cne->sharedDBList('mysql'); - $pgList = $this->cne->sharedDBList('postgresql'); - $versionList = $this->store->getVersionPairs($appID); - $cloudApp = $this->loadModel('store')->getAppInfo($appID); - $showDb = !empty($cloudApp) && ((!empty($cloudApp->dependencies->mysql) && $mysqlList) || (!empty($cloudApp->dependencies->postgresql) && $pgList)); - - $this->view->title = $this->lang->space->install; - $this->view->apps = $apps; - $this->view->appID = $appID; - $this->view->defaultApp = $defaultApp; - $this->view->pgList = $pgList; - $this->view->mysqlList = $mysqlList; - $this->view->versionList = $versionList; - $this->view->showDb = $showDb; - $this->view->addType = empty($appID) ? 'external' : 'store'; - $this->view->thirdDomain = $this->loadModel('instance')->randThirdDomain(); + $this->view->apps = $apps; + $this->view->defaultApp = $defaultApp; + $this->view->title = $this->lang->space->install; + $this->view->appID = $appID; + $this->view->addType = empty($appID) ? 'external' : 'store'; $this->display(); } diff --git a/module/space/ui/createapplication.html.php b/module/space/ui/createapplication.html.php index 6b18ecf5b0..71b64cbae2 100644 --- a/module/space/ui/createapplication.html.php +++ b/module/space/ui/createapplication.html.php @@ -24,12 +24,15 @@ jsVar('jenkinsPasswordTips', $lang->jenkins->tips); jsVar('sonarqubeAccountTips', $lang->sonarqube->placeholder->account); jsVar('apps', $apps); jsVar('appID', $appID); -jsVar('pgList', $pgList); -jsVar('mysqlList', $mysqlList); jsVar('defaultApp', $defaultApp); -jsVar('showVersion', $showVersion); jsVar('externalApps', $config->space->zentaoApps); -jsVar('resourceAlert', $lang->instance->notices['notEnoughResource']); +if($config->inQuickon) +{ + jsVar('pgList', $pgList); + jsVar('mysqlList', $mysqlList); + jsVar('showVersion', $showVersion); + jsVar('resourceAlert', $lang->instance->notices['notEnoughResource']); +} if($config->inQuickon) {