aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-30 22:13:24 -0700
committerredmatrix <git@macgirvin.com>2016-03-30 22:13:24 -0700
commit1cd3b4182595b838a535dd6b6990251db05d49e6 (patch)
tree2d22ab3140caf9d7efcd46a1f30f81a833ebf6fd /mod
parent4148211086ff53dfb6fb4e969fd067389bcfef29 (diff)
downloadvolse-hubzilla-1cd3b4182595b838a535dd6b6990251db05d49e6.tar.gz
volse-hubzilla-1cd3b4182595b838a535dd6b6990251db05d49e6.tar.bz2
volse-hubzilla-1cd3b4182595b838a535dd6b6990251db05d49e6.zip
deprecate $a->get_baseurl()
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php50
-rwxr-xr-xmod/cal.php14
-rw-r--r--mod/channel.php8
-rw-r--r--mod/chat.php2
-rw-r--r--mod/cloud.php2
-rw-r--r--mod/connedit.php38
-rw-r--r--mod/cover_photo.php4
-rw-r--r--mod/dav.php2
-rw-r--r--mod/directory.php2
-rw-r--r--mod/editblock.php4
-rw-r--r--mod/editlayout.php4
-rw-r--r--mod/editpost.php4
-rw-r--r--mod/editwebpage.php4
-rwxr-xr-xmod/events.php24
-rw-r--r--mod/fbrowser.php16
-rw-r--r--mod/filerm.php2
-rw-r--r--mod/group.php10
-rw-r--r--mod/hcard.php2
-rw-r--r--mod/import.php6
-rw-r--r--mod/item.php38
-rwxr-xr-xmod/like.php2
-rw-r--r--mod/lostpass.php10
-rw-r--r--mod/mail.php10
-rw-r--r--mod/match.php6
-rw-r--r--mod/message.php2
-rw-r--r--mod/msearch.php4
-rw-r--r--mod/network.php6
-rw-r--r--mod/new_channel.php2
-rw-r--r--mod/notifications.php6
-rw-r--r--mod/notify.php4
-rw-r--r--mod/oexchange.php4
-rw-r--r--mod/opensearch.php2
-rw-r--r--mod/photos.php62
-rw-r--r--mod/ping.php8
-rw-r--r--mod/profile.php2
-rw-r--r--mod/profile_photo.php12
-rw-r--r--mod/profiles.php18
-rw-r--r--mod/randprof.php2
-rw-r--r--mod/register.php2
-rw-r--r--mod/removeaccount.php2
-rw-r--r--mod/removeme.php2
-rw-r--r--mod/rsd_xml.php2
-rw-r--r--mod/search_ac.php2
-rw-r--r--mod/settings.php20
-rwxr-xr-xmod/setup.php10
-rwxr-xr-xmod/subthread.php2
-rw-r--r--mod/suggest.php6
-rw-r--r--mod/tagger.php6
-rw-r--r--mod/tagrm.php18
-rw-r--r--mod/toggle_mobile.php2
-rw-r--r--mod/xrd.php20
51 files changed, 246 insertions, 246 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 6300ac027..0d8bf8395 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -40,7 +40,7 @@ function admin_post(&$a){
$func($a);
}
}
- goaway($a->get_baseurl(true) . '/admin/plugins/' . argv(2) );
+ goaway(z_root() . '/admin/plugins/' . argv(2) );
break;
case 'themes':
$theme = argv(2);
@@ -54,7 +54,7 @@ function admin_post(&$a){
info(t('Theme settings updated.'));
if(is_ajax()) return;
- goaway($a->get_baseurl(true) . '/admin/themes/' . $theme );
+ goaway(z_root() . '/admin/themes/' . $theme );
break;
case 'logs':
admin_page_logs_post($a);
@@ -77,7 +77,7 @@ function admin_post(&$a){
}
}
- goaway($a->get_baseurl(true) . '/admin' );
+ goaway(z_root() . '/admin' );
}
/**
@@ -337,7 +337,7 @@ function admin_page_site_post(&$a){
set_config('system','curl_timeout', $timeout);
info( t('Site settings updated.') . EOL);
- goaway($a->get_baseurl(true) . '/admin/site' );
+ goaway(z_root() . '/admin/site' );
}
/**
@@ -460,7 +460,7 @@ function admin_page_site(&$a) {
'$corporate' => t('Policies'),
'$advanced' => t('Advanced'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
// name, label, value, help string, extra data...
'$sitename' => array('sitename', t("Site name"), htmlspecialchars(get_config('system','sitename'), ENT_QUOTES, 'UTF-8'),''),
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
@@ -536,7 +536,7 @@ function admin_page_hubloc_post(&$a){
//after repair set hubloc flags to 0
}
- goaway($a->get_baseurl(true) . '/admin/hubloc' );
+ goaway(z_root() . '/admin/hubloc' );
}
function trim_array_elems($arr) {
@@ -659,7 +659,7 @@ function admin_page_hubloc(&$a) {
if(! $hubloc){
notice( t('No server found') . EOL);
- goaway($a->get_baseurl(true) . '/admin/hubloc');
+ goaway(z_root() . '/admin/hubloc');
}
$t = get_markup_template('admin_hubloc.tpl');
@@ -733,7 +733,7 @@ function admin_page_dbsync(&$a) {
if(intval(get_config('system','db_version')) <= intval(argv(3)))
set_config('system','db_version',intval(argv(3)) + 1);
info( t('Update has been marked successful') . EOL);
- goaway($a->get_baseurl(true) . '/admin/dbsync');
+ goaway(z_root() . '/admin/dbsync');
}
if(argc() > 2 && intval(argv(2))) {
@@ -771,7 +771,7 @@ function admin_page_dbsync(&$a) {
return '<div class="generic-content-wrapper-styled"><h3>' . t('No failed updates.') . '</h3></div>';
$o = replace_macros(get_markup_template('failed_updates.tpl'),array(
- '$base' => $a->get_baseurl(true),
+ '$base' => z_root(),
'$banner' => t('Failed Updates'),
'$desc' => '',
'$mark' => t('Mark success (if update was manually applied)'),
@@ -871,7 +871,7 @@ function admin_page_users_post($a) {
}
}
- goaway($a->get_baseurl(true) . '/admin/users' );
+ goaway(z_root() . '/admin/users' );
}
/**
@@ -893,7 +893,7 @@ function admin_page_users(&$a){
if (! $account) {
notice( t('Account not found') . EOL);
- goaway($a->get_baseurl(true) . '/admin/users' );
+ goaway(z_root() . '/admin/users' );
}
check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't');
@@ -924,7 +924,7 @@ function admin_page_users(&$a){
break;
}
- goaway($a->get_baseurl(true) . '/admin/users' );
+ goaway(z_root() . '/admin/users' );
}
/* get pending */
@@ -1003,7 +1003,7 @@ function admin_page_users(&$a){
'$form_security_token' => get_form_security_token("admin_users"),
// values //
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$pending' => $pending,
'$users' => $users,
@@ -1053,7 +1053,7 @@ function admin_page_channels_post(&$a) {
notice( sprintf( tt("%s channel deleted", "%s channels deleted", count($channels)), count($channels)) );
}
- goaway($a->get_baseurl(true) . '/admin/channels' );
+ goaway(z_root() . '/admin/channels' );
}
/**
@@ -1071,7 +1071,7 @@ function admin_page_channels(&$a){
if (! $channel) {
notice( t('Channel not found') . EOL);
- goaway($a->get_baseurl(true) . '/admin/channels' );
+ goaway(z_root() . '/admin/channels' );
}
switch(argv(2)) {
@@ -1110,7 +1110,7 @@ function admin_page_channels(&$a){
default:
break;
}
- goaway($a->get_baseurl(true) . '/admin/channels' );
+ goaway(z_root() . '/admin/channels' );
}
/* get channels */
@@ -1163,7 +1163,7 @@ function admin_page_channels(&$a){
'$form_security_token' => get_form_security_token("admin_channels"),
// values //
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$channels' => $channels,
));
$o .= paginate($a);
@@ -1222,7 +1222,7 @@ function admin_page_plugins(&$a){
info( sprintf( t("Plugin %s enabled."), $plugin ) );
}
set_config("system","addon", implode(", ",$a->plugins));
- goaway($a->get_baseurl(true) . '/admin/plugins' );
+ goaway(z_root() . '/admin/plugins' );
}
// display plugin details
require_once('library/markdown.php');
@@ -1264,7 +1264,7 @@ function admin_page_plugins(&$a){
'$page' => t('Plugins'),
'$toggle' => t('Toggle'),
'$settings' => t('Settings'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$plugin' => $plugin,
'$status' => $status,
@@ -1324,7 +1324,7 @@ function admin_page_plugins(&$a){
'$title' => t('Administration'),
'$page' => t('Plugins'),
'$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$function' => 'plugins',
'$plugins' => $plugins,
'$disabled' => t('Disabled - version incompatibility'),
@@ -1448,7 +1448,7 @@ function admin_page_themes(&$a){
info( sprintf('Theme %s disabled.', $theme));
set_config('system', 'allowed_themes', $s);
- goaway($a->get_baseurl(true) . '/admin/themes' );
+ goaway(z_root() . '/admin/themes' );
}
// display theme details
@@ -1486,7 +1486,7 @@ function admin_page_themes(&$a){
'$page' => t('Themes'),
'$toggle' => t('Toggle'),
'$settings' => t('Settings'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$plugin' => $theme,
'$status' => $status,
@@ -1519,7 +1519,7 @@ function admin_page_themes(&$a){
'$title' => t('Administration'),
'$page' => t('Themes'),
'$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$function' => 'themes',
'$plugins' => $xthemes,
'$experimental' => t('[Experimental]'),
@@ -1548,7 +1548,7 @@ function admin_page_logs_post(&$a) {
}
info( t('Log settings updated.') );
- goaway($a->get_baseurl(true) . '/admin/logs' );
+ goaway(z_root() . '/admin/logs' );
}
/**
@@ -1606,7 +1606,7 @@ readable.");
'$submit' => t('Submit'),
'$clear' => t('Clear'),
'$data' => $data,
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$logname' => get_config('system','logfile'),
// name, label, value, help string, extra data...
diff --git a/mod/cal.php b/mod/cal.php
index 453f46f69..80a484c27 100755
--- a/mod/cal.php
+++ b/mod/cal.php
@@ -71,7 +71,7 @@ function cal_content(&$a) {
$htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$module_url' => '/cal/' . $channel['channel_address'],
'$modparams' => 2,
'$lang' => $a->language,
@@ -243,7 +243,7 @@ function cal_content(&$a) {
foreach($r as $rr) {
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
if(! x($links,$j))
- $links[$j] = $a->get_baseurl() . '/' . $a->cmd . '#link-' . $j;
+ $links[$j] = z_root() . '/' . $a->cmd . '#link-' . $j;
}
}
@@ -321,11 +321,11 @@ function cal_content(&$a) {
$nick = $channel['channel_address'];
$o = replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
- '$new_event' => array($a->get_baseurl().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
- '$previus' => array($a->get_baseurl()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
- '$next' => array($a->get_baseurl()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
- '$export' => array($a->get_baseurl()."/cal/$nick/$y/$m/export",t('Export'),'',''),
+ '$baseurl' => z_root(),
+ '$new_event' => array(z_root().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
+ '$previus' => array(z_root()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
+ '$next' => array(z_root()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
+ '$export' => array(z_root()."/cal/$nick/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
'$upload' => t('Import'),
diff --git a/mod/channel.php b/mod/channel.php
index eb65a66f3..d609d6802 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -34,12 +34,12 @@ function channel_init(&$a) {
$profile = argv(1);
}
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Posts and comments') . '" href="' . $a->get_baseurl() . '/feed/' . $which . '" />' . "\r\n" ;
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Only posts') . '" href="' . $a->get_baseurl() . '/feed/' . $which . '?top=1" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Posts and comments') . '" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Only posts') . '" href="' . z_root() . '/feed/' . $which . '?top=1" />' . "\r\n" ;
// Not yet ready for prime time
-// $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->get_baseurl() . '/id/' . $which .'?f=" />' . "\r\n" ;
-// $a->page['htmlhead'] .= '<link rel="openid.delegate" href="' . $a->get_baseurl() . '/channel/' . $which .'" />' . "\r\n" ;
+// $a->page['htmlhead'] .= '<link rel="openid.server" href="' . z_root() . '/id/' . $which .'?f=" />' . "\r\n" ;
+// $a->page['htmlhead'] .= '<link rel="openid.delegate" href="' . z_root() . '/channel/' . $which .'" />' . "\r\n" ;
// Run profile_load() here to make sure the theme is set before
// we start loading content
diff --git a/mod/chat.php b/mod/chat.php
index 95b3802a8..682921ec2 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -28,7 +28,7 @@ function chat_init(&$a) {
$profile = argv(1);
}
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which .'" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
// Run profile_load() here to make sure the theme is set before
// we start loading content
diff --git a/mod/cloud.php b/mod/cloud.php
index 82d454477..dc3e11ef3 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -30,7 +30,7 @@ function cloud_init(&$a) {
$profile = 0;
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which . '" />' . "\r\n";
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
if ($which)
profile_load($a, $which, $profile);
diff --git a/mod/connedit.php b/mod/connedit.php
index 008bc21ac..5d087a3b1 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -73,7 +73,7 @@ function connedit_post(&$a) {
if(! $orig_record) {
notice( t('Could not access contact record.') . EOL);
- goaway($a->get_baseurl(true) . '/connections');
+ goaway(z_root() . '/connections');
return; // NOTREACHED
}
@@ -306,7 +306,7 @@ function connedit_post(&$a) {
connedit_clone($a);
if(($_REQUEST['pending']) && (!$_REQUEST['done']))
- goaway($a->get_baseurl(true) . '/connections/ifpending');
+ goaway(z_root() . '/connections/ifpending');
return;
@@ -405,13 +405,13 @@ function connedit_content(&$a) {
if(! count($orig_record)) {
notice( t('Could not access address book record.') . EOL);
- goaway($a->get_baseurl(true) . '/connections');
+ goaway(z_root() . '/connections');
}
if($cmd === 'update') {
// pull feed and consume it, which should subscribe to the hub.
proc_run('php',"include/poller.php","$contact_id");
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
@@ -425,7 +425,7 @@ function connedit_content(&$a) {
// if you are on a different network we'll force a refresh of the connection basic info
proc_run('php','include/notifier.php','permission_update',$contact_id);
}
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
if($cmd === 'block') {
@@ -434,7 +434,7 @@ function connedit_content(&$a) {
}
else
notice(t('Unable to set address book parameters.') . EOL);
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
if($cmd === 'ignore') {
@@ -443,7 +443,7 @@ function connedit_content(&$a) {
}
else
notice(t('Unable to set address book parameters.') . EOL);
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
if($cmd === 'archive') {
@@ -452,7 +452,7 @@ function connedit_content(&$a) {
}
else
notice(t('Unable to set address book parameters.') . EOL);
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
if($cmd === 'hide') {
@@ -461,7 +461,7 @@ function connedit_content(&$a) {
}
else
notice(t('Unable to set address book parameters.') . EOL);
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
// We'll prevent somebody from unapproving an already approved contact.
@@ -475,7 +475,7 @@ function connedit_content(&$a) {
else
notice(t('Unable to set address book parameters.') . EOL);
}
- goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
+ goaway(z_root() . '/connedit/' . $contact_id);
}
@@ -499,8 +499,8 @@ function connedit_content(&$a) {
info( t('Connection has been removed.') . EOL );
if(x($_SESSION,'return_url'))
- goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']);
- goaway($a->get_baseurl(true) . '/contacts');
+ goaway(z_root() . '/' . $_SESSION['return_url']);
+ goaway(z_root() . '/contacts');
}
}
@@ -521,21 +521,21 @@ function connedit_content(&$a) {
'refresh' => array(
'label' => t('Refresh Permissions'),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/refresh',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/refresh',
'sel' => '',
'title' => t('Fetch updated permissions'),
),
'recent' => array(
'label' => t('Recent Activity'),
- 'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
+ 'url' => z_root() . '/network/?f=&cid=' . $contact['abook_id'],
'sel' => '',
'title' => t('View recent posts and comments'),
),
'block' => array(
'label' => (intval($contact['abook_blocked']) ? t('Unblock') : t('Block')),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/block',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/block',
'sel' => (intval($contact['abook_blocked']) ? 'active' : ''),
'title' => t('Block (or Unblock) all communications with this connection'),
'info' => (intval($contact['abook_blocked']) ? t('This connection is blocked!') : ''),
@@ -543,7 +543,7 @@ function connedit_content(&$a) {
'ignore' => array(
'label' => (intval($contact['abook_ignored']) ? t('Unignore') : t('Ignore')),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/ignore',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/ignore',
'sel' => (intval($contact['abook_ignored']) ? 'active' : ''),
'title' => t('Ignore (or Unignore) all inbound communications from this connection'),
'info' => (intval($contact['abook_ignored']) ? t('This connection is ignored!') : ''),
@@ -551,7 +551,7 @@ function connedit_content(&$a) {
'archive' => array(
'label' => (intval($contact['abook_archived']) ? t('Unarchive') : t('Archive')),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/archive',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/archive',
'sel' => (intval($contact['abook_archived']) ? 'active' : ''),
'title' => t('Archive (or Unarchive) this connection - mark channel dead but keep content'),
'info' => (intval($contact['abook_archived']) ? t('This connection is archived!') : ''),
@@ -559,7 +559,7 @@ function connedit_content(&$a) {
'hide' => array(
'label' => (intval($contact['abook_hidden']) ? t('Unhide') : t('Hide')),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/hide',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/hide',
'sel' => (intval($contact['abook_hidden']) ? 'active' : ''),
'title' => t('Hide or Unhide this connection from your other connections'),
'info' => (intval($contact['abook_hidden']) ? t('This connection is hidden!') : ''),
@@ -567,7 +567,7 @@ function connedit_content(&$a) {
'delete' => array(
'label' => t('Delete'),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/drop',
+ 'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/drop',
'sel' => '',
'title' => t('Delete this connection'),
),
diff --git a/mod/cover_photo.php b/mod/cover_photo.php
index 9c99859ea..9e7136c14 100644
--- a/mod/cover_photo.php
+++ b/mod/cover_photo.php
@@ -354,7 +354,7 @@ function cover_photo_content(&$a) {
'$profiles' => $profiles,
'$form_security_token' => get_form_security_token("cover_photo"),
// FIXME - yuk
- '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
+ '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . z_root() . '">' . t('skip this step') . '</a>' : '<a href="'. z_root() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
));
call_hooks('cover_photo_content_end', $o);
@@ -369,7 +369,7 @@ function cover_photo_content(&$a) {
'$filename' => $filename,
'$profile' => intval($_REQUEST['profile']),
'$resource' => $a->data['imagecrop'] . '-3',
- '$image_url' => $a->get_baseurl() . '/photo/' . $filename,
+ '$image_url' => z_root() . '/photo/' . $filename,
'$title' => t('Crop Image'),
'$desc' => t('Please adjust the image cropping for optimum viewing.'),
'$form_security_token' => get_form_security_token("cover_photo"),
diff --git a/mod/dav.php b/mod/dav.php
index 272dae4c8..b745dbb5c 100644
--- a/mod/dav.php
+++ b/mod/dav.php
@@ -49,7 +49,7 @@ function dav_init(&$a) {
$profile = 0;
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which . '" />' . "\r\n";
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
if ($which)
profile_load($a, $which, $profile);
diff --git a/mod/directory.php b/mod/directory.php
index dca96694e..fe5799c88 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -324,7 +324,7 @@ function directory_content(&$a) {
'online' => $online,
'kw' => (($out) ? t('Keywords: ') : ''),
'keywords' => $out,
- 'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '',
+ 'ignlink' => $suggest ? z_root() . '/directory?ignore=' . $rr['hash'] : '',
'ignore_label' => t('Don\'t suggest'),
'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''),
'common_label' => t('Common connections:'),
diff --git a/mod/editblock.php b/mod/editblock.php
index 9269676b1..a49beca3d 100644
--- a/mod/editblock.php
+++ b/mod/editblock.php
@@ -109,7 +109,7 @@ function editblock_content(&$a) {
$mimeselect = mimetype_select($itm[0]['uid'],$mimetype);
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
@@ -153,7 +153,7 @@ function editblock_content(&$a) {
'$mimeselect' => $mimeselect,
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$defloc' => $channel['channel_location'],
'$visitor' => false,
'$public' => t('Public post'),
diff --git a/mod/editlayout.php b/mod/editlayout.php
index fc68cfe3c..2c77a2381 100644
--- a/mod/editlayout.php
+++ b/mod/editlayout.php
@@ -103,7 +103,7 @@ function editlayout_content(&$a) {
$plaintext = true;
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
@@ -150,7 +150,7 @@ function editlayout_content(&$a) {
'$ptyp' => $itm[0]['type'],
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$defloc' => $channel['channel_location'],
'$visitor' => false,
'$public' => t('Public post'),
diff --git a/mod/editpost.php b/mod/editpost.php
index 030d8d671..7555ef37c 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -47,7 +47,7 @@ function editpost_content(&$a) {
$channel = $a->get_channel();
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
@@ -132,7 +132,7 @@ function editpost_content(&$a) {
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
'$parent' => (($itm[0]['parent'] != $itm[0]['id']) ? $itm[0]['parent'] : ''),
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$defloc' => $channel['channel_location'],
'$visitor' => false,
'$public' => t('Public post'),
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 0192fd9c0..f6cf22390 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -144,7 +144,7 @@ function editwebpage_content(&$a) {
$layoutselect = layout_select($itm[0]['uid'],$itm[0]['layout_mid']);
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
@@ -192,7 +192,7 @@ function editwebpage_content(&$a) {
'$ptyp' => $itm[0]['type'],
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$defloc' => $itm[0]['location'],
'$visitor' => ($is_owner) ? true : false,
'$acl' => populate_acl($itm[0],false),
diff --git a/mod/events.php b/mod/events.php
index 8e3b3e06b..30c083e4f 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -93,8 +93,8 @@ function events_post(&$a) {
//$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
//fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location)
- //$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
- $onerror_url = $a->get_baseurl() . "/events";
+ //$onerror_url = z_root() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
+ $onerror_url = z_root() . "/events";
if(strcmp($finish,$start) < 0 && !$nofinish) {
notice( t('Event can not end before it has started.') . EOL);
@@ -282,7 +282,7 @@ function events_content(&$a) {
$htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$module_url' => '/events',
'$modparams' => 1,
'$lang' => $a->language,
@@ -435,7 +435,7 @@ function events_content(&$a) {
$tpl = get_markup_template('event_form.tpl');
$form = replace_macros($tpl,array(
- '$post' => $a->get_baseurl() . '/events',
+ '$post' => z_root() . '/events',
'$eid' => $eid,
'$type' => $type,
'$xchan' => $event_xchan,
@@ -571,7 +571,7 @@ function events_content(&$a) {
foreach($r as $rr) {
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
if(! x($links,$j))
- $links[$j] = $a->get_baseurl() . '/' . $a->cmd . '#link-' . $j;
+ $links[$j] = z_root() . '/' . $a->cmd . '#link-' . $j;
}
}
@@ -600,9 +600,9 @@ function events_content(&$a) {
$last_date = $d;
- $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false);
+ $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array(z_root().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false);
- $drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
+ $drop = array(z_root().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
$title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
if(! $title) {
@@ -654,11 +654,11 @@ function events_content(&$a) {
}
$o = replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
- '$new_event' => array($a->get_baseurl().'/events',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
- '$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
- '$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
- '$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
+ '$baseurl' => z_root(),
+ '$new_event' => array(z_root().'/events',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
+ '$previus' => array(z_root()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
+ '$next' => array(z_root()."/events/$nextyear/$nextmonth",t('Next'),'',''),
+ '$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
'$upload' => t('Import'),
diff --git a/mod/fbrowser.php b/mod/fbrowser.php
index 13abbfd8a..6ce1292c8 100644
--- a/mod/fbrowser.php
+++ b/mod/fbrowser.php
@@ -22,7 +22,7 @@ function fbrowser_content($a){
switch($a->argv[1]){
case "image":
- $path = array( array($a->get_baseurl()."/fbrowser/image/", t("Photos")));
+ $path = array( array(z_root()."/fbrowser/image/", t("Photos")));
$albums = false;
$sql_extra = "";
$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
@@ -42,7 +42,7 @@ function fbrowser_content($a){
$album = hex2bin($a->argv[2]);
$sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
$sql_extra2 = "";
- $path[]=array($a->get_baseurl()."/fbrowser/image/".$a->argv[2]."/", $album);
+ $path[]=array(z_root()."/fbrowser/image/".$a->argv[2]."/", $album);
}
$r = q("SELECT `resource_id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `description`
@@ -60,9 +60,9 @@ function fbrowser_content($a){
$filename_e = $rr['filename'];
return array(
- $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['hiq'] . '.' .$ext,
+ z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['hiq'] . '.' .$ext,
$filename_e,
- $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['loq'] . '.'. $ext
+ z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['loq'] . '.'. $ext
);
}
$files = array_map("files1", $r);
@@ -70,7 +70,7 @@ function fbrowser_content($a){
$tpl = get_markup_template("filebrowser.tpl");
echo replace_macros($tpl, array(
'$type' => 'image',
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$path' => $path,
'$folders' => $albums,
'$files' =>$files,
@@ -96,7 +96,7 @@ function fbrowser_content($a){
$filename_e = $rr['filename'];
}
- return array( $a->get_baseurl() . '/attach/' . $rr['id'], $filename_e, $a->get_baseurl() . '/images/icons/16/' . $filetype . '.png');
+ return array( z_root() . '/attach/' . $rr['id'], $filename_e, z_root() . '/images/icons/16/' . $filetype . '.png');
}
$files = array_map("files2", $files);
//echo "<pre>"; var_dump($files); killme();
@@ -105,8 +105,8 @@ function fbrowser_content($a){
$tpl = get_markup_template("filebrowser.tpl");
echo replace_macros($tpl, array(
'$type' => 'file',
- '$baseurl' => $a->get_baseurl(),
- '$path' => array( array($a->get_baseurl()."/fbrowser/image/", t("Files")) ),
+ '$baseurl' => z_root(),
+ '$path' => array( array(z_root()."/fbrowser/image/", t("Files")) ),
'$folders' => false,
'$files' =>$files,
'$cancel' => t('Cancel'),
diff --git a/mod/filerm.php b/mod/filerm.php
index bd8ce7cfc..6a6c4ff15 100644
--- a/mod/filerm.php
+++ b/mod/filerm.php
@@ -27,7 +27,7 @@ function filerm_content(&$a) {
}
if(x($_SESSION,'return_url'))
- goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+ goaway(z_root() . '/' . $_SESSION['return_url']);
killme();
}
diff --git a/mod/group.php b/mod/group.php
index c63ccfa9b..defac572a 100644
--- a/mod/group.php
+++ b/mod/group.php
@@ -20,11 +20,11 @@ function group_post(&$a) {
info( t('Privacy group created.') . EOL );
$r = group_byname(local_channel(),$name);
if($r)
- goaway($a->get_baseurl() . '/group/' . $r);
+ goaway(z_root() . '/group/' . $r);
}
else
notice( t('Could not create privacy group.') . EOL );
- goaway($a->get_baseurl() . '/group');
+ goaway(z_root() . '/group');
}
if((argc() == 2) && (intval(argv(1)))) {
@@ -36,7 +36,7 @@ function group_post(&$a) {
);
if(! $r) {
notice( t('Privacy group not found.') . EOL );
- goaway($a->get_baseurl() . '/connections');
+ goaway(z_root() . '/connections');
}
$group = $r[0];
@@ -108,7 +108,7 @@ function group_content(&$a) {
else
notice( t('Unable to remove privacy group.') . EOL);
}
- goaway($a->get_baseurl() . '/group');
+ goaway(z_root() . '/group');
// NOTREACHED
}
@@ -135,7 +135,7 @@ function group_content(&$a) {
);
if(! $r) {
notice( t('Privacy group not found.') . EOL );
- goaway($a->get_baseurl() . '/connections');
+ goaway(z_root() . '/connections');
}
$group = $r[0];
diff --git a/mod/hcard.php b/mod/hcard.php
index 014a63b35..8339fd013 100644
--- a/mod/hcard.php
+++ b/mod/hcard.php
@@ -25,7 +25,7 @@ function hcard_init(&$a) {
$profile = $r[0]['profile_guid'];
}
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which .'" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
if(! $profile) {
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
diff --git a/mod/import.php b/mod/import.php
index f91f261a5..0e41d41f3 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -246,9 +246,9 @@ function import_account(&$a, $account_id) {
dbesc($channel['channel_guid']),
dbesc($channel['channel_guid_sig']),
dbesc($channel['channel_pubkey']),
- dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
- dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
- dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
+ dbesc(z_root() . "/photo/profile/l/" . $channel['channel_id']),
+ dbesc(z_root() . "/photo/profile/m/" . $channel['channel_id']),
+ dbesc(z_root() . "/photo/profile/s/" . $channel['channel_id']),
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
dbesc(z_root() . '/channel/' . $channel['channel_address']),
dbesc(z_root() . '/follow?f=&url=%s'),
diff --git a/mod/item.php b/mod/item.php
index 038a967b2..b84a7ff8d 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -119,7 +119,7 @@ function item_post(&$a) {
if (!$ret['success']) {
notice( t($ret['message']) . EOL) ;
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
}
@@ -173,7 +173,7 @@ function item_post(&$a) {
if(($r === false) || (! count($r))) {
notice( t('Unable to locate original post.') . EOL);
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
@@ -205,7 +205,7 @@ function item_post(&$a) {
if(! $can_comment) {
notice( t('Permission denied.') . EOL) ;
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
}
@@ -213,7 +213,7 @@ function item_post(&$a) {
if(! perm_is_allowed($profile_uid,$observer['xchan_hash'],($webpage) ? 'write_pages' : 'post_wall')) {
notice( t('Permission denied.') . EOL) ;
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
}
@@ -267,7 +267,7 @@ function item_post(&$a) {
if(! $channel) {
logger("mod_item: no channel.");
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
@@ -282,7 +282,7 @@ function item_post(&$a) {
else {
logger("mod_item: no owner.");
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
@@ -422,7 +422,7 @@ function item_post(&$a) {
killme();
info( t('Empty post discarded.') . EOL );
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
}
@@ -462,7 +462,7 @@ function item_post(&$a) {
else {
notice( t('Executable content type not permitted to this channel.') . EOL);
if(x($_REQUEST,'return'))
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
killme();
}
}
@@ -636,7 +636,7 @@ function item_post(&$a) {
$r = attach_by_hash_nodata($hash,$rev);
if($r['success']) {
$attachments[] = array(
- 'href' => $a->get_baseurl() . '/attach/' . $r['data']['hash'],
+ 'href' => z_root() . '/attach/' . $r['data']['hash'],
'length' => $r['data']['filesize'],
'type' => $r['data']['filetype'],
'title' => urlencode($r['data']['filename']),
@@ -852,10 +852,10 @@ function item_post(&$a) {
if(x($datarray,'cancel')) {
logger('mod_item: post cancelled by plugin or duplicate suppressed.');
if($return_path)
- goaway($a->get_baseurl() . "/" . $return_path);
+ goaway(z_root() . "/" . $return_path);
$json = array('cancel' => 1);
- $json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
+ $json['reload'] = z_root() . '/' . $_REQUEST['jsreload'];
echo json_encode($json);
killme();
}
@@ -901,7 +901,7 @@ function item_post(&$a) {
if((x($_REQUEST,'return')) && strlen($return_path)) {
logger('return: ' . $return_path);
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
}
killme();
}
@@ -926,7 +926,7 @@ function item_post(&$a) {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
- 'link' => $a->get_baseurl() . '/display/' . $datarray['mid'],
+ 'link' => z_root() . '/display/' . $datarray['mid'],
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $parent,
@@ -944,7 +944,7 @@ function item_post(&$a) {
'from_xchan' => $datarray['author_xchan'],
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
- 'link' => $a->get_baseurl() . '/display/' . $datarray['mid'],
+ 'link' => z_root() . '/display/' . $datarray['mid'],
'verb' => ACTIVITY_POST,
'otype' => 'item'
));
@@ -971,7 +971,7 @@ function item_post(&$a) {
else {
logger('mod_item: unable to retrieve post that was just stored.');
notice( t('System error. Post not saved.') . EOL);
- goaway($a->get_baseurl() . "/" . $return_path );
+ goaway(z_root() . "/" . $return_path );
// NOTREACHED
}
@@ -999,7 +999,7 @@ function item_post(&$a) {
}
$datarray['id'] = $post_id;
- $datarray['llink'] = $a->get_baseurl() . '/display/' . $channel['channel_address'] . '/' . $post_id;
+ $datarray['llink'] = z_root() . '/display/' . $channel['channel_address'] . '/' . $post_id;
call_hooks('post_local_end', $datarray);
@@ -1019,12 +1019,12 @@ function item_post(&$a) {
return $post;
if($return_path) {
- goaway($a->get_baseurl() . "/" . $return_path);
+ goaway(z_root() . "/" . $return_path);
}
$json = array('success' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
- $json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
+ $json['reload'] = z_root() . '/' . $_REQUEST['jsreload'];
logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
@@ -1099,7 +1099,7 @@ function fix_attached_photo_permissions($uid,$xchan_hash,$body,
$images = $match[2];
if($images) {
foreach($images as $image) {
- if(! stristr($image,get_app()->get_baseurl() . '/photo/'))
+ if(! stristr($image,z_root() . '/photo/'))
continue;
$image_uri = substr($image,strrpos($image,'/') + 1);
if(strpos($image_uri,'-') !== false)
diff --git a/mod/like.php b/mod/like.php
index 1de7882e9..9901c1cfa 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -444,7 +444,7 @@ function like_content(&$a) {
$arr['thr_parent'] = $item['mid'];
$ulink = '[zrl=' . $item_author['xchan_url'] . ']' . $item_author['xchan_name'] . '[/zrl]';
$alink = '[zrl=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/zrl]';
- $plink = '[zrl=' . $a->get_baseurl() . '/display/' . $item['mid'] . ']' . $post_type . '[/zrl]';
+ $plink = '[zrl=' . z_root() . '/display/' . $item['mid'] . ']' . $post_type . '[/zrl]';
$allow_cid = $item['allow_cid'];
$allow_gid = $item['allow_gid'];
$deny_cid = $item['deny_cid'];
diff --git a/mod/lostpass.php b/mod/lostpass.php
index ffdd7b62e..9a52ac7a9 100644
--- a/mod/lostpass.php
+++ b/mod/lostpass.php
@@ -31,10 +31,10 @@ function lostpass_post(&$a) {
$email_tpl = get_intltext_template("lostpass_eml.tpl");
$message = replace_macros($email_tpl, array(
'$sitename' => get_config('system','sitename'),
- '$siteurl' => $a->get_baseurl(),
+ '$siteurl' => z_root(),
'$username' => sprintf( t('Site Member (%s)'), $email),
'$email' => $email,
- '$reset_link' => $a->get_baseurl() . '/lostpass?verify=' . $hash
+ '$reset_link' => z_root() . '/lostpass?verify=' . $hash
));
$subject = email_header_encode(sprintf( t('Password reset requested at %s'),get_config('system','sitename')), 'UTF-8');
@@ -87,10 +87,10 @@ function lostpass_content(&$a) {
'$lbl2' => t('Your password has been reset as requested.'),
'$lbl3' => t('Your new password is'),
'$lbl4' => t('Save or copy your new password - and then'),
- '$lbl5' => '<a href="' . $a->get_baseurl() . '/login">' . t('click here to login') . '</a>.',
+ '$lbl5' => '<a href="' . z_root() . '/login">' . t('click here to login') . '</a>.',
'$lbl6' => t('Your password may be changed from the <em>Settings</em> page after successful login.'),
'$newpass' => $new_password,
- '$baseurl' => $a->get_baseurl()
+ '$baseurl' => z_root()
));
@@ -99,7 +99,7 @@ function lostpass_content(&$a) {
$email_tpl = get_intltext_template("passchanged_eml.tpl");
$message = replace_macros($email_tpl, array(
'$sitename' => $a->config['sitename'],
- '$siteurl' => $a->get_baseurl(),
+ '$siteurl' => z_root(),
'$username' => sprintf( t('Site Member (%s)'), $email),
'$email' => $email,
'$new_password' => $new_password,
diff --git a/mod/mail.php b/mod/mail.php
index 59d15772b..32bb19952 100644
--- a/mod/mail.php
+++ b/mod/mail.php
@@ -149,7 +149,7 @@ function mail_content(&$a) {
if($r) {
//info( t('Message deleted.') . EOL );
}
- goaway($a->get_baseurl(true) . '/mail/' . $mailbox);
+ goaway(z_root() . '/mail/' . $mailbox);
}
if((argc() == 4) && (argv(2) === 'recall')) {
@@ -174,7 +174,7 @@ function mail_content(&$a) {
if($r) {
info( t('Message recalled.') . EOL );
}
- goaway($a->get_baseurl(true) . '/mail/' . $mailbox . '/' . argv(3));
+ goaway(z_root() . '/mail/' . $mailbox . '/' . argv(3));
}
@@ -186,7 +186,7 @@ function mail_content(&$a) {
$r = private_messages_drop(local_channel(), argv(3), true);
if($r)
info( t('Conversation removed.') . EOL );
- goaway($a->get_baseurl(true) . '/mail/' . $mailbox);
+ goaway(z_root() . '/mail/' . $mailbox);
}
if((argc() > 1) && (argv(1) === 'new')) {
@@ -196,7 +196,7 @@ function mail_content(&$a) {
$tpl = get_markup_template('msg-header.tpl');
$header = replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $channel['channel_address'],
'$linkurl' => t('Please enter a link URL:'),
@@ -311,7 +311,7 @@ function mail_content(&$a) {
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$nickname' => $channel['channel_address'],
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$linkurl' => t('Please enter a link URL:'),
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM')
diff --git a/mod/match.php b/mod/match.php
index fd739ba2c..60c281861 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -17,7 +17,7 @@ function match_content(&$a) {
if (! local_channel())
return;
- $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+ $_SESSION['return_url'] = z_root() . '/' . $a->cmd;
$o .= '<h2>' . t('Profile Match') . '</h2>';
@@ -43,7 +43,7 @@ function match_content(&$a) {
// if(strlen(get_config('system','directory_submit_url')))
// $x = post_url('http://dir.friendica.com/msearch', $params);
// else
-// $x = post_url($a->get_baseurl() . '/msearch', $params);
+// $x = post_url(z_root() . '/msearch', $params);
$j = json_decode($x);
@@ -55,7 +55,7 @@ function match_content(&$a) {
if (count($j->results)) {
$tpl = get_markup_template('match.tpl');
foreach ($j->results as $jj) {
- $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
+ $connlnk = z_root() . '/follow/?url=' . $jj->url;
$o .= replace_macros($tpl,array(
'$url' => zid($jj->url),
'$name' => $jj->name,
diff --git a/mod/message.php b/mod/message.php
index 73239d2cb..a97ab5399 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -32,7 +32,7 @@ function message_content(&$a) {
$r = private_messages_drop(local_channel(), argv(2), true);
if($r)
info( t('Conversation removed.') . EOL );
- goaway($a->get_baseurl(true) . '/mail/combined' );
+ goaway(z_root() . '/mail/combined' );
}
if(argc() == 2) {
diff --git a/mod/msearch.php b/mod/msearch.php
index b51c4e097..f94b75910 100644
--- a/mod/msearch.php
+++ b/mod/msearch.php
@@ -27,8 +27,8 @@ function msearch_post(&$a) {
foreach($r as $rr)
$results[] = array(
'name' => $rr['name'],
- 'url' => $a->get_baseurl() . '/channel/' . $rr['nickname'],
- 'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'],
+ 'url' => z_root() . '/channel/' . $rr['nickname'],
+ 'photo' => z_root() . '/photo/avatar/' . $rr['uid'],
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['keywords'])
);
}
diff --git a/mod/network.php b/mod/network.php
index 134a4081d..0def662cc 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -89,7 +89,7 @@ function network_content(&$a, $update = 0, $load = false) {
if($update)
killme();
notice( t('No such group') . EOL );
- goaway($a->get_baseurl(true) . '/network');
+ goaway(z_root() . '/network');
// NOTREACHED
}
@@ -129,7 +129,7 @@ function network_content(&$a, $update = 0, $load = false) {
killme();
}
notice( t('No such channel') . EOL );
- goaway($a->get_baseurl(true) . '/network');
+ goaway(z_root() . '/network');
// NOTREACHED
}
if($_GET['pf'] === '1')
@@ -242,7 +242,7 @@ function network_content(&$a, $update = 0, $load = false) {
}
else {
notice( t('Invalid connection.') . EOL);
- goaway($a->get_baseurl(true) . '/network');
+ goaway(z_root() . '/network');
}
}
diff --git a/mod/new_channel.php b/mod/new_channel.php
index 577137c37..db5fff82a 100644
--- a/mod/new_channel.php
+++ b/mod/new_channel.php
@@ -122,7 +122,7 @@ function new_channel_content(&$a) {
}
$name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'));
- $nickhub = '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl'));
+ $nickhub = '@' . get_app()->get_hostname();
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub));
$privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" );
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
diff --git a/mod/notifications.php b/mod/notifications.php
index f679fbb3b..f6a75e2c0 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -46,12 +46,12 @@ function notifications_post(&$a) {
intval(local_channel())
);
}
- goaway($a->get_baseurl(true) . '/notifications/intros');
+ goaway(z_root() . '/notifications/intros');
}
if($_POST['submit'] == t('Ignore')) {
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
intval($intro_id));
- goaway($a->get_baseurl(true) . '/notifications/intros');
+ goaway(z_root() . '/notifications/intros');
}
}
}
@@ -84,7 +84,7 @@ function notifications_content(&$a) {
$notifications_available =1;
foreach ($r as $it) {
$notif_content .= replace_macros($not_tpl,array(
- '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
+ '$item_link' => z_root().'/notify/view/'. $it['id'],
'$item_image' => $it['photo'],
'$item_text' => strip_tags(bbcode($it['msg'])),
'$item_when' => relative_date($it['date'])
diff --git a/mod/notify.php b/mod/notify.php
index 4c9d1977b..d56871880 100644
--- a/mod/notify.php
+++ b/mod/notify.php
@@ -19,7 +19,7 @@ function notify_init(&$a) {
);
goaway($r[0]['link']);
}
- goaway($a->get_baseurl(true));
+ goaway(z_root());
}
@@ -42,7 +42,7 @@ function notify_content(&$a) {
if($r) {
foreach ($r as $it) {
$notif_content .= replace_macros($not_tpl,array(
- '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
+ '$item_link' => z_root().'/notify/view/'. $it['id'],
'$item_image' => $it['photo'],
'$item_text' => strip_tags(bbcode($it['msg'])),
'$item_when' => relative_date($it['date'])
diff --git a/mod/oexchange.php b/mod/oexchange.php
index 867cea6f2..d59a8d127 100644
--- a/mod/oexchange.php
+++ b/mod/oexchange.php
@@ -6,7 +6,7 @@ function oexchange_init(&$a) {
if((argc() > 1) && (argv(1) === 'xrd')) {
$tpl = get_markup_template('oexchange_xrd.tpl');
- $o = replace_macros($tpl, array('$base' => $a->get_baseurl()));
+ $o = replace_macros($tpl, array('$base' => z_root()));
echo $o;
killme();
}
@@ -47,7 +47,7 @@ function oexchange_content(&$a) {
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
- $ret = z_fetch_url($a->get_baseurl() . '/urlinfo?f=&url=' . $url . $title . $description . $tags);
+ $ret = z_fetch_url(z_root() . '/urlinfo?f=&url=' . $url . $title . $description . $tags);
if($ret['success'])
$s = $ret['body'];
diff --git a/mod/opensearch.php b/mod/opensearch.php
index d28c4f1b8..212773b96 100644
--- a/mod/opensearch.php
+++ b/mod/opensearch.php
@@ -7,7 +7,7 @@ function opensearch_init(&$a) {
header("Content-type: application/opensearchdescription+xml");
$o = replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$nodename' => $a->get_hostname(),
));
diff --git a/mod/photos.php b/mod/photos.php
index 07138e6cf..ddacc38a3 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -93,12 +93,12 @@ function photos_post(&$a) {
if($album === t('Profile Photos')) {
// not allowed
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
}
if(! photos_album_exists($page_owner_uid,$album)) {
notice( t('Album not found.') . EOL);
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
}
@@ -111,12 +111,12 @@ function photos_post(&$a) {
// @fixme - syncronise with DAV or disallow completely
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
// $x = photos_album_rename($page_owner_uid,$album,$newalbum);
// if($x) {
// $newurl = str_replace(bin2hex($album),bin2hex($newalbum),$_SESSION['photo_return']);
-// goaway($a->get_baseurl() . '/' . $newurl);
+// goaway(z_root() . '/' . $newurl);
// }
}
@@ -140,7 +140,7 @@ function photos_post(&$a) {
$str = null;
}
if(! $str) {
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
}
$r = q("select id from item where resource_id in ( $str ) and resource_type = 'photo' and uid = %d " . item_normal(),
@@ -165,7 +165,7 @@ function photos_post(&$a) {
}
- goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address']);
+ goaway(z_root() . '/photos/' . $a->data['channel']['channel_address']);
}
if((argc() > 2) && (x($_REQUEST,'delete')) && ($_REQUEST['delete'] === t('Delete Photo'))) {
@@ -174,7 +174,7 @@ function photos_post(&$a) {
$ob_hash = get_observer_hash();
if(! $ob_hash)
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$r = q("SELECT `id`, `resource_id` FROM `photo` WHERE ( xchan = '%s' or `uid` = %d ) AND `resource_id` = '%s' LIMIT 1",
dbesc($ob_hash),
@@ -197,12 +197,12 @@ function photos_post(&$a) {
);
if(count($i)) {
drop_item($i[0]['id'],true,DROPITEM_PHASE1);
- $url = $a->get_baseurl();
+ $url = z_root();
}
*/
}
- goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
+ goaway(z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
}
@@ -440,7 +440,7 @@ function photos_post(&$a) {
}
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
return; // NOTREACHED
}
@@ -470,9 +470,9 @@ function photos_post(&$a) {
}
if($_REQUEST['newalbum'])
- goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($_REQUEST['newalbum']));
+ goaway(z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($_REQUEST['newalbum']));
else
- goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex(datetime_convert('UTC',date_default_timezone_get(),'now', 'Y')));
+ goaway(z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex(datetime_convert('UTC',date_default_timezone_get(),'now', 'Y')));
}
@@ -571,7 +571,7 @@ function photos_content(&$a) {
$uploader = '';
- $ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'],
+ $ret = array('post_url' => z_root() . '/photos/' . $a->data['channel']['channel_address'],
'addon_text' => $uploader,
'default_upload' => true);
@@ -684,7 +684,7 @@ function photos_content(&$a) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(60);
} else {
- goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address']);
+ goaway(z_root() . '/photos/' . $a->data['channel']['channel_address']);
}
if($_GET['order'] === 'posted')
@@ -731,9 +731,9 @@ function photos_content(&$a) {
}
if($_GET['order'] === 'posted')
- $order = array(t('Show Newest First'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($album));
+ $order = array(t('Show Newest First'), z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($album));
else
- $order = array(t('Show Oldest First'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($album) . '?f=&order=posted');
+ $order = array(t('Show Oldest First'), z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($album) . '?f=&order=posted');
$photos = array();
if(count($r)) {
@@ -750,7 +750,7 @@ function photos_content(&$a) {
$imgalt_e = $rr['filename'];
$desc_e = $rr['description'];
- $imagelink = ($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id']
+ $imagelink = (z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id']
. (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''));
$photos[] = array(
@@ -758,7 +758,7 @@ function photos_content(&$a) {
'twist' => ' ' . $twist . rand(2,4),
'link' => $imagelink,
'title' => t('View Photo'),
- 'src' => $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['scale'] . '.' .$ext,
+ 'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['scale'] . '.' .$ext,
'alt' => $imgalt_e,
'desc'=> $desc_e,
'ext' => $ext,
@@ -790,7 +790,7 @@ function photos_content(&$a) {
'$album_id' => bin2hex($album),
'$album_edit' => array(t('Edit Album'), $album_edit),
'$can_post' => $can_post,
- '$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
+ '$upload' => array(t('Upload'), z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => $order,
'$upload_form' => $upload_form,
'$usage' => $usage_message
@@ -871,8 +871,8 @@ function photos_content(&$a) {
}
}
- $prevlink = $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
- $nextlink = $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
+ $prevlink = z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
+ $nextlink = z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
}
@@ -889,14 +889,14 @@ function photos_content(&$a) {
}
}
- $album_link = $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($ph[0]['album']);
+ $album_link = z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($ph[0]['album']);
$tools = Null;
$lock = Null;
if($can_post && ($ph[0]['uid'] == $owner_uid)) {
$tools = array(
- 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource_id'], t('Use as profile photo')),
- 'cover'=>array($a->get_baseurl() . '/cover_photo/use/'.$ph[0]['resource_id'], t('Use as cover photo')),
+ 'profile'=>array(z_root() . '/profile_photo/use/'.$ph[0]['resource_id'], t('Use as profile photo')),
+ 'cover'=>array(z_root() . '/cover_photo/use/'.$ph[0]['resource_id'], t('Use as cover photo')),
);
}
@@ -917,9 +917,9 @@ function photos_content(&$a) {
$prevlink = array($prevlink, t('Previous'));
$photo = array(
- 'href' => $a->get_baseurl() . '/photo/' . $hires['resource_id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']],
+ 'href' => z_root() . '/photo/' . $hires['resource_id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']],
'title'=> t('View Full Size'),
- 'src' => $a->get_baseurl() . '/photo/' . $lores['resource_id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis')
+ 'src' => z_root() . '/photo/' . $lores['resource_id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis')
);
if($nextlink)
@@ -1123,7 +1123,7 @@ function photos_content(&$a) {
if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent']))
continue;
- $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
+ $redirect_url = z_root() . '/redir/' . $item['cid'] ;
$profile_url = zid($item['author']['xchan_url']);
@@ -1297,12 +1297,12 @@ function photos_content(&$a) {
$photos[] = array(
'id' => $rr['id'],
'twist' => ' ' . $twist . rand(2,4),
- 'link' => $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id'],
+ 'link' => z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id'],
'title' => t('View Photo'),
- 'src' => $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
+ 'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
'alt' => $alt_e,
'album' => array(
- 'link' => $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($rr['album']),
+ 'link' => z_root() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($rr['album']),
'name' => $name_e,
'alt' => t('View Album'),
),
@@ -1331,7 +1331,7 @@ function photos_content(&$a) {
'$title' => t('Recent Photos'),
'$album_id' => bin2hex(t('Recent Photos')),
'$can_post' => $can_post,
- '$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
+ '$upload' => array(t('Upload'), z_root().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
'$photos' => $photos,
'$upload_form' => $upload_form,
'$usage' => $usage_message
diff --git a/mod/ping.php b/mod/ping.php
index 69d504da1..c93644317 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -224,7 +224,7 @@ function ping_init(&$a) {
if(count($z)) {
foreach($z as $zz) {
$notifs[] = array(
- 'notify_link' => $a->get_baseurl() . '/notify/view/' . $zz['id'],
+ 'notify_link' => z_root() . '/notify/view/' . $zz['id'],
'name' => $zz['name'],
'url' => $zz['url'],
'photo' => $zz['photo'],
@@ -251,7 +251,7 @@ function ping_init(&$a) {
if($t) {
foreach($t as $zz) {
$notifs[] = array(
- 'notify_link' => $a->get_baseurl() . '/mail/' . $zz['id'],
+ 'notify_link' => z_root() . '/mail/' . $zz['id'],
'name' => $zz['xchan_name'],
'url' => $zz['xchan_url'],
'photo' => $zz['xchan_photo_s'],
@@ -299,7 +299,7 @@ function ping_init(&$a) {
if($r) {
foreach($r as $rr) {
$result[] = array(
- 'notify_link' => $a->get_baseurl() . '/connections/ifpending',
+ 'notify_link' => z_root() . '/connections/ifpending',
'name' => $rr['xchan_name'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
@@ -341,7 +341,7 @@ function ping_init(&$a) {
$when = day_translate(datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
$result[] = array(
- 'notify_link' => $a->get_baseurl() . '/events', // FIXME this takes you to an edit page and it may not be yours, we really want to just view the single event --> '/events/event/' . $rr['event_hash'],
+ 'notify_link' => z_root() . '/events', // FIXME this takes you to an edit page and it may not be yours, we really want to just view the single event --> '/events/event/' . $rr['event_hash'],
'name' => $rr['xchan_name'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
diff --git a/mod/profile.php b/mod/profile.php
index 7ee03a77b..3c9c7808d 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -33,7 +33,7 @@ function profile_init(&$a) {
$profile = $r[0]['profile_guid'];
}
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/feed/' . $which .'" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
if(! $profile) {
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index 9dc71f256..789989ff2 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -189,8 +189,8 @@ function profile_photo_post(&$a) {
}
else {
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
- dbesc($a->get_baseurl() . '/photo/' . $base_image['resource_id'] . '-4'),
- dbesc($a->get_baseurl() . '/photo/' . $base_image['resource_id'] . '-5'),
+ dbesc(z_root() . '/photo/' . $base_image['resource_id'] . '-4'),
+ dbesc(z_root() . '/photo/' . $base_image['resource_id'] . '-5'),
intval($_REQUEST['profile']),
intval(local_channel())
);
@@ -225,7 +225,7 @@ function profile_photo_post(&$a) {
notice( t('Unable to process image') . EOL);
}
- goaway($a->get_baseurl() . '/profiles');
+ goaway(z_root() . '/profiles');
return; // NOTREACHED
}
@@ -345,7 +345,7 @@ function profile_photo_content(&$a) {
profile_photo_set_profile_perms(); //Reset default photo permissions to public
proc_run('php','include/directory.php',local_channel());
- goaway($a->get_baseurl() . '/profiles');
+ goaway(z_root() . '/profiles');
}
$r = q("SELECT `data`, `type`, resource_id, os_storage FROM photo WHERE id = %d and uid = %d limit 1",
@@ -404,7 +404,7 @@ function profile_photo_content(&$a) {
'$profile0' => $profiles[0],
'$form_security_token' => get_form_security_token("profile_photo"),
// FIXME - yuk
- '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
+ '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . z_root() . '">' . t('skip this step') . '</a>' : '<a href="'. z_root() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
));
call_hooks('profile_photo_content_end', $o);
@@ -419,7 +419,7 @@ function profile_photo_content(&$a) {
'$filename' => $filename,
'$profile' => intval($_REQUEST['profile']),
'$resource' => $a->data['imagecrop'] . '-' . $a->data['imagecrop_resolution'],
- '$image_url' => $a->get_baseurl() . '/photo/' . $filename,
+ '$image_url' => z_root() . '/photo/' . $filename,
'$title' => t('Crop Image'),
'$desc' => t('Please adjust the image cropping for optimum viewing.'),
'$form_security_token' => get_form_security_token("profile_photo"),
diff --git a/mod/profiles.php b/mod/profiles.php
index f891c6033..fca2ff429 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -17,7 +17,7 @@ function profiles_init(&$a) {
);
if(! count($r)) {
notice( t('Profile not found.') . EOL);
- goaway($a->get_baseurl(true) . '/profiles');
+ goaway(z_root() . '/profiles');
return; // NOTREACHED
}
$profile_guid = $r['profile_guid'];
@@ -44,7 +44,7 @@ function profiles_init(&$a) {
// profiles_build_sync(local_channel());
- goaway($a->get_baseurl(true) . '/profiles');
+ goaway(z_root() . '/profiles');
return; // NOTREACHED
}
@@ -83,9 +83,9 @@ function profiles_init(&$a) {
info( t('New profile created.') . EOL);
if(count($r3) == 1)
- goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
+ goaway(z_root() . '/profiles/' . $r3[0]['id']);
- goaway($a->get_baseurl(true) . '/profiles');
+ goaway(z_root() . '/profiles');
}
if((argc() > 2) && (argv(1) === 'clone')) {
@@ -129,9 +129,9 @@ function profiles_init(&$a) {
profiles_build_sync(local_channel());
if(($r3) && (count($r3) == 1))
- goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
+ goaway(z_root() . '/profiles/' . $r3[0]['id']);
- goaway($a->get_baseurl(true) . '/profiles');
+ goaway(z_root() . '/profiles');
return; // NOTREACHED
}
@@ -629,7 +629,7 @@ function profiles_content(&$a) {
// $editselect = 'textareas';
$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$editselect' => $editselect,
));
@@ -703,7 +703,7 @@ function profiles_content(&$a) {
'$lbl_gender' => t('Your gender'),
'$lbl_marital' => t('Marital status'),
'$lbl_sexual' => t('Sexual preference'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$profile_id' => $r[0]['id'],
'$profile_name' => array('profile_name', t('Profile name'), $r[0]['profile_name'], t('Required'), '*'),
'$is_default' => $is_default,
@@ -767,7 +767,7 @@ function profiles_content(&$a) {
'$profile_name' => $rr['profile_name'],
'$visible' => (($rr['is_default'])
? '<strong>' . translate_scope(map_scope($channel['channel_r_profile'])) . '</strong>'
- : '<a href="' . $a->get_baseurl(true) . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
+ : '<a href="' . z_root() . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
));
}
diff --git a/mod/randprof.php b/mod/randprof.php
index 9817685c8..124117e96 100644
--- a/mod/randprof.php
+++ b/mod/randprof.php
@@ -8,5 +8,5 @@ function randprof_init(&$a) {
goaway(chanlink_url($x));
/** FIXME this doesn't work at the moment as a fallback */
- goaway($a->get_baseurl() . '/profile');
+ goaway(z_root() . '/profile');
}
diff --git a/mod/register.php b/mod/register.php
index b533483f7..712691547 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -206,7 +206,7 @@ function register_content(&$a) {
$tosurl = get_config('system','tos_url');
if(! $tosurl)
- $tosurl = $a->get_baseurl() . '/help/TermsOfService';
+ $tosurl = z_root() . '/help/TermsOfService';
$toslink = '<a href="' . $tosurl . '" target="_blank">' . t('Terms of Service') . '</a>';
diff --git a/mod/removeaccount.php b/mod/removeaccount.php
index f3fa53f75..2752a2ee7 100644
--- a/mod/removeaccount.php
+++ b/mod/removeaccount.php
@@ -52,7 +52,7 @@ function removeaccount_content(&$a) {
$_SESSION['remove_account_verify'] = $hash;
$tpl = get_markup_template('removeaccount.tpl');
$o .= replace_macros($tpl, array(
- '$basedir' => $a->get_baseurl(),
+ '$basedir' => z_root(),
'$hash' => $hash,
'$title' => t('Remove This Account'),
'$desc' => array(t('WARNING: '), t('This account and all its channels will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
diff --git a/mod/removeme.php b/mod/removeme.php
index b604bc7db..452ee5ef5 100644
--- a/mod/removeme.php
+++ b/mod/removeme.php
@@ -52,7 +52,7 @@ function removeme_content(&$a) {
$tpl = get_markup_template('removeme.tpl');
$o .= replace_macros($tpl, array(
- '$basedir' => $a->get_baseurl(),
+ '$basedir' => z_root(),
'$hash' => $hash,
'$title' => t('Remove This Channel'),
'$desc' => array(t('WARNING: '), t('This channel will be completely removed from the network. '), t('This action is permanent and can not be undone!')),
diff --git a/mod/rsd_xml.php b/mod/rsd_xml.php
index 6fd9514cd..4ce82dbe0 100644
--- a/mod/rsd_xml.php
+++ b/mod/rsd_xml.php
@@ -10,7 +10,7 @@ function rsd_xml_content(&$a) {
<engineName>Red</engineName>
<engineLink>http://friendica.com/</engineLink>
<apis>
- <api name="Twitter" preferred="true" apiLink="'.$a->get_baseurl().'/api/" blogID="">
+ <api name="Twitter" preferred="true" apiLink="'.z_root().'/api/" blogID="">
<settings>
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
<setting name="OAuth">false</setting>
diff --git a/mod/search_ac.php b/mod/search_ac.php
index 19c1dc940..6ffdc6ed5 100644
--- a/mod/search_ac.php
+++ b/mod/search_ac.php
@@ -50,7 +50,7 @@ function search_ac_init(&$a){
if(count($r)) {
foreach($r as $g) {
$results[] = array(
- "photo" => $a->get_baseurl() . '/images/hashtag.png',
+ "photo" => z_root() . '/images/hashtag.png',
"name" => '#'.$g['term'],
"id" => $g['tid'],
"link" => $g['url'],
diff --git a/mod/settings.php b/mod/settings.php
index a6655f46a..d8aa069d0 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -57,7 +57,7 @@ function settings_post(&$a) {
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
dbesc($key),
local_channel());
- goaway($a->get_baseurl(true)."/settings/oauth/");
+ goaway(z_root()."/settings/oauth/");
return;
}
@@ -114,7 +114,7 @@ function settings_post(&$a) {
);
}
}
- goaway($a->get_baseurl(true)."/settings/oauth/");
+ goaway(z_root()."/settings/oauth/");
return;
}
@@ -211,7 +211,7 @@ function settings_post(&$a) {
call_hooks('display_settings_post', $_POST);
build_sync_packet();
- goaway($a->get_baseurl(true) . '/settings/display' );
+ goaway(z_root() . '/settings/display' );
return; // NOTREACHED
}
@@ -294,7 +294,7 @@ function settings_post(&$a) {
foreach($errs as $err)
notice($err . EOL);
}
- goaway($a->get_baseurl(true) . '/settings/account' );
+ goaway(z_root() . '/settings/account' );
}
@@ -563,7 +563,7 @@ function settings_post(&$a) {
}
- goaway($a->get_baseurl(true) . '/settings' );
+ goaway(z_root() . '/settings' );
return; // NOTREACHED
}
@@ -637,7 +637,7 @@ function settings_content(&$a) {
$r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
dbesc(argv(3)),
local_channel());
- goaway($a->get_baseurl(true)."/settings/oauth/");
+ goaway(z_root()."/settings/oauth/");
return;
}
@@ -653,7 +653,7 @@ function settings_content(&$a) {
$tpl = get_markup_template("settings_oauth.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth"),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$title' => t('Connected Apps'),
'$add' => t('Add application'),
'$edit' => t('Edit'),
@@ -847,7 +847,7 @@ function settings_content(&$a) {
'$d_cset' => t('Content Settings'),
'$form_security_token' => get_form_security_token("settings_display"),
'$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$uid' => local_channel(),
'$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false),
@@ -989,7 +989,7 @@ function settings_content(&$a) {
));
- $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/channel/' . $nickname : '');
+ $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . z_root() . '/channel/' . $nickname : '');
$tpl_addr = get_markup_template("settings_nick_set.tpl");
@@ -1039,7 +1039,7 @@ function settings_content(&$a) {
'$ptitle' => t('Channel Settings'),
'$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => z_root(),
'$uid' => local_channel(),
'$form_security_token' => get_form_security_token("settings"),
'$nickname_block' => $prof_addr,
diff --git a/mod/setup.php b/mod/setup.php
index 282b9cbef..84fb752c3 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -291,7 +291,7 @@ function setup_content(&$a) {
'$next' => t('Next'),
'$reload' => t('Check again'),
'$phpath' => $phpath,
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
));
return $o;
}; break;
@@ -329,7 +329,7 @@ function setup_content(&$a) {
'$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')),
'$lbl_10' => t('Please select a default timezone for your website'),
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$phpath' => $phpath,
@@ -372,7 +372,7 @@ function setup_content(&$a) {
'$timezone' => array('timezone', t('Please select a default timezone for your website'), $timezone, '', get_timezones()),
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$submit' => t('Submit'),
));
@@ -633,7 +633,7 @@ function check_htaccess(&$checks) {
$help = '';
$ssl_error = false;
- $url = $a->get_baseurl() . '/setup/testrewrite';
+ $url = z_root() . '/setup/testrewrite';
if (function_exists('curl_init')){
$test = z_fetch_url($url);
@@ -733,7 +733,7 @@ function what_next() {
require_once ('include/identity.php');
create_sys_channel();
- $baseurl = $a->get_baseurl();
+ $baseurl = z_root();
return
t('<h1>What next</h1>')
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
diff --git a/mod/subthread.php b/mod/subthread.php
index ce087806e..9438b545c 100755
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -134,7 +134,7 @@ function subthread_content(&$a) {
$ulink = '[zrl=' . $item_author['xchan_url'] . ']' . $item_author['xchan_name'] . '[/zrl]';
$alink = '[zrl=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/zrl]';
- $plink = '[zrl=' . $a->get_baseurl() . '/display/' . $item['mid'] . ']' . $post_type . '[/zrl]';
+ $plink = '[zrl=' . z_root() . '/display/' . $item['mid'] . ']' . $post_type . '[/zrl]';
$arr['body'] = sprintf( $bodyverb, $alink, $ulink, $plink );
diff --git a/mod/suggest.php b/mod/suggest.php
index 438d884ca..ebe0e0f78 100644
--- a/mod/suggest.php
+++ b/mod/suggest.php
@@ -27,7 +27,7 @@ function suggest_content(&$a) {
return;
}
- $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+ $_SESSION['return_url'] = z_root() . '/' . $a->cmd;
$r = suggestion_query(local_channel(),get_observer_hash());
@@ -40,7 +40,7 @@ function suggest_content(&$a) {
foreach($r as $rr) {
- $connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['xchan_addr'];
+ $connlnk = z_root() . '/follow/?url=' . $rr['xchan_addr'];
$arr[] = array(
'url' => chanlink_url($rr['xchan_url']),
@@ -48,7 +48,7 @@ function suggest_content(&$a) {
'profile' => $rr['xchan_url'],
'name' => $rr['xchan_name'],
'photo' => $rr['xchan_photo_m'],
- 'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['xchan_hash'],
+ 'ignlnk' => z_root() . '/suggest?ignore=' . $rr['xchan_hash'],
'conntxt' => t('Connect'),
'connlnk' => $connlnk,
'ignore' => t('Ignore/Hide')
diff --git a/mod/tagger.php b/mod/tagger.php
index 27a8a15ea..eba02c9c4 100644
--- a/mod/tagger.php
+++ b/mod/tagger.php
@@ -80,9 +80,9 @@ function tagger_content(&$a) {
$link = xmlify('<link rel="alternate" type="text/html" href="'
- . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
+ . z_root() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
- $tagid = $a->get_baseurl() . '/search?tag=' . $term;
+ $tagid = z_root() . '/search?tag=' . $term;
$objtype = ACTIVITY_OBJ_TAGTERM;
$obj = json_encode(array(
@@ -98,7 +98,7 @@ function tagger_content(&$a) {
// saving here for reference
// also check out x22d5 and x2317 and x0d6b and x0db8 and x24d0 and xff20 !!!
- $termlink = html_entity_decode('&#x22d5;') . '[zrl=' . $a->get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/zrl]';
+ $termlink = html_entity_decode('&#x22d5;') . '[zrl=' . z_root() . '/search?tag=' . urlencode($term) . ']'. $term . '[/zrl]';
$channel = $a->get_channel();
diff --git a/mod/tagrm.php b/mod/tagrm.php
index 56e842fb8..5523a8dd3 100644
--- a/mod/tagrm.php
+++ b/mod/tagrm.php
@@ -5,11 +5,11 @@ require_once('bbcode.php');
function tagrm_post(&$a) {
if(! local_channel())
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
if((x($_POST,'submit')) && ($_POST['submit'] === t('Cancel')))
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$tag = ((x($_POST,'tag')) ? trim($_POST['tag']) : '');
$item = ((x($_POST,'item')) ? intval($_POST['item']) : 0 );
@@ -20,7 +20,7 @@ function tagrm_post(&$a) {
);
if(! $r)
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$r = fetch_post_tags($r,true);
@@ -42,7 +42,7 @@ function tagrm_post(&$a) {
item_store_update($item);
info( t('Tag removed') . EOL );
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
// NOTREACHED
@@ -53,7 +53,7 @@ function tagrm_post(&$a) {
function tagrm_content(&$a) {
if(! local_channel()) {
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
// NOTREACHED
}
@@ -69,7 +69,7 @@ function tagrm_content(&$a) {
);
if(! $r)
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$r = fetch_post_tags($r,true);
@@ -92,7 +92,7 @@ function tagrm_content(&$a) {
item_store_update($item);
info( t('Tag removed') . EOL );
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
}
@@ -109,12 +109,12 @@ function tagrm_content(&$a) {
);
if(! $r)
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$r = fetch_post_tags($r,true);
if(! count($r[0]['term']))
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(z_root() . '/' . $_SESSION['photo_return']);
$o .= '<h3>' . t('Remove Item Tag') . '</h3>';
diff --git a/mod/toggle_mobile.php b/mod/toggle_mobile.php
index 06dadca04..918c4aad6 100644
--- a/mod/toggle_mobile.php
+++ b/mod/toggle_mobile.php
@@ -10,7 +10,7 @@ function toggle_mobile_init(&$a) {
if(isset($_GET['address']))
$address = $_GET['address'];
else
- $address = $a->get_baseurl();
+ $address = z_root();
goaway($address);
}
diff --git a/mod/xrd.php b/mod/xrd.php
index ed8e1eabe..0719407f6 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -28,7 +28,7 @@ function xrd_init(&$a) {
killme();
$dspr = replace_macros(get_markup_template('xrd_diaspora.tpl'),array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$dspr_guid' => $r[0]['channel_guid'] . str_replace('.','',$a->get_hostname()),
'$dspr_key' => base64_encode(pemtorsa($r[0]['channel_pubkey']))
));
@@ -51,17 +51,17 @@ function xrd_init(&$a) {
'$nick' => $r[0]['channel_address'],
'$accturi' => $resource,
'$aliases' => $aliases,
- '$profile_url' => $a->get_baseurl() . '/channel/' . $r[0]['channel_address'],
- '$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['channel_address'],
- '$atom' => $a->get_baseurl() . '/feed/' . $r[0]['channel_address'],
- '$zot_post' => $a->get_baseurl() . '/post/' . $r[0]['channel_address'],
- '$poco_url' => $a->get_baseurl() . '/poco/' . $r[0]['channel_address'],
- '$photo' => $a->get_baseurl() . '/photo/profile/l/' . $r[0]['channel_id'],
+ '$profile_url' => z_root() . '/channel/' . $r[0]['channel_address'],
+ '$hcard_url' => z_root() . '/hcard/' . $r[0]['channel_address'],
+ '$atom' => z_root() . '/feed/' . $r[0]['channel_address'],
+ '$zot_post' => z_root() . '/post/' . $r[0]['channel_address'],
+ '$poco_url' => z_root() . '/poco/' . $r[0]['channel_address'],
+ '$photo' => z_root() . '/photo/profile/l/' . $r[0]['channel_id'],
'$dspr' => $dspr,
-// '$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['channel_address'],
-// '$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['channel_address'] . '/mention',
+// '$salmon' => z_root() . '/salmon/' . $r[0]['channel_address'],
+// '$salmen' => z_root() . '/salmon/' . $r[0]['channel_address'] . '/mention',
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
- '$subscribe' => $a->get_baseurl() . '/follow?url={uri}',
+ '$subscribe' => z_root() . '/follow?url={uri}',
'$bigkey' => salmon_key($r[0]['channel_pubkey'])
));