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
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
|
// We will only change the url to an ip address if there is no existing setting
|
||||||
|
|
||||||
if(! x($url))
|
if(! x($url))
|
||||||
$url = set_config('system','url',$a->get_baseurl());
|
$url = set_config('system','url',App::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)))
|
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',$a->get_baseurl());
|
$url = set_config('system','url',App::get_baseurl());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
10
index.php
10
index.php
|
@ -60,15 +60,15 @@ if(!$install) {
|
||||||
if ($a->max_processes_reached() OR $a->maxload_reached()) {
|
if ($a->max_processes_reached() OR $a->maxload_reached()) {
|
||||||
header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable');
|
header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable');
|
||||||
header('Retry-After: 120');
|
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");
|
die("System is currently unavailable. Please try again later");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_config('system','force_ssl') AND ($a->get_scheme() == "http") AND
|
if (get_config('system','force_ssl') AND ($a->get_scheme() == "http") AND
|
||||||
(intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) 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("HTTP/1.1 302 Moved Temporarily");
|
||||||
header("Location: ".$a->get_baseurl()."/".$a->query_string);
|
header("Location: ".App::get_baseurl()."/".$a->query_string);
|
||||||
exit();
|
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'))
|
if(x($_COOKIE["Friendica"]) || (x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
|
||||||
require("include/auth.php");
|
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)) {
|
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']);
|
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);
|
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);
|
file_tag_unsave_file(local_user(),$item_id,$term, $category);
|
||||||
|
|
||||||
if(x($_SESSION,'return_url'))
|
if(x($_SESSION,'return_url'))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
|
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ function follow_content(App &$a) {
|
||||||
$request = $ret["request"];
|
$request = $ret["request"];
|
||||||
$tpl = get_markup_template('dfrn_request.tpl');
|
$tpl = get_markup_template('dfrn_request.tpl');
|
||||||
} else {
|
} else {
|
||||||
$request = $a->get_baseurl()."/follow";
|
$request = App::get_baseurl()."/follow";
|
||||||
$tpl = get_markup_template('auto_request.tpl');
|
$tpl = get_markup_template('auto_request.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,12 +175,12 @@ function follow_post(App &$a) {
|
||||||
notice($result['message']);
|
notice($result['message']);
|
||||||
goaway($return_url);
|
goaway($return_url);
|
||||||
} elseif ($result['cid'])
|
} elseif ($result['cid'])
|
||||||
goaway($a->get_baseurl().'/contacts/'.$result['cid']);
|
goaway(App::get_baseurl().'/contacts/'.$result['cid']);
|
||||||
|
|
||||||
info( t('Contact added').EOL);
|
info( t('Contact added').EOL);
|
||||||
|
|
||||||
if(strstr($return_url,'contacts'))
|
if(strstr($return_url,'contacts'))
|
||||||
goaway($a->get_baseurl().'/contacts/'.$contact_id);
|
goaway(App::get_baseurl().'/contacts/'.$contact_id);
|
||||||
|
|
||||||
goaway($return_url);
|
goaway($return_url);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
|
|
|
@ -77,7 +77,7 @@ function help_content(App &$a) {
|
||||||
if ($level>$lastlevel) $toc.="<ul>";
|
if ($level>$lastlevel) $toc.="<ul>";
|
||||||
$idnum[$level]++;
|
$idnum[$level]++;
|
||||||
$id = implode("_", array_slice($idnum,1,$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>";
|
$toc .= "<li><a href='{$href}'>".strip_tags($line)."</a></li>";
|
||||||
$line = "<a name='{$id}'></a>".$line;
|
$line = "<a name='{$id}'></a>".$line;
|
||||||
$lastlevel = $level;
|
$lastlevel = $level;
|
||||||
|
|
|
@ -23,7 +23,7 @@ function match_content(App &$a) {
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
$a->page['aside'] .= follow_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",
|
$r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
|
@ -47,7 +47,7 @@ function match_content(App &$a) {
|
||||||
if(strlen(get_config('system','directory')))
|
if(strlen(get_config('system','directory')))
|
||||||
$x = post_url(get_server().'/msearch', $params);
|
$x = post_url(get_server().'/msearch', $params);
|
||||||
else
|
else
|
||||||
$x = post_url($a->get_baseurl() . '/msearch', $params);
|
$x = post_url(App::get_baseurl() . '/msearch', $params);
|
||||||
|
|
||||||
$j = json_decode($x);
|
$j = json_decode($x);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ function match_content(App &$a) {
|
||||||
|
|
||||||
if (!count($match)) {
|
if (!count($match)) {
|
||||||
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
|
$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(
|
$photo_menu = array(
|
||||||
'profile' => array(t("View Profile"), zrl($jj->url)),
|
'profile' => array(t("View Profile"), zrl($jj->url)),
|
||||||
'follow' => array(t("Connect/Follow"), $connlnk)
|
'follow' => array(t("Connect/Follow"), $connlnk)
|
||||||
|
|
|
@ -64,7 +64,7 @@ function redir_init(App &$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user()) {
|
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()) {
|
if (remote_user()) {
|
||||||
$handle = $_SESSION['handle'];
|
$handle = $_SESSION['handle'];
|
||||||
|
|
|
@ -47,7 +47,7 @@ function removeme_content(App &$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('removeme.tpl');
|
$tpl = get_markup_template('removeme.tpl');
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$basedir' => $a->get_baseurl(),
|
'$basedir' => App::get_baseurl(),
|
||||||
'$hash' => $hash,
|
'$hash' => $hash,
|
||||||
'$title' => t('Remove My Account'),
|
'$title' => t('Remove My Account'),
|
||||||
'$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
|
'$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'));
|
$post_type = (($item['resource-id']) ? t('photo') : t('status'));
|
||||||
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
$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'];
|
$body = $item['body'];
|
||||||
|
|
||||||
$obj = <<< EOT
|
$obj = <<< EOT
|
||||||
|
@ -128,7 +128,7 @@ EOT;
|
||||||
|
|
||||||
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
||||||
$alink = '[url=' . $item['author-link'] . ']' . $item['author-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['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
|
||||||
|
|
||||||
$arr['verb'] = $activity;
|
$arr['verb'] = $activity;
|
||||||
|
|
Loading…
Reference in a new issue