diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php index af171437d..900ac1e26 100644 --- a/Zotlabs/Web/Router.php +++ b/Zotlabs/Web/Router.php @@ -94,7 +94,7 @@ class Router { if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && $a->config['system']['dreamhost_error_hack']) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); - goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']); + goaway(z_root() . $_SERVER['REQUEST_URI']); } logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG); diff --git a/boot.php b/boot.php index e52950b86..9b127aa8f 100755 --- a/boot.php +++ b/boot.php @@ -1206,7 +1206,7 @@ function clean_urls() { function z_path() { global $a; - $base = $a->get_baseurl(); + $base = z_root(); if(! clean_urls()) $base .= '/?q='; @@ -1293,7 +1293,7 @@ function check_config(&$a) { // This will actually set the url to the one stored in .htconfig, and ignore what // we're passing - unless we are installing and it has never been set. - $a->set_baseurl($a->get_baseurl()); + $a->set_baseurl(z_root()); // Make sure each site has a system channel. This is now created on install // so we just need to keep this around a couple of weeks until the hubs that @@ -1355,12 +1355,12 @@ function check_config(&$a) { $email_tpl = get_intltext_template("update_fail_eml.tpl"); $email_msg = replace_macros($email_tpl, array( '$sitename' => $a->config['system']['sitename'], - '$siteurl' => $a->get_baseurl(), + '$siteurl' => z_root(), '$update' => $x, '$error' => sprintf( t('Update %s failed. See error logs.'), $x) )); - $subject = email_header_encode(sprintf(t('Update Error at %s'), $a->get_baseurl())); + $subject = email_header_encode(sprintf(t('Update Error at %s'), z_root())); mail($a->config['system']['admin_email'], $subject, $email_msg, 'From: Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n" @@ -1535,7 +1535,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) { 'link' => (($register) ? $reglink : 'pubsites') ); - $dest_url = $a->get_baseurl(true) . '/' . $a->query_string; + $dest_url = z_root() . '/' . $a->query_string; if(local_channel()) { $tpl = get_markup_template("logout.tpl"); @@ -2177,10 +2177,10 @@ function construct_page(&$a) { if($a->is_mobile || $a->is_tablet) { if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { - $link = $a->get_baseurl() . '/toggle_mobile?f=&address=' . curPageURL(); + $link = z_root() . '/toggle_mobile?f=&address=' . curPageURL(); } else { - $link = $a->get_baseurl() . '/toggle_mobile?f=&off=1&address=' . curPageURL(); + $link = z_root() . '/toggle_mobile?f=&off=1&address=' . curPageURL(); } if ((isset($_SESSION) && $_SESSION['mobile_theme'] !='' && $_SESSION['mobile_theme'] !='---' ) || (isset($a->config['system']['mobile_theme']) && !isset($_SESSION['mobile_theme']))) { @@ -2338,7 +2338,7 @@ function cert_bad_email() { $email_tpl = get_intltext_template("cert_bad_eml.tpl"); $email_msg = replace_macros($email_tpl, array( '$sitename' => $a->config['system']['sitename'], - '$siteurl' => $a->get_baseurl(), + '$siteurl' => z_root(), '$error' => t('Website SSL certificate is not valid. Please correct.') )); @@ -2378,7 +2378,7 @@ function check_cron_broken() { $email_tpl = get_intltext_template("cron_bad_eml.tpl"); $email_msg = replace_macros($email_tpl, array( '$sitename' => $a->config['system']['sitename'], - '$siteurl' => $a->get_baseurl(), + '$siteurl' => z_root(), '$error' => t('Cron/Scheduled tasks not running.'), '$lastdate' => (($d)? $d : t('never')) )); diff --git a/doc/Creating-Templates.md b/doc/Creating-Templates.md index 6de627f39..fc3f18dd3 100644 --- a/doc/Creating-Templates.md +++ b/doc/Creating-Templates.md @@ -18,7 +18,7 @@ view/php/default.php
matrix';
+// $powered_by = 'red
matrix';
$tpl = get_markup_template('nav.tpl');
$a->page['nav'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,
diff --git a/include/network.php b/include/network.php
index 33b62039c..17e61bac5 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;
diff --git a/include/oembed.php b/include/oembed.php
index fb7a30e65..751c136d2 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -195,7 +195,7 @@ function oembed_format_object($j){
}
$ret.=replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$embedurl'=>$embedurl,
'$escapedhtml'=>base64_encode($jhtml),
'$tw'=>$tw,
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index dce92d8da..3bea54fd4 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -679,9 +679,9 @@ function import_xchan_photo($photo,$xchan,$thing = false) {
if($r === false)
$photo_failure = true;
- $photo = $a->get_baseurl() . '/photo/' . $hash . '-4';
- $thumb = $a->get_baseurl() . '/photo/' . $hash . '-5';
- $micro = $a->get_baseurl() . '/photo/' . $hash . '-6';
+ $photo = z_root() . '/photo/' . $hash . '-4';
+ $thumb = z_root() . '/photo/' . $hash . '-5';
+ $micro = z_root() . '/photo/' . $hash . '-6';
}
else {
logger('import_xchan_photo: invalid image from ' . $photo);
@@ -689,9 +689,9 @@ function import_xchan_photo($photo,$xchan,$thing = false) {
}
}
if($photo_failure) {
- $photo = $a->get_baseurl() . '/' . get_default_profile_photo();
- $thumb = $a->get_baseurl() . '/' . get_default_profile_photo(80);
- $micro = $a->get_baseurl() . '/' . get_default_profile_photo(48);
+ $photo = z_root() . '/' . get_default_profile_photo();
+ $thumb = z_root() . '/' . get_default_profile_photo(80);
+ $micro = z_root() . '/' . get_default_profile_photo(48);
$type = 'image/png';
}
diff --git a/include/plugin.php b/include/plugin.php
index bd844442f..e0973b976 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -495,10 +495,10 @@ function get_theme_screenshot($theme) {
$exts = array('.png', '.jpg');
foreach($exts as $ext) {
if(file_exists('view/theme/' . $theme . '/img/screenshot' . $ext))
- return($a->get_baseurl() . '/view/theme/' . $theme . '/img/screenshot' . $ext);
+ return(z_root() . '/view/theme/' . $theme . '/img/screenshot' . $ext);
}
- return($a->get_baseurl() . '/images/blank.png');
+ return(z_root() . '/images/blank.png');
}
/**
diff --git a/include/security.php b/include/security.php
index f3cf2d1b6..3b91808d5 100644
--- a/include/security.php
+++ b/include/security.php
@@ -68,7 +68,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
$return_url = '';
unset($_SESSION['login_return_url']);
- goaway($a->get_baseurl() . '/' . $return_url);
+ goaway(z_root() . '/' . $return_url);
}
/* This account has never created a channel. Send them to new_channel by default */
@@ -127,7 +127,7 @@ function change_channel($change_channel) {
);
if($x) {
$_SESSION['my_url'] = $x[0]['xchan_url'];
- $_SESSION['my_address'] = $r[0]['channel_address'] . '@' . substr(get_app()->get_baseurl(), strpos(get_app()->get_baseurl(), '://') + 3);
+ $_SESSION['my_address'] = $r[0]['channel_address'] . '@' . substr(z_root(), strpos(z_root(), '://') + 3);
get_app()->set_observer($x[0]);
get_app()->set_perms(get_all_perms(local_channel(), $hash));
@@ -393,7 +393,7 @@ function check_form_security_token_redirectOnErr($err_redirect, $typename = '',
logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA);
notice( check_form_security_std_err_msg() );
- goaway($a->get_baseurl() . $err_redirect );
+ goaway(z_root() . $err_redirect );
}
}
function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') {
diff --git a/include/text.php b/include/text.php
index 8e822532e..7af5db22d 100644
--- a/include/text.php
+++ b/include/text.php
@@ -386,7 +386,7 @@ function paginate(&$a) {
$stripped = str_replace('q=','',$stripped);
$stripped = trim($stripped,'/');
$pagenum = $a->pager['page'];
- $url = $a->get_baseurl() . '/' . $stripped;
+ $url = z_root() . '/' . $stripped;
if($a->pager['total'] > $a->pager['itemspage']) {
$o .= '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- 'red
matrix',
- 'red
matrix',
- 'red
matrix'
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ 'red
matrix',
+ 'red
matrix',
+ 'red
matrix'
);
@@ -1192,7 +1192,7 @@ function preg_heart($x) {
$t = '';
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
- $t .= '
';
+ $t .= '
';
$r = str_replace($x[0],$t,$x[0]);
@@ -1720,12 +1720,12 @@ function feed_hublinks() {
function feed_salmonlinks($nick) {
$a = get_app();
- $salmon = '' . "\n" ;
+ $salmon = '' . "\n" ;
// old style links that status.net still needed as of 12/2010
- $salmon .= ' ' . "\n" ;
- $salmon .= ' ' . "\n" ;
+ $salmon .= ' ' . "\n" ;
+ $salmon .= ' ' . "\n" ;
return $salmon;
}
@@ -2373,8 +2373,8 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $d
$basetag = str_replace('_',' ',substr($tag,1));
//create text for link
- $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag);
- $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]';
+ $url = z_root() . '/search?tag=' . rawurlencode($basetag);
+ $newtag = '#[zrl=' . z_root() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]';
//replace tag by the link. Make sure to not replace something in the middle of a word
// The '=' is needed to not replace color codes if the code is also used as a tag
// Much better would be to somehow completely avoiding things in e.g. [color]-tags.
diff --git a/include/widgets.php b/include/widgets.php
index 3b5e3a17b..014160867 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -510,13 +510,13 @@ function widget_settings_menu($arr) {
$tabs = array(
array(
'label' => t('Account settings'),
- 'url' => $a->get_baseurl(true).'/settings/account',
+ 'url' => z_root().'/settings/account',
'selected' => ((argv(1) === 'account') ? 'active' : ''),
),
array(
'label' => t('Channel settings'),
- 'url' => $a->get_baseurl(true).'/settings/channel',
+ 'url' => z_root().'/settings/channel',
'selected' => ((argv(1) === 'channel') ? 'active' : ''),
),
@@ -525,27 +525,27 @@ function widget_settings_menu($arr) {
if(get_features()) {
$tabs[] = array(
'label' => t('Additional features'),
- 'url' => $a->get_baseurl(true).'/settings/features',
+ 'url' => z_root().'/settings/features',
'selected' => ((argv(1) === 'features') ? 'active' : ''),
);
}
$tabs[] = array(
'label' => t('Feature/Addon settings'),
- 'url' => $a->get_baseurl(true).'/settings/featured',
+ 'url' => z_root().'/settings/featured',
'selected' => ((argv(1) === 'featured') ? 'active' : ''),
);
$tabs[] = array(
'label' => t('Display settings'),
- 'url' => $a->get_baseurl(true).'/settings/display',
+ 'url' => z_root().'/settings/display',
'selected' => ((argv(1) === 'display') ? 'active' : ''),
);
if($hublocs) {
$tabs[] = array(
'label' => t('Manage locations'),
- 'url' => $a->get_baseurl(true) . '/locs',
+ 'url' => z_root() . '/locs',
'selected' => ((argv(1) === 'locs') ? 'active' : ''),
);
}
@@ -554,21 +554,21 @@ function widget_settings_menu($arr) {
if(! UNO) {
$tabs[] = array(
'label' => t('Export channel'),
- 'url' => $a->get_baseurl(true) . '/uexport',
+ 'url' => z_root() . '/uexport',
'selected' => ''
);
}
$tabs[] = array(
'label' => t('Connected apps'),
- 'url' => $a->get_baseurl(true) . '/settings/oauth',
+ 'url' => z_root() . '/settings/oauth',
'selected' => ((argv(1) === 'oauth') ? 'active' : ''),
);
if($role === false || $role === 'custom') {
$tabs[] = array(
'label' => t('Connection Default Permissions'),
- 'url' => $a->get_baseurl(true) . '/connedit/' . $abook_self_id,
+ 'url' => z_root() . '/connedit/' . $abook_self_id,
'selected' => ''
);
}
@@ -576,7 +576,7 @@ function widget_settings_menu($arr) {
if(feature_enabled(local_channel(),'premium_channel')) {
$tabs[] = array(
'label' => t('Premium Channel Settings'),
- 'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'],
+ 'url' => z_root() . '/connect/' . $channel['channel_address'],
'selected' => ''
);
}
@@ -584,7 +584,7 @@ function widget_settings_menu($arr) {
if(feature_enabled(local_channel(),'channel_sources')) {
$tabs[] = array(
'label' => t('Channel Sources'),
- 'url' => $a->get_baseurl(true) . '/sources',
+ 'url' => z_root() . '/sources',
'selected' => ''
);
}
@@ -608,22 +608,22 @@ function widget_mailmenu($arr) {
'$title' => t('Private Mail Menu'),
'$combined'=>array(
'label' => t('Combined View'),
- 'url' => $a->get_baseurl(true) . '/mail/combined',
+ 'url' => z_root() . '/mail/combined',
'sel' => (argv(1) == 'combined'),
),
'$inbox'=>array(
'label' => t('Inbox'),
- 'url' => $a->get_baseurl(true) . '/mail/inbox',
+ 'url' => z_root() . '/mail/inbox',
'sel' => (argv(1) == 'inbox'),
),
'$outbox'=>array(
'label' => t('Outbox'),
- 'url' => $a->get_baseurl(true) . '/mail/outbox',
+ 'url' => z_root() . '/mail/outbox',
'sel' => (argv(1) == 'outbox'),
),
'$new'=>array(
'label' => t('New Message'),
- 'url' => $a->get_baseurl(true) . '/mail/new',
+ 'url' => z_root() . '/mail/new',
'sel'=> (argv(1) == 'new'),
)
));
diff --git a/index.php b/index.php
index bccb270d8..0d2754406 100755
--- a/index.php
+++ b/index.php
@@ -166,7 +166,7 @@ $Router->Dispatch($a);
if(x($_SESSION, 'visitor_home')) {
$homebase = $_SESSION['visitor_home'];
} elseif(local_channel()) {
- $homebase = $a->get_baseurl() . '/channel/' . $a->channel['channel_address'];
+ $homebase = z_root() . '/channel/' . $a->channel['channel_address'];
}
if(isset($homebase)) {
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 '"; 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'] .= '' . "\r\n" ;
+ $a->page['htmlhead'] .= '' . "\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' => '' . t('click here to login') . '.',
+ '$lbl5' => '' . t('click here to login') . '.',
'$lbl6' => t('Your password may be changed from the Settings 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 .= '' . t('Profile Match') . '
';
@@ -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.') . ' ' . t('Read more about roles') . '',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'] .= '' . "\r\n" ;
+ $a->page['htmlhead'] .= '' . "\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) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '')
+ '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '')
));
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'])
? '' . translate_scope(map_scope($channel['channel_r_profile'])) . ''
- : '' . t('Edit visibility') . '')
+ : '' . t('Edit visibility') . '')
));
}
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 = '' . t('Terms of Service') . '';
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) {
Red
http://friendica.com/
-
+
http://status.net/wiki/TwitterCompatibleAPI
false
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())) ? '
' . t('or') . ' ' . $a->get_baseurl(true) . '/channel/' . $nickname : '');
+ $subdir = ((strlen($a->get_path())) ? '
' . 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('What next
')
."".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('' . "\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('⋕') . '[zrl=' . $a->get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/zrl]';
+ $termlink = html_entity_decode('⋕') . '[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 .= '
' . t('Remove Item Tag') . '
';
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'])
));
diff --git a/view/php/choklet.php b/view/php/choklet.php
index 5f2303e77..00f8a6c56 100644
--- a/view/php/choklet.php
+++ b/view/php/choklet.php
@@ -2,7 +2,7 @@
-
+
diff --git a/view/php/default.php b/view/php/default.php
index 4a7c1ea19..ad6b7a3d1 100644
--- a/view/php/default.php
+++ b/view/php/default.php
@@ -2,7 +2,7 @@
-
+
diff --git a/view/php/full.php b/view/php/full.php
index bc3b2ed87..9cf567a67 100644
--- a/view/php/full.php
+++ b/view/php/full.php
@@ -2,7 +2,7 @@
-
+
diff --git a/view/php/minimal.php b/view/php/minimal.php
index ade2a0cb7..3572f3b5c 100644
--- a/view/php/minimal.php
+++ b/view/php/minimal.php
@@ -2,7 +2,7 @@
-
+
diff --git a/view/php/redable.php b/view/php/redable.php
index 0dcba77d2..a5110e0dc 100644
--- a/view/php/redable.php
+++ b/view/php/redable.php
@@ -2,7 +2,7 @@
-
+
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index 66597332c..789efc612 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -97,7 +97,7 @@ if(feature_enabled(local_channel(),'expert'))
$t = get_markup_template('theme_settings.tpl');
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(),
+ '$baseurl' => z_root(),
'$theme' => $a->channel['channel_theme'],
'$expert' => $expert,
'$title' => t("Theme settings"),