Function calls
update function calls to new class
This commit is contained in:
parent
d50a1edef4
commit
e537f7d017
6 changed files with 10 additions and 10 deletions
|
@ -638,7 +638,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
|
||||||
$lock = false;
|
$lock = false;
|
||||||
$likebuttons = false;
|
$likebuttons = false;
|
||||||
|
|
||||||
$body = prepare_body($item, true, $preview);
|
$body = Item::prepareBody($item, true, $preview);
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ function notification($params)
|
||||||
$item = Item::selectFirstForUser($params['uid'], Item::ITEM_FIELDLIST, ['id' => $parent_id]);
|
$item = Item::selectFirstForUser($params['uid'], Item::ITEM_FIELDLIST, ['id' => $parent_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item_post_type = item_post_type($item);
|
$item_post_type = Item::postType($item);
|
||||||
$itemlink = $item['plink'];
|
$itemlink = $item['plink'];
|
||||||
|
|
||||||
// "a post"
|
// "a post"
|
||||||
|
|
|
@ -698,10 +698,9 @@ function item_post(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($orig_post) {
|
if ($orig_post) {
|
||||||
|
|
||||||
// Fill the cache field
|
// Fill the cache field
|
||||||
// This could be done in Item::update as well - but we have to check for the existance of some fields.
|
// This could be done in Item::update as well - but we have to check for the existance of some fields.
|
||||||
put_item_in_cache($datarray);
|
Item::putInCache($datarray);
|
||||||
|
|
||||||
$fields = [
|
$fields = [
|
||||||
'title' => $datarray['title'],
|
'title' => $datarray['title'],
|
||||||
|
@ -817,7 +816,7 @@ function item_post(App $a) {
|
||||||
$subject = Email::encodeHeader('[Friendica]' . ' ' . L10n::t('%s posted an update.', $a->user['username']), 'UTF-8');
|
$subject = Email::encodeHeader('[Friendica]' . ' ' . L10n::t('%s posted an update.', $a->user['username']), 'UTF-8');
|
||||||
}
|
}
|
||||||
$link = '<a href="' . System::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);
|
$html = Item::prepareBody($datarray);
|
||||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
|
||||||
$params = [
|
$params = [
|
||||||
'fromName' => $a->user['username'],
|
'fromName' => $a->user['username'],
|
||||||
|
|
|
@ -1363,7 +1363,7 @@ class BBCode extends BaseObject
|
||||||
$text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $text);
|
$text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $text);
|
||||||
|
|
||||||
// leave open the posibility of [map=something]
|
// leave open the posibility of [map=something]
|
||||||
// this is replaced in prepare_body() which has knowledge of the item location
|
// this is replaced in Item::prepareBody() which has knowledge of the item location
|
||||||
|
|
||||||
if (strpos($text, '[/map]') !== false) {
|
if (strpos($text, '[/map]') !== false) {
|
||||||
$text = preg_replace_callback(
|
$text = preg_replace_callback(
|
||||||
|
@ -1474,7 +1474,7 @@ class BBCode extends BaseObject
|
||||||
|
|
||||||
$text = str_replace('[hr]', '<hr />', $text);
|
$text = str_replace('[hr]', '<hr />', $text);
|
||||||
|
|
||||||
// This is actually executed in prepare_body()
|
// This is actually executed in Item::prepareBody()
|
||||||
|
|
||||||
$text = str_replace('[nosmile]', '', $text);
|
$text = str_replace('[nosmile]', '', $text);
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ class Post extends BaseObject
|
||||||
|
|
||||||
localize_item($item);
|
localize_item($item);
|
||||||
|
|
||||||
$body = prepare_body($item, true);
|
$body = Item::prepareBody($item, true);
|
||||||
|
|
||||||
list($categories, $folders) = get_cats_and_terms($item);
|
list($categories, $folders) = get_cats_and_terms($item);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Protocol;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Core\Protocol;
|
use Friendica\Core\Protocol;
|
||||||
|
use Friendica\Model\Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Email class
|
* @brief Email class
|
||||||
|
@ -331,7 +332,7 @@ class Email
|
||||||
|
|
||||||
$part = uniqid("", true);
|
$part = uniqid("", true);
|
||||||
|
|
||||||
$html = prepare_body($item);
|
$html = Item::prepareBody($item);
|
||||||
|
|
||||||
$headers .= "Mime-Version: 1.0\n";
|
$headers .= "Mime-Version: 1.0\n";
|
||||||
$headers .= 'Content-Type: multipart/alternative; boundary="=_'.$part.'"'."\n\n";
|
$headers .= 'Content-Type: multipart/alternative; boundary="=_'.$part.'"'."\n\n";
|
||||||
|
|
Loading…
Reference in a new issue