if(x($_GET,'q'))
$this->cmd = trim($_GET['q'],'/');
+ $path = trim(dirname($_SERVER['SCRIPT_NAME']),'/');
+ if(isset($path) && strlen($path) && ($path != $this->path))
+ $this->path = $path;
$this->argv = explode('/',$this->cmd);
$this->argc = count($this->argv);
function init_pagehead() {
$tpl = load_view_file("view/head.tpl");
$this->page['htmlhead'] = replace_macros($tpl,array(
- '$baseurl' => $this->get_baseurl()
+ '$baseurl' => $this->get_baseurl() . '/'
));
}
global $db;
+ $urlpath = $a->get_path();
$dbhost = notags(trim($_POST['dbhost']));
$dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass']));
'$dbpass' => $dbpass,
'$dbdata' => $dbdata,
'$timezone' => $timezone,
+ '$urlpath' => $urlpath,
'$phpath' => $phpath
));
$result = file_put_contents('.htconfig.php', $txt);
$tpl = load_view_file('view/install_db.tpl');
$o .= replace_macros($tpl, array(
+ '$baseurl' => $a->get_baseurl(),
'$tzselect' => ((x($_POST,'timezone')) ? select_timezone($_POST['timezone']) : select_timezone()),
'$submit' => t('Submit'),
'$dbhost' => ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost'),
// For instance if your URL is 'http://example.com/directory/subdirectory',
// set $a->path to 'directory/subdirectory'.
-$a->path = '';
+$a->path = '$urlpath';
// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles".
// It can be changed later and only applies to timestamps for anonymous viewers.
In order to install Friendika we need to know how to contact your database. Please contact your hosting provider or site administrator if you have questions about these settings. The database you specify below must already exist. If it does not, please create it before continuing.
</p>
-<form id="install-form" action="install" method="post">
+<form id="install-form" action="$baseurl/install" method="post">
<input type="hidden" name="phpath" value="$phpath" />