new install settings

This commit is contained in:
friendica 2012-10-18 18:34:38 -07:00
parent 2cd9994904
commit f685b67656
5 changed files with 14 additions and 5 deletions

View File

@ -591,8 +591,7 @@ if(! class_exists('App')) {
} }
} }
$this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this\ $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
->path : '' );
return $this->baseurl; return $this->baseurl;
} }

View File

@ -69,6 +69,9 @@ function install_post(&$a) {
$phpath = notags(trim($_POST['phpath'])); $phpath = notags(trim($_POST['phpath']));
$timezone = notags(trim($_POST['timezone'])); $timezone = notags(trim($_POST['timezone']));
$adminmail = notags(trim($_POST['adminmail'])); $adminmail = notags(trim($_POST['adminmail']));
$siteurl = notags(trim($_POST['siteurl']));
// connect to db // connect to db
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true); $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
@ -80,7 +83,8 @@ function install_post(&$a) {
'$dbpass' => $dbpass, '$dbpass' => $dbpass,
'$dbdata' => $dbdata, '$dbdata' => $dbdata,
'$timezone' => $timezone, '$timezone' => $timezone,
'$urlpath' => $urlpath, '$siteurl' => $siteurl,
'$site_id' => hash('whirlpool', random_string()),
'$phpath' => $phpath, '$phpath' => $phpath,
'$adminmail' => $adminmail '$adminmail' => $adminmail
)); ));
@ -235,7 +239,7 @@ function install_content(&$a) {
'$dbdata' => array('dbdata', t('Database Name'), $dbdata, ''), '$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.')), '$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'), '$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.')), '$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, ''), '$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),

View File

@ -1 +1 @@
2012-10-17.110 2012-10-18.111

View File

@ -15,7 +15,9 @@ $default_timezone = '$timezone';
// What is your site name? // What is your site name?
$a->config['system']['baseurl'] = '$siteurl';
$a->config['system']['sitename'] = "My Friend Network"; $a->config['system']['sitename'] = "My Friend Network";
$a->config['system']['location_hash'] = '$site_id';
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. // Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
// Be certain to create your own personal account before setting // Be certain to create your own personal account before setting

View File

@ -17,6 +17,8 @@
<input type="hidden" name="pass" value="4" /> <input type="hidden" name="pass" value="4" />
{{ inc field_input.tpl with $field=$adminmail }}{{endinc}} {{ inc field_input.tpl with $field=$adminmail }}{{endinc}}
{{ inc field_input.tpl with $field=$siteurl }}{{endinc}}
$timezone $timezone
<input id="install-submit" type="submit" name="submit" value="$submit" /> <input id="install-submit" type="submit" name="submit" value="$submit" />