From 2637831d9056862f7c3db718702116ef4652629a Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 1 Aug 2011 21:02:25 -0700 Subject: some more zot changes migrating back to f9a mainline --- boot.php | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'boot.php') 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. -- cgit v1.2.3