Changed $a->get_baseurl() to App::get_baseurl()
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
bbbc63b8ad
commit
9972a029e3
9 changed files with 20 additions and 20 deletions
6
boot.php
6
boot.php
|
@ -1548,9 +1548,9 @@ function check_url(App &$a) {
|
|||
// We will only change the url to an ip address if there is no existing setting
|
||||
|
||||
if(! x($url))
|
||||
$url = set_config('system','url',$a->get_baseurl());
|
||||
if((! link_compare($url,$a->get_baseurl())) && (! preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/",$a->get_hostname)))
|
||||
$url = set_config('system','url',$a->get_baseurl());
|
||||
$url = set_config('system','url',App::get_baseurl());
|
||||
if((! link_compare($url,App::get_baseurl())) && (! preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/",$a->get_hostname)))
|
||||
$url = set_config('system','url',App::get_baseurl());
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
10
index.php
10
index.php
|
@ -60,15 +60,15 @@ if(!$install) {
|
|||
if ($a->max_processes_reached() OR $a->maxload_reached()) {
|
||||
header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable');
|
||||
header('Retry-After: 120');
|
||||
header('Refresh: 120; url='.$a->get_baseurl()."/".$a->query_string);
|
||||
header('Refresh: 120; url='.App::get_baseurl()."/".$a->query_string);
|
||||
die("System is currently unavailable. Please try again later");
|
||||
}
|
||||
|
||||
if (get_config('system','force_ssl') AND ($a->get_scheme() == "http") AND
|
||||
(intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) AND
|
||||
(substr($a->get_baseurl(), 0, 8) == "https://")) {
|
||||
(substr(App::get_baseurl(), 0, 8) == "https://")) {
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("Location: ".$a->get_baseurl()."/".$a->query_string);
|
||||
header("Location: ".App::get_baseurl()."/".$a->query_string);
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ if((x($_GET,'zrl')) && (!$install && !$maintenance)) {
|
|||
*
|
||||
*/
|
||||
|
||||
// header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";');
|
||||
// header('Link: <' . App::get_baseurl() . '/amcd>; rel="acct-mgmt";');
|
||||
|
||||
if(x($_COOKIE["Friendica"]) || (x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
|
||||
require("include/auth.php");
|
||||
|
@ -281,7 +281,7 @@ if(strlen($a->module)) {
|
|||
|
||||
if((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) {
|
||||
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
|
||||
goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']);
|
||||
goaway(App::get_baseurl() . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
|
||||
|
|
|
@ -21,7 +21,7 @@ function filerm_content(App &$a) {
|
|||
file_tag_unsave_file(local_user(),$item_id,$term, $category);
|
||||
|
||||
if(x($_SESSION,'return_url'))
|
||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ function follow_content(App &$a) {
|
|||
$request = $ret["request"];
|
||||
$tpl = get_markup_template('dfrn_request.tpl');
|
||||
} else {
|
||||
$request = $a->get_baseurl()."/follow";
|
||||
$request = App::get_baseurl()."/follow";
|
||||
$tpl = get_markup_template('auto_request.tpl');
|
||||
}
|
||||
|
||||
|
@ -175,12 +175,12 @@ function follow_post(App &$a) {
|
|||
notice($result['message']);
|
||||
goaway($return_url);
|
||||
} elseif ($result['cid'])
|
||||
goaway($a->get_baseurl().'/contacts/'.$result['cid']);
|
||||
goaway(App::get_baseurl().'/contacts/'.$result['cid']);
|
||||
|
||||
info( t('Contact added').EOL);
|
||||
|
||||
if(strstr($return_url,'contacts'))
|
||||
goaway($a->get_baseurl().'/contacts/'.$contact_id);
|
||||
goaway(App::get_baseurl().'/contacts/'.$contact_id);
|
||||
|
||||
goaway($return_url);
|
||||
// NOTREACHED
|
||||
|
|
|
@ -77,7 +77,7 @@ function help_content(App &$a) {
|
|||
if ($level>$lastlevel) $toc.="<ul>";
|
||||
$idnum[$level]++;
|
||||
$id = implode("_", array_slice($idnum,1,$level));
|
||||
$href = $a->get_baseurl()."/help/{$filename}#{$id}";
|
||||
$href = App::get_baseurl()."/help/{$filename}#{$id}";
|
||||
$toc .= "<li><a href='{$href}'>".strip_tags($line)."</a></li>";
|
||||
$line = "<a name='{$id}'></a>".$line;
|
||||
$lastlevel = $level;
|
||||
|
|
|
@ -23,7 +23,7 @@ function match_content(App &$a) {
|
|||
$a->page['aside'] .= findpeople_widget();
|
||||
$a->page['aside'] .= follow_widget();
|
||||
|
||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
||||
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||
|
||||
$r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
|
||||
intval(local_user())
|
||||
|
@ -47,7 +47,7 @@ function match_content(App &$a) {
|
|||
if(strlen(get_config('system','directory')))
|
||||
$x = post_url(get_server().'/msearch', $params);
|
||||
else
|
||||
$x = post_url($a->get_baseurl() . '/msearch', $params);
|
||||
$x = post_url(App::get_baseurl() . '/msearch', $params);
|
||||
|
||||
$j = json_decode($x);
|
||||
|
||||
|
@ -68,7 +68,7 @@ function match_content(App &$a) {
|
|||
|
||||
if (!count($match)) {
|
||||
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
|
||||
$connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
|
||||
$connlnk = App::get_baseurl() . '/follow/?url=' . $jj->url;
|
||||
$photo_menu = array(
|
||||
'profile' => array(t("View Profile"), zrl($jj->url)),
|
||||
'follow' => array(t("Connect/Follow"), $connlnk)
|
||||
|
|
|
@ -64,7 +64,7 @@ function redir_init(App &$a) {
|
|||
}
|
||||
|
||||
if (local_user()) {
|
||||
$handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3);
|
||||
$handle = $a->user['nickname'] . '@' . substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3);
|
||||
}
|
||||
if (remote_user()) {
|
||||
$handle = $_SESSION['handle'];
|
||||
|
|
|
@ -47,7 +47,7 @@ function removeme_content(App &$a) {
|
|||
|
||||
$tpl = get_markup_template('removeme.tpl');
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$basedir' => $a->get_baseurl(),
|
||||
'$basedir' => App::get_baseurl(),
|
||||
'$hash' => $hash,
|
||||
'$title' => t('Remove My Account'),
|
||||
'$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
|
||||
|
|
|
@ -87,7 +87,7 @@ function subthread_content(App &$a) {
|
|||
|
||||
$post_type = (($item['resource-id']) ? t('photo') : t('status'));
|
||||
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
$body = $item['body'];
|
||||
|
||||
$obj = <<< EOT
|
||||
|
@ -128,7 +128,7 @@ EOT;
|
|||
|
||||
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
||||
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
|
||||
$plink = '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
||||
$plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
||||
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
|
||||
|
||||
$arr['verb'] = $activity;
|
||||
|
|
Loading…
Reference in a new issue