diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-19 15:51:56 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-19 15:51:56 -0700 |
commit | 0b2d85891e651bab2c3ddd0c7396d557a052dd18 (patch) | |
tree | db2529b11d6eafd20e76442e8a5fbc9cc41f1946 /boot.php | |
parent | 3876cab8eac1364e7074e8da9aeb83badb3b65b3 (diff) | |
download | volse-hubzilla-0b2d85891e651bab2c3ddd0c7396d557a052dd18.tar.gz volse-hubzilla-0b2d85891e651bab2c3ddd0c7396d557a052dd18.tar.bz2 volse-hubzilla-0b2d85891e651bab2c3ddd0c7396d557a052dd18.zip |
lrdd link on profile page (for salmon m/e), remove dfrn-template, qualify some contact lookups, some cleanup of app/boot
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -122,15 +122,11 @@ class App { $this->page = array(); $this->pager= array(); - $this->scheme = ((isset($_SERVER['HTTPS']) - && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); - $this->hostname = str_replace('www.','', - $_SERVER['SERVER_NAME']); - set_include_path("include/$this->hostname" - . PATH_SEPARATOR . 'include' - . PATH_SEPARATOR . '.' ); - - if(substr($_SERVER['QUERY_STRING'],0,2) == "q=") + $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); + $this->hostname = $_SERVER['SERVER_NAME']; + set_include_path("include/$this->hostname" . PATH_SEPARATOR . 'include' . PATH_SEPARATOR . '.' ); + + if(substr($_SERVER['QUERY_STRING'],0,2) == "q=") $_SERVER['QUERY_STRING'] = substr($_SERVER['QUERY_STRING'],2); $this->cmd = trim($_GET['q'],'/'); @@ -157,9 +153,7 @@ class App { if(strlen($this->baseurl)) return $this->baseurl; - $this->baseurl = (($ssl) ? 'https' : $this->scheme) . "://" . $this->hostname - . ((isset($this->path) && strlen($this->path)) - ? '/' . $this->path : '' ); + $this->baseurl = (($ssl) ? 'https' : $this->scheme) . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); return $this->baseurl; } @@ -177,7 +171,7 @@ class App { } function set_path($p) { - $this->path = ltrim(trim($p),'/'); + $this->path = trim(trim($p),'/'); } function get_path() { @@ -1158,4 +1152,6 @@ function load_view_file($s) { if($lang && file_exists("$d/$lang/$b")) return file_get_contents("$d/$lang/$b"); return file_get_contents($s); -}}
\ No newline at end of file +}} + + |