aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php34
1 files changed, 18 insertions, 16 deletions
diff --git a/include/network.php b/include/network.php
index e7d341321..ac14548a5 100644
--- a/include/network.php
+++ b/include/network.php
@@ -602,7 +602,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
continue;
}
- $hostname = str_replace('www.','',substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3));
+ $hostname = str_replace('www.','',substr(z_root(),strpos(z_root(),'://')+3));
if(stristr($mtch[3],$hostname))
continue;
@@ -1144,21 +1144,23 @@ function discover_by_webbie($webbie) {
$avatar = '';
$pubkey = '';
- if(array_key_exists('address',$x))
- $address = $x['address'];
- if(array_key_exists('location',$x))
- $location = $x['location'];
- if(array_key_exists('nickname',$x))
- $nickname = $x['nickname'];
+ if(is_array($x)) {
+ if(array_key_exists('address',$x))
+ $address = $x['address'];
+ if(array_key_exists('location',$x))
+ $location = $x['location'];
+ if(array_key_exists('nickname',$x))
+ $nickname = $x['nickname'];
+ }
if(! $x)
$probe_old = true;
if($probe_old) {
- $x = old_webfinger($webbie);
- if($x) {
+ $y = old_webfinger($webbie);
+ if($y) {
logger('old_webfinger: ' . print_r($x,true));
- foreach($x as $link) {
+ foreach($y as $link) {
if($link['@attributes']['rel'] === NAMESPACE_DFRN)
$dfrn = unamp($link['@attributes']['href']);
if($link['@attributes']['rel'] === 'salmon')
@@ -1854,7 +1856,7 @@ function format_and_send_email($sender,$xchan,$item) {
$sender_name = t('Administrator');
- $hostname = get_app()->get_hostname();
+ $hostname = App::get_hostname();
if(strpos($hostname,':'))
$hostname = substr($hostname,0,strpos($hostname,':'));
$sender_email = 'noreply' . '@' . $hostname;
@@ -1928,11 +1930,11 @@ function get_site_info() {
$admin = array();
foreach($r as $rr) {
if($rr['channel_pageflags'] & PAGE_HUBADMIN)
- $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
+ $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . App::get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
if(! $admin) {
foreach($r as $rr) {
- $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . get_app()->get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
+ $admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . App::get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
}
}
}
@@ -1947,7 +1949,7 @@ function get_site_info() {
$service_class = false;
$visible_plugins = array();
- if(is_array($a->plugins) && count($a->plugins)) {
+ if(is_array(App::$plugins) && count(App::$plugins)) {
$r = q("select * from addon where hidden = 0");
if(count($r))
foreach($r as $rr)
@@ -1987,8 +1989,8 @@ function get_site_info() {
load_config('feature_lock');
$locked_features = array();
- if(is_array($a->config['feature_lock']) && count($a->config['feature_lock'])) {
- foreach($a->config['feature_lock'] as $k => $v) {
+ if(is_array(App::$config['feature_lock']) && count(App::$config['feature_lock'])) {
+ foreach(App::$config['feature_lock'] as $k => $v) {
if($k === 'config_loaded')
continue;
$locked_features[$k] = intval($v);