From bacd96330720f6389bf2b5fa158b052efae14d99 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Tue, 11 Mar 2014 16:39:34 +0200 Subject: [PATCH] fixed install --- data/.data | 1 + install/core/Installer.php | 8 ++++---- install/core/tpl/main.tpl | 2 +- install/core/tpl/step1.tpl | 2 +- install/css/install.css | 8 ++++++++ install/index.php | 32 ++++++++++++++++++++++---------- 6 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 data/.data diff --git a/data/.data b/data/.data new file mode 100644 index 0000000000..0519ecba6e --- /dev/null +++ b/data/.data @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/install/core/Installer.php b/install/core/Installer.php index 394eb5b940..9d1988b911 100644 --- a/install/core/Installer.php +++ b/install/core/Installer.php @@ -1,4 +1,4 @@ -app = new \Espo\Core\Application(); $this->writableList[] = $this->app->getContainer()->get('config')->get('configPath'); + + $user = $this->getEntityManager()->getEntity('User'); + $this->app->getContainer()->setUser($user); } protected function getEntityManager() @@ -158,9 +161,6 @@ class Installer public function buildDatabase() { - $user = $this->getEntityManager()->getEntity('User'); - $this->app->getContainer()->setUser($user); - try { $this->app->getContainer()->get('schema')->rebuild(); } catch (\Exception $e) { diff --git a/install/core/tpl/main.tpl b/install/core/tpl/main.tpl index 869f6e6dcc..1946b4b8bf 100644 --- a/install/core/tpl/main.tpl +++ b/install/core/tpl/main.tpl @@ -20,7 +20,7 @@
+
diff --git a/install/css/install.css b/install/css/install.css index 8e9ff84f98..ae081da528 100644 --- a/install/css/install.css +++ b/install/css/install.css @@ -36,3 +36,11 @@ select[name="user-lang"] { height: 50%; } +.panel-body { + min-height: 400px; +} + +.panel-body .panel-body { + min-height: 50px; +} + diff --git a/install/index.php b/install/index.php index d0afafad64..f77b77a890 100644 --- a/install/index.php +++ b/install/index.php @@ -19,7 +19,8 @@ * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. ************************************************************************/ - + +error_reporting(0); session_start(); require_once('../bootstrap.php'); @@ -65,29 +66,40 @@ $langFileName = 'core/i18n/'.$userLang.'.php'; $langs = array(); if (file_exists('install/'.$langFileName)) { $langs = include($langFileName); -} -else { +} else { $langs = include('core/i18n/en_US.php'); } -$settingsDefaults = $installer->getSettingDefaults(); $smarty->assign("langs", $langs); $smarty->assign("langsJs", json_encode($langs)); -$smarty->assign("settingsDefaults", $settingsDefaults); - $systemTest = new SystemTest(); -// get urls for api -$ajaxUrls = $installer->getAjaxUrls(); -$smarty->assign("ajaxUrls", json_encode($ajaxUrls)); - // include actions and set tpl name $tplName = 'main.tpl'; $actionsDir = 'core/actions'; $actionFile = ''; $action = (!empty($_REQUEST['action']))? $_REQUEST['action'] : 'main'; +switch ($action) { + case 'main': + $languageList = $installer->getLanguageList(); + $smarty->assign("languageList", $languageList); + break; + + case 'step3': + case 'errors': + $ajaxUrls = $installer->getAjaxUrls(); + $smarty->assign("ajaxUrls", json_encode($ajaxUrls)); + break; + + case 'step4': + case 'errors': + $settingsDefaults = $installer->getSettingDefaults(); + $smarty->assign("settingsDefaults", $settingsDefaults); + break; +} + $actionFile = $actionsDir.'/'.$action.'.php'; $tplName = $action.'.tpl'; $smarty->assign('tplName', $tplName);