fixed install
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
@@ -64,6 +64,9 @@ class Installer
|
||||
{
|
||||
$this->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) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<label class="field-label-website control-label">{$langs['Choose your language:']}</label>
|
||||
<div class="field field-website">
|
||||
<select name="user-lang" class="form-control">
|
||||
{foreach from=$settingsDefaults['language'].options item=lbl key=val}
|
||||
{foreach from=$languageList item=lbl key=val}
|
||||
{if $val == $fields['user-lang'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<div class="field field-website">
|
||||
<textarea rows="15" class="license-field">{$license}</textarea>
|
||||
<textarea rows="16" class="license-field">{$license}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -36,3 +36,11 @@ select[name="user-lang"] {
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.panel-body .panel-body {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
|
||||
+22
-10
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user