mirror of
https://github.com/friendica/friendica
synced 2024-11-18 02:23:40 +00:00
*much* more usage of App::get_baseurl() instead of $a->get_baseurl() (coding convention applied)
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
c43389f79a
commit
884f44ce94
108 changed files with 407 additions and 437 deletions
|
@ -8,7 +8,6 @@
|
||||||
function user_remove($uid) {
|
function user_remove($uid) {
|
||||||
if(! $uid)
|
if(! $uid)
|
||||||
return;
|
return;
|
||||||
$a = get_app();
|
|
||||||
logger('Removing user: ' . $uid);
|
logger('Removing user: ' . $uid);
|
||||||
|
|
||||||
$r = q("select * from user where uid = %d limit 1", intval($uid));
|
$r = q("select * from user where uid = %d limit 1", intval($uid));
|
||||||
|
@ -54,7 +53,7 @@ function user_remove($uid) {
|
||||||
if($uid == local_user()) {
|
if($uid == local_user()) {
|
||||||
unset($_SESSION['authenticated']);
|
unset($_SESSION['authenticated']);
|
||||||
unset($_SESSION['uid']);
|
unset($_SESSION['uid']);
|
||||||
goaway($a->get_baseurl());
|
goaway(App::get_baseurl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +85,6 @@ function contact_remove($id) {
|
||||||
|
|
||||||
function terminate_friendship($user,$self,$contact) {
|
function terminate_friendship($user,$self,$contact) {
|
||||||
|
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
@ -361,7 +359,7 @@ function contact_photo_menu($contact, $uid = 0)
|
||||||
$sparkle = false;
|
$sparkle = false;
|
||||||
if ($contact['network'] === NETWORK_DFRN) {
|
if ($contact['network'] === NETWORK_DFRN) {
|
||||||
$sparkle = true;
|
$sparkle = true;
|
||||||
$profile_link = $a->get_baseurl() . '/redir/' . $contact['id'];
|
$profile_link = App::get_baseurl() . '/redir/' . $contact['id'];
|
||||||
} else {
|
} else {
|
||||||
$profile_link = $contact['url'];
|
$profile_link = $contact['url'];
|
||||||
}
|
}
|
||||||
|
@ -377,17 +375,17 @@ function contact_photo_menu($contact, $uid = 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) {
|
if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) {
|
||||||
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
|
$pm_url = App::get_baseurl() . '/message/new/' . $contact['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($contact['network'] == NETWORK_DFRN) {
|
if ($contact['network'] == NETWORK_DFRN) {
|
||||||
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
|
$poke_link = App::get_baseurl() . '/poke/?f=&c=' . $contact['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
|
$contact_url = App::get_baseurl() . '/contacts/' . $contact['id'];
|
||||||
|
|
||||||
$posts_link = $a->get_baseurl() . '/contacts/' . $contact['id'] . '/posts';
|
$posts_link = App::get_baseurl() . '/contacts/' . $contact['id'] . '/posts';
|
||||||
$contact_drop_link = $a->get_baseurl() . '/contacts/' . $contact['id'] . '/drop?confirm=1';
|
$contact_drop_link = App::get_baseurl() . '/contacts/' . $contact['id'] . '/drop?confirm=1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu array:
|
* menu array:
|
||||||
|
|
|
@ -794,8 +794,6 @@ function update_contact_avatar($avatar, $uid, $cid, $force = false) {
|
||||||
|
|
||||||
function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
|
function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$r = q("SELECT `resource-id` FROM `photo` WHERE `uid` = %d AND `contact-id` = %d AND `scale` = 4 AND `album` = 'Contact Photos' LIMIT 1",
|
$r = q("SELECT `resource-id` FROM `photo` WHERE `uid` = %d AND `contact-id` = %d AND `scale` = 4 AND `album` = 'Contact Photos' LIMIT 1",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
intval($cid)
|
intval($cid)
|
||||||
|
@ -841,9 +839,9 @@ function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = $a->get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt();
|
$photo = App::get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt();
|
||||||
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt();
|
$thumb = App::get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt();
|
||||||
$micro = $a->get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt();
|
$micro = App::get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt();
|
||||||
} else {
|
} else {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
@ -853,9 +851,9 @@ function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($photo_failure) {
|
if ($photo_failure) {
|
||||||
$photo = $a->get_baseurl() . '/images/person-175.jpg';
|
$photo = App::get_baseurl() . '/images/person-175.jpg';
|
||||||
$thumb = $a->get_baseurl() . '/images/person-80.jpg';
|
$thumb = App::get_baseurl() . '/images/person-80.jpg';
|
||||||
$micro = $a->get_baseurl() . '/images/person-48.jpg';
|
$micro = App::get_baseurl() . '/images/person-48.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
return(array($photo,$thumb,$micro));
|
return(array($photo,$thumb,$micro));
|
||||||
|
@ -1044,18 +1042,18 @@ function store_photo($a, $uid, $imagedata = "", $url = "") {
|
||||||
return(array());
|
return(array());
|
||||||
}
|
}
|
||||||
|
|
||||||
$image = array("page" => $a->get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash,
|
$image = array("page" => App::get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash,
|
||||||
"full" => $a->get_baseurl()."/photo/{$hash}-0.".$ph->getExt());
|
"full" => App::get_baseurl()."/photo/{$hash}-0.".$ph->getExt());
|
||||||
|
|
||||||
if ($width > 800 || $height > 800) {
|
if ($width > 800 || $height > 800) {
|
||||||
$image["large"] = $a->get_baseurl()."/photo/{$hash}-0.".$ph->getExt();
|
$image["large"] = App::get_baseurl()."/photo/{$hash}-0.".$ph->getExt();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 640 || $height > 640) {
|
if ($width > 640 || $height > 640) {
|
||||||
$ph->scaleImage(640);
|
$ph->scaleImage(640);
|
||||||
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 1, 0, $defperm);
|
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 1, 0, $defperm);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$image["medium"] = $a->get_baseurl()."/photo/{$hash}-1.".$ph->getExt();
|
$image["medium"] = App::get_baseurl()."/photo/{$hash}-1.".$ph->getExt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1063,7 +1061,7 @@ function store_photo($a, $uid, $imagedata = "", $url = "") {
|
||||||
$ph->scaleImage(320);
|
$ph->scaleImage(320);
|
||||||
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 2, 0, $defperm);
|
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 2, 0, $defperm);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$image["small"] = $a->get_baseurl()."/photo/{$hash}-2.".$ph->getExt();
|
$image["small"] = App::get_baseurl()."/photo/{$hash}-2.".$ph->getExt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1088,7 +1086,7 @@ function store_photo($a, $uid, $imagedata = "", $url = "") {
|
||||||
|
|
||||||
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 3, 0, $defperm);
|
$r = $ph->store($uid, $visitor, $hash, $tempfile, t('Wall Photos'), 3, 0, $defperm);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$image["thumb"] = $a->get_baseurl()."/photo/{$hash}-3.".$ph->getExt();
|
$image["thumb"] = App::get_baseurl()."/photo/{$hash}-3.".$ph->getExt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,8 +125,7 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params'
|
||||||
$openid = new LightOpenID;
|
$openid = new LightOpenID;
|
||||||
$openid->identity = $openid_url;
|
$openid->identity = $openid_url;
|
||||||
$_SESSION['openid'] = $openid_url;
|
$_SESSION['openid'] = $openid_url;
|
||||||
$a = get_app();
|
$openid->returnUrl = App::get_baseurl(true).'/openid';
|
||||||
$openid->returnUrl = $a->get_baseurl(true).'/openid';
|
|
||||||
goaway($openid->authUrl());
|
goaway($openid->authUrl());
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'.t('The error message was:').' '.$e->getMessage());
|
notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'.t('The error message was:').' '.$e->getMessage());
|
||||||
|
|
|
@ -144,8 +144,6 @@ function unescape_underscores_in_links($m) {
|
||||||
|
|
||||||
function format_event_diaspora($ev) {
|
function format_event_diaspora($ev) {
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
if(! ((is_array($ev)) && count($ev)))
|
if(! ((is_array($ev)) && count($ev)))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
|
@ -160,7 +158,7 @@ function format_event_diaspora($ev) {
|
||||||
$ev['start'] , $bd_format ))
|
$ev['start'] , $bd_format ))
|
||||||
: day_translate(datetime_convert('UTC', 'UTC',
|
: day_translate(datetime_convert('UTC', 'UTC',
|
||||||
$ev['start'] , $bd_format)))
|
$ev['start'] , $bd_format)))
|
||||||
. '](' . $a->get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
|
. '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
|
||||||
|
|
||||||
if(! $ev['nofinish'])
|
if(! $ev['nofinish'])
|
||||||
$o .= t('Finishes:') . ' ' . '['
|
$o .= t('Finishes:') . ' ' . '['
|
||||||
|
@ -168,7 +166,7 @@ function format_event_diaspora($ev) {
|
||||||
$ev['finish'] , $bd_format ))
|
$ev['finish'] , $bd_format ))
|
||||||
: day_translate(datetime_convert('UTC', 'UTC',
|
: day_translate(datetime_convert('UTC', 'UTC',
|
||||||
$ev['finish'] , $bd_format )))
|
$ev['finish'] , $bd_format )))
|
||||||
. '](' . $a->get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n";
|
. '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n";
|
||||||
|
|
||||||
if(strlen($ev['location']))
|
if(strlen($ev['location']))
|
||||||
$o .= t('Location:') . bb2diaspora($ev['location'])
|
$o .= t('Location:') . bb2diaspora($ev['location'])
|
||||||
|
|
|
@ -613,9 +613,7 @@ function GetProfileUsername($profile, $username, $compact = false, $getnetwork =
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb_DiasporaLinks($match) {
|
function bb_DiasporaLinks($match) {
|
||||||
$a = get_app();
|
return "[url=".App::get_baseurl()."/display/".$match[1]."]".$match[2]."[/url]";
|
||||||
|
|
||||||
return "[url=".$a->get_baseurl()."/display/".$match[1]."]".$match[2]."[/url]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb_RemovePictureLinks($match) {
|
function bb_RemovePictureLinks($match) {
|
||||||
|
@ -894,7 +892,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
||||||
// we may need to restrict this further if it picks up too many strays
|
// we may need to restrict this further if it picks up too many strays
|
||||||
// link acct:user@host to a webfinger profile redirector
|
// link acct:user@host to a webfinger profile redirector
|
||||||
|
|
||||||
$Text = preg_replace('/acct:([^@]+)@((?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63})/', '<a href="' . $a->get_baseurl() . '/acctlink?addr=$1@$2" target="extlink">acct:$1@$2</a>',$Text);
|
$Text = preg_replace('/acct:([^@]+)@((?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63})/', '<a href="' . App::get_baseurl() . '/acctlink?addr=$1@$2" target="extlink">acct:$1@$2</a>',$Text);
|
||||||
|
|
||||||
// Perform MAIL Search
|
// Perform MAIL Search
|
||||||
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1">$1</a>', $Text);
|
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1">$1</a>', $Text);
|
||||||
|
@ -1063,9 +1061,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
||||||
return(bb_ShareAttributes($match, $simplehtml));
|
return(bb_ShareAttributes($match, $simplehtml));
|
||||||
},$Text);
|
},$Text);
|
||||||
|
|
||||||
$Text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism",'<br/><img src="' .$a->get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . t('Encrypted content') . '" /><br />', $Text);
|
$Text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism",'<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . t('Encrypted content') . '" /><br />', $Text);
|
||||||
$Text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism",'<br/><img src="' .$a->get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
|
$Text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism",'<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
|
||||||
//$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism",'<br/><img src="' .$a->get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
|
//$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism",'<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
|
||||||
|
|
||||||
|
|
||||||
// Try to Oembed
|
// Try to Oembed
|
||||||
|
|
|
@ -116,7 +116,6 @@ function networks_widget($baseurl,$selected = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileas_widget($baseurl,$selected = '') {
|
function fileas_widget($baseurl,$selected = '') {
|
||||||
$a = get_app();
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
|
@ -235,7 +234,7 @@ function common_friends_visitor_widget($profile_uid) {
|
||||||
|
|
||||||
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
|
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
|
||||||
'$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
|
'$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
|
||||||
'$base' => $a->get_baseurl(),
|
'$base' => App::get_baseurl(),
|
||||||
'$uid' => $profile_uid,
|
'$uid' => $profile_uid,
|
||||||
'$cid' => (($cid) ? $cid : '0'),
|
'$cid' => (($cid) ? $cid : '0'),
|
||||||
'$linkmore' => (($t > 5) ? 'true' : ''),
|
'$linkmore' => (($t > 5) ? 'true' : ''),
|
||||||
|
|
|
@ -864,7 +864,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = replace_macros($page_template, array(
|
$o = replace_macros($page_template, array(
|
||||||
'$baseurl' => $a->get_baseurl($ssl_state),
|
'$baseurl' => App::get_baseurl($ssl_state),
|
||||||
'$return_path' => $a->query_string,
|
'$return_path' => $a->query_string,
|
||||||
'$live_update' => $live_update_div,
|
'$live_update' => $live_update_div,
|
||||||
'$remove' => t('remove'),
|
'$remove' => t('remove'),
|
||||||
|
@ -1183,7 +1183,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
$tpl = get_markup_template('jot-header.tpl');
|
$tpl = get_markup_template('jot-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$newpost' => 'true',
|
'$newpost' => 'true',
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
|
@ -1201,7 +1201,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
$tpl = get_markup_template('jot-end.tpl');
|
$tpl = get_markup_template('jot-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
'$newpost' => 'true',
|
'$newpost' => 'true',
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
|
@ -1267,7 +1267,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
|
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
|
||||||
'$content' => $x['content'],
|
'$content' => $x['content'],
|
||||||
'$post_id' => $x['post_id'],
|
'$post_id' => $x['post_id'],
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$defloc' => $x['default_location'],
|
'$defloc' => $x['default_location'],
|
||||||
'$visitor' => $x['visitor'],
|
'$visitor' => $x['visitor'],
|
||||||
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
|
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
|
||||||
|
|
|
@ -56,11 +56,11 @@ function update_fail($update_id, $error_message){
|
||||||
$email_tpl = get_intltext_template("update_fail_eml.tpl");
|
$email_tpl = get_intltext_template("update_fail_eml.tpl");
|
||||||
$email_msg = replace_macros($email_tpl, array(
|
$email_msg = replace_macros($email_tpl, array(
|
||||||
'$sitename' => $a->config['sitename'],
|
'$sitename' => $a->config['sitename'],
|
||||||
'$siteurl' => $a->get_baseurl(),
|
'$siteurl' => App::get_baseurl(),
|
||||||
'$update' => DB_UPDATE_VERSION,
|
'$update' => DB_UPDATE_VERSION,
|
||||||
'$error' => sprintf(t('Update %s failed. See error logs.'), DB_UPDATE_VERSION)
|
'$error' => sprintf(t('Update %s failed. See error logs.'), DB_UPDATE_VERSION)
|
||||||
));
|
));
|
||||||
$subject=sprintf(t('Update Error at %s'), $a->get_baseurl());
|
$subject=sprintf(t('Update Error at %s'), App::get_baseurl());
|
||||||
require_once('include/email.php');
|
require_once('include/email.php');
|
||||||
$subject = email_header_encode($subject,'UTF-8');
|
$subject = email_header_encode($subject,'UTF-8');
|
||||||
mail($a->config['admin_email'], $subject, $email_msg,
|
mail($a->config['admin_email'], $subject, $email_msg,
|
||||||
|
|
|
@ -323,7 +323,7 @@ function delivery_run(&$argv, &$argc){
|
||||||
|
|
||||||
// perform local delivery if we are on the same site
|
// perform local delivery if we are on the same site
|
||||||
|
|
||||||
if (link_compare($basepath,$a->get_baseurl())) {
|
if (link_compare($basepath,App::get_baseurl())) {
|
||||||
|
|
||||||
$nickname = basename($contact['url']);
|
$nickname = basename($contact['url']);
|
||||||
if ($contact['issued-id'])
|
if ($contact['issued-id'])
|
||||||
|
|
|
@ -23,7 +23,7 @@ function notification($params) {
|
||||||
|
|
||||||
$banner = t('Friendica Notification');
|
$banner = t('Friendica Notification');
|
||||||
$product = FRIENDICA_PLATFORM;
|
$product = FRIENDICA_PLATFORM;
|
||||||
$siteurl = $a->get_baseurl(true);
|
$siteurl = App::get_baseurl(true);
|
||||||
$thanks = t('Thank You,');
|
$thanks = t('Thank You,');
|
||||||
$sitename = $a->config['sitename'];
|
$sitename = $a->config['sitename'];
|
||||||
if (!x($a->config['admin_name']))
|
if (!x($a->config['admin_name']))
|
||||||
|
@ -58,7 +58,7 @@ function notification($params) {
|
||||||
$additional_mail_header .= "X-Friendica-Platform: ".FRIENDICA_PLATFORM."\n";
|
$additional_mail_header .= "X-Friendica-Platform: ".FRIENDICA_PLATFORM."\n";
|
||||||
$additional_mail_header .= "X-Friendica-Version: ".FRIENDICA_VERSION."\n";
|
$additional_mail_header .= "X-Friendica-Version: ".FRIENDICA_VERSION."\n";
|
||||||
$additional_mail_header .= "List-ID: <notification.".$hostname.">\n";
|
$additional_mail_header .= "List-ID: <notification.".$hostname.">\n";
|
||||||
$additional_mail_header .= "List-Archive: <".$a->get_baseurl()."/notifications/system>\n";
|
$additional_mail_header .= "List-Archive: <".App::get_baseurl()."/notifications/system>\n";
|
||||||
|
|
||||||
if (array_key_exists('item', $params)) {
|
if (array_key_exists('item', $params)) {
|
||||||
$title = $params['item']['title'];
|
$title = $params['item']['title'];
|
||||||
|
@ -494,7 +494,7 @@ function notification($params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$itemlink = $a->get_baseurl().'/notify/view/'.$notify_id;
|
$itemlink = App::get_baseurl().'/notify/view/'.$notify_id;
|
||||||
$msg = replace_macros($epreamble, array('$itemlink' => $itemlink));
|
$msg = replace_macros($epreamble, array('$itemlink' => $itemlink));
|
||||||
$msg_cache = format_notification_message($datarray['name_cache'], strip_tags(bbcode($msg)));
|
$msg_cache = format_notification_message($datarray['name_cache'], strip_tags(bbcode($msg)));
|
||||||
$r = q("UPDATE `notify` SET `msg` = '%s', `msg_cache` = '%s' WHERE `id` = %d AND `uid` = %d",
|
$r = q("UPDATE `notify` SET `msg` = '%s', `msg_cache` = '%s' WHERE `id` = %d AND `uid` = %d",
|
||||||
|
@ -648,8 +648,6 @@ function notification($params) {
|
||||||
* @param str $defaulttype (Optional) Forces a notification with this type.
|
* @param str $defaulttype (Optional) Forces a notification with this type.
|
||||||
*/
|
*/
|
||||||
function check_item_notification($itemid, $uid, $defaulttype = "") {
|
function check_item_notification($itemid, $uid, $defaulttype = "") {
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$notification_data = array("uid" => $uid, "profiles" => array());
|
$notification_data = array("uid" => $uid, "profiles" => array());
|
||||||
call_hooks('check_item_notification', $notification_data);
|
call_hooks('check_item_notification', $notification_data);
|
||||||
|
|
||||||
|
@ -667,7 +665,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
|
||||||
$profiles[] = $owner[0]["url"];
|
$profiles[] = $owner[0]["url"];
|
||||||
|
|
||||||
// Notifications from Diaspora are often with an URL in the Diaspora format
|
// Notifications from Diaspora are often with an URL in the Diaspora format
|
||||||
$profiles[] = $a->get_baseurl()."/u/".$user[0]["nickname"];
|
$profiles[] = App::get_baseurl()."/u/".$user[0]["nickname"];
|
||||||
|
|
||||||
$profiles2 = array();
|
$profiles2 = array();
|
||||||
|
|
||||||
|
|
|
@ -408,7 +408,7 @@ function event_store($arr) {
|
||||||
intval($arr['uid'])
|
intval($arr['uid'])
|
||||||
);
|
);
|
||||||
//if (dbm::is_result($r))
|
//if (dbm::is_result($r))
|
||||||
// $plink = $a->get_baseurl() . '/display/' . $r[0]['nickname'] . '/' . $item_id;
|
// $plink = App::get_baseurl() . '/display/' . $r[0]['nickname'] . '/' . $item_id;
|
||||||
|
|
||||||
|
|
||||||
if($item_id) {
|
if($item_id) {
|
||||||
|
|
|
@ -99,7 +99,7 @@ function new_contact($uid,$url,$interactive = false) {
|
||||||
if($ret['network'] === NETWORK_DFRN) {
|
if($ret['network'] === NETWORK_DFRN) {
|
||||||
if($interactive) {
|
if($interactive) {
|
||||||
if(strlen($a->path))
|
if(strlen($a->path))
|
||||||
$myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']);
|
$myaddr = bin2hex(App::get_baseurl() . '/profile/' . $a->user['nickname']);
|
||||||
else
|
else
|
||||||
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());
|
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
if (isset($profile["url"]))
|
if (isset($profile["url"]))
|
||||||
$profile_url = normalise_link($profile["url"]);
|
$profile_url = normalise_link($profile["url"]);
|
||||||
else
|
else
|
||||||
$profile_url = normalise_link($a->get_baseurl()."/profile/".$profile["nickname"]);
|
$profile_url = normalise_link(App::get_baseurl()."/profile/".$profile["nickname"]);
|
||||||
|
|
||||||
$r = q("SELECT * FROM `contact` WHERE NOT `pending` AND `uid` = %d AND `nurl` = '%s'",
|
$r = q("SELECT * FROM `contact` WHERE NOT `pending` AND `uid` = %d AND `nurl` = '%s'",
|
||||||
local_user(), $profile_url);
|
local_user(), $profile_url);
|
||||||
|
@ -279,7 +279,7 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
|
|
||||||
// show edit profile to yourself
|
// show edit profile to yourself
|
||||||
if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
|
if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
|
||||||
$profile['edit'] = array($a->get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
|
$profile['edit'] = array(App::get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
|
||||||
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
||||||
local_user());
|
local_user());
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
|
if ($profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
|
||||||
$profile['edit'] = array($a->get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
|
$profile['edit'] = array(App::get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
|
||||||
$profile['menu'] = array(
|
$profile['menu'] = array(
|
||||||
'chg_photo' => t('Change profile photo'),
|
'chg_photo' => t('Change profile photo'),
|
||||||
'cr_new' => null,
|
'cr_new' => null,
|
||||||
|
@ -349,15 +349,15 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
if ($profile['guid'] != "")
|
if ($profile['guid'] != "")
|
||||||
$diaspora = array(
|
$diaspora = array(
|
||||||
'guid' => $profile['guid'],
|
'guid' => $profile['guid'],
|
||||||
'podloc' => $a->get_baseurl(),
|
'podloc' => App::get_baseurl(),
|
||||||
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
|
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
|
||||||
'nickname' => $profile['nickname'],
|
'nickname' => $profile['nickname'],
|
||||||
'fullname' => $profile['name'],
|
'fullname' => $profile['name'],
|
||||||
'firstname' => $firstname,
|
'firstname' => $firstname,
|
||||||
'lastname' => $lastname,
|
'lastname' => $lastname,
|
||||||
'photo300' => $a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
|
'photo300' => App::get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
|
||||||
'photo100' => $a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
|
'photo100' => App::get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
|
||||||
'photo50' => $a->get_baseurl() . '/photo/custom/50/' . $profile['uid'] . '.jpg',
|
'photo50' => App::get_baseurl() . '/photo/custom/50/' . $profile['uid'] . '.jpg',
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
$diaspora = false;
|
$diaspora = false;
|
||||||
|
@ -489,7 +489,7 @@ function get_birthdays() {
|
||||||
$url = $rr['url'];
|
$url = $rr['url'];
|
||||||
if($rr['network'] === NETWORK_DFRN) {
|
if($rr['network'] === NETWORK_DFRN) {
|
||||||
$sparkle = " sparkle";
|
$sparkle = " sparkle";
|
||||||
$url = $a->get_baseurl() . '/redir/' . $rr['cid'];
|
$url = App::get_baseurl() . '/redir/' . $rr['cid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$rr['link'] = $url;
|
$rr['link'] = $url;
|
||||||
|
@ -503,7 +503,7 @@ function get_birthdays() {
|
||||||
}
|
}
|
||||||
$tpl = get_markup_template("birthdays_reminder.tpl");
|
$tpl = get_markup_template("birthdays_reminder.tpl");
|
||||||
return replace_macros($tpl, array(
|
return replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$classtoday' => $classtoday,
|
'$classtoday' => $classtoday,
|
||||||
'$count' => $total,
|
'$count' => $total,
|
||||||
'$event_reminders' => t('Birthday Reminders'),
|
'$event_reminders' => t('Birthday Reminders'),
|
||||||
|
@ -587,7 +587,7 @@ function get_events() {
|
||||||
|
|
||||||
$tpl = get_markup_template("events_reminder.tpl");
|
$tpl = get_markup_template("events_reminder.tpl");
|
||||||
return replace_macros($tpl, array(
|
return replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$classtoday' => $classtoday,
|
'$classtoday' => $classtoday,
|
||||||
'$count' => count($r) - $skip,
|
'$count' => count($r) - $skip,
|
||||||
'$event_reminders' => t('Event Reminders'),
|
'$event_reminders' => t('Event Reminders'),
|
||||||
|
@ -685,7 +685,7 @@ function advanced_profile(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->profile['uid'] == local_user())
|
if ($a->profile['uid'] == local_user())
|
||||||
$profile['edit'] = array($a->get_baseurl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
|
$profile['edit'] = array(App::get_baseurl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
|
||||||
|
|
||||||
return replace_macros($tpl, array(
|
return replace_macros($tpl, array(
|
||||||
'$title' => t('Profile'),
|
'$title' => t('Profile'),
|
||||||
|
@ -707,7 +707,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
if(x($_GET,'tab'))
|
if(x($_GET,'tab'))
|
||||||
$tab = notags(trim($_GET['tab']));
|
$tab = notags(trim($_GET['tab']));
|
||||||
|
|
||||||
$url = $a->get_baseurl() . '/profile/' . $nickname;
|
$url = App::get_baseurl() . '/profile/' . $nickname;
|
||||||
|
|
||||||
$tabs = array(
|
$tabs = array(
|
||||||
array(
|
array(
|
||||||
|
@ -728,7 +728,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => t('Photos'),
|
'label' => t('Photos'),
|
||||||
'url' => $a->get_baseurl() . '/photos/' . $nickname,
|
'url' => App::get_baseurl() . '/photos/' . $nickname,
|
||||||
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
|
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
|
||||||
'title' => t('Photo Albums'),
|
'title' => t('Photo Albums'),
|
||||||
'id' => 'photo-tab',
|
'id' => 'photo-tab',
|
||||||
|
@ -736,7 +736,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => t('Videos'),
|
'label' => t('Videos'),
|
||||||
'url' => $a->get_baseurl() . '/videos/' . $nickname,
|
'url' => App::get_baseurl() . '/videos/' . $nickname,
|
||||||
'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''),
|
'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''),
|
||||||
'title' => t('Videos'),
|
'title' => t('Videos'),
|
||||||
'id' => 'video-tab',
|
'id' => 'video-tab',
|
||||||
|
@ -748,7 +748,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
if ($is_owner && $a->theme_events_in_profile) {
|
if ($is_owner && $a->theme_events_in_profile) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Events'),
|
'label' => t('Events'),
|
||||||
'url' => $a->get_baseurl() . '/events',
|
'url' => App::get_baseurl() . '/events',
|
||||||
'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''),
|
'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''),
|
||||||
'title' => t('Events and Calendar'),
|
'title' => t('Events and Calendar'),
|
||||||
'id' => 'events-tab',
|
'id' => 'events-tab',
|
||||||
|
@ -759,7 +759,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
} elseif (! $is_owner) {
|
} elseif (! $is_owner) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Events'),
|
'label' => t('Events'),
|
||||||
'url' => $a->get_baseurl() . '/cal/' . $nickname,
|
'url' => App::get_baseurl() . '/cal/' . $nickname,
|
||||||
'sel' =>((!isset($tab)&&$a->argv[0]=='cal')?'active':''),
|
'sel' =>((!isset($tab)&&$a->argv[0]=='cal')?'active':''),
|
||||||
'title' => t('Events and Calendar'),
|
'title' => t('Events and Calendar'),
|
||||||
'id' => 'events-tab',
|
'id' => 'events-tab',
|
||||||
|
@ -770,7 +770,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
if ($is_owner){
|
if ($is_owner){
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Personal Notes'),
|
'label' => t('Personal Notes'),
|
||||||
'url' => $a->get_baseurl() . '/notes',
|
'url' => App::get_baseurl() . '/notes',
|
||||||
'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''),
|
'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''),
|
||||||
'title' => t('Only You Can See This'),
|
'title' => t('Only You Can See This'),
|
||||||
'id' => 'notes-tab',
|
'id' => 'notes-tab',
|
||||||
|
@ -781,7 +781,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) {
|
if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Contacts'),
|
'label' => t('Contacts'),
|
||||||
'url' => $a->get_baseurl() . '/viewcontacts/' . $nickname,
|
'url' => App::get_baseurl() . '/viewcontacts/' . $nickname,
|
||||||
'sel' => ((!isset($tab)&&$a->argv[0]=='viewcontacts')?'active':''),
|
'sel' => ((!isset($tab)&&$a->argv[0]=='viewcontacts')?'active':''),
|
||||||
'title' => t('Contacts'),
|
'title' => t('Contacts'),
|
||||||
'id' => 'viewcontacts-tab',
|
'id' => 'viewcontacts-tab',
|
||||||
|
|
|
@ -208,13 +208,12 @@ function add_page_info_data($data) {
|
||||||
|
|
||||||
$hashtags = "";
|
$hashtags = "";
|
||||||
if (isset($data["keywords"]) AND count($data["keywords"])) {
|
if (isset($data["keywords"]) AND count($data["keywords"])) {
|
||||||
$a = get_app();
|
|
||||||
$hashtags = "\n";
|
$hashtags = "\n";
|
||||||
foreach ($data["keywords"] AS $keyword) {
|
foreach ($data["keywords"] AS $keyword) {
|
||||||
/// @todo make a positive list of allowed characters
|
/// @todo make a positive list of allowed characters
|
||||||
$hashtag = str_replace(array(" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"),
|
$hashtag = str_replace(array(" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"),
|
||||||
array("","", "", "", "", "", "", "", "", "", "", ""), $keyword);
|
array("","", "", "", "", "", "", "", "", "", "", ""), $keyword);
|
||||||
$hashtags .= "#[url=".$a->get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url] ";
|
$hashtags .= "#[url=".App::get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url] ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +250,6 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa
|
||||||
|
|
||||||
$tags = "";
|
$tags = "";
|
||||||
if (isset($data["keywords"]) AND count($data["keywords"])) {
|
if (isset($data["keywords"]) AND count($data["keywords"])) {
|
||||||
$a = get_app();
|
|
||||||
foreach ($data["keywords"] AS $keyword) {
|
foreach ($data["keywords"] AS $keyword) {
|
||||||
$hashtag = str_replace(array(" ", "+", "/", ".", "#", "'"),
|
$hashtag = str_replace(array(" ", "+", "/", ".", "#", "'"),
|
||||||
array("","", "", "", "", ""), $keyword);
|
array("","", "", "", "", ""), $keyword);
|
||||||
|
@ -259,7 +257,7 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa
|
||||||
if ($tags != "")
|
if ($tags != "")
|
||||||
$tags .= ",";
|
$tags .= ",";
|
||||||
|
|
||||||
$tags .= "#[url=".$a->get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url]";
|
$tags .= "#[url=".App::get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,8 +555,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
||||||
logger("Both author-link and owner-link are empty. Called by: ".App::callstack(), LOGGER_DEBUG);
|
logger("Both author-link and owner-link are empty. Called by: ".App::callstack(), LOGGER_DEBUG);
|
||||||
|
|
||||||
if ($arr['plink'] == "") {
|
if ($arr['plink'] == "") {
|
||||||
$a = get_app();
|
$arr['plink'] = App::get_baseurl().'/display/'.urlencode($arr['guid']);
|
||||||
$arr['plink'] = $a->get_baseurl().'/display/'.urlencode($arr['guid']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($arr['network'] == "") {
|
if ($arr['network'] == "") {
|
||||||
|
@ -709,7 +706,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
||||||
$u = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($arr['uid']));
|
$u = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($arr['uid']));
|
||||||
if (count($u)) {
|
if (count($u)) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$self = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']);
|
$self = normalise_link(App::get_baseurl() . '/profile/' . $u[0]['nickname']);
|
||||||
logger("item_store: 'myself' is ".$self." for parent ".$parent_id." checking against ".$arr['author-link']." and ".$arr['owner-link'], LOGGER_DEBUG);
|
logger("item_store: 'myself' is ".$self." for parent ".$parent_id." checking against ".$arr['author-link']." and ".$arr['owner-link'], LOGGER_DEBUG);
|
||||||
if ((normalise_link($arr['author-link']) == $self) OR (normalise_link($arr['owner-link']) == $self)) {
|
if ((normalise_link($arr['author-link']) == $self) OR (normalise_link($arr['owner-link']) == $self)) {
|
||||||
q("UPDATE `thread` SET `mention` = 1 WHERE `iid` = %d", intval($parent_id));
|
q("UPDATE `thread` SET `mention` = 1 WHERE `iid` = %d", intval($parent_id));
|
||||||
|
@ -1068,10 +1065,10 @@ function item_body_set_hashtags(&$item) {
|
||||||
|
|
||||||
// All hashtags should point to the home server
|
// All hashtags should point to the home server
|
||||||
//$item["body"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
//$item["body"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||||
// "#[url=".$a->get_baseurl()."/search?tag=$2]$2[/url]", $item["body"]);
|
// "#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["body"]);
|
||||||
|
|
||||||
//$item["tag"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
//$item["tag"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||||
// "#[url=".$a->get_baseurl()."/search?tag=$2]$2[/url]", $item["tag"]);
|
// "#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["tag"]);
|
||||||
|
|
||||||
// mask hashtags inside of url, bookmarks and attachments to avoid urls in urls
|
// mask hashtags inside of url, bookmarks and attachments to avoid urls in urls
|
||||||
$item["body"] = preg_replace_callback("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
$item["body"] = preg_replace_callback("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
|
||||||
|
@ -1103,7 +1100,7 @@ function item_body_set_hashtags(&$item) {
|
||||||
|
|
||||||
$basetag = str_replace('_',' ',substr($tag,1));
|
$basetag = str_replace('_',' ',substr($tag,1));
|
||||||
|
|
||||||
$newtag = '#[url='.$a->get_baseurl().'/search?tag='.rawurlencode($basetag).']'.$basetag.'[/url]';
|
$newtag = '#[url='.App::get_baseurl().'/search?tag='.rawurlencode($basetag).']'.$basetag.'[/url]';
|
||||||
|
|
||||||
$item["body"] = str_replace($tag, $newtag, $item["body"]);
|
$item["body"] = str_replace($tag, $newtag, $item["body"]);
|
||||||
|
|
||||||
|
@ -1207,12 +1204,12 @@ function tag_deliver($uid,$item_id) {
|
||||||
|
|
||||||
$item = $i[0];
|
$item = $i[0];
|
||||||
|
|
||||||
$link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']);
|
$link = normalise_link(App::get_baseurl() . '/profile/' . $u[0]['nickname']);
|
||||||
|
|
||||||
// Diaspora uses their own hardwired link URL in @-tags
|
// Diaspora uses their own hardwired link URL in @-tags
|
||||||
// instead of the one we supply with webfinger
|
// instead of the one we supply with webfinger
|
||||||
|
|
||||||
$dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']);
|
$dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
|
||||||
|
|
||||||
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
|
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
|
||||||
if ($cnt) {
|
if ($cnt) {
|
||||||
|
@ -1312,12 +1309,12 @@ function tgroup_check($uid,$item) {
|
||||||
$prvgroup = (($u[0]['page-flags'] == PAGE_PRVGROUP) ? true : false);
|
$prvgroup = (($u[0]['page-flags'] == PAGE_PRVGROUP) ? true : false);
|
||||||
|
|
||||||
|
|
||||||
$link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']);
|
$link = normalise_link(App::get_baseurl() . '/profile/' . $u[0]['nickname']);
|
||||||
|
|
||||||
// Diaspora uses their own hardwired link URL in @-tags
|
// Diaspora uses their own hardwired link URL in @-tags
|
||||||
// instead of the one we supply with webfinger
|
// instead of the one we supply with webfinger
|
||||||
|
|
||||||
$dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']);
|
$dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
|
||||||
|
|
||||||
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
|
$cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
|
||||||
if ($cnt) {
|
if ($cnt) {
|
||||||
|
@ -1572,7 +1569,7 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
|
||||||
'to_name' => $r[0]['username'],
|
'to_name' => $r[0]['username'],
|
||||||
'to_email' => $r[0]['email'],
|
'to_email' => $r[0]['email'],
|
||||||
'uid' => $r[0]['uid'],
|
'uid' => $r[0]['uid'],
|
||||||
'link' => $a->get_baseurl() . '/notifications/intro',
|
'link' => App::get_baseurl() . '/notifications/intro',
|
||||||
'source_name' => ((strlen(stripslashes($contact_record['name']))) ? stripslashes($contact_record['name']) : t('[Name Withheld]')),
|
'source_name' => ((strlen(stripslashes($contact_record['name']))) ? stripslashes($contact_record['name']) : t('[Name Withheld]')),
|
||||||
'source_link' => $contact_record['url'],
|
'source_link' => $contact_record['url'],
|
||||||
'source_photo' => $contact_record['photo'],
|
'source_photo' => $contact_record['photo'],
|
||||||
|
@ -1665,7 +1662,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
logger('fix_private_photos: check for photos', LOGGER_DEBUG);
|
logger('fix_private_photos: check for photos', LOGGER_DEBUG);
|
||||||
$site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://'));
|
$site = substr(App::get_baseurl(),strpos(App::get_baseurl(),'://'));
|
||||||
|
|
||||||
$orig_body = $s;
|
$orig_body = $s;
|
||||||
$new_body = '';
|
$new_body = '';
|
||||||
|
@ -1929,7 +1926,7 @@ function drop_item($id,$interactive = true) {
|
||||||
if (! $interactive)
|
if (! $interactive)
|
||||||
return 0;
|
return 0;
|
||||||
notice( t('Item not found.') . EOL);
|
notice( t('Item not found.') . EOL);
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = $r[0];
|
$item = $r[0];
|
||||||
|
@ -1977,7 +1974,7 @@ function drop_item($id,$interactive = true) {
|
||||||
}
|
}
|
||||||
// Now check how the user responded to the confirmation query
|
// Now check how the user responded to the confirmation query
|
||||||
if ($_REQUEST['canceled']) {
|
if ($_REQUEST['canceled']) {
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
|
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
|
||||||
|
@ -2127,13 +2124,13 @@ function drop_item($id,$interactive = true) {
|
||||||
|
|
||||||
if (! $interactive)
|
if (! $interactive)
|
||||||
return $owner;
|
return $owner;
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
//NOTREACHED
|
//NOTREACHED
|
||||||
} else {
|
} else {
|
||||||
if (! $interactive)
|
if (! $interactive)
|
||||||
return 0;
|
return 0;
|
||||||
notice( t('Permission denied.') . EOL);
|
notice( t('Permission denied.') . EOL);
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
//NOTREACHED
|
//NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ function do_like($item_id, $verb) {
|
||||||
if($item['object-type'] === ACTIVITY_OBJ_EVENT)
|
if($item['object-type'] === ACTIVITY_OBJ_EVENT)
|
||||||
$post_type = t('event');
|
$post_type = t('event');
|
||||||
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
||||||
$link = xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
$link = xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||||
$body = $item['body'];
|
$body = $item['body'];
|
||||||
|
|
||||||
$obj = <<< EOT
|
$obj = <<< EOT
|
||||||
|
@ -214,7 +214,7 @@ EOT;
|
||||||
|
|
||||||
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
|
||||||
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
|
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
|
||||||
$plink = '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
$plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
|
||||||
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
|
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
|
||||||
|
|
||||||
$arr['verb'] = $activity;
|
$arr['verb'] = $activity;
|
||||||
|
|
|
@ -27,7 +27,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
|
||||||
}
|
}
|
||||||
|
|
||||||
$guid = get_guid(32);
|
$guid = get_guid(32);
|
||||||
$uri = 'urn:X-dfrn:' . $a->get_baseurl() . ':' . local_user() . ':' . $guid;
|
$uri = 'urn:X-dfrn:' . App::get_baseurl() . ':' . local_user() . ':' . $guid;
|
||||||
|
|
||||||
$convid = 0;
|
$convid = 0;
|
||||||
$reply = false;
|
$reply = false;
|
||||||
|
@ -53,7 +53,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
|
||||||
$recip_host = substr($recip_host,0,strpos($recip_host,'/'));
|
$recip_host = substr($recip_host,0,strpos($recip_host,'/'));
|
||||||
|
|
||||||
$recip_handle = (($contact[0]['addr']) ? $contact[0]['addr'] : $contact[0]['nick'] . '@' . $recip_host);
|
$recip_handle = (($contact[0]['addr']) ? $contact[0]['addr'] : $contact[0]['nick'] . '@' . $recip_host);
|
||||||
$sender_handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
$sender_handle = $a->user['nickname'] . '@' . substr(App::get_baseurl(), strpos(App::get_baseurl(),'://') + 3);
|
||||||
|
|
||||||
$conv_guid = get_guid(32);
|
$conv_guid = get_guid(32);
|
||||||
$convuri = $recip_handle.':'.$conv_guid;
|
$convuri = $recip_handle.':'.$conv_guid;
|
||||||
|
@ -134,7 +134,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
|
||||||
$images = $match[1];
|
$images = $match[1];
|
||||||
if(count($images)) {
|
if(count($images)) {
|
||||||
foreach($images as $image) {
|
foreach($images as $image) {
|
||||||
if(! stristr($image,$a->get_baseurl() . '/photo/'))
|
if(! stristr($image,App::get_baseurl() . '/photo/'))
|
||||||
continue;
|
continue;
|
||||||
$image_uri = substr($image,strrpos($image,'/') + 1);
|
$image_uri = substr($image,strrpos($image,'/') + 1);
|
||||||
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
|
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
|
||||||
|
@ -164,16 +164,13 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
|
||||||
|
|
||||||
function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
|
function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
|
|
||||||
if(! $recipient) return -1;
|
if(! $recipient) return -1;
|
||||||
|
|
||||||
if(! strlen($subject))
|
if(! strlen($subject))
|
||||||
$subject = t('[no subject]');
|
$subject = t('[no subject]');
|
||||||
|
|
||||||
$guid = get_guid(32);
|
$guid = get_guid(32);
|
||||||
$uri = 'urn:X-dfrn:' . $a->get_baseurl() . ':' . local_user() . ':' . $guid;
|
$uri = 'urn:X-dfrn:' . App::get_baseurl() . ':' . local_user() . ':' . $guid;
|
||||||
|
|
||||||
$convid = 0;
|
$convid = 0;
|
||||||
$reply = false;
|
$reply = false;
|
||||||
|
@ -187,7 +184,7 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
|
||||||
|
|
||||||
$conv_guid = get_guid(32);
|
$conv_guid = get_guid(32);
|
||||||
|
|
||||||
$recip_handle = $recipient['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
$recip_handle = $recipient['nickname'] . '@' . substr(App::get_baseurl(), strpos(App::get_baseurl(),'://') + 3);
|
||||||
|
|
||||||
$sender_nick = basename($replyto);
|
$sender_nick = basename($replyto);
|
||||||
$sender_host = substr($replyto,strpos($replyto,'://')+3);
|
$sender_host = substr($replyto,strpos($replyto,'://')+3);
|
||||||
|
|
|
@ -28,7 +28,7 @@ function nav(&$a) {
|
||||||
$tpl = get_markup_template('nav.tpl');
|
$tpl = get_markup_template('nav.tpl');
|
||||||
|
|
||||||
$a->page['nav'] .= replace_macros($tpl, array(
|
$a->page['nav'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$sitelocation' => $nav_info['sitelocation'],
|
'$sitelocation' => $nav_info['sitelocation'],
|
||||||
'$nav' => $nav_info['nav'],
|
'$nav' => $nav_info['nav'],
|
||||||
'$banner' => $nav_info['banner'],
|
'$banner' => $nav_info['banner'],
|
||||||
|
@ -65,7 +65,7 @@ function nav_info(App $a)
|
||||||
|
|
||||||
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
|
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
|
||||||
|
|
||||||
$sitelocation = $myident . substr($a->get_baseurl($ssl_state), strpos($a->get_baseurl($ssl_state), '//') + 2 );
|
$sitelocation = $myident . substr(App::get_baseurl($ssl_state), strpos(App::get_baseurl($ssl_state), '//') + 2 );
|
||||||
|
|
||||||
// nav links: array of array('href', 'text', 'extra css classes', 'title')
|
// nav links: array of array('href', 'text', 'extra css classes', 'title')
|
||||||
$nav = array();
|
$nav = array();
|
||||||
|
|
|
@ -513,8 +513,6 @@ function allowed_email($email) {
|
||||||
|
|
||||||
function avatar_img($email) {
|
function avatar_img($email) {
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$avatar['size'] = 175;
|
$avatar['size'] = 175;
|
||||||
$avatar['email'] = $email;
|
$avatar['email'] = $email;
|
||||||
$avatar['url'] = '';
|
$avatar['url'] = '';
|
||||||
|
@ -523,7 +521,7 @@ function avatar_img($email) {
|
||||||
call_hooks('avatar_lookup', $avatar);
|
call_hooks('avatar_lookup', $avatar);
|
||||||
|
|
||||||
if(! $avatar['success'])
|
if(! $avatar['success'])
|
||||||
$avatar['url'] = $a->get_baseurl() . '/images/person-175.jpg';
|
$avatar['url'] = App::get_baseurl() . '/images/person-175.jpg';
|
||||||
|
|
||||||
logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
|
logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
|
||||||
return $avatar['url'];
|
return $avatar['url'];
|
||||||
|
@ -569,7 +567,7 @@ function scale_external_images($srctext, $include_link = true, $scale_replace =
|
||||||
foreach($matches as $mtch) {
|
foreach($matches as $mtch) {
|
||||||
logger('scale_external_image: ' . $mtch[1]);
|
logger('scale_external_image: ' . $mtch[1]);
|
||||||
|
|
||||||
$hostname = str_replace('www.','',substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3));
|
$hostname = str_replace('www.','',substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3));
|
||||||
if(stristr($mtch[1],$hostname))
|
if(stristr($mtch[1],$hostname))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -649,7 +649,7 @@ function notifier_run(&$argv, &$argc){
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$params = 'hub.mode=publish&hub.url=' . urlencode( $a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
|
$params = 'hub.mode=publish&hub.url=' . urlencode( App::get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
|
||||||
post_url($h,$params);
|
post_url($h,$params);
|
||||||
logger('publish for item '.$item_id.' ' . $h . ' ' . $params . ' returned ' . $a->get_curl_code());
|
logger('publish for item '.$item_id.' ' . $h . ' ' . $params . ' returned ' . $a->get_curl_code());
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ class FKOAuth1 extends OAuthServer {
|
||||||
$_SESSION['mobile-theme'] = get_pconfig($record['uid'], 'system', 'mobile_theme');
|
$_SESSION['mobile-theme'] = get_pconfig($record['uid'], 'system', 'mobile_theme');
|
||||||
$_SESSION['authenticated'] = 1;
|
$_SESSION['authenticated'] = 1;
|
||||||
$_SESSION['page_flags'] = $record['page-flags'];
|
$_SESSION['page_flags'] = $record['page-flags'];
|
||||||
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $record['nickname'];
|
$_SESSION['my_url'] = App::get_baseurl() . '/profile/' . $record['nickname'];
|
||||||
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
||||||
$_SESSION["allow_api"] = true;
|
$_SESSION["allow_api"] = true;
|
||||||
|
|
||||||
|
|
|
@ -410,13 +410,12 @@ function get_theme_info($theme){
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_theme_screenshot($theme) {
|
function get_theme_screenshot($theme) {
|
||||||
$a = get_app();
|
|
||||||
$exts = array('.png','.jpg');
|
$exts = array('.png','.jpg');
|
||||||
foreach($exts as $ext) {
|
foreach($exts as $ext) {
|
||||||
if(file_exists('view/theme/' . $theme . '/screenshot' . $ext))
|
if(file_exists('view/theme/' . $theme . '/screenshot' . $ext))
|
||||||
return($a->get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext);
|
return(App::get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext);
|
||||||
}
|
}
|
||||||
return($a->get_baseurl() . '/images/blank.png');
|
return(App::get_baseurl() . '/images/blank.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
// install and uninstall theme
|
// install and uninstall theme
|
||||||
|
|
|
@ -21,7 +21,7 @@ function handle_pubsubhubbub($id) {
|
||||||
|
|
||||||
$headers = array("Content-type: application/atom+xml",
|
$headers = array("Content-type: application/atom+xml",
|
||||||
sprintf("Link: <%s>;rel=hub,<%s>;rel=self",
|
sprintf("Link: <%s>;rel=hub,<%s>;rel=self",
|
||||||
$a->get_baseurl().'/pubsubhubbub',
|
App::get_baseurl().'/pubsubhubbub',
|
||||||
$rr['topic']),
|
$rr['topic']),
|
||||||
"X-Hub-Signature: sha1=".$hmac_sig);
|
"X-Hub-Signature: sha1=".$hmac_sig);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ function auto_redir(&$a, $contact_nick) {
|
||||||
//
|
//
|
||||||
// We also have to make sure that I'm a legitimate contact--I'm not blocked or pending.
|
// We also have to make sure that I'm a legitimate contact--I'm not blocked or pending.
|
||||||
|
|
||||||
$baseurl = $a->get_baseurl();
|
$baseurl = App::get_baseurl();
|
||||||
$domain_st = strpos($baseurl, "://");
|
$domain_st = strpos($baseurl, "://");
|
||||||
if($domain_st === false)
|
if($domain_st === false)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -9,8 +9,8 @@ function authenticate_success($user_record, $login_initial = false, $interactive
|
||||||
$_SESSION['mobile-theme'] = get_pconfig($user_record['uid'], 'system', 'mobile_theme');
|
$_SESSION['mobile-theme'] = get_pconfig($user_record['uid'], 'system', 'mobile_theme');
|
||||||
$_SESSION['authenticated'] = 1;
|
$_SESSION['authenticated'] = 1;
|
||||||
$_SESSION['page_flags'] = $user_record['page-flags'];
|
$_SESSION['page_flags'] = $user_record['page-flags'];
|
||||||
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $user_record['nickname'];
|
$_SESSION['my_url'] = App::get_baseurl() . '/profile/' . $user_record['nickname'];
|
||||||
$_SESSION['my_address'] = $user_record['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3);
|
$_SESSION['my_address'] = $user_record['nickname'] . '@' . substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3);
|
||||||
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
$a->user = $user_record;
|
$a->user = $user_record;
|
||||||
|
@ -98,7 +98,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
|
||||||
call_hooks('logged_in', $a->user);
|
call_hooks('logged_in', $a->user);
|
||||||
|
|
||||||
if(($a->module !== 'home') && isset($_SESSION['return_url']))
|
if(($a->module !== 'home') && isset($_SESSION['return_url']))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -378,7 +378,7 @@ function check_form_security_token_redirectOnErr($err_redirect, $typename = '',
|
||||||
logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
|
logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
|
||||||
logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA);
|
logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA);
|
||||||
notice( check_form_security_std_err_msg() );
|
notice( check_form_security_std_err_msg() );
|
||||||
goaway($a->get_baseurl() . $err_redirect );
|
goaway(App::get_baseurl() . $err_redirect );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') {
|
function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') {
|
||||||
|
|
|
@ -207,7 +207,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
|
||||||
$orig_updated = $updated;
|
$orig_updated = $updated;
|
||||||
|
|
||||||
// The global contacts should contain the original picture, not the cached one
|
// The global contacts should contain the original picture, not the cached one
|
||||||
if (($generation != 1) AND stristr(normalise_link($profile_photo), normalise_link($a->get_baseurl()."/photo/")))
|
if (($generation != 1) AND stristr(normalise_link($profile_photo), normalise_link(App::get_baseurl()."/photo/")))
|
||||||
$profile_photo = "";
|
$profile_photo = "";
|
||||||
|
|
||||||
$r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1",
|
$r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1",
|
||||||
|
@ -1181,9 +1181,9 @@ function update_suggestions() {
|
||||||
$done = array();
|
$done = array();
|
||||||
|
|
||||||
/// TODO Check if it is really neccessary to poll the own server
|
/// TODO Check if it is really neccessary to poll the own server
|
||||||
poco_load(0,0,0,$a->get_baseurl() . '/poco');
|
poco_load(0,0,0,App::get_baseurl() . '/poco');
|
||||||
|
|
||||||
$done[] = $a->get_baseurl() . '/poco';
|
$done[] = App::get_baseurl() . '/poco';
|
||||||
|
|
||||||
if(strlen(get_config('system','directory'))) {
|
if(strlen(get_config('system','directory'))) {
|
||||||
$x = fetch_url(get_server()."/pubsites");
|
$x = fetch_url(get_server()."/pubsites");
|
||||||
|
@ -1771,8 +1771,6 @@ function gs_fetch_users($server) {
|
||||||
|
|
||||||
logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG);
|
logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG);
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$url = $server."/main/statistics";
|
$url = $server."/main/statistics";
|
||||||
|
|
||||||
$result = z_fetch_url($url);
|
$result = z_fetch_url($url);
|
||||||
|
@ -1811,7 +1809,7 @@ function gs_fetch_users($server) {
|
||||||
"nick" => $user->nickname,
|
"nick" => $user->nickname,
|
||||||
"about" => $user->bio,
|
"about" => $user->bio,
|
||||||
"network" => NETWORK_OSTATUS,
|
"network" => NETWORK_OSTATUS,
|
||||||
"photo" => $a->get_baseurl()."/images/person-175.jpg");
|
"photo" => App::get_baseurl()."/images/person-175.jpg");
|
||||||
get_gcontact_id($contact);
|
get_gcontact_id($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
function create_tags_from_item($itemid) {
|
function create_tags_from_item($itemid) {
|
||||||
$a = get_app();
|
$profile_base = App::get_baseurl();
|
||||||
|
|
||||||
$profile_base = $a->get_baseurl();
|
|
||||||
$profile_data = parse_url($profile_base);
|
$profile_data = parse_url($profile_base);
|
||||||
$profile_base_friendica = $profile_data['host'].$profile_data['path']."/profile/";
|
$profile_base_friendica = $profile_data['host'].$profile_data['path']."/profile/";
|
||||||
$profile_base_diaspora = $profile_data['host'].$profile_data['path']."/u/";
|
$profile_base_diaspora = $profile_data['host'].$profile_data['path']."/u/";
|
||||||
|
|
||||||
$searchpath = $a->get_baseurl()."/search?tag=";
|
$searchpath = App::get_baseurl()."/search?tag=";
|
||||||
|
|
||||||
$messages = q("SELECT `guid`, `uid`, `id`, `edited`, `deleted`, `created`, `received`, `title`, `body`, `tag`, `parent` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid));
|
$messages = q("SELECT `guid`, `uid`, `id`, `edited`, `deleted`, `created`, `received`, `title`, `body`, `tag`, `parent` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid));
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ function replace_macros($s,$r) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
// pass $baseurl to all templates
|
// pass $baseurl to all templates
|
||||||
$r['$baseurl'] = $a->get_baseurl();
|
$r['$baseurl'] = App::get_baseurl();
|
||||||
|
|
||||||
|
|
||||||
$t = $a->template_engine();
|
$t = $a->template_engine();
|
||||||
|
|
|
@ -267,12 +267,10 @@ function update_threads() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_threads_mention() {
|
function update_threads_mention() {
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$users = q("SELECT `uid`, `nickname` FROM `user` ORDER BY `uid`");
|
$users = q("SELECT `uid`, `nickname` FROM `user` ORDER BY `uid`");
|
||||||
|
|
||||||
foreach ($users AS $user) {
|
foreach ($users AS $user) {
|
||||||
$self = normalise_link($a->get_baseurl() . '/profile/' . $user['nickname']);
|
$self = normalise_link(App::get_baseurl() . '/profile/' . $user['nickname']);
|
||||||
$selfhttps = str_replace("http://", "https://", $self);
|
$selfhttps = str_replace("http://", "https://", $self);
|
||||||
$parents = q("SELECT DISTINCT(`parent`) FROM `item` WHERE `uid` = %d AND
|
$parents = q("SELECT DISTINCT(`parent`) FROM `item` WHERE `uid` = %d AND
|
||||||
((`owner-link` IN ('%s', '%s')) OR (`author-link` IN ('%s', '%s')))",
|
((`owner-link` IN ('%s', '%s')) OR (`author-link` IN ('%s', '%s')))",
|
||||||
|
|
|
@ -133,7 +133,7 @@ function import_account(&$a, $file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldbaseurl = $account['baseurl'];
|
$oldbaseurl = $account['baseurl'];
|
||||||
$newbaseurl = $a->get_baseurl();
|
$newbaseurl = App::get_baseurl();
|
||||||
$olduid = $account['user']['uid'];
|
$olduid = $account['user']['uid'];
|
||||||
|
|
||||||
unset($account['user']['uid']);
|
unset($account['user']['uid']);
|
||||||
|
@ -290,5 +290,5 @@ function import_account(&$a, $file) {
|
||||||
proc_run(PRIORITY_HIGH, 'include/notifier.php', 'relocate', $newuid);
|
proc_run(PRIORITY_HIGH, 'include/notifier.php', 'relocate', $newuid);
|
||||||
|
|
||||||
info(t("Done. You can now login with your username and password"));
|
info(t("Done. You can now login with your username and password"));
|
||||||
goaway($a->get_baseurl() . "/login");
|
goaway(App::get_baseurl() . "/login");
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,7 @@ function admin_page_federation(&$a) {
|
||||||
'$counts' => $counts,
|
'$counts' => $counts,
|
||||||
'$version' => FRIENDICA_VERSION,
|
'$version' => FRIENDICA_VERSION,
|
||||||
'$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total),
|
'$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ function admin_page_summary(&$a) {
|
||||||
'$accounts' => $accounts,
|
'$accounts' => $accounts,
|
||||||
'$pending' => array(t('Pending registrations'), $pending),
|
'$pending' => array(t('Pending registrations'), $pending),
|
||||||
'$version' => array(t('Version'), FRIENDICA_VERSION),
|
'$version' => array(t('Version'), FRIENDICA_VERSION),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$platform' => FRIENDICA_PLATFORM,
|
'$platform' => FRIENDICA_PLATFORM,
|
||||||
'$codename' => FRIENDICA_CODENAME,
|
'$codename' => FRIENDICA_CODENAME,
|
||||||
'$build' => get_config('system','build'),
|
'$build' => get_config('system','build'),
|
||||||
|
@ -527,7 +527,7 @@ function admin_page_site_post(&$a) {
|
||||||
* send relocate for every local user
|
* send relocate for every local user
|
||||||
* */
|
* */
|
||||||
|
|
||||||
$old_url = $a->get_baseurl(true);
|
$old_url = App::get_baseurl(true);
|
||||||
|
|
||||||
// Generate host names for relocation the addresses in the format user@address.tld
|
// Generate host names for relocation the addresses in the format user@address.tld
|
||||||
$new_host = str_replace("http://", "@", normalise_link($new_url));
|
$new_host = str_replace("http://", "@", normalise_link($new_url));
|
||||||
|
@ -961,7 +961,7 @@ function admin_page_site(&$a) {
|
||||||
'$performance' => t('Performance'),
|
'$performance' => t('Performance'),
|
||||||
'$worker_title' => t('Worker'),
|
'$worker_title' => t('Worker'),
|
||||||
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
|
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
// name, label, value, help string, extra data...
|
// name, label, value, help string, extra data...
|
||||||
'$sitename' => array('sitename', t("Site name"), $a->config['sitename'],''),
|
'$sitename' => array('sitename', t("Site name"), $a->config['sitename'],''),
|
||||||
'$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""),
|
'$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""),
|
||||||
|
@ -1043,7 +1043,7 @@ function admin_page_site(&$a) {
|
||||||
'$old_pager' => array('old_pager', t("Enable old style pager"), get_config('system','old_pager'), t("The old style pager has page numbers but slows down massively the page speed.")),
|
'$old_pager' => array('old_pager', t("Enable old style pager"), get_config('system','old_pager'), t("The old style pager has page numbers but slows down massively the page speed.")),
|
||||||
'$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.")),
|
'$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"), $a->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"), App::get_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")),
|
'$rino' => array('rino', t("RINO Encryption"), intval(get_config('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
|
||||||
'$embedly' => array('embedly', t("Embedly API key"), get_config('system','embedly'), t("<a href='http://embed.ly'>Embedly</a> is used to fetch additional data for web pages. This is an optional parameter.")),
|
'$embedly' => array('embedly', t("Embedly API key"), get_config('system','embedly'), t("<a href='http://embed.ly'>Embedly</a> is used to fetch additional data for web pages. This is an optional parameter.")),
|
||||||
|
@ -1131,13 +1131,13 @@ function admin_page_dbsync(&$a) {
|
||||||
}
|
}
|
||||||
if(! count($failed)) {
|
if(! count($failed)) {
|
||||||
$o = replace_macros(get_markup_template('structure_check.tpl'),array(
|
$o = replace_macros(get_markup_template('structure_check.tpl'),array(
|
||||||
'$base' => $a->get_baseurl(true),
|
'$base' => App::get_baseurl(true),
|
||||||
'$banner' => t('No failed updates.'),
|
'$banner' => t('No failed updates.'),
|
||||||
'$check' => t('Check database structure'),
|
'$check' => t('Check database structure'),
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
$o = replace_macros(get_markup_template('failed_updates.tpl'),array(
|
$o = replace_macros(get_markup_template('failed_updates.tpl'),array(
|
||||||
'$base' => $a->get_baseurl(true),
|
'$base' => App::get_baseurl(true),
|
||||||
'$banner' => t('Failed Updates'),
|
'$banner' => t('Failed Updates'),
|
||||||
'$desc' => t('This does not include updates prior to 1139, which did not return a status.'),
|
'$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)'),
|
'$mark' => t('Mark success (if update was manually applied)'),
|
||||||
|
@ -1205,7 +1205,7 @@ function admin_page_users_post(&$a){
|
||||||
Thank you and welcome to %4$s.'));
|
Thank you and welcome to %4$s.'));
|
||||||
|
|
||||||
$preamble = sprintf($preamble, $nu['username'], $a->config['sitename']);
|
$preamble = sprintf($preamble, $nu['username'], $a->config['sitename']);
|
||||||
$body = sprintf($body, $a->get_baseurl(), $nu['email'], $result['password'], $a->config['sitename']);
|
$body = sprintf($body, App::get_baseurl(), $nu['email'], $result['password'], $a->config['sitename']);
|
||||||
|
|
||||||
notification(array(
|
notification(array(
|
||||||
'type' => "SYSTEM_EMAIL",
|
'type' => "SYSTEM_EMAIL",
|
||||||
|
@ -1430,7 +1430,7 @@ function admin_page_users(&$a){
|
||||||
'$form_security_token' => get_form_security_token("admin_users"),
|
'$form_security_token' => get_form_security_token("admin_users"),
|
||||||
|
|
||||||
// values //
|
// values //
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
|
|
||||||
'$pending' => $pending,
|
'$pending' => $pending,
|
||||||
'deleted' => $deleted,
|
'deleted' => $deleted,
|
||||||
|
@ -1522,7 +1522,7 @@ function admin_page_plugins(&$a){
|
||||||
'$page' => t('Plugins'),
|
'$page' => t('Plugins'),
|
||||||
'$toggle' => t('Toggle'),
|
'$toggle' => t('Toggle'),
|
||||||
'$settings' => t('Settings'),
|
'$settings' => t('Settings'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
|
|
||||||
'$plugin' => $plugin,
|
'$plugin' => $plugin,
|
||||||
'$status' => $status,
|
'$status' => $status,
|
||||||
|
@ -1547,10 +1547,10 @@ function admin_page_plugins(&$a){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(x($_GET,"a") && $_GET['a']=="r") {
|
if(x($_GET,"a") && $_GET['a']=="r") {
|
||||||
check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/plugins', 'admin_themes', 't');
|
check_form_security_token_redirectOnErr(App::get_baseurl().'/admin/plugins', 'admin_themes', 't');
|
||||||
reload_plugins();
|
reload_plugins();
|
||||||
info("Plugins reloaded");
|
info("Plugins reloaded");
|
||||||
goaway($a->get_baseurl().'/admin/plugins');
|
goaway(App::get_baseurl().'/admin/plugins');
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugins = array();
|
$plugins = array();
|
||||||
|
@ -1582,7 +1582,7 @@ function admin_page_plugins(&$a){
|
||||||
'$page' => t('Plugins'),
|
'$page' => t('Plugins'),
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$reload' => t('Reload active plugins'),
|
'$reload' => t('Reload active plugins'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$function' => 'plugins',
|
'$function' => 'plugins',
|
||||||
'$plugins' => $plugins,
|
'$plugins' => $plugins,
|
||||||
'$pcount' => count($plugins),
|
'$pcount' => count($plugins),
|
||||||
|
@ -1780,7 +1780,7 @@ function admin_page_themes(&$a){
|
||||||
'$page' => t('Themes'),
|
'$page' => t('Themes'),
|
||||||
'$toggle' => t('Toggle'),
|
'$toggle' => t('Toggle'),
|
||||||
'$settings' => t('Settings'),
|
'$settings' => t('Settings'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$plugin' => $theme,
|
'$plugin' => $theme,
|
||||||
'$status' => $status,
|
'$status' => $status,
|
||||||
'$action' => $action,
|
'$action' => $action,
|
||||||
|
@ -1799,7 +1799,7 @@ function admin_page_themes(&$a){
|
||||||
|
|
||||||
// reload active themes
|
// reload active themes
|
||||||
if(x($_GET,"a") && $_GET['a']=="r") {
|
if(x($_GET,"a") && $_GET['a']=="r") {
|
||||||
check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/themes', 'admin_themes', 't');
|
check_form_security_token_redirectOnErr(App::get_baseurl().'/admin/themes', 'admin_themes', 't');
|
||||||
if($themes) {
|
if($themes) {
|
||||||
foreach($themes as $th) {
|
foreach($themes as $th) {
|
||||||
if($th['allowed']) {
|
if($th['allowed']) {
|
||||||
|
@ -1809,7 +1809,7 @@ function admin_page_themes(&$a){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info("Themes reloaded");
|
info("Themes reloaded");
|
||||||
goaway($a->get_baseurl().'/admin/themes');
|
goaway(App::get_baseurl().'/admin/themes');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1830,7 +1830,7 @@ function admin_page_themes(&$a){
|
||||||
'$page' => t('Themes'),
|
'$page' => t('Themes'),
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$reload' => t('Reload active themes'),
|
'$reload' => t('Reload active themes'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$function' => 'themes',
|
'$function' => 'themes',
|
||||||
'$plugins' => $xthemes,
|
'$plugins' => $xthemes,
|
||||||
'$pcount' => count($themes),
|
'$pcount' => count($themes),
|
||||||
|
@ -1904,7 +1904,7 @@ function admin_page_logs(&$a){
|
||||||
'$page' => t('Logs'),
|
'$page' => t('Logs'),
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$clear' => t('Clear'),
|
'$clear' => t('Clear'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$logname' => get_config('system','logfile'),
|
'$logname' => get_config('system','logfile'),
|
||||||
|
|
||||||
// name, label, value, help string, extra data...
|
// name, label, value, help string, extra data...
|
||||||
|
|
|
@ -60,7 +60,7 @@ function allfriends_content(&$a) {
|
||||||
$photo_menu = contact_photo_menu ($rr);
|
$photo_menu = contact_photo_menu ($rr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url'];
|
$connlnk = App::get_baseurl() . '/follow/?url=' . $rr['url'];
|
||||||
$photo_menu = array(
|
$photo_menu = array(
|
||||||
'profile' => array(t("View Profile"), zrl($rr['url'])),
|
'profile' => array(t("View Profile"), zrl($rr['url'])),
|
||||||
'follow' => array(t("Connect/Follow"), $connlnk)
|
'follow' => array(t("Connect/Follow"), $connlnk)
|
||||||
|
|
|
@ -15,7 +15,7 @@ function bookmarklet_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$referer = normalise_link($_SERVER["HTTP_REFERER"]);
|
$referer = normalise_link($_SERVER["HTTP_REFERER"]);
|
||||||
$page = normalise_link($a->get_baseurl()."/bookmarklet");
|
$page = normalise_link(App::get_baseurl()."/bookmarklet");
|
||||||
|
|
||||||
if (!strstr($referer, $page)) {
|
if (!strstr($referer, $page)) {
|
||||||
$content = add_page_info($_REQUEST["url"]);
|
$content = add_page_info($_REQUEST["url"]);
|
||||||
|
|
12
mod/cal.php
12
mod/cal.php
|
@ -80,7 +80,7 @@ function cal_content(&$a) {
|
||||||
|
|
||||||
$htpl = get_markup_template('event_head.tpl');
|
$htpl = get_markup_template('event_head.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($htpl,array(
|
$a->page['htmlhead'] .= replace_macros($htpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
||||||
'$modparams' => 2,
|
'$modparams' => 2,
|
||||||
'$i18n' => $i18n,
|
'$i18n' => $i18n,
|
||||||
|
@ -89,7 +89,7 @@ function cal_content(&$a) {
|
||||||
|
|
||||||
$etpl = get_markup_template('event_end.tpl');
|
$etpl = get_markup_template('event_end.tpl');
|
||||||
$a->page['end'] .= replace_macros($etpl,array(
|
$a->page['end'] .= replace_macros($etpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$editselect' => $editselect
|
'$editselect' => $editselect
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ function cal_content(&$a) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
||||||
if(! x($links,$j))
|
if(! x($links,$j))
|
||||||
$links[$j] = $a->get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
$links[$j] = App::get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,12 +270,12 @@ function cal_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$title' => t('Events'),
|
'$title' => t('Events'),
|
||||||
'$view' => t('View'),
|
'$view' => t('View'),
|
||||||
'$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
|
'$previus' => array(App::get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
|
||||||
'$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
|
'$next' => array(App::get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
|
||||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||||
|
|
||||||
'$events' => $events,
|
'$events' => $events,
|
||||||
|
|
|
@ -78,13 +78,13 @@ function contacts_init(&$a) {
|
||||||
$base = z_root();
|
$base = z_root();
|
||||||
$tpl = get_markup_template("contacts-head.tpl");
|
$tpl = get_markup_template("contacts-head.tpl");
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$base' => $base
|
'$base' => $base
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template("contacts-end.tpl");
|
$tpl = get_markup_template("contacts-end.tpl");
|
||||||
$a->page['end'] .= replace_macros($tpl,array(
|
$a->page['end'] .= replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$base' => $base
|
'$base' => $base
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -480,11 +480,11 @@ function contacts_content(&$a) {
|
||||||
$editselect = 'exact';
|
$editselect = 'exact';
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => $editselect,
|
'$editselect' => $editselect,
|
||||||
));
|
));
|
||||||
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
|
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => $editselect,
|
'$editselect' => $editselect,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ function contacts_content(&$a) {
|
||||||
|
|
||||||
if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS)) AND
|
if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS)) AND
|
||||||
($contact['rel'] == CONTACT_IS_FOLLOWER))
|
($contact['rel'] == CONTACT_IS_FOLLOWER))
|
||||||
$follow = $a->get_baseurl(true)."/follow?url=".urlencode($contact["url"]);
|
$follow = App::get_baseurl(true)."/follow?url=".urlencode($contact["url"]);
|
||||||
|
|
||||||
// Load contactact related actions like hide, suggest, delete and others
|
// Load contactact related actions like hide, suggest, delete and others
|
||||||
$contact_actions = contact_actions($contact);
|
$contact_actions = contact_actions($contact);
|
||||||
|
|
|
@ -117,7 +117,7 @@ function content_content(&$a, $update = 0) {
|
||||||
if($update)
|
if($update)
|
||||||
killme();
|
killme();
|
||||||
notice( t('No such group') . EOL );
|
notice( t('No such group') . EOL );
|
||||||
goaway($a->get_baseurl(true) . '/network');
|
goaway(App::get_baseurl(true) . '/network');
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,8 +509,8 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
'like' => '',
|
'like' => '',
|
||||||
'dislike' => '',
|
'dislike' => '',
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
//'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
|
//'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
|
||||||
'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))),
|
'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))),
|
||||||
'previewing' => $previewing,
|
'previewing' => $previewing,
|
||||||
'wait' => t('Please wait'),
|
'wait' => t('Please wait'),
|
||||||
);
|
);
|
||||||
|
@ -743,7 +743,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(local_user() && link_compare($a->contact['url'],$item['author-link']))
|
if(local_user() && link_compare($a->contact['url'],$item['author-link']))
|
||||||
$edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
|
$edpost = array(App::get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
|
||||||
else
|
else
|
||||||
$edpost = false;
|
$edpost = false;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ function delegate_content(&$a) {
|
||||||
// delegated admins can view but not change delegation permissions
|
// delegated admins can view but not change delegation permissions
|
||||||
|
|
||||||
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
|
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
|
||||||
goaway($a->get_baseurl() . '/delegate');
|
goaway(App::get_baseurl() . '/delegate');
|
||||||
|
|
||||||
|
|
||||||
$id = $a->argv[2];
|
$id = $a->argv[2];
|
||||||
|
@ -29,7 +29,7 @@ function delegate_content(&$a) {
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
$r = q("select id from contact where uid = %d and nurl = '%s' limit 1",
|
$r = q("select id from contact where uid = %d and nurl = '%s' limit 1",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc(normalise_link($a->get_baseurl() . '/profile/' . $r[0]['nickname']))
|
dbesc(normalise_link(App::get_baseurl() . '/profile/' . $r[0]['nickname']))
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
q("insert into manage ( uid, mid ) values ( %d , %d ) ",
|
q("insert into manage ( uid, mid ) values ( %d , %d ) ",
|
||||||
|
@ -38,7 +38,7 @@ function delegate_content(&$a) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goaway($a->get_baseurl() . '/delegate');
|
goaway(App::get_baseurl() . '/delegate');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
|
if($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
|
||||||
|
@ -46,13 +46,13 @@ function delegate_content(&$a) {
|
||||||
// delegated admins can view but not change delegation permissions
|
// delegated admins can view but not change delegation permissions
|
||||||
|
|
||||||
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
|
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
|
||||||
goaway($a->get_baseurl() . '/delegate');
|
goaway(App::get_baseurl() . '/delegate');
|
||||||
|
|
||||||
q("delete from manage where uid = %d and mid = %d limit 1",
|
q("delete from manage where uid = %d and mid = %d limit 1",
|
||||||
intval($a->argv[2]),
|
intval($a->argv[2]),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
goaway($a->get_baseurl() . '/delegate');
|
goaway(App::get_baseurl() . '/delegate');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ function delegate_content(&$a) {
|
||||||
|
|
||||||
$r = q("select nurl from contact where substring_index(contact.nurl,'/',3) = '%s'
|
$r = q("select nurl from contact where substring_index(contact.nurl,'/',3) = '%s'
|
||||||
and contact.uid = %d and contact.self = 0 and network = '%s' ",
|
and contact.uid = %d and contact.self = 0 and network = '%s' ",
|
||||||
dbesc(normalise_link($a->get_baseurl())),
|
dbesc(normalise_link(App::get_baseurl())),
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc(NETWORK_DFRN)
|
dbesc(NETWORK_DFRN)
|
||||||
);
|
);
|
||||||
|
@ -128,7 +128,7 @@ function delegate_content(&$a) {
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('delegate.tpl'),array(
|
$o = replace_macros(get_markup_template('delegate.tpl'),array(
|
||||||
'$header' => t('Delegate Page Management'),
|
'$header' => t('Delegate Page Management'),
|
||||||
'$base' => $a->get_baseurl(),
|
'$base' => App::get_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.'),
|
'$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'),
|
'$head_managers' => t('Existing Page Managers'),
|
||||||
'$managers' => $full_managers,
|
'$managers' => $full_managers,
|
||||||
|
|
|
@ -194,7 +194,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||||
$params['public_key'] = $public_key;
|
$params['public_key'] = $public_key;
|
||||||
|
|
||||||
|
|
||||||
$my_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
|
$my_url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
|
||||||
|
|
||||||
openssl_public_encrypt($my_url, $params['source_url'], $site_pubkey);
|
openssl_public_encrypt($my_url, $params['source_url'], $site_pubkey);
|
||||||
$params['source_url'] = bin2hex($params['source_url']);
|
$params['source_url'] = bin2hex($params['source_url']);
|
||||||
|
@ -504,7 +504,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||||
// do anything special with this new friend.
|
// do anything special with this new friend.
|
||||||
|
|
||||||
if($handsfree === null)
|
if($handsfree === null)
|
||||||
goaway($a->get_baseurl() . '/contacts/' . intval($contact_id));
|
goaway(App::get_baseurl() . '/contacts/' . intval($contact_id));
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
//NOTREACHED
|
//NOTREACHED
|
||||||
|
@ -664,7 +664,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||||
if (dbm::is_result($r))
|
if (dbm::is_result($r))
|
||||||
$photo = $r[0]['photo'];
|
$photo = $r[0]['photo'];
|
||||||
else
|
else
|
||||||
$photo = $a->get_baseurl() . '/images/person-175.jpg';
|
$photo = App::get_baseurl() . '/images/person-175.jpg';
|
||||||
|
|
||||||
require_once("include/Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||||
'to_name' => $r[0]['username'],
|
'to_name' => $r[0]['username'],
|
||||||
'to_email' => $r[0]['email'],
|
'to_email' => $r[0]['email'],
|
||||||
'uid' => $r[0]['uid'],
|
'uid' => $r[0]['uid'],
|
||||||
'link' => $a->get_baseurl() . '/contacts/' . $dfrn_record,
|
'link' => App::get_baseurl() . '/contacts/' . $dfrn_record,
|
||||||
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||||
'source_link' => $r[0]['url'],
|
'source_link' => $r[0]['url'],
|
||||||
'source_photo' => $r[0]['photo'],
|
'source_photo' => $r[0]['photo'],
|
||||||
|
|
|
@ -112,7 +112,7 @@ function dfrn_poll_init(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$profile = $r[0]['nickname'];
|
$profile = $r[0]['nickname'];
|
||||||
goaway((strlen($destination_url)) ? $destination_url : $a->get_baseurl() . '/profile/' . $profile);
|
goaway((strlen($destination_url)) ? $destination_url : App::get_baseurl() . '/profile/' . $profile);
|
||||||
}
|
}
|
||||||
goaway(z_root());
|
goaway(z_root());
|
||||||
|
|
||||||
|
@ -499,14 +499,14 @@ function dfrn_poll_content(&$a) {
|
||||||
|
|
||||||
switch($destination_url) {
|
switch($destination_url) {
|
||||||
case 'profile':
|
case 'profile':
|
||||||
$dest = $a->get_baseurl() . '/profile/' . $profile . '?f=&tab=profile';
|
$dest = App::get_baseurl() . '/profile/' . $profile . '?f=&tab=profile';
|
||||||
break;
|
break;
|
||||||
case 'photos':
|
case 'photos':
|
||||||
$dest = $a->get_baseurl() . '/photos/' . $profile;
|
$dest = App::get_baseurl() . '/photos/' . $profile;
|
||||||
break;
|
break;
|
||||||
case 'status':
|
case 'status':
|
||||||
case '':
|
case '':
|
||||||
$dest = $a->get_baseurl() . '/profile/' . $profile;
|
$dest = App::get_baseurl() . '/profile/' . $profile;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$dest = $destination_url . '?f=&redir=1';
|
$dest = $destination_url . '?f=&redir=1';
|
||||||
|
|
|
@ -193,9 +193,9 @@ function dfrn_request_post(&$a) {
|
||||||
if (isset($photo))
|
if (isset($photo))
|
||||||
update_contact_avatar($photo, local_user(), $r[0]["id"], true);
|
update_contact_avatar($photo, local_user(), $r[0]["id"], true);
|
||||||
|
|
||||||
$forwardurl = $a->get_baseurl()."/contacts/".$r[0]['id'];
|
$forwardurl = App::get_baseurl()."/contacts/".$r[0]['id'];
|
||||||
} else
|
} else
|
||||||
$forwardurl = $a->get_baseurl()."/contacts";
|
$forwardurl = App::get_baseurl()."/contacts";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow the blocked remote notification to complete
|
* Allow the blocked remote notification to complete
|
||||||
|
@ -501,13 +501,13 @@ function dfrn_request_post(&$a) {
|
||||||
else {
|
else {
|
||||||
if(! validate_url($url)) {
|
if(! validate_url($url)) {
|
||||||
notice( t('Invalid profile URL.') . EOL);
|
notice( t('Invalid profile URL.') . EOL);
|
||||||
goaway($a->get_baseurl() . '/' . $a->cmd);
|
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! allowed_url($url)) {
|
if(! allowed_url($url)) {
|
||||||
notice( t('Disallowed profile URL.') . EOL);
|
notice( t('Disallowed profile URL.') . EOL);
|
||||||
goaway($a->get_baseurl() . '/' . $a->cmd);
|
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,7 +518,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
if(! count($parms)) {
|
if(! count($parms)) {
|
||||||
notice( t('Profile location is not valid or does not contain profile information.') . EOL );
|
notice( t('Profile location is not valid or does not contain profile information.') . EOL );
|
||||||
goaway($a->get_baseurl() . '/' . $a->cmd);
|
goaway(App::get_baseurl() . '/' . $a->cmd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(! x($parms,'fn'))
|
if(! x($parms,'fn'))
|
||||||
|
@ -605,7 +605,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
// "Homecoming" - send the requestor back to their site to record the introduction.
|
// "Homecoming" - send the requestor back to their site to record the introduction.
|
||||||
|
|
||||||
$dfrn_url = bin2hex($a->get_baseurl() . '/profile/' . $nickname);
|
$dfrn_url = bin2hex(App::get_baseurl() . '/profile/' . $nickname);
|
||||||
$aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
|
$aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
|
||||||
|
|
||||||
goaway($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
|
goaway($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
|
||||||
|
@ -634,7 +634,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
$uri = urlencode($uri);
|
$uri = urlencode($uri);
|
||||||
} else
|
} else
|
||||||
$uri = $a->get_baseurl().'/profile/'.$nickname;
|
$uri = App::get_baseurl().'/profile/'.$nickname;
|
||||||
|
|
||||||
$url = str_replace('{uri}', $uri, $url);
|
$url = str_replace('{uri}', $uri, $url);
|
||||||
goaway($url);
|
goaway($url);
|
||||||
|
@ -742,7 +742,7 @@ function dfrn_request_content(&$a) {
|
||||||
'to_name' => $r[0]['username'],
|
'to_name' => $r[0]['username'],
|
||||||
'to_email' => $r[0]['email'],
|
'to_email' => $r[0]['email'],
|
||||||
'uid' => $r[0]['uid'],
|
'uid' => $r[0]['uid'],
|
||||||
'link' => $a->get_baseurl() . '/notifications/intros',
|
'link' => App::get_baseurl() . '/notifications/intros',
|
||||||
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||||
'source_link' => $r[0]['url'],
|
'source_link' => $r[0]['url'],
|
||||||
'source_photo' => $r[0]['photo'],
|
'source_photo' => $r[0]['photo'],
|
||||||
|
@ -806,7 +806,7 @@ function dfrn_request_content(&$a) {
|
||||||
$myaddr = $_GET['address'];
|
$myaddr = $_GET['address'];
|
||||||
elseif(local_user()) {
|
elseif(local_user()) {
|
||||||
if(strlen($a->path)) {
|
if(strlen($a->path)) {
|
||||||
$myaddr = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
|
$myaddr = App::get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
|
$myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
|
||||||
|
|
|
@ -197,7 +197,7 @@ function dirfind_content(&$a, $prefix = "") {
|
||||||
} else
|
} else
|
||||||
$photo_menu = array();
|
$photo_menu = array();
|
||||||
} else {
|
} else {
|
||||||
$connlnk = $a->get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
|
$connlnk = App::get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
|
||||||
$conntxt = t('Connect');
|
$conntxt = t('Connect');
|
||||||
$photo_menu = array(
|
$photo_menu = array(
|
||||||
'profile' => array(t("View Profile"), zrl($jj->url)),
|
'profile' => array(t("View Profile"), zrl($jj->url)),
|
||||||
|
|
|
@ -81,8 +81,8 @@ function display_init(&$a) {
|
||||||
|
|
||||||
$profiledata = display_fetchauthor($a, $r[0]);
|
$profiledata = display_fetchauthor($a, $r[0]);
|
||||||
|
|
||||||
if (strstr(normalise_link($profiledata["url"]), normalise_link($a->get_baseurl()))) {
|
if (strstr(normalise_link($profiledata["url"]), normalise_link(App::get_baseurl()))) {
|
||||||
$nickname = str_replace(normalise_link($a->get_baseurl())."/profile/", "", normalise_link($profiledata["url"]));
|
$nickname = str_replace(normalise_link(App::get_baseurl())."/profile/", "", normalise_link($profiledata["url"]));
|
||||||
|
|
||||||
if (($nickname != $a->user["nickname"])) {
|
if (($nickname != $a->user["nickname"])) {
|
||||||
$r = qu("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
|
$r = qu("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
|
||||||
|
@ -184,7 +184,7 @@ function display_fetchauthor($a, $item) {
|
||||||
|
|
||||||
if (local_user()) {
|
if (local_user()) {
|
||||||
if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
|
if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
|
||||||
$profiledata["remoteconnect"] = $a->get_baseurl()."/follow?url=".urlencode($profiledata["url"]);
|
$profiledata["remoteconnect"] = App::get_baseurl()."/follow?url=".urlencode($profiledata["url"]);
|
||||||
}
|
}
|
||||||
} elseif ($profiledata["network"] == NETWORK_DFRN) {
|
} elseif ($profiledata["network"] == NETWORK_DFRN) {
|
||||||
$connect = str_replace("/profile/", "/dfrn_request/", $profiledata["url"]);
|
$connect = str_replace("/profile/", "/dfrn_request/", $profiledata["url"]);
|
||||||
|
|
|
@ -42,7 +42,7 @@ function editpost_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('jot-header.tpl');
|
$tpl = get_markup_template('jot-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
|
@ -51,7 +51,7 @@ function editpost_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('jot-end.tpl');
|
$tpl = get_markup_template('jot-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
|
@ -126,7 +126,7 @@ function editpost_content(&$a) {
|
||||||
'$ptyp' => $itm[0]['type'],
|
'$ptyp' => $itm[0]['type'],
|
||||||
'$content' => undo_post_tagging($itm[0]['body']),
|
'$content' => undo_post_tagging($itm[0]['body']),
|
||||||
'$post_id' => $post_id,
|
'$post_id' => $post_id,
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$defloc' => $a->user['default-location'],
|
'$defloc' => $a->user['default-location'],
|
||||||
'$visitor' => 'none',
|
'$visitor' => 'none',
|
||||||
'$pvisit' => 'none',
|
'$pvisit' => 'none',
|
||||||
|
|
|
@ -89,7 +89,7 @@ function events_post(&$a) {
|
||||||
$type = 'event';
|
$type = 'event';
|
||||||
|
|
||||||
$action = ($event_id == '') ? 'new' : "event/" . $event_id;
|
$action = ($event_id == '') ? 'new' : "event/" . $event_id;
|
||||||
$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
|
$onerror_url = App::get_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) {
|
if(strcmp($finish,$start) < 0 && !$nofinish) {
|
||||||
notice( t('Event can not end before it has started.') . EOL);
|
notice( t('Event can not end before it has started.') . EOL);
|
||||||
|
@ -192,7 +192,7 @@ function events_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($a->argc == 1)
|
if($a->argc == 1)
|
||||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||||
|
|
||||||
if(($a->argc > 2) && ($a->argv[1] === 'ignore') && intval($a->argv[2])) {
|
if(($a->argc > 2) && ($a->argv[1] === 'ignore') && intval($a->argv[2])) {
|
||||||
$r = q("update event set ignore = 1 where id = %d and uid = %d",
|
$r = q("update event set ignore = 1 where id = %d and uid = %d",
|
||||||
|
@ -222,7 +222,7 @@ function events_content(&$a) {
|
||||||
|
|
||||||
$htpl = get_markup_template('event_head.tpl');
|
$htpl = get_markup_template('event_head.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($htpl,array(
|
$a->page['htmlhead'] .= replace_macros($htpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$module_url' => '/events',
|
'$module_url' => '/events',
|
||||||
'$modparams' => 1,
|
'$modparams' => 1,
|
||||||
'$i18n' => $i18n,
|
'$i18n' => $i18n,
|
||||||
|
@ -231,7 +231,7 @@ function events_content(&$a) {
|
||||||
|
|
||||||
$etpl = get_markup_template('event_end.tpl');
|
$etpl = get_markup_template('event_end.tpl');
|
||||||
$a->page['end'] .= replace_macros($etpl,array(
|
$a->page['end'] .= replace_macros($etpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$editselect' => $editselect
|
'$editselect' => $editselect
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ function events_content(&$a) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
||||||
if(! x($links,$j))
|
if(! x($links,$j))
|
||||||
$links[$j] = $a->get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
$links[$j] = App::get_baseurl() . '/' . $a->cmd . '#link-' . $j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,13 +375,13 @@ function events_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$title' => t('Events'),
|
'$title' => t('Events'),
|
||||||
'$view' => t('View'),
|
'$view' => t('View'),
|
||||||
'$new_event' => array($a->get_baseurl().'/events/new',t('Create New Event'),'',''),
|
'$new_event' => array(App::get_baseurl().'/events/new',t('Create New Event'),'',''),
|
||||||
'$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
|
'$previus' => array(App::get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
|
||||||
'$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
|
'$next' => array(App::get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
|
||||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||||
|
|
||||||
'$events' => $events,
|
'$events' => $events,
|
||||||
|
@ -475,7 +475,7 @@ function events_content(&$a) {
|
||||||
$tpl = get_markup_template('event_form.tpl');
|
$tpl = get_markup_template('event_form.tpl');
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$post' => $a->get_baseurl() . '/events',
|
'$post' => App::get_baseurl() . '/events',
|
||||||
'$eid' => $eid,
|
'$eid' => $eid,
|
||||||
'$cid' => $cid,
|
'$cid' => $cid,
|
||||||
'$uri' => $uri,
|
'$uri' => $uri,
|
||||||
|
|
|
@ -10,6 +10,7 @@ require_once('include/Photo.php');
|
||||||
/**
|
/**
|
||||||
* @param App $a
|
* @param App $a
|
||||||
*/
|
*/
|
||||||
|
/// @TODO & is missing or App ?
|
||||||
function fbrowser_content($a){
|
function fbrowser_content($a){
|
||||||
|
|
||||||
if (!local_user())
|
if (!local_user())
|
||||||
|
@ -83,9 +84,9 @@ function fbrowser_content($a){
|
||||||
$scale = $rr['loq'];
|
$scale = $rr['loq'];
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$a->get_baseurl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
|
App::get_baseurl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
|
||||||
$filename_e,
|
$filename_e,
|
||||||
$a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
App::get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$files = array_map("_map_files1", $r);
|
$files = array_map("_map_files1", $r);
|
||||||
|
@ -94,7 +95,7 @@ function fbrowser_content($a){
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$type' => 'image',
|
'$type' => 'image',
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$path' => $path,
|
'$path' => $path,
|
||||||
'$folders' => $albums,
|
'$folders' => $albums,
|
||||||
'$files' =>$files,
|
'$files' =>$files,
|
||||||
|
@ -122,7 +123,7 @@ function fbrowser_content($a){
|
||||||
$filename_e = $rr['filename'];
|
$filename_e = $rr['filename'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return array( $a->get_baseurl() . '/attach/' . $rr['id'], $filename_e, $a->get_baseurl() . '/images/icons/16/' . $filetype . '.png');
|
return array( App::get_baseurl() . '/attach/' . $rr['id'], $filename_e, App::get_baseurl() . '/images/icons/16/' . $filetype . '.png');
|
||||||
}
|
}
|
||||||
$files = array_map("_map_files2", $files);
|
$files = array_map("_map_files2", $files);
|
||||||
|
|
||||||
|
@ -130,7 +131,7 @@ function fbrowser_content($a){
|
||||||
$tpl = get_markup_template($template_file);
|
$tpl = get_markup_template($template_file);
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$type' => 'file',
|
'$type' => 'file',
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$path' => array( array( "", t("Files")) ),
|
'$path' => array( array( "", t("Files")) ),
|
||||||
'$folders' => false,
|
'$folders' => false,
|
||||||
'$files' =>$files,
|
'$files' =>$files,
|
||||||
|
|
|
@ -15,7 +15,7 @@ function friendica_init(&$a) {
|
||||||
$r = q("SELECT username, nickname FROM user WHERE email='%s' $sql_extra", dbesc($adminlist[0]));
|
$r = q("SELECT username, nickname FROM user WHERE email='%s' $sql_extra", dbesc($adminlist[0]));
|
||||||
$admin = array(
|
$admin = array(
|
||||||
'name' => $r[0]['username'],
|
'name' => $r[0]['username'],
|
||||||
'profile'=> $a->get_baseurl().'/profile/'.$r[0]['nickname'],
|
'profile'=> App::get_baseurl().'/profile/'.$r[0]['nickname'],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$admin = false;
|
$admin = false;
|
||||||
|
@ -49,7 +49,7 @@ function friendica_init(&$a) {
|
||||||
'site_name' => $a->config['sitename'],
|
'site_name' => $a->config['sitename'],
|
||||||
'platform' => FRIENDICA_PLATFORM,
|
'platform' => FRIENDICA_PLATFORM,
|
||||||
'info' => ((x($a->config,'info')) ? $a->config['info'] : ''),
|
'info' => ((x($a->config,'info')) ? $a->config['info'] : ''),
|
||||||
'no_scrape_url' => $a->get_baseurl().'/noscrape'
|
'no_scrape_url' => App::get_baseurl().'/noscrape'
|
||||||
);
|
);
|
||||||
|
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
|
|
@ -29,11 +29,11 @@ function group_post(&$a) {
|
||||||
info( t('Group created.') . EOL );
|
info( t('Group created.') . EOL );
|
||||||
$r = group_byname(local_user(),$name);
|
$r = group_byname(local_user(),$name);
|
||||||
if($r)
|
if($r)
|
||||||
goaway($a->get_baseurl() . '/group/' . $r);
|
goaway(App::get_baseurl() . '/group/' . $r);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
notice( t('Could not create group.') . EOL );
|
notice( t('Could not create group.') . EOL );
|
||||||
goaway($a->get_baseurl() . '/group');
|
goaway(App::get_baseurl() . '/group');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
if(($a->argc == 2) && (intval($a->argv[1]))) {
|
if(($a->argc == 2) && (intval($a->argv[1]))) {
|
||||||
|
@ -45,7 +45,7 @@ function group_post(&$a) {
|
||||||
);
|
);
|
||||||
if(! dbm::is_result($r)) {
|
if(! dbm::is_result($r)) {
|
||||||
notice( t('Group not found.') . EOL );
|
notice( t('Group not found.') . EOL );
|
||||||
goaway($a->get_baseurl() . '/contacts');
|
goaway(App::get_baseurl() . '/contacts');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
$group = $r[0];
|
$group = $r[0];
|
||||||
|
@ -114,7 +114,7 @@ function group_content(&$a) {
|
||||||
else
|
else
|
||||||
notice( t('Unable to remove group.') . EOL);
|
notice( t('Unable to remove group.') . EOL);
|
||||||
}
|
}
|
||||||
goaway($a->get_baseurl() . '/group');
|
goaway(App::get_baseurl() . '/group');
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ function group_content(&$a) {
|
||||||
);
|
);
|
||||||
if(! dbm::is_result($r)) {
|
if(! dbm::is_result($r)) {
|
||||||
notice( t('Group not found.') . EOL );
|
notice( t('Group not found.') . EOL );
|
||||||
goaway($a->get_baseurl() . '/contacts');
|
goaway(App::get_baseurl() . '/contacts');
|
||||||
}
|
}
|
||||||
$group = $r[0];
|
$group = $r[0];
|
||||||
$members = group_get_members($group['id']);
|
$members = group_get_members($group['id']);
|
||||||
|
|
|
@ -38,14 +38,14 @@ function hcard_init(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
|
$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="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . App::get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . App::get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||||
header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||||
|
|
||||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||||
foreach($dfrn_pages as $dfrn)
|
foreach($dfrn_pages as $dfrn)
|
||||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".$a->get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".App::get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ function home_init(&$a) {
|
||||||
call_hooks('home_init',$ret);
|
call_hooks('home_init',$ret);
|
||||||
|
|
||||||
if(local_user() && ($a->user['nickname']))
|
if(local_user() && ($a->user['nickname']))
|
||||||
goaway($a->get_baseurl()."/network");
|
goaway(App::get_baseurl()."/network");
|
||||||
//goaway($a->get_baseurl()."/profile/".$a->user['nickname']);
|
//goaway(App::get_baseurl()."/profile/".$a->user['nickname']);
|
||||||
|
|
||||||
if(strlen(get_config('system','singleuser')))
|
if(strlen(get_config('system','singleuser')))
|
||||||
goaway($a->get_baseurl()."/profile/" . get_config('system','singleuser'));
|
goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser'));
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ function home_content(&$a) {
|
||||||
|
|
||||||
if(file_exists('home.html')){
|
if(file_exists('home.html')){
|
||||||
if(file_exists('home.css')){
|
if(file_exists('home.css')){
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/home.css'.'" media="all" />';}
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.App::get_baseurl().'/home.css'.'" media="all" />';}
|
||||||
|
|
||||||
$o .= file_get_contents('home.html');}
|
$o .= file_get_contents('home.html');}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ function ignored_init(&$a) {
|
||||||
if(strpos($return_path, '?')) $rand = "&$rand";
|
if(strpos($return_path, '?')) $rand = "&$rand";
|
||||||
else $rand = "?$rand";
|
else $rand = "?$rand";
|
||||||
|
|
||||||
goaway($a->get_baseurl() . "/" . $return_path . $rand);
|
goaway(App::get_baseurl() . "/" . $return_path . $rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the json doesn't really matter, it will either be 0 or 1
|
// the json doesn't really matter, it will either be 0 or 1
|
||||||
|
|
|
@ -15,7 +15,7 @@ function install_init(&$a){
|
||||||
// We overwrite current theme css, because during install we could not have a working mod_rewrite
|
// 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
|
// 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->config['system']['theme'] = "../install";
|
||||||
$a->theme['stylesheet'] = $a->get_baseurl()."/view/install/style.css";
|
$a->theme['stylesheet'] = App::get_baseurl()."/view/install/style.css";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ function install_content(&$a) {
|
||||||
'$next' => t('Next'),
|
'$next' => t('Next'),
|
||||||
'$reload' => t('Check again'),
|
'$reload' => t('Check again'),
|
||||||
'$phpath' => $phpath,
|
'$phpath' => $phpath,
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
}; break;
|
}; break;
|
||||||
|
@ -265,7 +265,7 @@ function install_content(&$a) {
|
||||||
|
|
||||||
'$lbl_10' => t('Please select a default timezone for your website'),
|
'$lbl_10' => t('Please select a default timezone for your website'),
|
||||||
|
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
|
|
||||||
'$phpath' => $phpath,
|
'$phpath' => $phpath,
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ function install_content(&$a) {
|
||||||
|
|
||||||
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
|
'$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),
|
'$language' => array('language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -518,14 +518,13 @@ function check_smarty3(&$checks) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_htaccess(&$checks) {
|
function check_htaccess(&$checks) {
|
||||||
$a = get_app();
|
|
||||||
$status = true;
|
$status = true;
|
||||||
$help = "";
|
$help = "";
|
||||||
if (function_exists('curl_init')){
|
if (function_exists('curl_init')){
|
||||||
$test = fetch_url($a->get_baseurl()."/install/testrewrite");
|
$test = fetch_url(App::get_baseurl()."/install/testrewrite");
|
||||||
|
|
||||||
if ($test!="ok")
|
if ($test!="ok")
|
||||||
$test = fetch_url(normalise_link($a->get_baseurl()."/install/testrewrite"));
|
$test = fetch_url(normalise_link(App::get_baseurl()."/install/testrewrite"));
|
||||||
|
|
||||||
if ($test!="ok") {
|
if ($test!="ok") {
|
||||||
$status = false;
|
$status = false;
|
||||||
|
@ -599,8 +598,7 @@ function load_database($db) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function what_next() {
|
function what_next() {
|
||||||
$a = get_app();
|
$baseurl = App::get_baseurl();
|
||||||
$baseurl = $a->get_baseurl();
|
|
||||||
return
|
return
|
||||||
t('<h1>What next</h1>')
|
t('<h1>What next</h1>')
|
||||||
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
|
."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
|
||||||
|
|
|
@ -119,7 +119,7 @@ function invite_content(&$a) {
|
||||||
if($a->config['register_policy'] == REGISTER_CLOSED)
|
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 . '/siteinfo');
|
$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 . '/siteinfo');
|
||||||
elseif($a->config['register_policy'] != REGISTER_CLOSED)
|
elseif($a->config['register_policy'] != REGISTER_CLOSED)
|
||||||
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), $a->get_baseurl())
|
$linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), App::get_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 . '/siteinfo');
|
. "\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 . '/siteinfo');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -135,7 +135,7 @@ function invite_content(&$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"
|
'$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
|
. $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" . (($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" . $a->get_baseurl() . '/profile/' . $a->user['nickname']
|
. "\r\n" . "\r\n" . App::get_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://friendica.com') . "\r\n" . "\r\n" ,
|
. "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendica.com') . "\r\n" . "\r\n" ,
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
));
|
));
|
||||||
|
|
20
mod/item.php
20
mod/item.php
|
@ -62,7 +62,7 @@ function item_post(&$a) {
|
||||||
if(!$preview && x($_REQUEST['post_id_random'])) {
|
if(!$preview && x($_REQUEST['post_id_random'])) {
|
||||||
if(x($_SESSION['post-random']) && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
|
if(x($_SESSION['post-random']) && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
|
||||||
logger("item post: duplicate post", LOGGER_DEBUG);
|
logger("item post: duplicate post", LOGGER_DEBUG);
|
||||||
item_post_return($a->get_baseurl(), $api_source, $return_path);
|
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
|
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
|
||||||
|
@ -449,7 +449,7 @@ function item_post(&$a) {
|
||||||
$objecttype = ACTIVITY_OBJ_IMAGE;
|
$objecttype = ACTIVITY_OBJ_IMAGE;
|
||||||
|
|
||||||
foreach($images as $image) {
|
foreach($images as $image) {
|
||||||
if(! stristr($image,$a->get_baseurl() . '/photo/'))
|
if(! stristr($image,App::get_baseurl() . '/photo/'))
|
||||||
continue;
|
continue;
|
||||||
$image_uri = substr($image,strrpos($image,'/') + 1);
|
$image_uri = substr($image,strrpos($image,'/') + 1);
|
||||||
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
|
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
|
||||||
|
@ -640,7 +640,7 @@ function item_post(&$a) {
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
if(strlen($attachments))
|
if(strlen($attachments))
|
||||||
$attachments .= ',';
|
$attachments .= ',';
|
||||||
$attachments .= '[attach]href="' . $a->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="' . App::get_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);
|
$body = str_replace($match[1],'',$body);
|
||||||
}
|
}
|
||||||
|
@ -732,7 +732,7 @@ function item_post(&$a) {
|
||||||
// $datarray['prvnets'] = $user['prvnets'];
|
// $datarray['prvnets'] = $user['prvnets'];
|
||||||
|
|
||||||
$datarray['parent-uri'] = ($parent == 0) ? $uri : $parent_item['uri'];
|
$datarray['parent-uri'] = ($parent == 0) ? $uri : $parent_item['uri'];
|
||||||
$datarray['plink'] = $a->get_baseurl().'/display/'.urlencode($datarray['guid']);
|
$datarray['plink'] = App::get_baseurl().'/display/'.urlencode($datarray['guid']);
|
||||||
$datarray['last-child'] = 1;
|
$datarray['last-child'] = 1;
|
||||||
$datarray['visible'] = 1;
|
$datarray['visible'] = 1;
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@ function item_post(&$a) {
|
||||||
|
|
||||||
$json = array('cancel' => 1);
|
$json = array('cancel' => 1);
|
||||||
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
|
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
|
||||||
$json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
|
$json['reload'] = App::get_baseurl() . '/' . $_REQUEST['jsreload'];
|
||||||
|
|
||||||
echo json_encode($json);
|
echo json_encode($json);
|
||||||
killme();
|
killme();
|
||||||
|
@ -938,7 +938,7 @@ function item_post(&$a) {
|
||||||
'to_email' => $user['email'],
|
'to_email' => $user['email'],
|
||||||
'uid' => $user['uid'],
|
'uid' => $user['uid'],
|
||||||
'item' => $datarray,
|
'item' => $datarray,
|
||||||
'link' => $a->get_baseurl().'/display/'.urlencode($datarray['guid']),
|
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||||
'source_name' => $datarray['author-name'],
|
'source_name' => $datarray['author-name'],
|
||||||
'source_link' => $datarray['author-link'],
|
'source_link' => $datarray['author-link'],
|
||||||
'source_photo' => $datarray['author-avatar'],
|
'source_photo' => $datarray['author-avatar'],
|
||||||
|
@ -970,7 +970,7 @@ function item_post(&$a) {
|
||||||
'to_email' => $user['email'],
|
'to_email' => $user['email'],
|
||||||
'uid' => $user['uid'],
|
'uid' => $user['uid'],
|
||||||
'item' => $datarray,
|
'item' => $datarray,
|
||||||
'link' => $a->get_baseurl().'/display/'.urlencode($datarray['guid']),
|
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||||
'source_name' => $datarray['author-name'],
|
'source_name' => $datarray['author-name'],
|
||||||
'source_link' => $datarray['author-link'],
|
'source_link' => $datarray['author-link'],
|
||||||
'source_photo' => $datarray['author-avatar'],
|
'source_photo' => $datarray['author-avatar'],
|
||||||
|
@ -991,14 +991,14 @@ function item_post(&$a) {
|
||||||
continue;
|
continue;
|
||||||
$disclaimer = '<hr />' . sprintf( t('This message was sent to you by %s, a member of the Friendica social network.'),$a->user['username'])
|
$disclaimer = '<hr />' . sprintf( t('This message was sent to you by %s, a member of the Friendica social network.'),$a->user['username'])
|
||||||
. '<br />';
|
. '<br />';
|
||||||
$disclaimer .= sprintf( t('You may visit them online at %s'), $a->get_baseurl() . '/profile/' . $a->user['nickname']) . EOL;
|
$disclaimer .= sprintf( t('You may visit them online at %s'), App::get_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;
|
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||||
if (!$datarray['title']=='') {
|
if (!$datarray['title']=='') {
|
||||||
$subject = email_header_encode($datarray['title'],'UTF-8');
|
$subject = email_header_encode($datarray['title'],'UTF-8');
|
||||||
} else {
|
} else {
|
||||||
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'),$a->user['username']),'UTF-8');
|
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'),$a->user['username']),'UTF-8');
|
||||||
}
|
}
|
||||||
$link = '<a href="' . $a->get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
$link = '<a href="' . App::get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||||
$html = prepare_body($datarray);
|
$html = prepare_body($datarray);
|
||||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
||||||
include_once('include/html2plain.php');
|
include_once('include/html2plain.php');
|
||||||
|
@ -1038,7 +1038,7 @@ function item_post(&$a) {
|
||||||
|
|
||||||
logger('post_complete');
|
logger('post_complete');
|
||||||
|
|
||||||
item_post_return($a->get_baseurl(), $api_source, $return_path);
|
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ function like_content(&$a) {
|
||||||
// See if we've been passed a return path to redirect to
|
// See if we've been passed a return path to redirect to
|
||||||
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
|
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
|
||||||
|
|
||||||
like_content_return($a->get_baseurl(), $return_path);
|
like_content_return(App::get_baseurl(), $return_path);
|
||||||
killme(); // NOTREACHED
|
killme(); // NOTREACHED
|
||||||
// return; // NOTREACHED
|
// return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ function localtime_content(&$a) {
|
||||||
$o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
|
$o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
|
||||||
|
|
||||||
|
|
||||||
$o .= '<form action ="' . $a->get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
|
$o .= '<form action ="' . App::get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
|
||||||
|
|
||||||
$o .= '<p>' . t('Please select your timezone:') . '</p>';
|
$o .= '<p>' . t('Please select your timezone:') . '</p>';
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,7 @@ function lostpass_post(&$a) {
|
||||||
|
|
||||||
|
|
||||||
$sitename = $a->config['sitename'];
|
$sitename = $a->config['sitename'];
|
||||||
$siteurl = $a->get_baseurl();
|
$resetlink = App::get_baseurl() . '/lostpass?verify=' . $new_password;
|
||||||
$resetlink = $a->get_baseurl() . '/lostpass?verify=' . $new_password;
|
|
||||||
|
|
||||||
$preamble = deindent(t('
|
$preamble = deindent(t('
|
||||||
Dear %1$s,
|
Dear %1$s,
|
||||||
|
@ -64,7 +63,7 @@ function lostpass_post(&$a) {
|
||||||
Login Name: %3$s'));
|
Login Name: %3$s'));
|
||||||
|
|
||||||
$preamble = sprintf($preamble, $username, $sitename);
|
$preamble = sprintf($preamble, $username, $sitename);
|
||||||
$body = sprintf($body, $resetlink, $siteurl, $email);
|
$body = sprintf($body, $resetlink, App::get_baseurl(), $email);
|
||||||
|
|
||||||
notification(array(
|
notification(array(
|
||||||
'type' => "SYSTEM_EMAIL",
|
'type' => "SYSTEM_EMAIL",
|
||||||
|
@ -110,17 +109,16 @@ function lostpass_content(&$a) {
|
||||||
'$lbl2' => t('Your password has been reset as requested.'),
|
'$lbl2' => t('Your password has been reset as requested.'),
|
||||||
'$lbl3' => t('Your new password is'),
|
'$lbl3' => t('Your new password is'),
|
||||||
'$lbl4' => t('Save or copy your new password - and then'),
|
'$lbl4' => t('Save or copy your new password - and then'),
|
||||||
'$lbl5' => '<a href="' . $a->get_baseurl() . '">' . t('click here to login') . '</a>.',
|
'$lbl5' => '<a href="' . App::get_baseurl() . '">' . t('click here to login') . '</a>.',
|
||||||
'$lbl6' => t('Your password may be changed from the <em>Settings</em> page after successful login.'),
|
'$lbl6' => t('Your password may be changed from the <em>Settings</em> page after successful login.'),
|
||||||
'$newpass' => $new_password,
|
'$newpass' => $new_password,
|
||||||
'$baseurl' => $a->get_baseurl()
|
'$baseurl' => App::get_baseurl()
|
||||||
|
|
||||||
));
|
));
|
||||||
info("Your password has been reset." . EOL);
|
info("Your password has been reset." . EOL);
|
||||||
|
|
||||||
|
|
||||||
$sitename = $a->config['sitename'];
|
$sitename = $a->config['sitename'];
|
||||||
$siteurl = $a->get_baseurl();
|
|
||||||
// $username, $email, $new_password
|
// $username, $email, $new_password
|
||||||
$preamble = deindent(t('
|
$preamble = deindent(t('
|
||||||
Dear %1$s,
|
Dear %1$s,
|
||||||
|
@ -139,7 +137,7 @@ function lostpass_content(&$a) {
|
||||||
'));
|
'));
|
||||||
|
|
||||||
$preamble = sprintf($preamble, $username);
|
$preamble = sprintf($preamble, $username);
|
||||||
$body = sprintf($body, $siteurl, $email, $new_password);
|
$body = sprintf($body, App::get_baseurl(), $email, $new_password);
|
||||||
|
|
||||||
notification(array(
|
notification(array(
|
||||||
'type' => "SYSTEM_EMAIL",
|
'type' => "SYSTEM_EMAIL",
|
||||||
|
|
|
@ -84,7 +84,7 @@ function manage_post(&$a) {
|
||||||
$ret = array();
|
$ret = array();
|
||||||
call_hooks('home_init',$ret);
|
call_hooks('home_init',$ret);
|
||||||
|
|
||||||
goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
|
goaway( App::get_baseurl() . "/profile/" . $a->user['nickname'] );
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,17 @@ function message_init(&$a) {
|
||||||
'$tabs'=>$tabs,
|
'$tabs'=>$tabs,
|
||||||
'$new'=>$new,
|
'$new'=>$new,
|
||||||
));
|
));
|
||||||
$base = $a->get_baseurl();
|
$base = App::get_baseurl();
|
||||||
|
|
||||||
$head_tpl = get_markup_template('message-head.tpl');
|
$head_tpl = get_markup_template('message-head.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$base' => $base
|
'$base' => $base
|
||||||
));
|
));
|
||||||
|
|
||||||
$end_tpl = get_markup_template('message-end.tpl');
|
$end_tpl = get_markup_template('message-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($end_tpl,array(
|
$a->page['end'] .= replace_macros($end_tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$base' => $base
|
'$base' => $base
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ function message_content(&$a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$myprofile = $a->get_baseurl().'/profile/' . $a->user['nickname'];
|
$myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
|
||||||
|
|
||||||
$tpl = get_markup_template('mail_head.tpl');
|
$tpl = get_markup_template('mail_head.tpl');
|
||||||
$header = replace_macros($tpl, array(
|
$header = replace_macros($tpl, array(
|
||||||
|
@ -234,7 +234,7 @@ function message_content(&$a) {
|
||||||
if($r) {
|
if($r) {
|
||||||
info( t('Message deleted.') . EOL );
|
info( t('Message deleted.') . EOL );
|
||||||
}
|
}
|
||||||
//goaway($a->get_baseurl(true) . '/message' );
|
//goaway(App::get_baseurl(true) . '/message' );
|
||||||
goaway($_SESSION['return_url']);
|
goaway($_SESSION['return_url']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -265,7 +265,7 @@ function message_content(&$a) {
|
||||||
if($r)
|
if($r)
|
||||||
info( t('Conversation removed.') . EOL );
|
info( t('Conversation removed.') . EOL );
|
||||||
}
|
}
|
||||||
//goaway($a->get_baseurl(true) . '/message' );
|
//goaway(App::get_baseurl(true) . '/message' );
|
||||||
goaway($_SESSION['return_url']);
|
goaway($_SESSION['return_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-header.tpl');
|
$tpl = get_markup_template('msg-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
|
@ -293,7 +293,7 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-end.tpl');
|
$tpl = get_markup_template('msg-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
|
@ -438,7 +438,7 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-header.tpl');
|
$tpl = get_markup_template('msg-header.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
|
@ -446,7 +446,7 @@ function message_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('msg-end.tpl');
|
$tpl = get_markup_template('msg-end.tpl');
|
||||||
$a->page['end'] .= replace_macros($tpl, array(
|
$a->page['end'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $a->user['nickname'],
|
'$nickname' => $a->user['nickname'],
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
|
@ -573,7 +573,7 @@ function render_messages(array $msg, $t) {
|
||||||
$tpl = get_markup_template($t);
|
$tpl = get_markup_template($t);
|
||||||
$rslt = '';
|
$rslt = '';
|
||||||
|
|
||||||
$myprofile = $a->get_baseurl().'/profile/' . $a->user['nickname'];
|
$myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
|
||||||
|
|
||||||
foreach($msg as $rr) {
|
foreach($msg as $rr) {
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ function mood_init(&$a) {
|
||||||
$item_id = item_store($arr);
|
$item_id = item_store($arr);
|
||||||
if($item_id) {
|
if($item_id) {
|
||||||
q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
||||||
dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
dbesc(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||||
intval($uid),
|
intval($uid),
|
||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,8 +29,8 @@ function msearch_post(&$a) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
$results[] = array(
|
$results[] = array(
|
||||||
'name' => $rr['name'],
|
'name' => $rr['name'],
|
||||||
'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
|
'url' => App::get_baseurl() . '/profile/' . $rr['nickname'],
|
||||||
'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
|
'photo' => App::get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
|
||||||
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords'])
|
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ function navigation_content(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('navigation.tpl');
|
$tpl = get_markup_template('navigation.tpl');
|
||||||
return replace_macros($tpl, array(
|
return replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$sitelocation' => $nav_info['sitelocation'],
|
'$sitelocation' => $nav_info['sitelocation'],
|
||||||
'$nav' => $nav_info['nav'],
|
'$nav' => $nav_info['nav'],
|
||||||
'$banner' => $nav_info['banner'],
|
'$banner' => $nav_info['banner'],
|
||||||
|
|
|
@ -100,7 +100,7 @@ function network_init(&$a) {
|
||||||
|
|
||||||
$redir_url = ($net_queries ? $net_baseurl."?".$net_queries : $net_baseurl);
|
$redir_url = ($net_queries ? $net_baseurl."?".$net_queries : $net_baseurl);
|
||||||
|
|
||||||
goaway($a->get_baseurl() . $redir_url);
|
goaway(App::get_baseurl() . $redir_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ function nodeinfo_wellknown(&$a) {
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
$nodeinfo = array("links" => array(array("rel" => "http://nodeinfo.diaspora.software/ns/schema/1.0",
|
$nodeinfo = array("links" => array(array("rel" => "http://nodeinfo.diaspora.software/ns/schema/1.0",
|
||||||
"href" => $a->get_baseurl()."/nodeinfo/1.0")));
|
"href" => App::get_baseurl()."/nodeinfo/1.0")));
|
||||||
|
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||||
|
|
|
@ -34,7 +34,7 @@ function noscrape_init(&$a) {
|
||||||
'addr' => $a->profile['addr'],
|
'addr' => $a->profile['addr'],
|
||||||
'nick' => $which,
|
'nick' => $which,
|
||||||
'key' => $a->profile['pubkey'],
|
'key' => $a->profile['pubkey'],
|
||||||
'homepage' => $a->get_baseurl()."/profile/{$which}",
|
'homepage' => App::get_baseurl()."/profile/{$which}",
|
||||||
'comm' => (x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),
|
'comm' => (x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),
|
||||||
'photo' => $r[0]["photo"],
|
'photo' => $r[0]["photo"],
|
||||||
'tags' => $keywords
|
'tags' => $keywords
|
||||||
|
@ -64,7 +64,7 @@ function noscrape_init(&$a) {
|
||||||
|
|
||||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||||
foreach($dfrn_pages as $dfrn)
|
foreach($dfrn_pages as $dfrn)
|
||||||
$json_info["dfrn-{$dfrn}"] = $a->get_baseurl()."/dfrn_{$dfrn}/{$which}";
|
$json_info["dfrn-{$dfrn}"] = App::get_baseurl()."/dfrn_{$dfrn}/{$which}";
|
||||||
|
|
||||||
//Output all the JSON!
|
//Output all the JSON!
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r)){
|
if (dbm::is_result($r)){
|
||||||
$nick = $r[0]['nickname'];
|
$nick = $r[0]['nickname'];
|
||||||
$url = $a->get_baseurl()."/display/$nick/$id";
|
$url = App::get_baseurl()."/display/$nick/$id";
|
||||||
goaway($url);
|
goaway($url);
|
||||||
} else {
|
} else {
|
||||||
$a->error = 404;
|
$a->error = 404;
|
||||||
|
|
|
@ -18,13 +18,13 @@ function notify_init(&$a) {
|
||||||
$guid = basename($urldata["path"]);
|
$guid = basename($urldata["path"]);
|
||||||
$itemdata = get_item_id($guid, local_user());
|
$itemdata = get_item_id($guid, local_user());
|
||||||
if ($itemdata["id"] != 0)
|
if ($itemdata["id"] != 0)
|
||||||
$note['link'] = $a->get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
|
$note['link'] = App::get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($note['link']);
|
goaway($note['link']);
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($a->get_baseurl(true));
|
goaway(App::get_baseurl(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
|
if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
|
||||||
|
@ -50,7 +50,7 @@ function notify_content(&$a) {
|
||||||
if (dbm::is_result($r) > 0) {
|
if (dbm::is_result($r) > 0) {
|
||||||
foreach ($r as $it) {
|
foreach ($r as $it) {
|
||||||
$notif_content .= replace_macros($not_tpl,array(
|
$notif_content .= replace_macros($not_tpl,array(
|
||||||
'$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
|
'$item_link' => App::get_baseurl(true).'/notify/view/'. $it['id'],
|
||||||
'$item_image' => $it['photo'],
|
'$item_image' => $it['photo'],
|
||||||
'$item_text' => strip_tags(bbcode($it['msg'])),
|
'$item_text' => strip_tags(bbcode($it['msg'])),
|
||||||
'$item_when' => relative_date($it['date'])
|
'$item_when' => relative_date($it['date'])
|
||||||
|
|
|
@ -6,7 +6,7 @@ function oexchange_init(&$a) {
|
||||||
if(($a->argc > 1) && ($a->argv[1] === 'xrd')) {
|
if(($a->argc > 1) && ($a->argv[1] === 'xrd')) {
|
||||||
$tpl = get_markup_template('oexchange_xrd.tpl');
|
$tpl = get_markup_template('oexchange_xrd.tpl');
|
||||||
|
|
||||||
$o = replace_macros($tpl, array('$base' => $a->get_baseurl()));
|
$o = replace_macros($tpl, array('$base' => App::get_baseurl()));
|
||||||
echo $o;
|
echo $o;
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ function oexchange_content(&$a) {
|
||||||
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
|
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
|
||||||
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
|
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
|
||||||
|
|
||||||
$s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
|
$s = fetch_url(App::get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
|
||||||
|
|
||||||
if(! strlen($s))
|
if(! strlen($s))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -92,7 +92,7 @@ function openid_content(&$a) {
|
||||||
|
|
||||||
$args .= '&openid_url=' . notags(trim($authid));
|
$args .= '&openid_url=' . notags(trim($authid));
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/register' . $args);
|
goaway(App::get_baseurl() . '/register' . $args);
|
||||||
|
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
header("Content-type: application/opensearchdescription+xml");
|
header("Content-type: application/opensearchdescription+xml");
|
||||||
|
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$nodename' => $a->get_hostname(),
|
'$nodename' => $a->get_hostname(),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ function ostatus_subscribe_content(&$a) {
|
||||||
$total = sizeof($friends);
|
$total = sizeof($friends);
|
||||||
|
|
||||||
if ($counter >= $total) {
|
if ($counter >= $total) {
|
||||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.$a->get_baseurl().'/settings/connectors">';
|
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/settings/connectors">';
|
||||||
del_pconfig($uid, "ostatus", "legacy_friends");
|
del_pconfig($uid, "ostatus", "legacy_friends");
|
||||||
del_pconfig($uid, "ostatus", "legacy_contact");
|
del_pconfig($uid, "ostatus", "legacy_contact");
|
||||||
$o .= t("Done");
|
$o .= t("Done");
|
||||||
|
@ -72,7 +72,7 @@ function ostatus_subscribe_content(&$a) {
|
||||||
|
|
||||||
$o .= "<p>".t("Keep this window open until done.")."</p>";
|
$o .= "<p>".t("Keep this window open until done.")."</p>";
|
||||||
|
|
||||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.$a->get_baseurl().'/ostatus_subscribe?counter='.$counter.'">';
|
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?counter='.$counter.'">';
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,7 +356,7 @@ function photos_post(&$a) {
|
||||||
create_tags_from_itemuri($i[0]['uri'], $page_owner_uid);
|
create_tags_from_itemuri($i[0]['uri'], $page_owner_uid);
|
||||||
delete_thread_uri($i[0]['uri'], $page_owner_uid);
|
delete_thread_uri($i[0]['uri'], $page_owner_uid);
|
||||||
|
|
||||||
$url = $a->get_baseurl();
|
$url = App::get_baseurl();
|
||||||
$drop_id = intval($i[0]['id']);
|
$drop_id = intval($i[0]['id']);
|
||||||
|
|
||||||
if ($i[0]['visible'])
|
if ($i[0]['visible'])
|
||||||
|
@ -496,8 +496,8 @@ function photos_post(&$a) {
|
||||||
$arr['visible'] = $visibility;
|
$arr['visible'] = $visibility;
|
||||||
$arr['origin'] = 1;
|
$arr['origin'] = 1;
|
||||||
|
|
||||||
$arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
|
$arr['body'] = '[url=' . App::get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']'
|
||||||
. '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
|
. '[img]' . App::get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]'
|
||||||
. '[/url]';
|
. '[/url]';
|
||||||
|
|
||||||
$item_id = item_store($arr);
|
$item_id = item_store($arr);
|
||||||
|
@ -615,7 +615,7 @@ function photos_post(&$a) {
|
||||||
}
|
}
|
||||||
} elseif (strpos($tag,'#') === 0) {
|
} elseif (strpos($tag,'#') === 0) {
|
||||||
$tagname = substr($tag, 1);
|
$tagname = substr($tag, 1);
|
||||||
$str_tags .= '#[url='.$a->get_baseurl()."/search?tag=".$tagname.']'.$tagname.'[/url]';
|
$str_tags .= '#[url='.App::get_baseurl()."/search?tag=".$tagname.']'.$tagname.'[/url]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -685,8 +685,8 @@ function photos_post(&$a) {
|
||||||
$arr['tag'] = $tagged[4];
|
$arr['tag'] = $tagged[4];
|
||||||
$arr['inform'] = $tagged[2];
|
$arr['inform'] = $tagged[2];
|
||||||
$arr['origin'] = 1;
|
$arr['origin'] = 1;
|
||||||
$arr['body'] = sprintf( t('%1$s was tagged in %2$s by %3$s'), '[url=' . $tagged[1] . ']' . $tagged[0] . '[/url]', '[url=' . $a->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'] = 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=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '[/img][/url]' . "\n" ;
|
$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['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $tagged[0] . '</title><id>' . $tagged[1] . '/' . $tagged[0] . '</id>';
|
$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");
|
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $tagged[1] . '" />' . "\n");
|
||||||
|
@ -695,8 +695,8 @@ function photos_post(&$a) {
|
||||||
$arr['object'] .= '</link></object>' . "\n";
|
$arr['object'] .= '</link></object>' . "\n";
|
||||||
|
|
||||||
$arr['target'] = '<target><type>' . ACTIVITY_OBJ_PHOTO . '</type><title>' . $p[0]['desc'] . '</title><id>'
|
$arr['target'] = '<target><type>' . ACTIVITY_OBJ_PHOTO . '</type><title>' . $p[0]['desc'] . '</title><id>'
|
||||||
. $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '</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="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>';
|
$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>';
|
||||||
|
|
||||||
$item_id = item_store($arr);
|
$item_id = item_store($arr);
|
||||||
if ($item_id) {
|
if ($item_id) {
|
||||||
|
@ -908,8 +908,8 @@ function photos_post(&$a) {
|
||||||
$arr['visible'] = $visible;
|
$arr['visible'] = $visible;
|
||||||
$arr['origin'] = 1;
|
$arr['origin'] = 1;
|
||||||
|
|
||||||
$arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
|
$arr['body'] = '[url=' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
|
||||||
. '[img]' . $a->get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
|
. '[img]' . App::get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
|
||||||
. '[/url]';
|
. '[/url]';
|
||||||
|
|
||||||
$item_id = item_store($arr);
|
$item_id = item_store($arr);
|
||||||
|
|
10
mod/ping.php
10
mod/ping.php
|
@ -177,7 +177,7 @@ function ping_init(App $a)
|
||||||
$intro_count = count($intros1) + count($intros2);
|
$intro_count = count($intros1) + count($intros2);
|
||||||
$intros = $intros1 + $intros2;
|
$intros = $intros1 + $intros2;
|
||||||
|
|
||||||
$myurl = $a->get_baseurl() . '/profile/' . $a->user['nickname'] ;
|
$myurl = App::get_baseurl() . '/profile/' . $a->user['nickname'] ;
|
||||||
$mails = qu("SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
|
$mails = qu("SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
|
||||||
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
|
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
|
@ -253,7 +253,7 @@ function ping_init(App $a)
|
||||||
if (dbm::is_result($intros)) {
|
if (dbm::is_result($intros)) {
|
||||||
foreach ($intros as $intro) {
|
foreach ($intros as $intro) {
|
||||||
$notif = array(
|
$notif = array(
|
||||||
'href' => $a->get_baseurl() . '/notifications/intros/' . $intro['id'],
|
'href' => App::get_baseurl() . '/notifications/intros/' . $intro['id'],
|
||||||
'name' => $intro['name'],
|
'name' => $intro['name'],
|
||||||
'url' => $intro['url'],
|
'url' => $intro['url'],
|
||||||
'photo' => $intro['photo'],
|
'photo' => $intro['photo'],
|
||||||
|
@ -268,7 +268,7 @@ function ping_init(App $a)
|
||||||
if (dbm::is_result($mails)) {
|
if (dbm::is_result($mails)) {
|
||||||
foreach ($mails as $mail) {
|
foreach ($mails as $mail) {
|
||||||
$notif = array(
|
$notif = array(
|
||||||
'href' => $a->get_baseurl() . '/message/' . $mail['id'],
|
'href' => App::get_baseurl() . '/message/' . $mail['id'],
|
||||||
'name' => $mail['from-name'],
|
'name' => $mail['from-name'],
|
||||||
'url' => $mail['from-url'],
|
'url' => $mail['from-url'],
|
||||||
'photo' => $mail['from-photo'],
|
'photo' => $mail['from-photo'],
|
||||||
|
@ -283,7 +283,7 @@ function ping_init(App $a)
|
||||||
if (dbm::is_result($regs)) {
|
if (dbm::is_result($regs)) {
|
||||||
foreach ($regs as $reg) {
|
foreach ($regs as $reg) {
|
||||||
$notif = array(
|
$notif = array(
|
||||||
'href' => $a->get_baseurl() . '/admin/users/',
|
'href' => App::get_baseurl() . '/admin/users/',
|
||||||
'name' => $reg['name'],
|
'name' => $reg['name'],
|
||||||
'url' => $reg['url'],
|
'url' => $reg['url'],
|
||||||
'photo' => $reg['micro'],
|
'photo' => $reg['micro'],
|
||||||
|
@ -450,7 +450,7 @@ function ping_get_notifications($uid)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$notification["href"] = $a->get_baseurl() . "/notify/view/" . $notification["id"];
|
$notification["href"] = App::get_baseurl() . "/notify/view/" . $notification["id"];
|
||||||
|
|
||||||
if ($notification["visible"] AND !$notification["spam"] AND
|
if ($notification["visible"] AND !$notification["spam"] AND
|
||||||
!$notification["deleted"] AND !is_array($result[$notification["parent"]])) {
|
!$notification["deleted"] AND !is_array($result[$notification["parent"]])) {
|
||||||
|
|
|
@ -118,7 +118,7 @@ function poke_init(&$a) {
|
||||||
$arr['origin'] = 1;
|
$arr['origin'] = 1;
|
||||||
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
|
$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>' . $a->get_baseurl() . '/contact/' . $target['id'] . '</id>';
|
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $target['name'] . '</title><id>' . App::get_baseurl() . '/contact/' . $target['id'] . '</id>';
|
||||||
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $target['url'] . '" />' . "\n");
|
$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");
|
$arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
|
||||||
|
@ -127,7 +127,7 @@ function poke_init(&$a) {
|
||||||
$item_id = item_store($arr);
|
$item_id = item_store($arr);
|
||||||
if($item_id) {
|
if($item_id) {
|
||||||
//q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
//q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
|
||||||
// dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
// dbesc(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
|
||||||
// intval($uid),
|
// intval($uid),
|
||||||
// intval($item_id)
|
// intval($item_id)
|
||||||
//);
|
//);
|
||||||
|
@ -166,11 +166,11 @@ function poke_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$base = $a->get_baseurl();
|
$base = App::get_baseurl();
|
||||||
|
|
||||||
$head_tpl = get_markup_template('poke_head.tpl');
|
$head_tpl = get_markup_template('poke_head.tpl');
|
||||||
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$base' => $base
|
'$base' => $base
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ function profile_init(&$a) {
|
||||||
else {
|
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");
|
$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)) {
|
if (dbm::is_result($r)) {
|
||||||
goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']);
|
goaway(App::get_baseurl() . '/profile/' . $r[0]['nickname']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG);
|
logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG);
|
||||||
|
@ -56,15 +56,15 @@ function profile_init(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
|
$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="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . App::get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
|
||||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||||
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . App::get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
|
||||||
header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||||
|
|
||||||
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
|
||||||
foreach($dfrn_pages as $dfrn)
|
foreach($dfrn_pages as $dfrn)
|
||||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".$a->get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
$a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".App::get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
|
||||||
$a->page['htmlhead'] .= "<link rel=\"dfrn-poco\" href=\"".$a->get_baseurl()."/poco/{$which}\" />\r\n";
|
$a->page['htmlhead'] .= "<link rel=\"dfrn-poco\" href=\"".App::get_baseurl()."/poco/{$which}\" />\r\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,8 +181,8 @@ function profile_content(&$a, $update = 0) {
|
||||||
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
||||||
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
||||||
|
|
||||||
$a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
$a->page['aside'] .= posted_date_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
||||||
$a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
$a->page['aside'] .= categories_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
||||||
|
|
||||||
if(can_write_wall($a,$a->profile['profile_uid'])) {
|
if(can_write_wall($a,$a->profile['profile_uid'])) {
|
||||||
|
|
||||||
|
|
|
@ -99,15 +99,15 @@ function profile_photo_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
$r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `self` AND `uid` = %d",
|
$r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `self` AND `uid` = %d",
|
||||||
dbesc($a->get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||||
dbesc($a->get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||||
dbesc($a->get_baseurl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
|
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
|
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
|
||||||
dbesc($a->get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||||
dbesc($a->get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||||
intval($_REQUEST['profile']),
|
intval($_REQUEST['profile']),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
@ -123,7 +123,7 @@ function profile_photo_post(&$a) {
|
||||||
|
|
||||||
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
|
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
|
||||||
// Update global directory in background
|
// Update global directory in background
|
||||||
$url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
|
$url = App::get_baseurl() . '/profile/' . $a->user['nickname'];
|
||||||
if($url && strlen(get_config('system','directory')))
|
if($url && strlen(get_config('system','directory')))
|
||||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ function profile_photo_post(&$a) {
|
||||||
notice( t('Unable to process image') . EOL);
|
notice( t('Unable to process image') . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/profiles');
|
goaway(App::get_baseurl() . '/profiles');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ function profile_photo_content(&$a) {
|
||||||
if($url && strlen(get_config('system','directory')))
|
if($url && strlen(get_config('system','directory')))
|
||||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/profiles');
|
goaway(App::get_baseurl() . '/profiles');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
$ph = new Photo($r[0]['data'], $r[0]['type']);
|
$ph = new Photo($r[0]['data'], $r[0]['type']);
|
||||||
|
@ -251,7 +251,7 @@ function profile_photo_content(&$a) {
|
||||||
'$submit' => t('Upload'),
|
'$submit' => t('Upload'),
|
||||||
'$profiles' => $profiles,
|
'$profiles' => $profiles,
|
||||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||||
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
|
'$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>')
|
||||||
));
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -264,7 +264,7 @@ function profile_photo_content(&$a) {
|
||||||
'$filename' => $filename,
|
'$filename' => $filename,
|
||||||
'$profile' => intval($_REQUEST['profile']),
|
'$profile' => intval($_REQUEST['profile']),
|
||||||
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
|
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
|
||||||
'$image_url' => $a->get_baseurl() . '/photo/' . $filename,
|
'$image_url' => App::get_baseurl() . '/photo/' . $filename,
|
||||||
'$title' => t('Crop Image'),
|
'$title' => t('Crop Image'),
|
||||||
'$desc' => t('Please adjust the image cropping for optimum viewing.'),
|
'$desc' => t('Please adjust the image cropping for optimum viewing.'),
|
||||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||||
|
|
|
@ -629,11 +629,11 @@ function profiles_content(&$a) {
|
||||||
$editselect = 'textareas';
|
$editselect = 'textareas';
|
||||||
|
|
||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => $editselect,
|
'$editselect' => $editselect,
|
||||||
));
|
));
|
||||||
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
|
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$editselect' => $editselect,
|
'$editselect' => $editselect,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ function profiles_content(&$a) {
|
||||||
'$lbl_ex2' => t('Example: fishing photography software'),
|
'$lbl_ex2' => t('Example: fishing photography software'),
|
||||||
|
|
||||||
'$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
|
'$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$profile_id' => $r[0]['id'],
|
'$profile_id' => $r[0]['id'],
|
||||||
'$profile_name' => array('profile_name', t('Profile Name:'), $r[0]['profile-name'], t('Required'), '*'),
|
'$profile_name' => array('profile_name', t('Profile Name:'), $r[0]['profile-name'], t('Required'), '*'),
|
||||||
'$is_default' => $is_default,
|
'$is_default' => $is_default,
|
||||||
|
|
|
@ -255,7 +255,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
||||||
|
|
||||||
// Only continue if it isn't a local image and the isn't deactivated
|
// Only continue if it isn't a local image and the isn't deactivated
|
||||||
if (proxy_is_local_image($url)) {
|
if (proxy_is_local_image($url)) {
|
||||||
$url = str_replace(normalise_link($a->get_baseurl()) . '/', $a->get_baseurl() . '/', $url);
|
$url = str_replace(normalise_link(App::get_baseurl()) . '/', App::get_baseurl() . '/', $url);
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
||||||
$longpath .= '.' . $extension;
|
$longpath .= '.' . $extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
$proxypath = $a->get_baseurl() . '/proxy/' . $longpath;
|
$proxypath = App::get_baseurl() . '/proxy/' . $longpath;
|
||||||
|
|
||||||
if ($size != '') {
|
if ($size != '') {
|
||||||
$size = ':' . $size;
|
$size = ':' . $size;
|
||||||
|
@ -308,7 +308,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
||||||
if ((strlen($proxypath) > 250) AND $writemode) {
|
if ((strlen($proxypath) > 250) AND $writemode) {
|
||||||
return $shortpath;
|
return $shortpath;
|
||||||
} elseif (strlen($proxypath) > 250) {
|
} elseif (strlen($proxypath) > 250) {
|
||||||
return $a->get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
|
return App::get_baseurl() . '/proxy/' . $shortpath . '?url=' . urlencode($url);
|
||||||
} elseif ($writemode) {
|
} elseif ($writemode) {
|
||||||
return $longpath;
|
return $longpath;
|
||||||
} else {
|
} else {
|
||||||
|
@ -366,7 +366,7 @@ function proxy_img_cb($matches) {
|
||||||
|
|
||||||
function proxy_parse_html($html) {
|
function proxy_parse_html($html) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$html = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $html);
|
$html = str_replace(normalise_link(App::get_baseurl())."/", App::get_baseurl()."/", $html);
|
||||||
|
|
||||||
return preg_replace_callback("/(<img [^>]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "proxy_img_cb", $html);
|
return preg_replace_callback("/(<img [^>]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "proxy_img_cb", $html);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,5 @@ function randprof_init(&$a) {
|
||||||
$x = random_profile();
|
$x = random_profile();
|
||||||
if($x)
|
if($x)
|
||||||
goaway(zrl($x));
|
goaway(zrl($x));
|
||||||
goaway($a->get_baseurl() . '/profile');
|
goaway(App::get_baseurl() . '/profile');
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ function register_post(&$a) {
|
||||||
$user = $result['user'];
|
$user = $result['user'];
|
||||||
|
|
||||||
if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
|
if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
|
||||||
$url = $a->get_baseurl() . '/profile/' . $user['nickname'];
|
$url = App::get_baseurl() . '/profile/' . $user['nickname'];
|
||||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ function register_post(&$a) {
|
||||||
$res = send_register_open_eml(
|
$res = send_register_open_eml(
|
||||||
$user['email'],
|
$user['email'],
|
||||||
$a->config['sitename'],
|
$a->config['sitename'],
|
||||||
$a->get_baseurl(),
|
App::get_baseurl(),
|
||||||
$user['username'],
|
$user['username'],
|
||||||
$result['password']);
|
$result['password']);
|
||||||
|
|
||||||
|
@ -142,9 +142,9 @@ function register_post(&$a) {
|
||||||
'source_name' => $user['username'],
|
'source_name' => $user['username'],
|
||||||
'source_mail' => $user['email'],
|
'source_mail' => $user['email'],
|
||||||
'source_nick' => $user['nickname'],
|
'source_nick' => $user['nickname'],
|
||||||
'source_link' => $a->get_baseurl()."/admin/users/",
|
'source_link' => App::get_baseurl()."/admin/users/",
|
||||||
'link' => $a->get_baseurl()."/admin/users/",
|
'link' => App::get_baseurl()."/admin/users/",
|
||||||
'source_photo' => $a->get_baseurl() . "/photo/avatar/".$user['uid'].".jpg",
|
'source_photo' => App::get_baseurl() . "/photo/avatar/".$user['uid'].".jpg",
|
||||||
'to_email' => $admin['email'],
|
'to_email' => $admin['email'],
|
||||||
'uid' => $admin['uid'],
|
'uid' => $admin['uid'],
|
||||||
'language' => ($admin['language']?$admin['language']:'en'),
|
'language' => ($admin['language']?$admin['language']:'en'),
|
||||||
|
|
|
@ -35,7 +35,7 @@ function user_allow($hash) {
|
||||||
intval($user[0]['uid'])
|
intval($user[0]['uid'])
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r) && $r[0]['net-publish']) {
|
if (dbm::is_result($r) && $r[0]['net-publish']) {
|
||||||
$url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
|
$url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
|
||||||
if($url && strlen(get_config('system','directory')))
|
if($url && strlen(get_config('system','directory')))
|
||||||
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
proc_run(PRIORITY_LOW, "include/directory.php", $url);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ function user_allow($hash) {
|
||||||
send_register_open_eml(
|
send_register_open_eml(
|
||||||
$user[0]['email'],
|
$user[0]['email'],
|
||||||
$a->config['sitename'],
|
$a->config['sitename'],
|
||||||
$a->get_baseurl(),
|
App::get_baseurl(),
|
||||||
$user[0]['username'],
|
$user[0]['username'],
|
||||||
$register[0]['password']);
|
$register[0]['password']);
|
||||||
|
|
||||||
|
@ -121,13 +121,13 @@ function regmod_content(&$a) {
|
||||||
|
|
||||||
if($cmd === 'deny') {
|
if($cmd === 'deny') {
|
||||||
user_deny($hash);
|
user_deny($hash);
|
||||||
goaway($a->get_baseurl()."/admin/users/");
|
goaway(App::get_baseurl()."/admin/users/");
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($cmd === 'allow') {
|
if($cmd === 'allow') {
|
||||||
user_allow($hash);
|
user_allow($hash);
|
||||||
goaway($a->get_baseurl()."/admin/users/");
|
goaway(App::get_baseurl()."/admin/users/");
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ function repair_ostatus_content(&$a) {
|
||||||
|
|
||||||
$result = new_contact($uid,$r[0]["url"],true);
|
$result = new_contact($uid,$r[0]["url"],true);
|
||||||
|
|
||||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.$a->get_baseurl().'/repair_ostatus?counter='.$counter.'">';
|
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.App::get_baseurl().'/repair_ostatus?counter='.$counter.'">';
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ function rsd_xml_content(&$a) {
|
||||||
<engineName>Friendica</engineName>
|
<engineName>Friendica</engineName>
|
||||||
<engineLink>http://friendica.com/</engineLink>
|
<engineLink>http://friendica.com/</engineLink>
|
||||||
<apis>
|
<apis>
|
||||||
<api name="Twitter" preferred="true" apiLink="'.$a->get_baseurl().'/api/" blogID="">
|
<api name="Twitter" preferred="true" apiLink="'.App::get_baseurl().'/api/" blogID="">
|
||||||
<settings>
|
<settings>
|
||||||
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
|
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
|
||||||
<setting name="OAuth">false</setting>
|
<setting name="OAuth">false</setting>
|
||||||
|
|
|
@ -138,7 +138,7 @@ function settings_post(&$a) {
|
||||||
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
|
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
|
||||||
dbesc($key),
|
dbesc($key),
|
||||||
local_user());
|
local_user());
|
||||||
goaway($a->get_baseurl(true)."/settings/oauth/");
|
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ function settings_post(&$a) {
|
||||||
local_user());
|
local_user());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goaway($a->get_baseurl(true)."/settings/oauth/");
|
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ function settings_content(&$a) {
|
||||||
$r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
|
$r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
|
||||||
dbesc($a->argv[3]),
|
dbesc($a->argv[3]),
|
||||||
local_user());
|
local_user());
|
||||||
goaway($a->get_baseurl(true)."/settings/oauth/");
|
goaway(App::get_baseurl(true)."/settings/oauth/");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ function settings_content(&$a) {
|
||||||
$tpl = get_markup_template("settings_oauth.tpl");
|
$tpl = get_markup_template("settings_oauth.tpl");
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$form_security_token' => get_form_security_token("settings_oauth"),
|
'$form_security_token' => get_form_security_token("settings_oauth"),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$title' => t('Connected Apps'),
|
'$title' => t('Connected Apps'),
|
||||||
'$add' => t('Add application'),
|
'$add' => t('Add application'),
|
||||||
'$edit' => t('Edit'),
|
'$edit' => t('Edit'),
|
||||||
|
@ -822,7 +822,7 @@ function settings_content(&$a) {
|
||||||
$settings_connectors .= mini_group_select(local_user(), $default_group, t("Default group for OStatus contacts"));
|
$settings_connectors .= mini_group_select(local_user(), $default_group, t("Default group for OStatus contacts"));
|
||||||
|
|
||||||
if ($legacy_contact != "")
|
if ($legacy_contact != "")
|
||||||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.$a->get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
|
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
|
||||||
|
|
||||||
$settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
|
$settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
|
||||||
$settings_connectors .= '<label id="legacy-contact-label" for="snautofollow-checkbox">'. t('Your legacy GNU Social account'). '</label>';
|
$settings_connectors .= '<label id="legacy-contact-label" for="snautofollow-checkbox">'. t('Your legacy GNU Social account'). '</label>';
|
||||||
|
@ -830,7 +830,7 @@ function settings_content(&$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 .= '<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 .= '</div>';
|
||||||
|
|
||||||
$settings_connectors .= '<p><a href="'.$a->get_baseurl().'/repair_ostatus">'.t("Repair OStatus subscriptions").'</a></p>';
|
$settings_connectors .= '<p><a href="'.App::get_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>';
|
$settings_connectors .= '<div class="settings-submit-wrapper" ><input type="submit" name="general-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
|
||||||
|
|
||||||
|
@ -994,7 +994,7 @@ function settings_content(&$a) {
|
||||||
'$ptitle' => t('Display Settings'),
|
'$ptitle' => t('Display Settings'),
|
||||||
'$form_security_token' => get_form_security_token("settings_display"),
|
'$form_security_token' => get_form_security_token("settings_display"),
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$uid' => local_user(),
|
'$uid' => local_user(),
|
||||||
|
|
||||||
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
|
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
|
||||||
|
@ -1217,7 +1217,7 @@ function settings_content(&$a) {
|
||||||
$tpl_addr = get_markup_template("settings_nick_set.tpl");
|
$tpl_addr = get_markup_template("settings_nick_set.tpl");
|
||||||
|
|
||||||
$prof_addr = replace_macros($tpl_addr,array(
|
$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(), $a->get_baseurl().'/profile/'.$nickname),
|
'$desc' => sprintf(t("Your Identity Address is <strong>'%s'</strong> or '%s'."), $nickname.'@'.$a->get_hostname().$a->get_path(), App::get_baseurl().'/profile/'.$nickname),
|
||||||
'$basepath' => $a->get_hostname()
|
'$basepath' => $a->get_hostname()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -1262,7 +1262,7 @@ function settings_content(&$a) {
|
||||||
'$ptitle' => t('Account Settings'),
|
'$ptitle' => t('Account Settings'),
|
||||||
|
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => App::get_baseurl(true),
|
||||||
'$uid' => local_user(),
|
'$uid' => local_user(),
|
||||||
'$form_security_token' => get_form_security_token("settings"),
|
'$form_security_token' => get_form_security_token("settings"),
|
||||||
'$nickname_block' => $prof_addr,
|
'$nickname_block' => $prof_addr,
|
||||||
|
|
|
@ -39,7 +39,7 @@ function starred_init(&$a) {
|
||||||
if(strpos($return_path, '?')) $rand = "&$rand";
|
if(strpos($return_path, '?')) $rand = "&$rand";
|
||||||
else $rand = "?$rand";
|
else $rand = "?$rand";
|
||||||
|
|
||||||
goaway($a->get_baseurl() . "/" . $return_path . $rand);
|
goaway(App::get_baseurl() . "/" . $return_path . $rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the json doesn't really matter, it will either be 0 or 1
|
// the json doesn't really matter, it will either be 0 or 1
|
||||||
|
|
|
@ -59,7 +59,7 @@ function suggest_content(&$a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
$_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
|
||||||
|
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
$a->page['aside'] .= follow_widget();
|
$a->page['aside'] .= follow_widget();
|
||||||
|
@ -76,8 +76,8 @@ function suggest_content(&$a) {
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
$connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
$connlnk = App::get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
||||||
$ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
|
$ignlnk = App::get_baseurl() . '/suggest?ignore=' . $rr['id'];
|
||||||
$photo_menu = array(
|
$photo_menu = array(
|
||||||
'profile' => array(t("View Profile"), zrl($rr["url"])),
|
'profile' => array(t("View Profile"), zrl($rr["url"])),
|
||||||
'follow' => array(t("Connect/Follow"), $connlnk),
|
'follow' => array(t("Connect/Follow"), $connlnk),
|
||||||
|
|
|
@ -63,7 +63,7 @@ function tagger_content(&$a) {
|
||||||
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
|
||||||
|
|
||||||
$link = xmlify('<link rel="alternate" type="text/html" href="'
|
$link = xmlify('<link rel="alternate" type="text/html" href="'
|
||||||
. $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
. App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
|
||||||
|
|
||||||
$body = xmlify($item['body']);
|
$body = xmlify($item['body']);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ function tagger_content(&$a) {
|
||||||
</target>
|
</target>
|
||||||
EOT;
|
EOT;
|
||||||
|
|
||||||
$tagid = $a->get_baseurl() . '/search?tag=' . $term;
|
$tagid = App::get_baseurl() . '/search?tag=' . $term;
|
||||||
$objtype = ACTIVITY_OBJ_TAGTERM;
|
$objtype = ACTIVITY_OBJ_TAGTERM;
|
||||||
|
|
||||||
$obj = <<< EOT
|
$obj = <<< EOT
|
||||||
|
@ -97,7 +97,7 @@ EOT;
|
||||||
if(! isset($bodyverb))
|
if(! isset($bodyverb))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$termlink = html_entity_decode('⌗') . '[url=' . $a->get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
|
$termlink = html_entity_decode('⌗') . '[url=' . App::get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
|
||||||
|
|
||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ EOT;
|
||||||
$post_id = item_store($arr);
|
$post_id = item_store($arr);
|
||||||
|
|
||||||
// q("UPDATE `item` set plink = '%s' where id = %d",
|
// q("UPDATE `item` set plink = '%s' where id = %d",
|
||||||
// dbesc($a->get_baseurl() . '/display/' . $owner_nick . '/' . $post_id),
|
// dbesc(App::get_baseurl() . '/display/' . $owner_nick . '/' . $post_id),
|
||||||
// intval($post_id)
|
// intval($post_id)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ EOT;
|
||||||
);
|
);
|
||||||
if((! $blocktags) && $t[0]['tcount']==0 ) {
|
if((! $blocktags) && $t[0]['tcount']==0 ) {
|
||||||
/*q("update item set tag = '%s' where id = %d",
|
/*q("update item set tag = '%s' where id = %d",
|
||||||
dbesc($item['tag'] . (strlen($item['tag']) ? ',' : '') . '#[url=' . $a->get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
dbesc($item['tag'] . (strlen($item['tag']) ? ',' : '') . '#[url=' . App::get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||||
intval($item['id'])
|
intval($item['id'])
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ EOT;
|
||||||
$term_objtype,
|
$term_objtype,
|
||||||
TERM_HASHTAG,
|
TERM_HASHTAG,
|
||||||
dbesc($term),
|
dbesc($term),
|
||||||
dbesc($a->get_baseurl() . '/search?tag=' . $term),
|
dbesc(App::get_baseurl() . '/search?tag=' . $term),
|
||||||
intval($owner_uid)
|
intval($owner_uid)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -192,14 +192,14 @@ EOT;
|
||||||
$term_objtype,
|
$term_objtype,
|
||||||
TERM_HASHTAG,
|
TERM_HASHTAG,
|
||||||
dbesc($term),
|
dbesc($term),
|
||||||
dbesc($a->get_baseurl() . '/search?tag=' . $term),
|
dbesc(App::get_baseurl() . '/search?tag=' . $term),
|
||||||
intval($owner_uid)
|
intval($owner_uid)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(count($x) && !$x[0]['blocktags'] && (! stristr($r[0]['tag'], ']' . $term . '['))) {
|
/*if(count($x) && !$x[0]['blocktags'] && (! stristr($r[0]['tag'], ']' . $term . '['))) {
|
||||||
q("update item set tag = '%s' where id = %d",
|
q("update item set tag = '%s' where id = %d",
|
||||||
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . $a->get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . App::get_baseurl() . '/search?tag=' . $term . ']'. $term . '[/url]'),
|
||||||
intval($r[0]['id'])
|
intval($r[0]['id'])
|
||||||
);
|
);
|
||||||
}*/
|
}*/
|
||||||
|
|
|
@ -5,11 +5,11 @@ require_once('include/bbcode.php');
|
||||||
function tagrm_post(&$a) {
|
function tagrm_post(&$a) {
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
|
|
||||||
if((x($_POST,'submit')) && ($_POST['submit'] === t('Cancel')))
|
if((x($_POST,'submit')) && ($_POST['submit'] === t('Cancel')))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
$tag = ((x($_POST,'tag')) ? hex2bin(notags(trim($_POST['tag']))) : '');
|
$tag = ((x($_POST,'tag')) ? hex2bin(notags(trim($_POST['tag']))) : '');
|
||||||
$item = ((x($_POST,'item')) ? intval($_POST['item']) : 0 );
|
$item = ((x($_POST,'item')) ? intval($_POST['item']) : 0 );
|
||||||
|
@ -20,7 +20,7 @@ function tagrm_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! dbm::is_result($r))
|
if(! dbm::is_result($r))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
$arr = explode(',', $r[0]['tag']);
|
$arr = explode(',', $r[0]['tag']);
|
||||||
for($x = 0; $x < count($arr); $x ++) {
|
for($x = 0; $x < count($arr); $x ++) {
|
||||||
|
@ -39,7 +39,7 @@ function tagrm_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
info( t('Tag removed') . EOL );
|
info( t('Tag removed') . EOL );
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
|
|
||||||
|
@ -52,13 +52,13 @@ function tagrm_content(&$a) {
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
if(! local_user()) {
|
if(! local_user()) {
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = (($a->argc > 1) ? intval($a->argv[1]) : 0);
|
$item = (($a->argc > 1) ? intval($a->argv[1]) : 0);
|
||||||
if(! $item) {
|
if(! $item) {
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,12 +69,12 @@ function tagrm_content(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! dbm::is_result($r))
|
if(! dbm::is_result($r))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
$arr = explode(',', $r[0]['tag']);
|
$arr = explode(',', $r[0]['tag']);
|
||||||
|
|
||||||
if(! count($arr))
|
if(! count($arr))
|
||||||
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
|
|
||||||
$o .= '<h3>' . t('Remove Item Tag') . '</h3>';
|
$o .= '<h3>' . t('Remove Item Tag') . '</h3>';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ function toggle_mobile_init(&$a) {
|
||||||
if(isset($_GET['address']))
|
if(isset($_GET['address']))
|
||||||
$address = $_GET['address'];
|
$address = $_GET['address'];
|
||||||
else
|
else
|
||||||
$address = $a->get_baseurl();
|
$address = App::get_baseurl();
|
||||||
|
|
||||||
goaway($address);
|
goaway($address);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ function uexport_content(&$a){
|
||||||
|
|
||||||
$tpl = get_markup_template("uexport.tpl");
|
$tpl = get_markup_template("uexport.tpl");
|
||||||
return replace_macros($tpl, array(
|
return replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$title' => t('Export personal data'),
|
'$title' => t('Export personal data'),
|
||||||
'$options' => $options
|
'$options' => $options
|
||||||
));
|
));
|
||||||
|
@ -104,7 +104,7 @@ function uexport_account($a){
|
||||||
$output = array(
|
$output = array(
|
||||||
'version' => FRIENDICA_VERSION,
|
'version' => FRIENDICA_VERSION,
|
||||||
'schema' => DB_UPDATE_VERSION,
|
'schema' => DB_UPDATE_VERSION,
|
||||||
'baseurl' => $a->get_baseurl(),
|
'baseurl' => App::get_baseurl(),
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'contact' => $contact,
|
'contact' => $contact,
|
||||||
'profile' => $profile,
|
'profile' => $profile,
|
||||||
|
|
|
@ -59,7 +59,7 @@ function videos_init(&$a) {
|
||||||
|
|
||||||
if($albums_visible) {
|
if($albums_visible) {
|
||||||
$o .= '<div id="sidebar-photos-albums" class="widget">';
|
$o .= '<div id="sidebar-photos-albums" class="widget">';
|
||||||
$o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
|
$o .= '<h3>' . '<a href="' . App::get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
|
||||||
|
|
||||||
$o .= '<ul>';
|
$o .= '<ul>';
|
||||||
foreach($albums as $album) {
|
foreach($albums as $album) {
|
||||||
|
@ -74,7 +74,7 @@ function videos_init(&$a) {
|
||||||
$o .= '</ul>';
|
$o .= '</ul>';
|
||||||
}
|
}
|
||||||
if(local_user() && $a->data['user']['uid'] == local_user()) {
|
if(local_user() && $a->data['user']['uid'] == local_user()) {
|
||||||
$o .= '<div id="photo-albums-upload-link"><a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
|
$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>';
|
$o .= '</div>';
|
||||||
|
@ -87,12 +87,12 @@ function videos_init(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template("videos_head.tpl");
|
$tpl = get_markup_template("videos_head.tpl");
|
||||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template("videos_end.tpl");
|
$tpl = get_markup_template("videos_end.tpl");
|
||||||
$a->page['end'] .= replace_macros($tpl,array(
|
$a->page['end'] .= replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -106,13 +106,13 @@ function videos_post(&$a) {
|
||||||
|
|
||||||
$owner_uid = $a->data['user']['uid'];
|
$owner_uid = $a->data['user']['uid'];
|
||||||
|
|
||||||
if (local_user() != $owner_uid) goaway($a->get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
if (local_user() != $owner_uid) goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||||
|
|
||||||
if(($a->argc == 2) && x($_POST,'delete') && x($_POST, 'id')) {
|
if(($a->argc == 2) && x($_POST,'delete') && x($_POST, 'id')) {
|
||||||
|
|
||||||
// Check if we should do HTML-based delete confirmation
|
// Check if we should do HTML-based delete confirmation
|
||||||
if(!x($_REQUEST,'confirm')) {
|
if(!x($_REQUEST,'confirm')) {
|
||||||
if(x($_REQUEST,'canceled')) goaway($a->get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
if(x($_REQUEST,'canceled')) goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||||
|
|
||||||
$drop_url = $a->query_string;
|
$drop_url = $a->query_string;
|
||||||
$a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
|
$a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
|
||||||
|
@ -160,7 +160,7 @@ function videos_post(&$a) {
|
||||||
create_tags_from_itemuri($i[0]['uri'], local_user());
|
create_tags_from_itemuri($i[0]['uri'], local_user());
|
||||||
delete_thread_uri($i[0]['uri'], local_user());
|
delete_thread_uri($i[0]['uri'], local_user());
|
||||||
|
|
||||||
$url = $a->get_baseurl();
|
$url = App::get_baseurl();
|
||||||
$drop_id = intval($i[0]['id']);
|
$drop_id = intval($i[0]['id']);
|
||||||
|
|
||||||
if($i[0]['visible'])
|
if($i[0]['visible'])
|
||||||
|
@ -168,11 +168,11 @@ function videos_post(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,13 +376,13 @@ function videos_content(&$a) {
|
||||||
|
|
||||||
$videos[] = array(
|
$videos[] = array(
|
||||||
'id' => $rr['id'],
|
'id' => $rr['id'],
|
||||||
'link' => $a->get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
|
'link' => App::get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
|
||||||
'title' => t('View Video'),
|
'title' => t('View Video'),
|
||||||
'src' => $a->get_baseurl() . '/attach/' . $rr['id'] . '?attachment=0',
|
'src' => App::get_baseurl() . '/attach/' . $rr['id'] . '?attachment=0',
|
||||||
'alt' => $alt_e,
|
'alt' => $alt_e,
|
||||||
'mime' => $rr['filetype'],
|
'mime' => $rr['filetype'],
|
||||||
'album' => array(
|
'album' => array(
|
||||||
'link' => $a->get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
'link' => App::get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
|
||||||
'name' => $name_e,
|
'name' => $name_e,
|
||||||
'alt' => t('View Album'),
|
'alt' => t('View Album'),
|
||||||
),
|
),
|
||||||
|
@ -395,9 +395,9 @@ function videos_content(&$a) {
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$title' => t('Recent Videos'),
|
'$title' => t('Recent Videos'),
|
||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload New Videos'), $a->get_baseurl().'/videos/'.$a->data['user']['nickname'].'/upload'),
|
'$upload' => array(t('Upload New Videos'), App::get_baseurl().'/videos/'.$a->data['user']['nickname'].'/upload'),
|
||||||
'$videos' => $videos,
|
'$videos' => $videos,
|
||||||
'$delete_url' => (($can_post)?$a->get_baseurl().'/videos/'.$a->data['user']['nickname']:False)
|
'$delete_url' => (($can_post)?App::get_baseurl().'/videos/'.$a->data['user']['nickname']:False)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -260,9 +260,9 @@ function wall_upload_post(&$a, $desktopmode = true) {
|
||||||
$picture["width"] = $r[0]["width"];
|
$picture["width"] = $r[0]["width"];
|
||||||
$picture["height"] = $r[0]["height"];
|
$picture["height"] = $r[0]["height"];
|
||||||
$picture["type"] = $r[0]["type"];
|
$picture["type"] = $r[0]["type"];
|
||||||
$picture["albumpage"] = $a->get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash;
|
$picture["albumpage"] = App::get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash;
|
||||||
$picture["picture"] = $a->get_baseurl()."/photo/{$hash}-0.".$ph->getExt();
|
$picture["picture"] = App::get_baseurl()."/photo/{$hash}-0.".$ph->getExt();
|
||||||
$picture["preview"] = $a->get_baseurl()."/photo/{$hash}-{$smallest}.".$ph->getExt();
|
$picture["preview"] = App::get_baseurl()."/photo/{$hash}-{$smallest}.".$ph->getExt();
|
||||||
|
|
||||||
if ($r_json) {
|
if ($r_json) {
|
||||||
echo json_encode(array('picture'=>$picture));
|
echo json_encode(array('picture'=>$picture));
|
||||||
|
@ -282,14 +282,14 @@ function wall_upload_post(&$a, $desktopmode = true) {
|
||||||
//if we get the signal then return the image url info in BBCODE, otherwise this outputs the info and bails (for the ajax image uploader on wall post)
|
//if we get the signal then return the image url info in BBCODE, otherwise this outputs the info and bails (for the ajax image uploader on wall post)
|
||||||
if ($_REQUEST['hush']!='yeah') {
|
if ($_REQUEST['hush']!='yeah') {
|
||||||
if(local_user() && (! feature_enabled(local_user(),'richtext') || x($_REQUEST['nomce'])) ) {
|
if(local_user() && (! feature_enabled(local_user(),'richtext') || x($_REQUEST['nomce'])) ) {
|
||||||
echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
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";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo '<br /><br /><a href="' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '" ><img src="' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."\" alt=\"$basename\" /></a><br /><br />";
|
echo '<br /><br /><a href="' . App::get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '" ><img src="' . App::get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."\" alt=\"$basename\" /></a><br /><br />";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$m = '[url='.$a->get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.$a->get_baseurl()."/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
$m = '[url='.App::get_baseurl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.App::get_baseurl()."/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
||||||
return($m);
|
return($m);
|
||||||
}
|
}
|
||||||
/* mod Waitman Gobble NO WARRANTY */
|
/* mod Waitman Gobble NO WARRANTY */
|
||||||
|
|
20
mod/xrd.php
20
mod/xrd.php
|
@ -31,14 +31,14 @@ function xrd_init(&$a) {
|
||||||
|
|
||||||
$tpl = get_markup_template('xrd_diaspora.tpl');
|
$tpl = get_markup_template('xrd_diaspora.tpl');
|
||||||
$dspr = replace_macros($tpl,array(
|
$dspr = replace_macros($tpl,array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$dspr_guid' => $r[0]['guid'],
|
'$dspr_guid' => $r[0]['guid'],
|
||||||
'$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
|
'$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template('xrd_person.tpl');
|
$tpl = get_markup_template('xrd_person.tpl');
|
||||||
|
|
||||||
$profile_url = $a->get_baseurl().'/profile/'.$r[0]['nickname'];
|
$profile_url = App::get_baseurl().'/profile/'.$r[0]['nickname'];
|
||||||
|
|
||||||
if ($acct)
|
if ($acct)
|
||||||
$alias = $profile_url;
|
$alias = $profile_url;
|
||||||
|
@ -54,15 +54,15 @@ function xrd_init(&$a) {
|
||||||
'$accturi' => $uri,
|
'$accturi' => $uri,
|
||||||
'$alias' => $alias,
|
'$alias' => $alias,
|
||||||
'$profile_url' => $profile_url,
|
'$profile_url' => $profile_url,
|
||||||
'$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['nickname'],
|
'$hcard_url' => App::get_baseurl() . '/hcard/' . $r[0]['nickname'],
|
||||||
'$atom' => $a->get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'],
|
'$atom' => App::get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'],
|
||||||
'$zot_post' => $a->get_baseurl() . '/post/' . $r[0]['nickname'],
|
'$zot_post' => App::get_baseurl() . '/post/' . $r[0]['nickname'],
|
||||||
'$poco_url' => $a->get_baseurl() . '/poco/' . $r[0]['nickname'],
|
'$poco_url' => App::get_baseurl() . '/poco/' . $r[0]['nickname'],
|
||||||
'$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg',
|
'$photo' => App::get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg',
|
||||||
'$dspr' => $dspr,
|
'$dspr' => $dspr,
|
||||||
'$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'],
|
'$salmon' => App::get_baseurl() . '/salmon/' . $r[0]['nickname'],
|
||||||
'$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
|
'$salmen' => App::get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
|
||||||
'$subscribe' => $a->get_baseurl() . '/follow?url={uri}',
|
'$subscribe' => App::get_baseurl() . '/follow?url={uri}',
|
||||||
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
|
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
|
||||||
'$bigkey' => salmon_key($r[0]['pubkey'])
|
'$bigkey' => salmon_key($r[0]['pubkey'])
|
||||||
));
|
));
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html itemscope itemtype="http://schema.org/Blog" lang="<?php echo $lang; ?>">
|
<html itemscope itemtype="http://schema.org/Blog" lang="<?php echo $lang; ?>">
|
||||||
<head>
|
<head>
|
||||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
<script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
|
||||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
<script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
|
||||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -38,7 +38,7 @@ function theme_admin_post(&$a){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @TODO $a is no longer used
|
||||||
function clean_form(&$a, &$colorset, $user){
|
function clean_form(&$a, &$colorset, $user){
|
||||||
$colorset = array(
|
$colorset = array(
|
||||||
'default'=>t('default'),
|
'default'=>t('default'),
|
||||||
|
@ -57,7 +57,7 @@ function clean_form(&$a, &$colorset, $user){
|
||||||
$t = get_markup_template("theme_settings.tpl" );
|
$t = get_markup_template("theme_settings.tpl" );
|
||||||
$o .= replace_macros($t, array(
|
$o .= replace_macros($t, array(
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$title' => t("Theme settings"),
|
'$title' => t("Theme settings"),
|
||||||
'$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
|
'$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
|
||||||
));
|
));
|
||||||
|
|
|
@ -57,7 +57,7 @@ function frio_form(&$a, $arr) {
|
||||||
$t = get_markup_template('theme_settings.tpl');
|
$t = get_markup_template('theme_settings.tpl');
|
||||||
$o .= replace_macros($t, array(
|
$o .= replace_macros($t, array(
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => App::get_baseurl(),
|
||||||
'$title' => t("Theme settings"),
|
'$title' => t("Theme settings"),
|
||||||
'$schema' => array('frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices),
|
'$schema' => array('frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices),
|
||||||
'$nav_bg' => array_key_exists("nav_bg", $disable) ? "" : array('frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
|
'$nav_bg' => array_key_exists("nav_bg", $disable) ? "" : array('frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
<head>
|
<head>
|
||||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?> ">
|
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?> ">
|
||||||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
<script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
|
||||||
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
||||||
<?php $baseurl = $a->get_baseurl(); ?>
|
<?php $baseurl = App::get_baseurl(); ?>
|
||||||
<?php $frio = "view/theme/frio"; ?>
|
<?php $frio = "view/theme/frio"; ?>
|
||||||
<?php
|
<?php
|
||||||
// Because we use minimal for modals the header and the included js stuff should be only loaded
|
// Because we use minimal for modals the header and the included js stuff should be only loaded
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
<meta name="viewport" content="initial-scale=1.0">
|
||||||
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?> ">
|
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?> ">
|
||||||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
<script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
|
||||||
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
<script>var frio="<?php echo "view/theme/frio"; ?>";</script>
|
||||||
<?php $baseurl = $a->get_baseurl(); ?>
|
<?php $baseurl = App::get_baseurl(); ?>
|
||||||
<?php $frio = "view/theme/frio"; ?>
|
<?php $frio = "view/theme/frio"; ?>
|
||||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead']; ?>
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead']; ?>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ function frio_init(&$a) {
|
||||||
|
|
||||||
set_template_engine($a, 'smarty3');
|
set_template_engine($a, 'smarty3');
|
||||||
|
|
||||||
$baseurl = $a->get_baseurl();
|
$baseurl = App::get_baseurl();
|
||||||
|
|
||||||
$style = get_pconfig(local_user(), 'frio', 'style');
|
$style = get_pconfig(local_user(), 'frio', 'style');
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="<?php echo $lang; ?>">
|
<html lang="<?php echo $lang; ?>">
|
||||||
<head>
|
<head>
|
||||||
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
<script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
|
||||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||||
</head>
|
</head>
|
||||||
<body <?php if($a->module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>>
|
<body <?php if($a->module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>>
|
||||||
|
|
|
@ -23,8 +23,8 @@ function frost_mobile_content_loaded(&$a) {
|
||||||
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
|
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
|
||||||
// making pages load faster
|
// making pages load faster
|
||||||
if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
|
if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
|
||||||
// $a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']);
|
// $a->page['htmlhead'] = str_replace('$stylesheet', App::get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']);
|
||||||
$a->theme['stylesheet'] = $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css';
|
$a->theme['stylesheet'] = App::get_baseurl() . '/view/theme/frost-mobile/login-style.css';
|
||||||
}
|
}
|
||||||
if( $a->module === 'login' )
|
if( $a->module === 'login' )
|
||||||
$a->page['end'] .= '<script type="text/javascript"> $(document).ready(function() { $("#id_" + window.loginName).focus();} );</script>';
|
$a->page['end'] .= '<script type="text/javascript"> $(document).ready(function() { $("#id_" + window.loginName).focus();} );</script>';
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue