diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 11:34:59 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 11:34:59 +0000 |
commit | a8daa6073f3ff14ff1f7dc7618ea41fd13aef393 (patch) | |
tree | 996bbd1ff6280575a4a73f988f586d7612a10c07 | |
parent | 94b9d7cac30e0da63ad7042a8bec41cb09320058 (diff) | |
download | elgg-a8daa6073f3ff14ff1f7dc7618ea41fd13aef393.tar.gz elgg-a8daa6073f3ff14ff1f7dc7618ea41fd13aef393.tar.bz2 |
finished the auto login option for the installer
git-svn-id: http://code.elgg.org/elgg/trunk@7042 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | install/ElggInstaller.php | 35 | ||||
-rw-r--r-- | views/installation/install/pages/complete.php | 3 |
2 files changed, 25 insertions, 13 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php index 79c6bb212..94c158a5d 100644 --- a/install/ElggInstaller.php +++ b/install/ElggInstaller.php @@ -9,15 +9,6 @@ * @link http://elgg.org/ */ -/* - * @todo - integrate this could in case we want to send new admin to plugins page - // remind users to enable / disable desired tools - elgg_add_admin_notice('first_installation_plugin_reminder', elgg_echo('firstadminlogininstructions')); - - datalist_set('first_admin_login', time()); - forward('pg/admin/plugins/simple'); - - */ class ElggInstaller { @@ -87,6 +78,15 @@ class ElggInstaller { } /** + * Set the auto login flag + * + * @param bool $flag + */ + public function setAutoLogin(bool $flag) { + $this->autoLogin = $value; + } + + /** * Renders the data passed by a controller * * @param string $step @@ -394,7 +394,18 @@ class ElggInstaller { */ protected function complete($vars) { - $this->render('complete'); + $params = array(); + if ($this->autoLogin) { + // remind users to enable / disable desired tools + $msg = elgg_echo('firstadminlogininstructions'); + elgg_add_admin_notice('first_installation_plugin_reminder', $msg); + + $params['destination'] = 'pg/admin/plugins/simple'; + } else { + $params['destination'] = 'index.php'; + } + + $this->render('complete', $params); } /** @@ -671,7 +682,7 @@ class ElggInstaller { return $url; } - function loadSettingsFile() { + protected function loadSettingsFile() { global $CONFIG; if (!include_once("{$CONFIG->path}engine/settings.php")) { @@ -1019,7 +1030,7 @@ class ElggInstaller { * @param string $host * @return bool */ - function checkDatabaseSettings($user, $password, $dbname, $host) { + protected function checkDatabaseSettings($user, $password, $dbname, $host) { $mysql_dblink = mysql_connect($host, $user, $password, true); if ($mysql_dblink == FALSE) { register_error(elgg_echo('install:error:databasesettings')); diff --git a/views/installation/install/pages/complete.php b/views/installation/install/pages/complete.php index ec50fe503..681db644e 100644 --- a/views/installation/install/pages/complete.php +++ b/views/installation/install/pages/complete.php @@ -9,7 +9,8 @@ echo autop(elgg_echo('install:complete:instructions')); <div class="install_nav"> <?php + $url = $vars['url'] . $vars['destination']; $text = elgg_echo('install:complete:gotosite'); - echo "<a href=\"{$vars['url']}index.php\">$text</a>"; + echo "<a href=\"$url\">$text</a>"; ?> </div> |