diff options
author | Friendika <info@friendika.com> | 2011-08-01 21:02:25 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-01 21:02:25 -0700 |
commit | 2637831d9056862f7c3db718702116ef4652629a (patch) | |
tree | 2ee4076e6aeec3f79c64152abcce0ec284ef295f /boot.php | |
parent | 8b31ff15f51c6936daedf28cc88c753214b569e0 (diff) | |
download | volse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.tar.gz volse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.tar.bz2 volse-hubzilla-2637831d9056862f7c3db718702116ef4652629a.zip |
some more zot changes migrating back to f9a mainline
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 32 |
1 files changed, 30 insertions, 2 deletions
@@ -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. |