App::get_baseurl is now replaced with System::baseUrl
This commit is contained in:
parent
3c24bed412
commit
5adfeb0bd5
134 changed files with 603 additions and 624 deletions
20
mod/item.php
20
mod/item.php
|
@ -67,7 +67,7 @@ function item_post(App $a) {
|
|||
if (!$preview && x($_REQUEST, 'post_id_random')) {
|
||||
if (x($_SESSION, 'post-random') && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
|
||||
logger("item post: duplicate post", LOGGER_DEBUG);
|
||||
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||
item_post_return(System::baseUrl(), $api_source, $return_path);
|
||||
} else {
|
||||
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ function item_post(App $a) {
|
|||
$objecttype = ACTIVITY_OBJ_IMAGE;
|
||||
|
||||
foreach ($images as $image) {
|
||||
if (! stristr($image,App::get_baseurl() . '/photo/')) {
|
||||
if (! stristr($image,System::baseUrl() . '/photo/')) {
|
||||
continue;
|
||||
}
|
||||
$image_uri = substr($image,strrpos($image,'/') + 1);
|
||||
|
@ -626,7 +626,7 @@ function item_post(App $a) {
|
|||
if (strlen($attachments)) {
|
||||
$attachments .= ',';
|
||||
}
|
||||
$attachments .= '[attach]href="' . App::get_baseurl() . '/attach/' . $r[0]['id'] . '" length="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : '') . '"[/attach]';
|
||||
$attachments .= '[attach]href="' . System::baseUrl() . '/attach/' . $r[0]['id'] . '" length="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : '') . '"[/attach]';
|
||||
}
|
||||
$body = str_replace($match[1],'',$body);
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ function item_post(App $a) {
|
|||
// $datarray['prvnets'] = $user['prvnets'];
|
||||
|
||||
$datarray['parent-uri'] = ($parent == 0) ? $uri : $parent_item['uri'];
|
||||
$datarray['plink'] = App::get_baseurl() . '/display/' . urlencode($datarray['guid']);
|
||||
$datarray['plink'] = System::baseUrl() . '/display/' . urlencode($datarray['guid']);
|
||||
$datarray['last-child'] = 1;
|
||||
$datarray['visible'] = 1;
|
||||
|
||||
|
@ -766,7 +766,7 @@ function item_post(App $a) {
|
|||
|
||||
$json = array('cancel' => 1);
|
||||
if (x($_REQUEST, 'jsreload') && strlen($_REQUEST['jsreload'])) {
|
||||
$json['reload'] = App::get_baseurl() . '/' . $_REQUEST['jsreload'];
|
||||
$json['reload'] = System::baseUrl() . '/' . $_REQUEST['jsreload'];
|
||||
}
|
||||
|
||||
echo json_encode($json);
|
||||
|
@ -936,7 +936,7 @@ function item_post(App $a) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $datarray,
|
||||
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||
'link' => System::baseUrl().'/display/'.urlencode($datarray['guid']),
|
||||
'source_name' => $datarray['author-name'],
|
||||
'source_link' => $datarray['author-link'],
|
||||
'source_photo' => $datarray['author-avatar'],
|
||||
|
@ -968,7 +968,7 @@ function item_post(App $a) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $datarray,
|
||||
'link' => App::get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||
'link' => System::baseUrl().'/display/'.urlencode($datarray['guid']),
|
||||
'source_name' => $datarray['author-name'],
|
||||
'source_link' => $datarray['author-link'],
|
||||
'source_photo' => $datarray['author-avatar'],
|
||||
|
@ -990,14 +990,14 @@ function item_post(App $a) {
|
|||
}
|
||||
$disclaimer = '<hr />' . sprintf( t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username'])
|
||||
. '<br />';
|
||||
$disclaimer .= sprintf( t('You may visit them online at %s'), App::get_baseurl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= sprintf( t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||
if (!$datarray['title']=='') {
|
||||
$subject = email_header_encode($datarray['title'], 'UTF-8');
|
||||
} else {
|
||||
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'), $a->user['username']), 'UTF-8');
|
||||
}
|
||||
$link = '<a href="' . App::get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$link = '<a href="' . System::baseUrl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$html = prepare_body($datarray);
|
||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
||||
include_once 'include/html2plain.php';
|
||||
|
@ -1037,7 +1037,7 @@ function item_post(App $a) {
|
|||
|
||||
logger('post_complete');
|
||||
|
||||
item_post_return(App::get_baseurl(), $api_source, $return_path);
|
||||
item_post_return(System::baseUrl(), $api_source, $return_path);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue