some more zot changes migrating back to f9a mainline
This commit is contained in:
parent
8b31ff15f5
commit
2637831d90
15 changed files with 67 additions and 40 deletions
32
boot.php
32
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue