diff --git a/module/space/control.php b/module/space/control.php index 1ff7b05c7d..f390a71457 100644 --- a/module/space/control.php +++ b/module/space/control.php @@ -133,6 +133,8 @@ class space extends control $mysqlList = $this->cne->sharedDBList('mysql'); $pgList = $this->cne->sharedDBList('postgresql'); $versionList = $this->store->getVersionPairs($appID); + $cloudApp = $this->loadModel('store')->getAppInfo($appID); + $showDb = !empty($cloudApp) && (($cloudApp->dependencies->mysql && $mysqlList) || ($cloudApp->dependencies->postgresql && $pgList)); $this->view->title = $this->lang->space->install; $this->view->apps = $apps; @@ -141,6 +143,7 @@ class space extends control $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->display(); diff --git a/module/space/ui/createapplication.html.php b/module/space/ui/createapplication.html.php index dda6f82eb5..9240f38751 100644 --- a/module/space/ui/createapplication.html.php +++ b/module/space/ui/createapplication.html.php @@ -126,7 +126,7 @@ if($config->inQuickon) ), formRow ( - setClass('dbType'), + setClass('dbType' . ($showDb ? '' : ' hidden')), formGroup ( set::label($lang->instance->dbType), @@ -148,7 +148,7 @@ if($config->inQuickon) ), formRow ( - setClass('dbType dbService'), + setClass('dbType dbService' . ($showDb ? '' : ' hidden')), formGroup ( set::width($colWidth), diff --git a/module/store/model.php b/module/store/model.php index 3ac04a13cf..8e053343cf 100644 --- a/module/store/model.php +++ b/module/store/model.php @@ -85,6 +85,7 @@ class storeModel extends model */ public function getAppInfo($id, $analysis = false, $name = '', $version ='', $channel = '') { + if(empty($id)) return null; $apiParams = array(); $apiParams['analysis'] = $analysis ? 'true' : 'false' ;