App::get_baseurl is now replaced with System::baseUrl
This commit is contained in:
parent
3c24bed412
commit
5adfeb0bd5
134 changed files with 603 additions and 624 deletions
|
@ -308,7 +308,7 @@ function admin_page_blocklist(App $a) {
|
|||
'$threason' => t('Reason for the block'),
|
||||
'$delentry' => t('Delete entry from blocklist'),
|
||||
'$entries' => $blocklistform,
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$confirm_delete' => t('Delete entry from blocklist?'),
|
||||
'$form_security_token' => get_form_security_token("admin_blocklist")
|
||||
));
|
||||
|
@ -377,7 +377,7 @@ function admin_page_deleteitem(App $a) {
|
|||
'$intro1' => t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
|
||||
'$intro2' => t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
|
||||
'$deleteitemguid' => array('deleteitemguid', t("GUID"), '', t("The GUID of the item you want to delete."), 'required', 'autofocus'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$form_security_token' => get_form_security_token("admin_deleteitem")
|
||||
));
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ function admin_page_federation(App $a) {
|
|||
'$counts' => $counts,
|
||||
'$version' => FRIENDICA_VERSION,
|
||||
'$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ function admin_page_summary(App $a) {
|
|||
'$accounts' => $accounts,
|
||||
'$pending' => array(t('Pending registrations'), $pending),
|
||||
'$version' => array(t('Version'), FRIENDICA_VERSION),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$platform' => FRIENDICA_PLATFORM,
|
||||
'$codename' => FRIENDICA_CODENAME,
|
||||
'$build' => get_config('system','build'),
|
||||
|
@ -704,7 +704,7 @@ function admin_page_site_post(App $a) {
|
|||
* send relocate for every local user
|
||||
* */
|
||||
|
||||
$old_url = App::get_baseurl(true);
|
||||
$old_url = System::baseUrl(true);
|
||||
|
||||
// Generate host names for relocation the addresses in the format user@address.tld
|
||||
$new_host = str_replace("http://", "@", normalise_link($new_url));
|
||||
|
@ -1152,7 +1152,7 @@ function admin_page_site(App $a) {
|
|||
'$performance' => t('Performance'),
|
||||
'$worker_title' => t('Worker'),
|
||||
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
// name, label, value, help string, extra data...
|
||||
'$sitename' => array('sitename', t("Site name"), $a->config['sitename'],''),
|
||||
'$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""),
|
||||
|
@ -1227,14 +1227,14 @@ function admin_page_site(App $a) {
|
|||
'$proxy_disabled' => array('proxy_disabled', t("Disable picture proxy"), get_config('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")),
|
||||
'$only_tag_search' => array('only_tag_search', t("Only search in tags"), get_config('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")),
|
||||
|
||||
'$relocate_url' => array('relocate_url', t("New base url"), App::get_baseurl(), t("Change base url for this server. Sends relocate message to all DFRN contacts of all users.")),
|
||||
'$relocate_url' => array('relocate_url', t("New base url"), System::baseUrl(), t("Change base url for this server. Sends relocate message to all DFRN contacts of all users.")),
|
||||
|
||||
'$rino' => array('rino', t("RINO Encryption"), intval(get_config('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
|
||||
|
||||
'$worker_queues' => array('worker_queues', t("Maximum number of parallel workers"), get_config('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")),
|
||||
'$worker_dont_fork' => array('worker_dont_fork', t("Don't use 'proc_open' with the worker"), get_config('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of poller calls in your crontab.")),
|
||||
'$worker_fastlane' => array('worker_fastlane', t("Enable fastlane"), get_config('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")),
|
||||
'$worker_frontend' => array('worker_frontend', t('Enable frontend worker'), get_config('system','frontend_worker'), sprintf(t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.'), App::get_baseurl())),
|
||||
'$worker_frontend' => array('worker_frontend', t('Enable frontend worker'), get_config('system','frontend_worker'), sprintf(t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.'), System::baseUrl())),
|
||||
|
||||
'$form_security_token' => get_form_security_token("admin_site")
|
||||
|
||||
|
@ -1317,13 +1317,13 @@ function admin_page_dbsync(App $a) {
|
|||
}
|
||||
if (! count($failed)) {
|
||||
$o = replace_macros(get_markup_template('structure_check.tpl'),array(
|
||||
'$base' => App::get_baseurl(true),
|
||||
'$base' => System::baseUrl(true),
|
||||
'$banner' => t('No failed updates.'),
|
||||
'$check' => t('Check database structure'),
|
||||
));
|
||||
} else {
|
||||
$o = replace_macros(get_markup_template('failed_updates.tpl'),array(
|
||||
'$base' => App::get_baseurl(true),
|
||||
'$base' => System::baseUrl(true),
|
||||
'$banner' => t('Failed Updates'),
|
||||
'$desc' => t('This does not include updates prior to 1139, which did not return a status.'),
|
||||
'$mark' => t('Mark success (if update was manually applied)'),
|
||||
|
@ -1391,7 +1391,7 @@ function admin_page_users_post(App $a) {
|
|||
Thank you and welcome to %4$s.'));
|
||||
|
||||
$preamble = sprintf($preamble, $nu['username'], $a->config['sitename']);
|
||||
$body = sprintf($body, App::get_baseurl(), $nu['email'], $result['password'], $a->config['sitename']);
|
||||
$body = sprintf($body, System::baseUrl(), $nu['email'], $result['password'], $a->config['sitename']);
|
||||
|
||||
notification(array(
|
||||
'type' => "SYSTEM_EMAIL",
|
||||
|
@ -1615,7 +1615,7 @@ function admin_page_users(App $a) {
|
|||
'$form_security_token' => get_form_security_token("admin_users"),
|
||||
|
||||
// values //
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
|
||||
'$pending' => $pending,
|
||||
'deleted' => $deleted,
|
||||
|
@ -1707,7 +1707,7 @@ function admin_page_plugins(App $a) {
|
|||
'$page' => t('Plugins'),
|
||||
'$toggle' => t('Toggle'),
|
||||
'$settings' => t('Settings'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
|
||||
'$plugin' => $plugin,
|
||||
'$status' => $status,
|
||||
|
@ -1732,10 +1732,10 @@ function admin_page_plugins(App $a) {
|
|||
*/
|
||||
|
||||
if (x($_GET,"a") && $_GET['a']=="r") {
|
||||
check_form_security_token_redirectOnErr(App::get_baseurl().'/admin/plugins', 'admin_themes', 't');
|
||||
check_form_security_token_redirectOnErr(System::baseUrl().'/admin/plugins', 'admin_themes', 't');
|
||||
reload_plugins();
|
||||
info("Plugins reloaded");
|
||||
goaway(App::get_baseurl().'/admin/plugins');
|
||||
goaway(System::baseUrl().'/admin/plugins');
|
||||
}
|
||||
|
||||
$plugins = array();
|
||||
|
@ -1770,7 +1770,7 @@ function admin_page_plugins(App $a) {
|
|||
'$page' => t('Plugins'),
|
||||
'$submit' => t('Save Settings'),
|
||||
'$reload' => t('Reload active plugins'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$function' => 'plugins',
|
||||
'$plugins' => $plugins,
|
||||
'$pcount' => count($plugins),
|
||||
|
@ -1983,7 +1983,7 @@ function admin_page_themes(App $a) {
|
|||
'$page' => t('Themes'),
|
||||
'$toggle' => t('Toggle'),
|
||||
'$settings' => t('Settings'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$plugin' => $theme,
|
||||
'$status' => $status,
|
||||
'$action' => $action,
|
||||
|
@ -2002,7 +2002,7 @@ function admin_page_themes(App $a) {
|
|||
|
||||
// reload active themes
|
||||
if (x($_GET,"a") && $_GET['a']=="r") {
|
||||
check_form_security_token_redirectOnErr(App::get_baseurl().'/admin/themes', 'admin_themes', 't');
|
||||
check_form_security_token_redirectOnErr(System::baseUrl().'/admin/themes', 'admin_themes', 't');
|
||||
if ($themes) {
|
||||
foreach ($themes as $th) {
|
||||
if ($th['allowed']) {
|
||||
|
@ -2012,7 +2012,7 @@ function admin_page_themes(App $a) {
|
|||
}
|
||||
}
|
||||
info("Themes reloaded");
|
||||
goaway(App::get_baseurl().'/admin/themes');
|
||||
goaway(System::baseUrl().'/admin/themes');
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2033,7 +2033,7 @@ function admin_page_themes(App $a) {
|
|||
'$page' => t('Themes'),
|
||||
'$submit' => t('Save Settings'),
|
||||
'$reload' => t('Reload active themes'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$function' => 'themes',
|
||||
'$plugins' => $xthemes,
|
||||
'$pcount' => count($themes),
|
||||
|
@ -2107,7 +2107,7 @@ function admin_page_logs(App $a) {
|
|||
'$page' => t('Logs'),
|
||||
'$submit' => t('Save Settings'),
|
||||
'$clear' => t('Clear'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$logname' => get_config('system','logfile'),
|
||||
|
||||
// name, label, value, help string, extra data...
|
||||
|
|
|
@ -66,7 +66,7 @@ function allfriends_content(App $a) {
|
|||
$photo_menu = contact_photo_menu ($rr);
|
||||
}
|
||||
else {
|
||||
$connlnk = App::get_baseurl() . '/follow/?url=' . $rr['url'];
|
||||
$connlnk = System::baseUrl() . '/follow/?url=' . $rr['url'];
|
||||
$photo_menu = array(
|
||||
'profile' => array(t("View Profile"), zrl($rr['url'])),
|
||||
'follow' => array(t("Connect/Follow"), $connlnk)
|
||||
|
|
|
@ -18,7 +18,7 @@ function bookmarklet_content(App $a) {
|
|||
}
|
||||
|
||||
$referer = normalise_link($_SERVER["HTTP_REFERER"]);
|
||||
$page = normalise_link(App::get_baseurl()."/bookmarklet");
|
||||
$page = normalise_link(System::baseUrl()."/bookmarklet");
|
||||
|
||||
if (!strstr($referer, $page)) {
|
||||
$content = add_page_info($_REQUEST["url"]);
|
||||
|
|
12
mod/cal.php
12
mod/cal.php
|
@ -79,7 +79,7 @@ function cal_content(App $a) {
|
|||
|
||||
$htpl = get_markup_template('event_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($htpl,array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
||||
'$modparams' => 2,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -87,7 +87,7 @@ function cal_content(App $a) {
|
|||
|
||||
$etpl = get_markup_template('event_end.tpl');
|
||||
$a->page['end'] .= replace_macros($etpl,array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
|
||||
$o ="";
|
||||
|
@ -229,7 +229,7 @@ function cal_content(App $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] = App::get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
||||
$links[$j] = System::baseUrl() . '/' . $a->cmd . '#link-' . $j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -268,12 +268,12 @@ function cal_content(App $a) {
|
|||
}
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => t('Events'),
|
||||
'$view' => t('View'),
|
||||
'$previous' => array(App::get_baseurl()."/events/$prevyear/$prevmonth", t('Previous'),'',''),
|
||||
'$next' => array(App::get_baseurl()."/events/$nextyear/$nextmonth", t('Next'),'',''),
|
||||
'$previous' => array(System::baseUrl()."/events/$prevyear/$prevmonth", t('Previous'),'',''),
|
||||
'$next' => array(System::baseUrl()."/events/$nextyear/$nextmonth", t('Next'),'',''),
|
||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||
|
||||
'$events' => $events,
|
||||
|
|
|
@ -85,16 +85,16 @@ function contacts_init(App $a) {
|
|||
'$networks_widget' => $networks_widget
|
||||
));
|
||||
|
||||
$base = z_root();
|
||||
$base = System::baseUrl();
|
||||
$tpl = get_markup_template("contacts-head.tpl");
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
$tpl = get_markup_template("contacts-end.tpl");
|
||||
$a->page['end'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
|
@ -494,10 +494,10 @@ function contacts_content(App $a) {
|
|||
$contact = $a->data['contact'];
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
));
|
||||
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
));
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
|
@ -576,7 +576,7 @@ function contacts_content(App $a) {
|
|||
|
||||
if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS)) &&
|
||||
($contact['rel'] == CONTACT_IS_FOLLOWER))
|
||||
$follow = App::get_baseurl(true)."/follow?url=".urlencode($contact["url"]);
|
||||
$follow = System::baseUrl(true)."/follow?url=".urlencode($contact["url"]);
|
||||
|
||||
// Load contactact related actions like hide, suggest, delete and others
|
||||
$contact_actions = contact_actions($contact);
|
||||
|
@ -802,7 +802,7 @@ function contacts_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template("contacts-template.tpl");
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$baseurl' => z_root(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
|
||||
'$tabs' => $t,
|
||||
'$total' => $total,
|
||||
|
|
|
@ -119,7 +119,7 @@ function content_content(App $a, $update = 0) {
|
|||
if($update)
|
||||
killme();
|
||||
notice( t('No such group') . EOL );
|
||||
goaway(App::get_baseurl(true) . '/network');
|
||||
goaway(System::baseUrl(true) . '/network');
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ function content_content(App $a, $update = 0) {
|
|||
}
|
||||
|
||||
if($conv) {
|
||||
$myurl = App::get_baseurl() . '/profile/'. $a->user['nickname'];
|
||||
$myurl = System::baseUrl() . '/profile/'. $a->user['nickname'];
|
||||
$myurl = substr($myurl,strpos($myurl,'://')+3);
|
||||
$myurl = str_replace('www.','',$myurl);
|
||||
$diasp_url = str_replace('/profile/','/u/',$myurl);
|
||||
|
@ -511,8 +511,8 @@ function render_content(App $a, $items, $mode, $update, $preview = false) {
|
|||
'like' => '',
|
||||
'dislike' => '',
|
||||
'comment' => '',
|
||||
//'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
|
||||
'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))),
|
||||
//'conv' => (($preview) ? '' : array('href'=> System::baseUrl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
|
||||
'conv' => (($preview) ? '' : array('href'=> System::baseUrl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))),
|
||||
'previewing' => $previewing,
|
||||
'wait' => t('Please wait'),
|
||||
);
|
||||
|
@ -745,7 +745,7 @@ function render_content(App $a, $items, $mode, $update, $preview = false) {
|
|||
}
|
||||
|
||||
if (local_user() && link_compare($a->contact['url'],$item['author-link'])) {
|
||||
$edpost = array(App::get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
|
||||
$edpost = array(System::baseUrl($ssl_state)."/editpost/".$item['id'], t("Edit"));
|
||||
} else {
|
||||
$edpost = false;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ function delegate_content(App $a) {
|
|||
// delegated admins can view but not change delegation permissions
|
||||
|
||||
if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
|
||||
goaway(App::get_baseurl() . '/delegate');
|
||||
goaway(System::baseUrl() . '/delegate');
|
||||
}
|
||||
|
||||
$id = $a->argv[2];
|
||||
|
@ -32,7 +32,7 @@ function delegate_content(App $a) {
|
|||
if (dbm::is_result($r)) {
|
||||
$r = q("select id from contact where uid = %d and nurl = '%s' limit 1",
|
||||
intval(local_user()),
|
||||
dbesc(normalise_link(App::get_baseurl() . '/profile/' . $r[0]['nickname']))
|
||||
dbesc(normalise_link(System::baseUrl() . '/profile/' . $r[0]['nickname']))
|
||||
);
|
||||
if (dbm::is_result($r)) {
|
||||
q("insert into manage ( uid, mid ) values ( %d , %d ) ",
|
||||
|
@ -41,21 +41,21 @@ function delegate_content(App $a) {
|
|||
);
|
||||
}
|
||||
}
|
||||
goaway(App::get_baseurl() . '/delegate');
|
||||
goaway(System::baseUrl() . '/delegate');
|
||||
}
|
||||
|
||||
if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
|
||||
|
||||
// delegated admins can view but not change delegation permissions
|
||||
if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
|
||||
goaway(App::get_baseurl() . '/delegate');
|
||||
goaway(System::baseUrl() . '/delegate');
|
||||
}
|
||||
|
||||
q("DELETE FROM `manage` WHERE `uid` = %d AND `mid` = %d LIMIT 1",
|
||||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
goaway(App::get_baseurl() . '/delegate');
|
||||
goaway(System::baseUrl() . '/delegate');
|
||||
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ function delegate_content(App $a) {
|
|||
|
||||
$r = q("select nurl from contact where substring_index(contact.nurl,'/',3) = '%s'
|
||||
and contact.uid = %d and contact.self = 0 and network = '%s' ",
|
||||
dbesc(normalise_link(App::get_baseurl())),
|
||||
dbesc(normalise_link(System::baseUrl())),
|
||||
intval(local_user()),
|
||||
dbesc(NETWORK_DFRN)
|
||||
);
|
||||
|
@ -131,7 +131,7 @@ function delegate_content(App $a) {
|
|||
|
||||
$o = replace_macros(get_markup_template('delegate.tpl'),array(
|
||||
'$header' => t('Delegate Page Management'),
|
||||
'$base' => App::get_baseurl(),
|
||||
'$base' => System::baseUrl(),
|
||||
'$desc' => t('Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely.'),
|
||||
'$head_managers' => t('Existing Page Managers'),
|
||||
'$managers' => $full_managers,
|
||||
|
|
|
@ -197,7 +197,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
$params['public_key'] = $public_key;
|
||||
|
||||
|
||||
$my_url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
|
||||
$my_url = System::baseUrl() . '/profile/' . $user[0]['nickname'];
|
||||
|
||||
openssl_public_encrypt($my_url, $params['source_url'], $site_pubkey);
|
||||
$params['source_url'] = bin2hex($params['source_url']);
|
||||
|
@ -508,7 +508,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
// do anything special with this new friend.
|
||||
|
||||
if ($handsfree === null) {
|
||||
goaway(App::get_baseurl() . '/contacts/' . intval($contact_id));
|
||||
goaway(System::baseUrl() . '/contacts/' . intval($contact_id));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -670,7 +670,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
if (dbm::is_result($r)) {
|
||||
$photo = $r[0]['photo'];
|
||||
} else {
|
||||
$photo = App::get_baseurl() . '/images/person-175.jpg';
|
||||
$photo = System::baseUrl() . '/images/person-175.jpg';
|
||||
}
|
||||
|
||||
require_once 'include/Photo.php';
|
||||
|
@ -735,7 +735,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
'to_name' => $r[0]['username'],
|
||||
'to_email' => $r[0]['email'],
|
||||
'uid' => $r[0]['uid'],
|
||||
'link' => App::get_baseurl() . '/contacts/' . $dfrn_record,
|
||||
'link' => System::baseUrl() . '/contacts/' . $dfrn_record,
|
||||
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||
'source_link' => $r[0]['url'],
|
||||
'source_photo' => $r[0]['photo'],
|
||||
|
@ -810,7 +810,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
|
|||
|
||||
// somebody arrived here by mistake or they are fishing. Send them to the homepage.
|
||||
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
// NOTREACHED
|
||||
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ function dfrn_poll_init(App $a) {
|
|||
$my_id = '0:' . $dfrn_id;
|
||||
break;
|
||||
default:
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
break; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -122,9 +122,9 @@ function dfrn_poll_init(App $a) {
|
|||
}
|
||||
}
|
||||
$profile = $r[0]['nickname'];
|
||||
goaway((strlen($destination_url)) ? $destination_url : App::get_baseurl() . '/profile/' . $profile);
|
||||
goaway((strlen($destination_url)) ? $destination_url : System::baseUrl() . '/profile/' . $profile);
|
||||
}
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
}
|
||||
|
||||
|
@ -322,7 +322,7 @@ function dfrn_poll_post(App $a) {
|
|||
$my_id = '0:' . $dfrn_id;
|
||||
break;
|
||||
default:
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
break; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,7 @@ function dfrn_poll_content(App $a) {
|
|||
$my_id = '0:' . $dfrn_id;
|
||||
break;
|
||||
default:
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
break; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -511,14 +511,14 @@ function dfrn_poll_content(App $a) {
|
|||
|
||||
switch($destination_url) {
|
||||
case 'profile':
|
||||
$dest = App::get_baseurl() . '/profile/' . $profile . '?f=&tab=profile';
|
||||
$dest = System::baseUrl() . '/profile/' . $profile . '?f=&tab=profile';
|
||||
break;
|
||||
case 'photos':
|
||||
$dest = App::get_baseurl() . '/photos/' . $profile;
|
||||
$dest = System::baseUrl() . '/photos/' . $profile;
|
||||
break;
|
||||
case 'status':
|
||||
case '':
|
||||
$dest = App::get_baseurl() . '/profile/' . $profile;
|
||||
$dest = System::baseUrl() . '/profile/' . $profile;
|
||||
break;
|
||||
default:
|
||||
$appendix = (strstr($destination_url, '?') ? '&f=&redir=1' : '?f=&redir=1');
|
||||
|
|
|
@ -54,7 +54,7 @@ function dfrn_request_post(App $a) {
|
|||
|
||||
|
||||
if(x($_POST, 'cancel')) {
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
|
||||
|
@ -196,9 +196,9 @@ function dfrn_request_post(App $a) {
|
|||
if (isset($photo))
|
||||
update_contact_avatar($photo, local_user(), $r[0]["id"], true);
|
||||
|
||||
$forwardurl = App::get_baseurl()."/contacts/".$r[0]['id'];
|
||||
$forwardurl = System::baseUrl()."/contacts/".$r[0]['id'];
|
||||
} else {
|
||||
$forwardurl = App::get_baseurl()."/contacts";
|
||||
$forwardurl = System::baseUrl()."/contacts";
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -226,7 +226,7 @@ function dfrn_request_post(App $a) {
|
|||
// invalid/bogus request
|
||||
|
||||
notice( t('Unrecoverable protocol error.') . EOL );
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -507,19 +507,19 @@ function dfrn_request_post(App $a) {
|
|||
else {
|
||||
if (! validate_url($url)) {
|
||||
notice( t('Invalid profile URL.') . EOL);
|
||||
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||
goaway(System::baseUrl() . '/' . $a->cmd);
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
if (! allowed_url($url)) {
|
||||
notice( t('Disallowed profile URL.') . EOL);
|
||||
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||
goaway(System::baseUrl() . '/' . $a->cmd);
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
if (blocked_url($url)) {
|
||||
notice( t('Blocked domain') . EOL);
|
||||
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||
goaway(System::baseUrl() . '/' . $a->cmd);
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ function dfrn_request_post(App $a) {
|
|||
|
||||
if (! count($parms)) {
|
||||
notice( t('Profile location is not valid or does not contain profile information.') . EOL );
|
||||
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||
goaway(System::baseUrl() . '/' . $a->cmd);
|
||||
}
|
||||
else {
|
||||
if (! x($parms,'fn')) {
|
||||
|
@ -617,7 +617,7 @@ function dfrn_request_post(App $a) {
|
|||
|
||||
// "Homecoming" - send the requestor back to their site to record the introduction.
|
||||
|
||||
$dfrn_url = bin2hex(App::get_baseurl() . '/profile/' . $nickname);
|
||||
$dfrn_url = bin2hex(System::baseUrl() . '/profile/' . $nickname);
|
||||
$aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
|
||||
|
||||
goaway($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
|
||||
|
@ -646,7 +646,7 @@ function dfrn_request_post(App $a) {
|
|||
|
||||
$uri = urlencode($uri);
|
||||
} else {
|
||||
$uri = App::get_baseurl().'/profile/'.$nickname;
|
||||
$uri = System::baseUrl().'/profile/'.$nickname;
|
||||
}
|
||||
|
||||
$url = str_replace('{uri}', $uri, $url);
|
||||
|
@ -756,7 +756,7 @@ function dfrn_request_content(App $a) {
|
|||
'to_name' => $r[0]['username'],
|
||||
'to_email' => $r[0]['email'],
|
||||
'uid' => $r[0]['uid'],
|
||||
'link' => App::get_baseurl() . '/notifications/intros',
|
||||
'link' => System::baseUrl() . '/notifications/intros',
|
||||
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||
'source_link' => $r[0]['url'],
|
||||
'source_photo' => $r[0]['photo'],
|
||||
|
@ -820,16 +820,16 @@ function dfrn_request_content(App $a) {
|
|||
$myaddr = $_GET['address'];
|
||||
} elseif (local_user()) {
|
||||
if (strlen($a->path)) {
|
||||
$myaddr = App::get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||
$myaddr = System::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
} else {
|
||||
$myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
|
||||
$myaddr = $a->user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(),'://') + 3 );
|
||||
}
|
||||
} else {
|
||||
// last, try a zrl
|
||||
$myaddr = get_my_url();
|
||||
}
|
||||
|
||||
$target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
|
||||
$target_addr = $a->profile['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(),'://') + 3 );
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -206,7 +206,7 @@ function dirfind_content(App $a, $prefix = "") {
|
|||
$photo_menu = array();
|
||||
}
|
||||
} else {
|
||||
$connlnk = App::get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
|
||||
$connlnk = System::baseUrl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
|
||||
$conntxt = t('Connect');
|
||||
$photo_menu = array(
|
||||
'profile' => array(t("View Profile"), zrl($jj->url)),
|
||||
|
|
|
@ -100,8 +100,8 @@ function display_init(App $a) {
|
|||
|
||||
$profiledata = display_fetchauthor($a, $r);
|
||||
|
||||
if (strstr(normalise_link($profiledata["url"]), normalise_link(App::get_baseurl()))) {
|
||||
$nickname = str_replace(normalise_link(App::get_baseurl())."/profile/", "", normalise_link($profiledata["url"]));
|
||||
if (strstr(normalise_link($profiledata["url"]), normalise_link(System::baseUrl()))) {
|
||||
$nickname = str_replace(normalise_link(System::baseUrl())."/profile/", "", normalise_link($profiledata["url"]));
|
||||
|
||||
if (($nickname != $a->user["nickname"])) {
|
||||
$r = dba::fetch_first("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
|
||||
|
@ -198,11 +198,11 @@ function display_fetchauthor($a, $item) {
|
|||
|
||||
$profiledata = get_contact_details_by_url($profiledata["url"], local_user(), $profiledata);
|
||||
|
||||
$profiledata["photo"] = App::remove_baseurl($profiledata["photo"]);
|
||||
$profiledata["photo"] = System::removedBaseUrl($profiledata["photo"]);
|
||||
|
||||
if (local_user()) {
|
||||
if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
|
||||
$profiledata["remoteconnect"] = App::get_baseurl()."/follow?url=".urlencode($profiledata["url"]);
|
||||
$profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
|
||||
}
|
||||
} elseif ($profiledata["network"] == NETWORK_DFRN) {
|
||||
$connect = str_replace("/profile/", "/dfrn_request/", $profiledata["url"]);
|
||||
|
@ -295,7 +295,7 @@ function display_content(App $a, $update = 0) {
|
|||
// We are displaying an "alternate" link if that post was public. See issue 2864
|
||||
$is_public = dba::exists('item', array('id' => $item_id, 'private' => false, 'wall' => true));
|
||||
if ($is_public) {
|
||||
$alternate = App::get_baseurl().'/display/'.$nick.'/'.$item_id.'.atom';
|
||||
$alternate = System::baseUrl().'/display/'.$nick.'/'.$item_id.'.atom';
|
||||
} else {
|
||||
$alternate = '';
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ function editpost_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('jot-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
|
@ -45,7 +45,7 @@ function editpost_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('jot-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
|
@ -119,7 +119,7 @@ function editpost_content(App $a) {
|
|||
'$ptyp' => $itm[0]['type'],
|
||||
'$content' => undo_post_tagging($itm[0]['body']),
|
||||
'$post_id' => $post_id,
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$defloc' => $a->user['default-location'],
|
||||
'$visitor' => 'none',
|
||||
'$pvisit' => 'none',
|
||||
|
|
|
@ -91,7 +91,7 @@ function events_post(App $a) {
|
|||
$type = 'event';
|
||||
|
||||
$action = ($event_id == '') ? 'new' : "event/" . $event_id;
|
||||
$onerror_url = App::get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
|
||||
$onerror_url = System::baseUrl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
|
||||
|
||||
if (strcmp($finish, $start) < 0 && !$nofinish) {
|
||||
notice(t('Event can not end before it has started.') . EOL);
|
||||
|
@ -191,7 +191,7 @@ function events_content(App $a) {
|
|||
}
|
||||
|
||||
if ($a->argc == 1) {
|
||||
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||
$_SESSION['return_url'] = System::baseUrl() . '/' . $a->cmd;
|
||||
}
|
||||
|
||||
if (($a->argc > 2) && ($a->argv[1] === 'ignore') && intval($a->argv[2])) {
|
||||
|
@ -219,7 +219,7 @@ function events_content(App $a) {
|
|||
|
||||
$htpl = get_markup_template('event_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($htpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/events',
|
||||
'$modparams' => 1,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -227,7 +227,7 @@ function events_content(App $a) {
|
|||
|
||||
$etpl = get_markup_template('event_end.tpl');
|
||||
$a->page['end'] .= replace_macros($etpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
|
||||
$o = '';
|
||||
|
@ -338,7 +338,7 @@ function events_content(App $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] = App::get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
||||
$links[$j] = System::baseUrl() . '/' . $a->cmd . '#link-' . $j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -373,13 +373,13 @@ function events_content(App $a) {
|
|||
}
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => t('Events'),
|
||||
'$view' => t('View'),
|
||||
'$new_event' => array(App::get_baseurl() . '/events/new', t('Create New Event'), '', ''),
|
||||
'$previous' => array(App::get_baseurl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''),
|
||||
'$next' => array(App::get_baseurl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''),
|
||||
'$new_event' => array(System::baseUrl() . '/events/new', t('Create New Event'), '', ''),
|
||||
'$previous' => array(System::baseUrl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''),
|
||||
'$next' => array(System::baseUrl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''),
|
||||
'$calendar' => cal($y, $m, $links, ' eventcal'),
|
||||
|
||||
'$events' => $events,
|
||||
|
@ -477,7 +477,7 @@ function events_content(App $a) {
|
|||
$tpl = get_markup_template('event_form.tpl');
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$post' => App::get_baseurl() . '/events',
|
||||
'$post' => System::baseUrl() . '/events',
|
||||
'$eid' => $eid,
|
||||
'$cid' => $cid,
|
||||
'$uri' => $uri,
|
||||
|
@ -534,6 +534,6 @@ function events_content(App $a) {
|
|||
info(t('Event removed') . EOL);
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/events');
|
||||
goaway(System::baseUrl() . '/events');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,9 +85,9 @@ function fbrowser_content(App $a) {
|
|||
$scale = $rr['loq'];
|
||||
|
||||
return array(
|
||||
App::get_baseurl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
|
||||
System::baseUrl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
|
||||
$filename_e,
|
||||
App::get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
||||
System::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
||||
);
|
||||
}
|
||||
$files = array_map("_map_files1", $r);
|
||||
|
@ -96,7 +96,7 @@ function fbrowser_content(App $a) {
|
|||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$type' => 'image',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
|
@ -123,7 +123,7 @@ function fbrowser_content(App $a) {
|
|||
$filename_e = $rr['filename'];
|
||||
}
|
||||
|
||||
return array( App::get_baseurl() . '/attach/' . $rr['id'], $filename_e, App::get_baseurl() . '/images/icons/16/' . $filetype . '.png');
|
||||
return array( System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png');
|
||||
}
|
||||
$files = array_map("_map_files2", $files);
|
||||
|
||||
|
@ -131,7 +131,7 @@ function fbrowser_content(App $a) {
|
|||
$tpl = get_markup_template($template_file);
|
||||
$o = replace_macros($tpl, array(
|
||||
'$type' => 'file',
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => array( array( "", t("Files")) ),
|
||||
'$folders' => false,
|
||||
'$files' =>$files,
|
||||
|
|
|
@ -31,7 +31,7 @@ function fetch_init(App $a) {
|
|||
$parts = parse_url($r[0]["author-link"]);
|
||||
$host = $parts["scheme"]."://".$parts["host"];
|
||||
|
||||
if (normalise_link($host) != normalise_link(App::get_baseurl())) {
|
||||
if (normalise_link($host) != normalise_link(System::baseUrl())) {
|
||||
$location = $host."/fetch/".$a->argv[1]."/".urlencode($guid);
|
||||
|
||||
header("HTTP/1.1 301 Moved Permanently");
|
||||
|
|
|
@ -26,7 +26,7 @@ function filerm_content(App $a) {
|
|||
}
|
||||
|
||||
if (x($_SESSION,'return_url')) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
|
||||
}
|
||||
|
||||
killme();
|
||||
|
|
|
@ -67,7 +67,7 @@ function follow_content(App $a) {
|
|||
$request = $ret["request"];
|
||||
$tpl = get_markup_template('dfrn_request.tpl');
|
||||
} else {
|
||||
$request = App::get_baseurl()."/follow";
|
||||
$request = System::baseUrl()."/follow";
|
||||
$tpl = get_markup_template('auto_request.tpl');
|
||||
}
|
||||
|
||||
|
@ -183,13 +183,13 @@ function follow_post(App $a) {
|
|||
}
|
||||
goaway($return_url);
|
||||
} elseif ($result['cid']) {
|
||||
goaway(App::get_baseurl().'/contacts/'.$result['cid']);
|
||||
goaway(System::baseUrl().'/contacts/'.$result['cid']);
|
||||
}
|
||||
|
||||
info( t('Contact added').EOL);
|
||||
|
||||
if (strstr($return_url,'contacts')) {
|
||||
goaway(App::get_baseurl().'/contacts/'.$contact_id);
|
||||
goaway(System::baseUrl().'/contacts/'.$contact_id);
|
||||
}
|
||||
|
||||
goaway($return_url);
|
||||
|
|
|
@ -18,7 +18,7 @@ function friendica_init(App $a) {
|
|||
$r = q("SELECT `username`, `nickname` FROM `user` WHERE `email` = '%s' $sql_extra", dbesc($adminlist[0]));
|
||||
$admin = array(
|
||||
'name' => $r[0]['username'],
|
||||
'profile'=> App::get_baseurl() . '/profile/' . $r[0]['nickname'],
|
||||
'profile'=> System::baseUrl() . '/profile/' . $r[0]['nickname'],
|
||||
);
|
||||
} else {
|
||||
$admin = false;
|
||||
|
@ -48,7 +48,7 @@ function friendica_init(App $a) {
|
|||
|
||||
$data = Array(
|
||||
'version' => FRIENDICA_VERSION,
|
||||
'url' => z_root(),
|
||||
'url' => System::baseUrl(),
|
||||
'plugins' => $visible_plugins,
|
||||
'locked_features' => $locked_features,
|
||||
'register_policy' => $register_policy[$a->config['register_policy']],
|
||||
|
@ -56,7 +56,7 @@ function friendica_init(App $a) {
|
|||
'site_name' => $a->config['sitename'],
|
||||
'platform' => FRIENDICA_PLATFORM,
|
||||
'info' => ((x($a->config,'info')) ? $a->config['info'] : ''),
|
||||
'no_scrape_url' => App::get_baseurl().'/noscrape'
|
||||
'no_scrape_url' => System::baseUrl().'/noscrape'
|
||||
);
|
||||
|
||||
echo json_encode($data);
|
||||
|
@ -68,7 +68,7 @@ function friendica_content(App $a) {
|
|||
$o = '<h1>Friendica</h1>' . PHP_EOL;
|
||||
$o .= '<p>';
|
||||
$o .= t('This is Friendica, version') . ' <strong>' . FRIENDICA_VERSION . '</strong> ';
|
||||
$o .= t('running at web location') . ' ' . z_root();
|
||||
$o .= t('running at web location') . ' ' . System::baseUrl();
|
||||
$o .= '</p>' . PHP_EOL;
|
||||
|
||||
$o .= '<p>';
|
||||
|
|
|
@ -31,12 +31,12 @@ function group_post(App $a) {
|
|||
info(t('Group created.') . EOL);
|
||||
$r = group_byname(local_user(), $name);
|
||||
if ($r) {
|
||||
goaway(App::get_baseurl() . '/group/' . $r);
|
||||
goaway(System::baseUrl() . '/group/' . $r);
|
||||
}
|
||||
} else {
|
||||
notice(t('Could not create group.') . EOL);
|
||||
}
|
||||
goaway(App::get_baseurl() . '/group');
|
||||
goaway(System::baseUrl() . '/group');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ function group_post(App $a) {
|
|||
);
|
||||
if (! dbm::is_result($r)) {
|
||||
notice(t('Group not found.') . EOL);
|
||||
goaway(App::get_baseurl() . '/contacts');
|
||||
goaway(System::baseUrl() . '/contacts');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
$group = $r[0];
|
||||
|
@ -127,7 +127,7 @@ function group_content(App $a) {
|
|||
notice(t('Unable to remove group.') . EOL);
|
||||
}
|
||||
}
|
||||
goaway(App::get_baseurl() . '/group');
|
||||
goaway(System::baseUrl() . '/group');
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ function group_content(App $a) {
|
|||
|
||||
if (! dbm::is_result($r)) {
|
||||
notice(t('Group not found.') . EOL);
|
||||
goaway(App::get_baseurl() . '/contacts');
|
||||
goaway(System::baseUrl() . '/contacts');
|
||||
}
|
||||
|
||||
$group = $r[0];
|
||||
|
|
|
@ -44,14 +44,14 @@ function hcard_init(App $a) {
|
|||
}
|
||||
|
||||
$a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
|
||||
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . App::get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . App::get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||
header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||
foreach ($dfrn_pages as $dfrn) {
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".App::get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".System::baseUrl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ function help_content(App $a) {
|
|||
if ($level>$lastlevel) $toc.="<ul>";
|
||||
$idnum[$level]++;
|
||||
$id = implode("_", array_slice($idnum,1,$level));
|
||||
$href = App::get_baseurl()."/help/{$filename}#{$id}";
|
||||
$href = System::baseUrl()."/help/{$filename}#{$id}";
|
||||
$toc .= "<li><a href='{$href}'>".strip_tags($line)."</a></li>";
|
||||
$line = "<a name='{$id}'></a>".$line;
|
||||
$lastlevel = $level;
|
||||
|
|
|
@ -10,11 +10,11 @@ function home_init(App $a) {
|
|||
call_hooks('home_init',$ret);
|
||||
|
||||
if (local_user() && ($a->user['nickname'])) {
|
||||
goaway(App::get_baseurl()."/network");
|
||||
goaway(System::baseUrl()."/network");
|
||||
}
|
||||
|
||||
if (strlen(get_config('system','singleuser'))) {
|
||||
goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser'));
|
||||
goaway(System::baseUrl()."/profile/" . get_config('system','singleuser'));
|
||||
}
|
||||
|
||||
}}
|
||||
|
@ -34,7 +34,7 @@ function home_content(App $a) {
|
|||
/// @TODO No absolute path used, maybe risky (security)
|
||||
if (file_exists('home.html')) {
|
||||
if (file_exists('home.css')) {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.App::get_baseurl().'/home.css'.'" media="all" />';
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.System::baseUrl().'/home.css'.'" media="all" />';
|
||||
}
|
||||
|
||||
$o .= file_get_contents('home.html');
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once('include/crypto.php');
|
||||
|
||||
|
@ -18,13 +19,13 @@ function hostxrd_init(App $a) {
|
|||
|
||||
//$tpl = file_get_contents('view/xrd_host.tpl');
|
||||
/*echo str_replace(array(
|
||||
'$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),z_root(),z_path(),z_root() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl);*/
|
||||
'$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),System::baseUrl(),System::baseUrl(),System::baseUrl() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl);*/
|
||||
$tpl = get_markup_template('xrd_host.tpl');
|
||||
echo replace_macros($tpl, array(
|
||||
'$zhost' => $a->get_hostname(),
|
||||
'$zroot' => z_root(),
|
||||
'$domain' => z_path(),
|
||||
'$zot_post' => z_root() . '/post',
|
||||
'$zroot' => System::baseUrl(),
|
||||
'$domain' => System::baseUrl(),
|
||||
'$zot_post' => System::baseUrl() . '/post',
|
||||
'$bigkey' => salmon_key(get_config('system','site_pubkey')),
|
||||
));
|
||||
exit();
|
||||
|
|
|
@ -42,7 +42,7 @@ function ignored_init(App $a) {
|
|||
if(strpos($return_path, '?')) $rand = "&$rand";
|
||||
else $rand = "?$rand";
|
||||
|
||||
goaway(App::get_baseurl() . "/" . $return_path . $rand);
|
||||
goaway(System::baseUrl() . "/" . $return_path . $rand);
|
||||
}
|
||||
|
||||
// the json doesn't really matter, it will either be 0 or 1
|
||||
|
|
|
@ -18,7 +18,7 @@ function install_init(App $a) {
|
|||
// We overwrite current theme css, because during install we could not have a working mod_rewrite
|
||||
// so we could not have a css at all. Here we set a static css file for the install procedure pages
|
||||
$a->config['system']['theme'] = "../install";
|
||||
$a->theme['stylesheet'] = App::get_baseurl()."/view/install/style.css";
|
||||
$a->theme['stylesheet'] = System::baseUrl()."/view/install/style.css";
|
||||
|
||||
global $install_wizard_pass;
|
||||
if (x($_POST, 'pass')) {
|
||||
|
@ -204,7 +204,7 @@ function install_content(App $a) {
|
|||
'$next' => t('Next'),
|
||||
'$reload' => t('Check again'),
|
||||
'$phpath' => $phpath,
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
return $o;
|
||||
}; break;
|
||||
|
@ -238,7 +238,7 @@ function install_content(App $a) {
|
|||
|
||||
'$lbl_10' => t('Please select a default timezone for your website'),
|
||||
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
|
||||
'$phpath' => $phpath,
|
||||
|
||||
|
@ -278,7 +278,7 @@ function install_content(App $a) {
|
|||
|
||||
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
|
||||
'$language' => array('language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
|
||||
|
||||
|
||||
|
@ -480,10 +480,10 @@ function check_htaccess(&$checks) {
|
|||
$status = true;
|
||||
$help = "";
|
||||
if (function_exists('curl_init')) {
|
||||
$test = fetch_url(App::get_baseurl()."/install/testrewrite");
|
||||
$test = fetch_url(System::baseUrl()."/install/testrewrite");
|
||||
|
||||
if ($test != "ok") {
|
||||
$test = fetch_url(normalise_link(App::get_baseurl()."/install/testrewrite"));
|
||||
$test = fetch_url(normalise_link(System::baseUrl()."/install/testrewrite"));
|
||||
}
|
||||
|
||||
if ($test != "ok") {
|
||||
|
@ -543,7 +543,7 @@ function load_database($db) {
|
|||
}
|
||||
|
||||
function what_next() {
|
||||
$baseurl = App::get_baseurl();
|
||||
$baseurl = System::baseUrl();
|
||||
return
|
||||
t('<h1>What next</h1>')
|
||||
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
|
||||
|
|
|
@ -124,7 +124,7 @@ function invite_content(App $a) {
|
|||
if ($a->config['register_policy'] == REGISTER_CLOSED) {
|
||||
$linktxt = sprintf( t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.'), $dirloc . '/servers');
|
||||
} else {
|
||||
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), App::get_baseurl())
|
||||
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), System::baseUrl())
|
||||
. "\r\n" . "\r\n" . sprintf( t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.'),$dirloc . '/servers');
|
||||
}
|
||||
} else { // there is no global directory URL defined
|
||||
|
@ -132,7 +132,7 @@ function invite_content(App $a) {
|
|||
$o = t('Our apologies. This system is not currently configured to connect with other public sites or invite members.');
|
||||
return $o;
|
||||
} else {
|
||||
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s.'), App::get_baseurl()
|
||||
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s.'), System::baseUrl()
|
||||
. "\r\n" . "\r\n" . t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks.'));
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ function invite_content(App $a) {
|
|||
'$default_message' => t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
|
||||
. $linktxt
|
||||
. "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:')
|
||||
. "\r\n" . "\r\n" . App::get_baseurl() . '/profile/' . $a->user['nickname']
|
||||
. "\r\n" . "\r\n" . System::baseUrl() . '/profile/' . $a->user['nickname']
|
||||
. "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n" ,
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
|
20
mod/item.php
20
mod/item.php
|
@ -67,7 +67,7 @@ function item_post(App $a) {
|
|||
if (!$preview && x($_REQUEST, 'post_id_random')) {
|
||||
if (x($_SESSION, 'post-random') && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
|
||||
logger("item post: duplicate post", LOGGER_DEBUG);
|
||||
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||
item_post_return(System::baseUrl(), $api_source, $return_path);
|
||||
} else {
|
||||
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ function item_post(App $a) {
|
|||
$objecttype = ACTIVITY_OBJ_IMAGE;
|
||||
|
||||
foreach ($images as $image) {
|
||||
if (! stristr($image,App::get_baseurl() . '/photo/')) {
|
||||
if (! stristr($image,System::baseUrl() . '/photo/')) {
|
||||
continue;
|
||||
}
|
||||
$image_uri = substr($image,strrpos($image,'/') + 1);
|
||||
|
@ -626,7 +626,7 @@ function item_post(App $a) {
|
|||
if (strlen($attachments)) {
|
||||
$attachments .= ',';
|
||||
}
|
||||
$attachments .= '[attach]href="' . App::get_baseurl() . '/attach/' . $r[0]['id'] . '" length="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : '') . '"[/attach]';
|
||||
$attachments .= '[attach]href="' . System::baseUrl() . '/attach/' . $r[0]['id'] . '" length="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : '') . '"[/attach]';
|
||||
}
|
||||
$body = str_replace($match[1],'',$body);
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ function item_post(App $a) {
|
|||
// $datarray['prvnets'] = $user['prvnets'];
|
||||
|
||||
$datarray['parent-uri'] = ($parent == 0) ? $uri : $parent_item['uri'];
|
||||
$datarray['plink'] = App::get_baseurl() . '/display/' . urlencode($datarray['guid']);
|
||||
$datarray['plink'] = System::baseUrl() . '/display/' . urlencode($datarray['guid']);
|
||||
$datarray['last-child'] = 1;
|
||||
$datarray['visible'] = 1;
|
||||
|
||||
|
@ -766,7 +766,7 @@ function item_post(App $a) {
|
|||
|
||||
$json = array('cancel' => 1);
|
||||
if (x($_REQUEST, 'jsreload') && strlen($_REQUEST['jsreload'])) {
|
||||
$json['reload'] = App::get_baseurl() . '/' . $_REQUEST['jsreload'];
|
||||
$json['reload'] = System::baseUrl() . '/' . $_REQUEST['jsreload'];
|
||||
}
|
||||
|
||||
echo json_encode($json);
|
||||
|
@ -936,7 +936,7 @@ function item_post(App $a) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $datarray,
|
||||
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||
'link' => System::baseUrl().'/display/'.urlencode($datarray['guid']),
|
||||
'source_name' => $datarray['author-name'],
|
||||
'source_link' => $datarray['author-link'],
|
||||
'source_photo' => $datarray['author-avatar'],
|
||||
|
@ -968,7 +968,7 @@ function item_post(App $a) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $datarray,
|
||||
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||
'link' => System::baseUrl().'/display/'.urlencode($datarray['guid']),
|
||||
'source_name' => $datarray['author-name'],
|
||||
'source_link' => $datarray['author-link'],
|
||||
'source_photo' => $datarray['author-avatar'],
|
||||
|
@ -990,14 +990,14 @@ function item_post(App $a) {
|
|||
}
|
||||
$disclaimer = '<hr />' . sprintf( t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username'])
|
||||
. '<br />';
|
||||
$disclaimer .= sprintf( t('You may visit them online at %s'), App::get_baseurl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= sprintf( t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||
if (!$datarray['title']=='') {
|
||||
$subject = email_header_encode($datarray['title'], 'UTF-8');
|
||||
} else {
|
||||
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'), $a->user['username']), 'UTF-8');
|
||||
}
|
||||
$link = '<a href="' . App::get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$link = '<a href="' . System::baseUrl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$html = prepare_body($datarray);
|
||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
||||
include_once 'include/html2plain.php';
|
||||
|
@ -1037,7 +1037,7 @@ function item_post(App $a) {
|
|||
|
||||
logger('post_complete');
|
||||
|
||||
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||
item_post_return(System::baseUrl(), $api_source, $return_path);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ function like_content(App $a) {
|
|||
// See if we've been passed a return path to redirect to
|
||||
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
|
||||
|
||||
like_content_return(App::get_baseurl(), $return_path);
|
||||
like_content_return(System::baseUrl(), $return_path);
|
||||
killme(); // NOTREACHED
|
||||
// return; // NOTREACHED
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ function localtime_content(App $a) {
|
|||
$o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
|
||||
|
||||
|
||||
$o .= '<form action ="' . App::get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
|
||||
$o .= '<form action ="' . System::baseUrl() . '/localtime?f=&time=' . $t . '" method="post" >';
|
||||
|
||||
$o .= '<p>' . t('Please select your timezone:') . '</p>';
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function login_content(App $a) {
|
||||
if (x($_SESSION, 'theme')) {
|
||||
|
@ -12,7 +13,7 @@ function login_content(App $a) {
|
|||
}
|
||||
|
||||
if (local_user()) {
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
return login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
|
||||
|
|
|
@ -11,7 +11,7 @@ function lostpass_post(App $a) {
|
|||
|
||||
$loginame = notags(trim($_POST['login-name']));
|
||||
if(! $loginame)
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
$r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) AND `verified` = 1 AND `blocked` = 0 LIMIT 1",
|
||||
dbesc($loginame),
|
||||
|
@ -20,7 +20,7 @@ function lostpass_post(App $a) {
|
|||
|
||||
if (! dbm::is_result($r)) {
|
||||
notice( t('No valid account found.') . EOL);
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
$uid = $r[0]['uid'];
|
||||
|
@ -39,7 +39,7 @@ function lostpass_post(App $a) {
|
|||
|
||||
|
||||
$sitename = $a->config['sitename'];
|
||||
$resetlink = App::get_baseurl() . '/lostpass?verify=' . $new_password;
|
||||
$resetlink = System::baseUrl() . '/lostpass?verify=' . $new_password;
|
||||
|
||||
$preamble = deindent(t('
|
||||
Dear %1$s,
|
||||
|
@ -66,7 +66,7 @@ function lostpass_post(App $a) {
|
|||
Login Name: %3$s'));
|
||||
|
||||
$preamble = sprintf($preamble, $username, $sitename);
|
||||
$body = sprintf($body, $resetlink, App::get_baseurl(), $email);
|
||||
$body = sprintf($body, $resetlink, System::baseUrl(), $email);
|
||||
|
||||
notification(array(
|
||||
'type' => "SYSTEM_EMAIL",
|
||||
|
@ -75,7 +75,7 @@ function lostpass_post(App $a) {
|
|||
'preamble'=> $preamble,
|
||||
'body' => $body));
|
||||
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
}
|
||||
|
||||
|
@ -114,10 +114,10 @@ function lostpass_content(App $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="' . App::get_baseurl() . '">' . t('click here to login') . '</a>.',
|
||||
'$lbl5' => '<a href="' . System::baseUrl() . '">' . 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' => App::get_baseurl()
|
||||
'$baseurl' => System::baseUrl()
|
||||
|
||||
));
|
||||
info("Your password has been reset." . EOL);
|
||||
|
@ -142,7 +142,7 @@ function lostpass_content(App $a) {
|
|||
'));
|
||||
|
||||
$preamble = sprintf($preamble, $username);
|
||||
$body = sprintf($body, App::get_baseurl(), $email, $new_password);
|
||||
$body = sprintf($body, System::baseUrl(), $email, $new_password);
|
||||
|
||||
notification(array(
|
||||
'type' => "SYSTEM_EMAIL",
|
||||
|
|
|
@ -92,7 +92,7 @@ function manage_post(App $a) {
|
|||
$ret = array();
|
||||
call_hooks('home_init',$ret);
|
||||
|
||||
goaway( App::get_baseurl() . "/profile/" . $a->user['nickname'] );
|
||||
goaway( System::baseUrl() . "/profile/" . $a->user['nickname'] );
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ function manifest_content(App $a) {
|
|||
}
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$touch_icon' => $touch_icon,
|
||||
'$title' => Config::get('config', 'sitename', 'Friendica'),
|
||||
));
|
||||
|
|
|
@ -27,7 +27,7 @@ function match_content(App $a) {
|
|||
$a->page['aside'] .= findpeople_widget();
|
||||
$a->page['aside'] .= follow_widget();
|
||||
|
||||
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||
$_SESSION['return_url'] = System::baseUrl() . '/' . $a->cmd;
|
||||
|
||||
$r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
|
||||
intval(local_user())
|
||||
|
@ -51,7 +51,7 @@ function match_content(App $a) {
|
|||
if(strlen(get_config('system','directory')))
|
||||
$x = post_url(get_server().'/msearch', $params);
|
||||
else
|
||||
$x = post_url(App::get_baseurl() . '/msearch', $params);
|
||||
$x = post_url(System::baseUrl() . '/msearch', $params);
|
||||
|
||||
$j = json_decode($x);
|
||||
|
||||
|
@ -72,7 +72,7 @@ function match_content(App $a) {
|
|||
|
||||
if (!count($match)) {
|
||||
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
|
||||
$connlnk = App::get_baseurl() . '/follow/?url=' . $jj->url;
|
||||
$connlnk = System::baseUrl() . '/follow/?url=' . $jj->url;
|
||||
$photo_menu = array(
|
||||
'profile' => array(t("View Profile"), zrl($jj->url)),
|
||||
'follow' => array(t("Connect/Follow"), $connlnk)
|
||||
|
|
|
@ -27,17 +27,17 @@ function message_init(App $a) {
|
|||
'$tabs'=>$tabs,
|
||||
'$new'=>$new,
|
||||
));
|
||||
$base = App::get_baseurl();
|
||||
$base = System::baseUrl();
|
||||
|
||||
$head_tpl = get_markup_template('message-head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
$end_tpl = get_markup_template('message-end.tpl');
|
||||
$a->page['end'] .= replace_macros($end_tpl,array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
|
@ -139,7 +139,7 @@ function item_redir_and_replace_images($body, $images, $cid) {
|
|||
|
||||
for($i = 0; $i < count($images); $i++) {
|
||||
$search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is';
|
||||
$replace = '[url=' . z_path() . '/redir/' . $cid
|
||||
$replace = '[url=' . System::baseUrl() . '/redir/' . $cid
|
||||
. '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ;
|
||||
|
||||
$img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]');
|
||||
|
@ -175,7 +175,7 @@ function message_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
|
||||
$myprofile = System::baseUrl().'/profile/' . $a->user['nickname'];
|
||||
|
||||
$tpl = get_markup_template('mail_head.tpl');
|
||||
$header = replace_macros($tpl, array(
|
||||
|
@ -226,7 +226,7 @@ function message_content(App $a) {
|
|||
if ($r) {
|
||||
info( t('Message deleted.') . EOL );
|
||||
}
|
||||
//goaway(App::get_baseurl(true) . '/message' );
|
||||
//goaway(System::baseUrl(true) . '/message' );
|
||||
goaway($_SESSION['return_url']);
|
||||
}
|
||||
else {
|
||||
|
@ -257,7 +257,7 @@ function message_content(App $a) {
|
|||
if($r)
|
||||
info( t('Conversation removed.') . EOL );
|
||||
}
|
||||
//goaway(App::get_baseurl(true) . '/message' );
|
||||
//goaway(System::baseUrl(true) . '/message' );
|
||||
goaway($_SESSION['return_url']);
|
||||
}
|
||||
|
||||
|
@ -269,14 +269,14 @@ function message_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('msg-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('msg-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
@ -416,14 +416,14 @@ function message_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('msg-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('msg-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
@ -556,7 +556,7 @@ function render_messages(array $msg, $t) {
|
|||
$tpl = get_markup_template($t);
|
||||
$rslt = '';
|
||||
|
||||
$myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
|
||||
$myprofile = System::baseUrl().'/profile/' . $a->user['nickname'];
|
||||
|
||||
foreach($msg as $rr) {
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ function mood_init(App $a) {
|
|||
$item_id = item_store($arr);
|
||||
if($item_id) {
|
||||
q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
||||
dbesc(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||
dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||
intval($uid),
|
||||
intval($item_id)
|
||||
);
|
||||
|
|
|
@ -32,8 +32,8 @@ function msearch_post(App $a) {
|
|||
foreach($r as $rr)
|
||||
$results[] = array(
|
||||
'name' => $rr['name'],
|
||||
'url' => App::get_baseurl() . '/profile/' . $rr['nickname'],
|
||||
'photo' => App::get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
|
||||
'url' => System::baseUrl() . '/profile/' . $rr['nickname'],
|
||||
'photo' => System::baseUrl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
|
||||
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords'])
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ function navigation_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('navigation.tpl');
|
||||
return replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$sitelocation' => $nav_info['sitelocation'],
|
||||
'$nav' => $nav_info['nav'],
|
||||
'$banner' => $nav_info['banner'],
|
||||
|
|
|
@ -106,7 +106,7 @@ function network_init(App $a) {
|
|||
|
||||
$redir_url = ($net_queries ? $net_baseurl."?".$net_queries : $net_baseurl);
|
||||
|
||||
goaway(App::get_baseurl() . $redir_url);
|
||||
goaway(System::baseUrl() . $redir_url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ require_once 'include/plugin.php';
|
|||
|
||||
function nodeinfo_wellknown(App $a) {
|
||||
$nodeinfo = array('links' => array(array('rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
|
||||
'href' => App::get_baseurl().'/nodeinfo/1.0')));
|
||||
'href' => System::baseUrl().'/nodeinfo/1.0')));
|
||||
|
||||
header('Content-type: application/json; charset=utf-8');
|
||||
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
|
|
|
@ -37,7 +37,7 @@ function noscrape_init(App $a) {
|
|||
'addr' => $a->profile['addr'],
|
||||
'nick' => $which,
|
||||
'key' => $a->profile['pubkey'],
|
||||
'homepage' => App::get_baseurl()."/profile/{$which}",
|
||||
'homepage' => System::baseUrl()."/profile/{$which}",
|
||||
'comm' => (x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),
|
||||
'photo' => $r[0]["photo"],
|
||||
'tags' => $keywords
|
||||
|
@ -72,7 +72,7 @@ function noscrape_init(App $a) {
|
|||
|
||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||
foreach ($dfrn_pages as $dfrn) {
|
||||
$json_info["dfrn-{$dfrn}"] = App::get_baseurl()."/dfrn_{$dfrn}/{$which}";
|
||||
$json_info["dfrn-{$dfrn}"] = System::baseUrl()."/dfrn_{$dfrn}/{$which}";
|
||||
}
|
||||
|
||||
//Output all the JSON!
|
||||
|
|
|
@ -11,7 +11,7 @@ function notice_init(App $a) {
|
|||
$r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id));
|
||||
if (dbm::is_result($r)) {
|
||||
$nick = $r[0]['nickname'];
|
||||
$url = App::get_baseurl() . "/display/$nick/$id";
|
||||
$url = System::baseUrl() . "/display/$nick/$id";
|
||||
goaway($url);
|
||||
} else {
|
||||
$a->error = 404;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once("include/NotificationsManager.php");
|
||||
require_once("include/contact_selectors.php");
|
||||
|
@ -14,7 +15,7 @@ require_once("include/network.php");
|
|||
function notifications_post(App $a) {
|
||||
|
||||
if (! local_user()) {
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
$request_id = (($a->argc > 1) ? $a->argv[1] : 0);
|
||||
|
|
|
@ -24,14 +24,14 @@ function notify_init(App $a) {
|
|||
$guid = basename($urldata["path"]);
|
||||
$itemdata = get_item_id($guid, local_user());
|
||||
if ($itemdata["id"] != 0) {
|
||||
$note['link'] = App::get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
|
||||
$note['link'] = System::baseUrl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
|
||||
}
|
||||
}
|
||||
|
||||
goaway($note['link']);
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl(true));
|
||||
goaway(System::baseUrl(true));
|
||||
}
|
||||
|
||||
if ($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
|
||||
|
@ -59,7 +59,7 @@ function notify_content(App $a) {
|
|||
if (dbm::is_result($r) > 0) {
|
||||
foreach ($r as $it) {
|
||||
$notif_content .= replace_macros($not_tpl,array(
|
||||
'$item_link' => App::get_baseurl(true).'/notify/view/'. $it['id'],
|
||||
'$item_link' => System::baseUrl(true).'/notify/view/'. $it['id'],
|
||||
'$item_image' => $it['photo'],
|
||||
'$item_text' => strip_tags(bbcode($it['msg'])),
|
||||
'$item_when' => relative_date($it['date'])
|
||||
|
|
|
@ -8,7 +8,7 @@ function oexchange_init(App $a) {
|
|||
if (($a->argc > 1) && ($a->argv[1] === 'xrd')) {
|
||||
$tpl = get_markup_template('oexchange_xrd.tpl');
|
||||
|
||||
$o = replace_macros($tpl, array('$base' => App::get_baseurl()));
|
||||
$o = replace_macros($tpl, array('$base' => System::baseUrl()));
|
||||
echo $o;
|
||||
killme();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ function oexchange_content(App $a) {
|
|||
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
|
||||
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
|
||||
|
||||
$s = fetch_url(App::get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
|
||||
$s = fetch_url(System::baseUrl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
|
||||
|
||||
if (! strlen($s)) {
|
||||
return;
|
||||
|
|
|
@ -9,7 +9,7 @@ function openid_content(App $a) {
|
|||
|
||||
$noid = get_config('system','no_openid');
|
||||
if($noid)
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
logger('mod_openid ' . print_r($_REQUEST,true), LOGGER_DATA);
|
||||
|
||||
|
@ -23,7 +23,7 @@ function openid_content(App $a) {
|
|||
|
||||
if(! strlen($authid)) {
|
||||
logger( t('OpenID protocol error. No ID returned.') . EOL);
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
// NOTE: we search both for normalised and non-normalised form of $authid
|
||||
|
@ -51,7 +51,7 @@ function openid_content(App $a) {
|
|||
// just in case there was no return url set
|
||||
// and we fell through
|
||||
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
// Successful OpenID login - but we can't match it to an existing account.
|
||||
|
@ -59,7 +59,7 @@ function openid_content(App $a) {
|
|||
|
||||
if ($a->config['register_policy'] == REGISTER_CLOSED) {
|
||||
notice( t('Account not found and OpenID registration is not permitted on this site.') . EOL);
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
unset($_SESSION['register']);
|
||||
|
@ -103,12 +103,12 @@ function openid_content(App $a) {
|
|||
|
||||
$args .= '&openid_url=' . urlencode(notags(trim($authid)));
|
||||
|
||||
goaway(App::get_baseurl() . '/register?' . $args);
|
||||
goaway(System::baseUrl() . '/register?' . $args);
|
||||
|
||||
// NOTREACHED
|
||||
}
|
||||
}
|
||||
notice( t('Login failed.') . EOL);
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
// NOTREACHED
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ function opensearch_content(App $a) {
|
|||
header("Content-type: application/opensearchdescription+xml");
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$nodename' => $a->get_hostname(),
|
||||
));
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ function ostatus_subscribe_content(App $a) {
|
|||
$total = sizeof($friends);
|
||||
|
||||
if ($counter >= $total) {
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/settings/connectors">';
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/settings/connectors">';
|
||||
del_pconfig($uid, "ostatus", "legacy_friends");
|
||||
del_pconfig($uid, "ostatus", "legacy_contact");
|
||||
$o .= t("Done");
|
||||
|
@ -80,7 +80,7 @@ function ostatus_subscribe_content(App $a) {
|
|||
|
||||
$o .= "<p>".t("Keep this window open until done.")."</p>";
|
||||
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?counter='.$counter.'">';
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/ostatus_subscribe?counter='.$counter.'">';
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ function p_init($a){
|
|||
$parts = parse_url($r[0]["author-link"]);
|
||||
$host = $parts["scheme"]."://".$parts["host"];
|
||||
|
||||
if (normalise_link($host) != normalise_link(App::get_baseurl())) {
|
||||
if (normalise_link($host) != normalise_link(System::baseUrl())) {
|
||||
$location = $host."/p/".urlencode($guid).".xml";
|
||||
|
||||
header("HTTP/1.1 301 Moved Permanently");
|
||||
|
|
|
@ -96,7 +96,7 @@ function photos_init(App $a) {
|
|||
'$title' => t('Photo Albums'),
|
||||
'$recent' => t('Recent Photos'),
|
||||
'$albums' => $albums['albums'],
|
||||
'$baseurl' => z_root(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$upload' => array(t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload'),
|
||||
'$can_post' => $can_post
|
||||
));
|
||||
|
@ -374,7 +374,7 @@ function photos_post(App $a) {
|
|||
create_tags_from_itemuri($i[0]['uri'], $page_owner_uid);
|
||||
delete_thread_uri($i[0]['uri'], $page_owner_uid);
|
||||
|
||||
$url = App::get_baseurl();
|
||||
$url = System::baseUrl();
|
||||
$drop_id = intval($i[0]['id']);
|
||||
|
||||
// Update the photo albums cache
|
||||
|
@ -526,8 +526,8 @@ function photos_post(App $a) {
|
|||
$arr['visible'] = $visibility;
|
||||
$arr['origin'] = 1;
|
||||
|
||||
$arr['body'] = '[url=' . App::get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
|
||||
. '[img]' . App::get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
|
||||
$arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
|
||||
. '[img]' . System::baseUrl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
|
||||
. '[/url]';
|
||||
|
||||
$item_id = item_store($arr);
|
||||
|
@ -641,7 +641,7 @@ function photos_post(App $a) {
|
|||
}
|
||||
} elseif (strpos($tag, '#') === 0) {
|
||||
$tagname = substr($tag, 1);
|
||||
$str_tags .= '#[url=' . App::get_baseurl() . "/search?tag=" . $tagname . ']' . $tagname . '[/url]';
|
||||
$str_tags .= '#[url=' . System::baseUrl() . "/search?tag=" . $tagname . ']' . $tagname . '[/url]';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -713,8 +713,8 @@ function photos_post(App $a) {
|
|||
$arr['tag'] = $tagged[4];
|
||||
$arr['inform'] = $tagged[2];
|
||||
$arr['origin'] = 1;
|
||||
$arr['body'] = sprintf( t('%1$s was tagged in %2$s by %3$s'), '[url=' . $tagged[1] . ']' . $tagged[0] . '[/url]', '[url=' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . t('a photo') . '[/url]', '[url=' . $owner_record['url'] . ']' . $owner_record['name'] . '[/url]') ;
|
||||
$arr['body'] .= "\n\n" . '[url=' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . App::get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '[/img][/url]' . "\n" ;
|
||||
$arr['body'] = sprintf( t('%1$s was tagged in %2$s by %3$s'), '[url=' . $tagged[1] . ']' . $tagged[0] . '[/url]', '[url=' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . t('a photo') . '[/url]', '[url=' . $owner_record['url'] . ']' . $owner_record['name'] . '[/url]') ;
|
||||
$arr['body'] .= "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . System::baseUrl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '[/img][/url]' . "\n" ;
|
||||
|
||||
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $tagged[0] . '</title><id>' . $tagged[1] . '/' . $tagged[0] . '</id>';
|
||||
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $tagged[1] . '" />' . "\n");
|
||||
|
@ -724,8 +724,8 @@ function photos_post(App $a) {
|
|||
$arr['object'] .= '</link></object>' . "\n";
|
||||
|
||||
$arr['target'] = '<target><type>' . ACTIVITY_OBJ_IMAGE . '</type><title>' . $p[0]['desc'] . '</title><id>'
|
||||
. App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '</id>';
|
||||
$arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . App::get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>';
|
||||
. System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '</id>';
|
||||
$arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . System::baseUrl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>';
|
||||
|
||||
$item_id = item_store($arr);
|
||||
if ($item_id) {
|
||||
|
@ -943,8 +943,8 @@ function photos_post(App $a) {
|
|||
$arr['visible'] = $visible;
|
||||
$arr['origin'] = 1;
|
||||
|
||||
$arr['body'] = '[url=' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
|
||||
. '[img]' . App::get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
|
||||
$arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
|
||||
. '[img]' . System::baseUrl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
|
||||
. '[/url]';
|
||||
|
||||
$item_id = item_store($arr);
|
||||
|
|
10
mod/ping.php
10
mod/ping.php
|
@ -183,7 +183,7 @@ function ping_init(App $a)
|
|||
$intro_count = count($intros1) + count($intros2);
|
||||
$intros = $intros1 + $intros2;
|
||||
|
||||
$myurl = App::get_baseurl() . '/profile/' . $a->user['nickname'] ;
|
||||
$myurl = System::baseUrl() . '/profile/' . $a->user['nickname'] ;
|
||||
$mails = qu("SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
|
||||
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
|
||||
intval(local_user()),
|
||||
|
@ -266,7 +266,7 @@ function ping_init(App $a)
|
|||
if (dbm::is_result($intros)) {
|
||||
foreach ($intros as $intro) {
|
||||
$notif = array(
|
||||
'href' => App::get_baseurl() . '/notifications/intros/' . $intro['id'],
|
||||
'href' => System::baseUrl() . '/notifications/intros/' . $intro['id'],
|
||||
'name' => $intro['name'],
|
||||
'url' => $intro['url'],
|
||||
'photo' => $intro['photo'],
|
||||
|
@ -281,7 +281,7 @@ function ping_init(App $a)
|
|||
if (dbm::is_result($mails)) {
|
||||
foreach ($mails as $mail) {
|
||||
$notif = array(
|
||||
'href' => App::get_baseurl() . '/message/' . $mail['id'],
|
||||
'href' => System::baseUrl() . '/message/' . $mail['id'],
|
||||
'name' => $mail['from-name'],
|
||||
'url' => $mail['from-url'],
|
||||
'photo' => $mail['from-photo'],
|
||||
|
@ -296,7 +296,7 @@ function ping_init(App $a)
|
|||
if (dbm::is_result($regs)) {
|
||||
foreach ($regs as $reg) {
|
||||
$notif = array(
|
||||
'href' => App::get_baseurl() . '/admin/users/',
|
||||
'href' => System::baseUrl() . '/admin/users/',
|
||||
'name' => $reg['name'],
|
||||
'url' => $reg['url'],
|
||||
'photo' => $reg['micro'],
|
||||
|
@ -473,7 +473,7 @@ function ping_get_notifications($uid)
|
|||
);
|
||||
}
|
||||
|
||||
$notification["href"] = App::get_baseurl() . "/notify/view/" . $notification["id"];
|
||||
$notification["href"] = System::baseUrl() . "/notify/view/" . $notification["id"];
|
||||
|
||||
if ($notification["visible"] && !$notification["spam"] &&
|
||||
!$notification["deleted"] && !is_array($result[$notification["parent"]])) {
|
||||
|
|
|
@ -124,7 +124,7 @@ function poke_init(App $a) {
|
|||
$arr['origin'] = 1;
|
||||
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
|
||||
|
||||
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $target['name'] . '</title><id>' . App::get_baseurl() . '/contact/' . $target['id'] . '</id>';
|
||||
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $target['name'] . '</title><id>' . System::baseUrl() . '/contact/' . $target['id'] . '</id>';
|
||||
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $target['url'] . '" />' . "\n");
|
||||
|
||||
$arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
|
||||
|
@ -133,7 +133,7 @@ function poke_init(App $a) {
|
|||
$item_id = item_store($arr);
|
||||
if($item_id) {
|
||||
//q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
||||
// dbesc(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||
// dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||
// intval($uid),
|
||||
// intval($item_id)
|
||||
//);
|
||||
|
@ -172,11 +172,11 @@ function poke_content(App $a) {
|
|||
}
|
||||
|
||||
|
||||
$base = App::get_baseurl();
|
||||
$base = System::baseUrl();
|
||||
|
||||
$head_tpl = get_markup_template('poke_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ function profile_init(App $a) {
|
|||
else {
|
||||
$r = q("select nickname from user where blocked = 0 and account_expired = 0 and account_removed = 0 and verified = 1 order by rand() limit 1");
|
||||
if (dbm::is_result($r)) {
|
||||
goaway(App::get_baseurl() . '/profile/' . $r[0]['nickname']);
|
||||
goaway(System::baseUrl() . '/profile/' . $r[0]['nickname']);
|
||||
}
|
||||
else {
|
||||
logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG);
|
||||
|
@ -59,16 +59,16 @@ function profile_init(App $a) {
|
|||
}
|
||||
|
||||
$a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
|
||||
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . App::get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . App::get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||
header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||
foreach ($dfrn_pages as $dfrn) {
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".App::get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".System::baseUrl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||
}
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-poco\" href=\"".App::get_baseurl()."/poco/{$which}\" />\r\n";
|
||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-poco\" href=\"".System::baseUrl()."/poco/{$which}\" />\r\n";
|
||||
|
||||
}
|
||||
|
||||
|
@ -180,8 +180,8 @@ function profile_content(App $a, $update = 0) {
|
|||
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
||||
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
||||
|
||||
$a->page['aside'] .= posted_date_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
||||
$a->page['aside'] .= categories_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
||||
$a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
||||
$a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
||||
|
||||
if (can_write_wall($a,$a->profile['profile_uid'])) {
|
||||
|
||||
|
|
|
@ -103,15 +103,15 @@ function profile_photo_post(App $a) {
|
|||
);
|
||||
|
||||
$r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `self` AND `uid` = %d",
|
||||
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
|
||||
intval(local_user())
|
||||
);
|
||||
} else {
|
||||
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
|
||||
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
intval($_REQUEST['profile']),
|
||||
intval(local_user())
|
||||
);
|
||||
|
@ -127,7 +127,7 @@ function profile_photo_post(App $a) {
|
|||
|
||||
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
|
||||
// Update global directory in background
|
||||
$url = App::get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||
$url = System::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
if ($url && strlen(get_config('system','directory'))) {
|
||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ function profile_photo_post(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/profiles');
|
||||
goaway(System::baseUrl() . '/profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ function profile_photo_content(App $a) {
|
|||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/profiles');
|
||||
goaway(System::baseUrl() . '/profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
$ph = new Photo($r[0]['data'], $r[0]['type']);
|
||||
|
@ -257,7 +257,7 @@ function profile_photo_content(App $a) {
|
|||
'$submit' => t('Upload'),
|
||||
'$profiles' => $profiles,
|
||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . App::get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. App::get_baseurl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
|
||||
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . System::baseUrl() . '">' . t('skip this step') . '</a>' : '<a href="'. System::baseUrl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
@ -270,7 +270,7 @@ function profile_photo_content(App $a) {
|
|||
'$filename' => $filename,
|
||||
'$profile' => intval($_REQUEST['profile']),
|
||||
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
|
||||
'$image_url' => App::get_baseurl() . '/photo/' . $filename,
|
||||
'$image_url' => System::baseUrl() . '/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"),
|
||||
|
|
|
@ -628,10 +628,10 @@ function profiles_content(App $a) {
|
|||
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
));
|
||||
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
));
|
||||
|
||||
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
|
||||
|
@ -708,7 +708,7 @@ function profiles_content(App $a) {
|
|||
'$lbl_ex2' => t('Example: fishing photography software'),
|
||||
|
||||
'$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$profile_id' => $r[0]['id'],
|
||||
'$profile_name' => array('profile_name', t('Profile Name:'), $r[0]['profile-name'], t('Required'), '*'),
|
||||
'$is_default' => $is_default,
|
||||
|
|
|
@ -266,7 +266,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
|||
|
||||
// Only continue if it isn't a local image and the isn't deactivated
|
||||
if (proxy_is_local_image($url)) {
|
||||
$url = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $url);
|
||||
$url = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $url);
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
|||
$longpath .= '.' . $extension;
|
||||
}
|
||||
|
||||
$proxypath = App::get_baseurl() . '/proxy/' . $longpath;
|
||||
$proxypath = System::baseUrl() . '/proxy/' . $longpath;
|
||||
|
||||
if ($size != '') {
|
||||
$size = ':' . $size;
|
||||
|
@ -310,7 +310,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
|||
if ((strlen($proxypath) > 250) && $writemode) {
|
||||
return $shortpath;
|
||||
} elseif (strlen($proxypath) > 250) {
|
||||
return App::get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
|
||||
return System::baseUrl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
|
||||
} elseif ($writemode) {
|
||||
return $longpath;
|
||||
} else {
|
||||
|
@ -332,7 +332,7 @@ function proxy_is_local_image($url) {
|
|||
}
|
||||
|
||||
// links normalised - bug #431
|
||||
$baseurl = normalise_link(App::get_baseurl());
|
||||
$baseurl = normalise_link(System::baseUrl());
|
||||
$url = normalise_link($url);
|
||||
return (substr($url, 0, strlen($baseurl)) == $baseurl);
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ function proxy_img_cb($matches) {
|
|||
}
|
||||
|
||||
function proxy_parse_html($html) {
|
||||
$html = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $html);
|
||||
$html = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $html);
|
||||
|
||||
return preg_replace_callback('/(<img [^>]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'proxy_img_cb', $html);
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@ function randprof_init(App $a) {
|
|||
goaway(zrl($x));
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/profile');
|
||||
goaway(System::baseUrl() . '/profile');
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ function redir_init(App $a) {
|
|||
);
|
||||
|
||||
if((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
$cid = $r[0]['id'];
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ function redir_init(App $a) {
|
|||
);
|
||||
|
||||
if((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
$dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);
|
||||
|
@ -67,7 +67,7 @@ function redir_init(App $a) {
|
|||
}
|
||||
|
||||
if (local_user()) {
|
||||
$handle = $a->user['nickname'] . '@' . substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3);
|
||||
$handle = $a->user['nickname'] . '@' . substr(System::baseUrl(),strpos(System::baseUrl(),'://')+3);
|
||||
}
|
||||
if (remote_user()) {
|
||||
$handle = $_SESSION['handle'];
|
||||
|
@ -78,5 +78,5 @@ function redir_init(App $a) {
|
|||
goaway($url);
|
||||
}
|
||||
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ function register_post(App $a) {
|
|||
$user = $result['user'];
|
||||
|
||||
if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
|
||||
$url = App::get_baseurl() . '/profile/' . $user['nickname'];
|
||||
$url = System::baseUrl() . '/profile/' . $user['nickname'];
|
||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||
}
|
||||
|
||||
|
@ -89,13 +89,13 @@ function register_post(App $a) {
|
|||
$res = send_register_open_eml(
|
||||
$user['email'],
|
||||
$a->config['sitename'],
|
||||
App::get_baseurl(),
|
||||
System::baseUrl(),
|
||||
$user['username'],
|
||||
$result['password']);
|
||||
|
||||
if($res) {
|
||||
info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
} else {
|
||||
notice(
|
||||
sprintf(
|
||||
|
@ -107,13 +107,13 @@ function register_post(App $a) {
|
|||
}
|
||||
} else {
|
||||
info( t('Registration successful.') . EOL ) ;
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
}
|
||||
elseif($a->config['register_policy'] == REGISTER_APPROVE) {
|
||||
if(! strlen($a->config['admin_email'])) {
|
||||
notice( t('Your registration can not be processed.') . EOL);
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
$hash = random_string();
|
||||
|
@ -146,9 +146,9 @@ function register_post(App $a) {
|
|||
'source_name' => $user['username'],
|
||||
'source_mail' => $user['email'],
|
||||
'source_nick' => $user['nickname'],
|
||||
'source_link' => App::get_baseurl()."/admin/users/",
|
||||
'link' => App::get_baseurl()."/admin/users/",
|
||||
'source_photo' => App::get_baseurl() . "/photo/avatar/".$user['uid'].".jpg",
|
||||
'source_link' => System::baseUrl()."/admin/users/",
|
||||
'link' => System::baseUrl()."/admin/users/",
|
||||
'source_photo' => System::baseUrl() . "/photo/avatar/".$user['uid'].".jpg",
|
||||
'to_email' => $admin['email'],
|
||||
'uid' => $admin['uid'],
|
||||
'language' => ($admin['language']?$admin['language']:'en'),
|
||||
|
@ -162,7 +162,7 @@ function register_post(App $a) {
|
|||
$user['username']);
|
||||
|
||||
info( t('Your registration is pending approval by the site owner.') . EOL ) ;
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ function user_allow($hash) {
|
|||
intval($user[0]['uid'])
|
||||
);
|
||||
if (dbm::is_result($r) && $r[0]['net-publish']) {
|
||||
$url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
|
||||
$url = System::baseUrl() . '/profile/' . $user[0]['nickname'];
|
||||
if ($url && strlen(get_config('system','directory'))) {
|
||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ function user_allow($hash) {
|
|||
send_register_open_eml(
|
||||
$user[0]['email'],
|
||||
$a->config['sitename'],
|
||||
App::get_baseurl(),
|
||||
System::baseUrl(),
|
||||
$user[0]['username'],
|
||||
$register[0]['password']);
|
||||
|
||||
|
@ -119,13 +119,13 @@ function regmod_content(App $a) {
|
|||
|
||||
if ($cmd === 'deny') {
|
||||
user_deny($hash);
|
||||
goaway(App::get_baseurl()."/admin/users/");
|
||||
goaway(System::baseUrl()."/admin/users/");
|
||||
killme();
|
||||
}
|
||||
|
||||
if ($cmd === 'allow') {
|
||||
user_allow($hash);
|
||||
goaway(App::get_baseurl()."/admin/users/");
|
||||
goaway(System::baseUrl()."/admin/users/");
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ function removeme_post(App $a) {
|
|||
function removeme_content(App $a) {
|
||||
|
||||
if (! local_user()) {
|
||||
goaway(z_root());
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
$hash = random_string();
|
||||
|
@ -50,7 +50,7 @@ function removeme_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template('removeme.tpl');
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$basedir' => App::get_baseurl(),
|
||||
'$basedir' => System::baseUrl(),
|
||||
'$hash' => $hash,
|
||||
'$title' => t('Remove My Account'),
|
||||
'$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
|
||||
|
|
|
@ -54,7 +54,7 @@ function repair_ostatus_content(App $a) {
|
|||
|
||||
$result = new_contact($uid,$r[0]["url"],true);
|
||||
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.App::get_baseurl().'/repair_ostatus?counter='.$counter.'">';
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.System::baseUrl().'/repair_ostatus?counter='.$counter.'">';
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ function rsd_xml_content(App $a)
|
|||
<engineName>Friendica</engineName>
|
||||
<engineLink>http://friendica.com/</engineLink>
|
||||
<apis>
|
||||
<api name="Twitter" preferred="true" apiLink="'.App::get_baseurl().'/api/" blogID="">
|
||||
<api name="Twitter" preferred="true" apiLink="'.System::baseUrl().'/api/" blogID="">
|
||||
<settings>
|
||||
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
|
||||
<setting name="OAuth">false</setting>
|
||||
|
|
|
@ -143,7 +143,7 @@ function settings_post(App $a) {
|
|||
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
|
||||
dbesc($key),
|
||||
local_user());
|
||||
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||
goaway(System::baseUrl(true)."/settings/oauth/");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ function settings_post(App $a) {
|
|||
local_user());
|
||||
}
|
||||
}
|
||||
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||
goaway(System::baseUrl(true)."/settings/oauth/");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ function settings_content(App $a) {
|
|||
$r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
|
||||
dbesc($a->argv[3]),
|
||||
local_user());
|
||||
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||
goaway(System::baseUrl(true)."/settings/oauth/");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -739,7 +739,7 @@ function settings_content(App $a) {
|
|||
$tpl = get_markup_template("settings_oauth.tpl");
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$form_security_token' => get_form_security_token("settings_oauth"),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$title' => t('Connected Apps'),
|
||||
'$add' => t('Add application'),
|
||||
'$edit' => t('Edit'),
|
||||
|
@ -829,7 +829,7 @@ function settings_content(App $a) {
|
|||
|
||||
/// @TODO Found to much different usage to test empty/non-empty strings (e.g. empty(), trim() == '' ) which is wanted?
|
||||
if ($legacy_contact != "") {
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
|
||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
|
||||
}
|
||||
|
||||
$settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
|
||||
|
@ -838,7 +838,7 @@ function settings_content(App $a) {
|
|||
$settings_connectors .= '<span class="field_help">'.t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.').'</span>';
|
||||
$settings_connectors .= '</div>';
|
||||
|
||||
$settings_connectors .= '<p><a href="'.App::get_baseurl().'/repair_ostatus">'.t("Repair OStatus subscriptions").'</a></p>';
|
||||
$settings_connectors .= '<p><a href="'.System::baseUrl().'/repair_ostatus">'.t("Repair OStatus subscriptions").'</a></p>';
|
||||
|
||||
$settings_connectors .= '<div class="settings-submit-wrapper" ><input type="submit" name="general-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
|
||||
|
||||
|
@ -1005,7 +1005,7 @@ function settings_content(App $a) {
|
|||
'$ptitle' => t('Display Settings'),
|
||||
'$form_security_token' => get_form_security_token("settings_display"),
|
||||
'$submit' => t('Save Settings'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$uid' => local_user(),
|
||||
|
||||
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
|
||||
|
@ -1223,7 +1223,7 @@ function settings_content(App $a) {
|
|||
$tpl_addr = get_markup_template("settings_nick_set.tpl");
|
||||
|
||||
$prof_addr = replace_macros($tpl_addr,array(
|
||||
'$desc' => sprintf(t("Your Identity Address is <strong>'%s'</strong> or '%s'."), $nickname.'@'.$a->get_hostname().$a->get_path(), App::get_baseurl().'/profile/'.$nickname),
|
||||
'$desc' => sprintf(t("Your Identity Address is <strong>'%s'</strong> or '%s'."), $nickname.'@'.$a->get_hostname().$a->get_path(), System::baseUrl().'/profile/'.$nickname),
|
||||
'$basepath' => $a->get_hostname()
|
||||
));
|
||||
|
||||
|
@ -1271,7 +1271,7 @@ function settings_content(App $a) {
|
|||
'$ptitle' => t('Account Settings'),
|
||||
|
||||
'$submit' => t('Save Settings'),
|
||||
'$baseurl' => App::get_baseurl(true),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$uid' => local_user(),
|
||||
'$form_security_token' => get_form_security_token("settings"),
|
||||
'$nickname_block' => $prof_addr,
|
||||
|
|
|
@ -49,7 +49,7 @@ function starred_init(App $a) {
|
|||
$rand = "?$rand";
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . "/" . $return_path . $rand);
|
||||
goaway(System::baseUrl() . "/" . $return_path . $rand);
|
||||
}
|
||||
|
||||
// the json doesn't really matter, it will either be 0 or 1
|
||||
|
|
|
@ -89,7 +89,7 @@ function subthread_content(App $a) {
|
|||
|
||||
$post_type = (($item['resource-id']) ? t('photo') : t('status'));
|
||||
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
$body = $item['body'];
|
||||
|
||||
$obj = <<< EOT
|
||||
|
@ -131,7 +131,7 @@ EOT;
|
|||
|
||||
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
||||
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
|
||||
$plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
||||
$plink = '[url=' . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
||||
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
|
||||
|
||||
$arr['verb'] = $activity;
|
||||
|
|
|
@ -62,7 +62,7 @@ function suggest_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||
$_SESSION['return_url'] = System::baseUrl() . '/' . $a->cmd;
|
||||
|
||||
$a->page['aside'] .= findpeople_widget();
|
||||
$a->page['aside'] .= follow_widget();
|
||||
|
@ -79,8 +79,8 @@ function suggest_content(App $a) {
|
|||
|
||||
foreach ($r as $rr) {
|
||||
|
||||
$connlnk = App::get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
||||
$ignlnk = App::get_baseurl() . '/suggest?ignore=' . $rr['id'];
|
||||
$connlnk = System::baseUrl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
||||
$ignlnk = System::baseUrl() . '/suggest?ignore=' . $rr['id'];
|
||||
$photo_menu = array(
|
||||
'profile' => array(t("View Profile"), zrl($rr["url"])),
|
||||
'follow' => array(t("Connect/Follow"), $connlnk),
|
||||
|
|
|
@ -65,7 +65,7 @@ function tagger_content(App $a) {
|
|||
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
|
||||
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="'
|
||||
. App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
. System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||
|
||||
$body = xmlify($item['body']);
|
||||
|
||||
|
@ -80,7 +80,7 @@ function tagger_content(App $a) {
|
|||
</target>
|
||||
EOT;
|
||||
|
||||
$tagid = App::get_baseurl() . '/search?tag=' . $term;
|
||||
$tagid = System::baseUrl() . '/search?tag=' . $term;
|
||||
$objtype = ACTIVITY_OBJ_TAGTERM;
|
||||
|
||||
$obj = <<< EOT
|
||||
|
@ -100,7 +100,7 @@ EOT;
|
|||
return;
|
||||
}
|
||||
|
||||
$termlink = html_entity_decode('⌗') . '[url=' . App::get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
|
||||
$termlink = html_entity_decode('⌗') . '[url=' . System::baseUrl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
|
||||
|
||||
$arr = array();
|
||||
|
||||
|
@ -143,7 +143,7 @@ EOT;
|
|||
$post_id = item_store($arr);
|
||||
|
||||
// q("UPDATE `item` set plink = '%s' where id = %d",
|
||||
// dbesc(App::get_baseurl() . '/display/' . $owner_nick . '/' . $post_id),
|
||||
// dbesc(System::baseUrl() . '/display/' . $owner_nick . '/' . $post_id),
|
||||
// intval($post_id)
|
||||
// );
|
||||
|
||||
|
@ -162,7 +162,7 @@ EOT;
|
|||
);
|
||||
if((! $blocktags) && $t[0]['tcount']==0 ) {
|
||||
/*q("update item set tag = '%s' where id = %d",
|
||||
dbesc($item['tag'] . (strlen($item['tag']) ? ',' : '') . '#[url=' . App::get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||
dbesc($item['tag'] . (strlen($item['tag']) ? ',' : '') . '#[url=' . System::baseUrl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||
intval($item['id'])
|
||||
);*/
|
||||
|
||||
|
@ -171,7 +171,7 @@ EOT;
|
|||
$term_objtype,
|
||||
TERM_HASHTAG,
|
||||
dbesc($term),
|
||||
dbesc(App::get_baseurl() . '/search?tag=' . $term),
|
||||
dbesc(System::baseUrl() . '/search?tag=' . $term),
|
||||
intval($owner_uid)
|
||||
);
|
||||
}
|
||||
|
@ -195,14 +195,14 @@ EOT;
|
|||
$term_objtype,
|
||||
TERM_HASHTAG,
|
||||
dbesc($term),
|
||||
dbesc(App::get_baseurl() . '/search?tag=' . $term),
|
||||
dbesc(System::baseUrl() . '/search?tag=' . $term),
|
||||
intval($owner_uid)
|
||||
);
|
||||
}
|
||||
|
||||
/*if(count($x) && !$x[0]['blocktags'] && (! stristr($r[0]['tag'], ']' . $term . '['))) {
|
||||
q("update item set tag = '%s' where id = %d",
|
||||
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . App::get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . System::baseUrl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
}*/
|
||||
|
|
|
@ -8,11 +8,11 @@ require_once('include/bbcode.php');
|
|||
function tagrm_post(App $a) {
|
||||
|
||||
if (! local_user()) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
if ((x($_POST,'submit')) && ($_POST['submit'] === t('Cancel'))) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
$tag = ((x($_POST,'tag')) ? hex2bin(notags(trim($_POST['tag']))) : '');
|
||||
|
@ -24,7 +24,7 @@ function tagrm_post(App $a) {
|
|||
);
|
||||
|
||||
if (! dbm::is_result($r)) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
$arr = explode(',', $r[0]['tag']);
|
||||
|
@ -44,7 +44,7 @@ function tagrm_post(App $a) {
|
|||
);
|
||||
|
||||
info( t('Tag removed') . EOL );
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
|
||||
// NOTREACHED
|
||||
|
||||
|
@ -57,13 +57,13 @@ function tagrm_content(App $a) {
|
|||
$o = '';
|
||||
|
||||
if (! local_user()) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
$item = (($a->argc > 1) ? intval($a->argv[1]) : 0);
|
||||
if (! $item) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -73,13 +73,13 @@ function tagrm_content(App $a) {
|
|||
);
|
||||
|
||||
if (! dbm::is_result($r)) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
$arr = explode(',', $r[0]['tag']);
|
||||
|
||||
if (! count($arr)) {
|
||||
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
|
||||
}
|
||||
|
||||
$o .= '<h3>' . t('Remove Item Tag') . '</h3>';
|
||||
|
|
|
@ -14,7 +14,7 @@ function toggle_mobile_init(App $a) {
|
|||
if (isset($_GET['address'])) {
|
||||
$address = $_GET['address'];
|
||||
} else {
|
||||
$address = App::get_baseurl();
|
||||
$address = System::baseUrl();
|
||||
}
|
||||
|
||||
goaway($address);
|
||||
|
|
|
@ -43,7 +43,7 @@ function uexport_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template("uexport.tpl");
|
||||
return replace_macros($tpl, array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t('Export personal data'),
|
||||
'$options' => $options
|
||||
));
|
||||
|
@ -114,7 +114,7 @@ function uexport_account($a) {
|
|||
$output = array(
|
||||
'version' => FRIENDICA_VERSION,
|
||||
'schema' => DB_UPDATE_VERSION,
|
||||
'baseurl' => App::get_baseurl(),
|
||||
'baseurl' => System::baseUrl(),
|
||||
'user' => $user,
|
||||
'contact' => $contact,
|
||||
'profile' => $profile,
|
||||
|
|
|
@ -62,7 +62,7 @@ function videos_init(App $a) {
|
|||
|
||||
if($albums_visible) {
|
||||
$o .= '<div id="sidebar-photos-albums" class="widget">';
|
||||
$o .= '<h3>' . '<a href="' . App::get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
|
||||
$o .= '<h3>' . '<a href="' . System::baseUrl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
|
||||
|
||||
$o .= '<ul>';
|
||||
foreach($albums as $album) {
|
||||
|
@ -77,7 +77,7 @@ function videos_init(App $a) {
|
|||
$o .= '</ul>';
|
||||
}
|
||||
if(local_user() && $a->data['user']['uid'] == local_user()) {
|
||||
$o .= '<div id="photo-albums-upload-link"><a href="' . App::get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
|
||||
$o .= '<div id="photo-albums-upload-link"><a href="' . System::baseUrl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
|
||||
}
|
||||
|
||||
$o .= '</div>';
|
||||
|
@ -90,12 +90,12 @@ function videos_init(App $a) {
|
|||
|
||||
$tpl = get_markup_template("videos_head.tpl");
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
|
||||
$tpl = get_markup_template("videos_end.tpl");
|
||||
$a->page['end'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
));
|
||||
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ function videos_post(App $a) {
|
|||
$owner_uid = $a->data['user']['uid'];
|
||||
|
||||
if (local_user() != $owner_uid) {
|
||||
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||
goaway(System::baseUrl() . '/videos/' . $a->data['user']['nickname']);
|
||||
}
|
||||
|
||||
if (($a->argc == 2) && x($_POST,'delete') && x($_POST, 'id')) {
|
||||
|
@ -118,7 +118,7 @@ function videos_post(App $a) {
|
|||
// Check if we should do HTML-based delete confirmation
|
||||
if (!x($_REQUEST,'confirm')) {
|
||||
if (x($_REQUEST,'canceled')) {
|
||||
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||
goaway(System::baseUrl() . '/videos/' . $a->data['user']['nickname']);
|
||||
}
|
||||
|
||||
$drop_url = $a->query_string;
|
||||
|
@ -166,7 +166,7 @@ function videos_post(App $a) {
|
|||
create_tags_from_itemuri($i[0]['uri'], local_user());
|
||||
delete_thread_uri($i[0]['uri'], local_user());
|
||||
|
||||
$url = App::get_baseurl();
|
||||
$url = System::baseUrl();
|
||||
$drop_id = intval($i[0]['id']);
|
||||
|
||||
if ($i[0]['visible']) {
|
||||
|
@ -175,11 +175,11 @@ function videos_post(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||
goaway(System::baseUrl() . '/videos/' . $a->data['user']['nickname']);
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||
goaway(System::baseUrl() . '/videos/' . $a->data['user']['nickname']);
|
||||
|
||||
}
|
||||
|
||||
|
@ -385,13 +385,13 @@ function videos_content(App $a) {
|
|||
|
||||
$videos[] = array(
|
||||
'id' => $rr['id'],
|
||||
'link' => App::get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
|
||||
'link' => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
|
||||
'title' => t('View Video'),
|
||||
'src' => App::get_baseurl() . '/attach/' . $rr['id'] . '?attachment=0',
|
||||
'src' => System::baseUrl() . '/attach/' . $rr['id'] . '?attachment=0',
|
||||
'alt' => $alt_e,
|
||||
'mime' => $rr['filetype'],
|
||||
'album' => array(
|
||||
'link' => App::get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
||||
'link' => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
||||
'name' => $name_e,
|
||||
'alt' => t('View Album'),
|
||||
),
|
||||
|
@ -404,9 +404,9 @@ function videos_content(App $a) {
|
|||
$o .= replace_macros($tpl, array(
|
||||
'$title' => t('Recent Videos'),
|
||||
'$can_post' => $can_post,
|
||||
'$upload' => array(t('Upload New Videos'), App::get_baseurl().'/videos/'.$a->data['user']['nickname'].'/upload'),
|
||||
'$upload' => array(t('Upload New Videos'), System::baseUrl().'/videos/'.$a->data['user']['nickname'].'/upload'),
|
||||
'$videos' => $videos,
|
||||
'$delete_url' => (($can_post)?App::get_baseurl().'/videos/'.$a->data['user']['nickname']:False)
|
||||
'$delete_url' => (($can_post)?System::baseUrl().'/videos/'.$a->data['user']['nickname']:False)
|
||||
));
|
||||
|
||||
|
||||
|
|
|
@ -302,9 +302,9 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
$picture["width"] = $r[0]["width"];
|
||||
$picture["height"] = $r[0]["height"];
|
||||
$picture["type"] = $r[0]["type"];
|
||||
$picture["albumpage"] = App::get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash;
|
||||
$picture["picture"] = App::get_baseurl() . "/photo/{$hash}-0." . $ph->getExt();
|
||||
$picture["preview"] = App::get_baseurl() . "/photo/{$hash}-{$smallest}." . $ph->getExt();
|
||||
$picture["albumpage"] = System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash;
|
||||
$picture["picture"] = System::baseUrl() . "/photo/{$hash}-0." . $ph->getExt();
|
||||
$picture["preview"] = System::baseUrl() . "/photo/{$hash}-{$smallest}." . $ph->getExt();
|
||||
|
||||
if ($r_json) {
|
||||
echo json_encode(array('picture'=>$picture));
|
||||
|
@ -322,9 +322,9 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
/* mod Waitman Gobble NO WARRANTY */
|
||||
// if we get the signal then return the image url info in BBCODE
|
||||
if ($_REQUEST['hush']!='yeah') {
|
||||
echo "\n\n" . '[url=' . App::get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . App::get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
||||
echo "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . System::baseUrl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
||||
} else {
|
||||
$m = '[url='.App::get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.App::get_baseurl()."/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
||||
$m = '[url='.System::baseUrl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.System::baseUrl()."/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
||||
return($m);
|
||||
}
|
||||
/* mod Waitman Gobble NO WARRANTY */
|
||||
|
|
20
mod/xrd.php
20
mod/xrd.php
|
@ -37,14 +37,14 @@ function xrd_init(App $a) {
|
|||
|
||||
$tpl = get_markup_template('xrd_diaspora.tpl');
|
||||
$dspr = replace_macros($tpl,array(
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$dspr_guid' => $r['guid'],
|
||||
'$dspr_key' => base64_encode(pemtorsa($r['pubkey']))
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('xrd_person.tpl');
|
||||
|
||||
$profile_url = App::get_baseurl().'/profile/'.$r['nickname'];
|
||||
$profile_url = System::baseUrl().'/profile/'.$r['nickname'];
|
||||
|
||||
if ($acct) {
|
||||
$alias = $profile_url;
|
||||
|
@ -62,15 +62,15 @@ function xrd_init(App $a) {
|
|||
'$accturi' => $uri,
|
||||
'$alias' => $alias,
|
||||
'$profile_url' => $profile_url,
|
||||
'$hcard_url' => App::get_baseurl() . '/hcard/' . $r['nickname'],
|
||||
'$atom' => App::get_baseurl() . '/dfrn_poll/' . $r['nickname'],
|
||||
'$zot_post' => App::get_baseurl() . '/post/' . $r['nickname'],
|
||||
'$poco_url' => App::get_baseurl() . '/poco/' . $r['nickname'],
|
||||
'$photo' => App::get_baseurl() . '/photo/profile/' . $r['uid'] . '.jpg',
|
||||
'$hcard_url' => System::baseUrl() . '/hcard/' . $r['nickname'],
|
||||
'$atom' => System::baseUrl() . '/dfrn_poll/' . $r['nickname'],
|
||||
'$zot_post' => System::baseUrl() . '/post/' . $r['nickname'],
|
||||
'$poco_url' => System::baseUrl() . '/poco/' . $r['nickname'],
|
||||
'$photo' => System::baseUrl() . '/photo/profile/' . $r['uid'] . '.jpg',
|
||||
'$dspr' => $dspr,
|
||||
'$salmon' => App::get_baseurl() . '/salmon/' . $r['nickname'],
|
||||
'$salmen' => App::get_baseurl() . '/salmon/' . $r['nickname'] . '/mention',
|
||||
'$subscribe' => App::get_baseurl() . '/follow?url={uri}',
|
||||
'$salmon' => System::baseUrl() . '/salmon/' . $r['nickname'],
|
||||
'$salmen' => System::baseUrl() . '/salmon/' . $r['nickname'] . '/mention',
|
||||
'$subscribe' => System::baseUrl() . '/follow?url={uri}',
|
||||
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
|
||||
'$bigkey' => salmon_key($r['pubkey']),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue