From f685b676567e990a1105100230a2cf1ba6d55ee9 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 18 Oct 2012 18:34:38 -0700 Subject: new install settings --- boot.php | 3 +-- mod/install.php | 10 ++++++++-- version.inc | 2 +- view/en/htconfig.tpl | 2 ++ view/tpl/install_settings.tpl | 2 ++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index 16872eff9..9fb49dbd5 100644 --- a/boot.php +++ b/boot.php @@ -591,8 +591,7 @@ if(! class_exists('App')) { } } - $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this\ -->path : '' ); + $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); return $this->baseurl; } diff --git a/mod/install.php b/mod/install.php index a6ca48b61..87a1c041a 100755 --- a/mod/install.php +++ b/mod/install.php @@ -69,6 +69,9 @@ function install_post(&$a) { $phpath = notags(trim($_POST['phpath'])); $timezone = notags(trim($_POST['timezone'])); $adminmail = notags(trim($_POST['adminmail'])); + $siteurl = notags(trim($_POST['siteurl'])); + + // connect to db $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true); @@ -80,7 +83,8 @@ function install_post(&$a) { '$dbpass' => $dbpass, '$dbdata' => $dbdata, '$timezone' => $timezone, - '$urlpath' => $urlpath, + '$siteurl' => $siteurl, + '$site_id' => hash('whirlpool', random_string()), '$phpath' => $phpath, '$adminmail' => $adminmail )); @@ -235,7 +239,7 @@ function install_content(&$a) { '$dbdata' => array('dbdata', t('Database Name'), $dbdata, ''), '$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.')), - + '$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')), '$lbl_10' => t('Please select a default timezone for your website'), @@ -275,6 +279,8 @@ function install_content(&$a) { '$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.')), + '$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')), + '$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''), diff --git a/version.inc b/version.inc index 990bcc9a2..86436466e 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-10-17.110 +2012-10-18.111 diff --git a/view/en/htconfig.tpl b/view/en/htconfig.tpl index cfb7cb24d..a8323f55a 100644 --- a/view/en/htconfig.tpl +++ b/view/en/htconfig.tpl @@ -15,7 +15,9 @@ $default_timezone = '$timezone'; // What is your site name? +$a->config['system']['baseurl'] = '$siteurl'; $a->config['system']['sitename'] = "My Friend Network"; +$a->config['system']['location_hash'] = '$site_id'; // Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. // Be certain to create your own personal account before setting diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index 05b87f904..1b9ae6e13 100644 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -17,6 +17,8 @@ {{ inc field_input.tpl with $field=$adminmail }}{{endinc}} +{{ inc field_input.tpl with $field=$siteurl }}{{endinc}} + $timezone -- cgit v1.2.3