aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php32
1 files changed, 30 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 35cb15239..fd5de0e94 100644
--- a/boot.php
+++ b/boot.php
@@ -325,7 +325,7 @@ class App {
if($this->cmd === '.well-known/host-meta') {
require_once('include/hostxrd.php');
- hostxrd($this->get_baseurl());
+ hostxrd();
// NOTREACHED
}
@@ -402,7 +402,7 @@ class App {
$this->page['title'] = $this->config['sitename'];
$tpl = file_get_contents('view/head.tpl');
$this->page['htmlhead'] = replace_macros($tpl,array(
- '$baseurl' => $this->get_baseurl(),
+ '$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
'$generator' => 'Friendika' . ' ' . FRIENDIKA_VERSION,
'$delitem' => t('Delete this item?'),
'$comment' => t('Comment')
@@ -475,6 +475,34 @@ function system_unavailable() {
}}
+
+function clean_urls() {
+ global $a;
+// if($a->config['system']['clean_urls'])
+ return true;
+// return false;
+}
+
+function z_path() {
+ global $a;
+ $base = $a->get_baseurl();
+ if(! clean_urls())
+ $base .= '/?q=';
+ return $base;
+}
+
+function z_root() {
+ global $a;
+ return $a->get_baseurl();
+}
+
+function absurl($path) {
+ if(strpos($path,'/') === 0)
+ return z_path() . $path;
+ return $path;
+}
+
+
// Primarily involved with database upgrade, but also sets the
// base url for use in cmdline programs which don't have
// $_SERVER variables, and synchronising the state of installed plugins.