]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Docs: add a note on adding `use` on theme.php
[friendica.git] / mod / item.php
index 90598b7a3084debe8fd85bb4da90ace1cc9af2eb..1bbc08527953cc76cad4b2f680670ddb14317fc8 100644 (file)
@@ -593,11 +593,11 @@ function item_post(App $a) {
        $datarray['owner-name']    = $contact_record['name'];
        $datarray['owner-link']    = $contact_record['url'];
        $datarray['owner-avatar']  = $contact_record['thumb'];
-       $datarray['owner-id']      = Contact::getIdForURL($datarray['owner-link'], 0);
+       $datarray['owner-id']      = Contact::getIdForURL($datarray['owner-link']);
        $datarray['author-name']   = $author['name'];
        $datarray['author-link']   = $author['url'];
        $datarray['author-avatar'] = $author['thumb'];
-       $datarray['author-id']     = Contact::getIdForURL($datarray['author-link'], 0);
+       $datarray['author-id']     = Contact::getIdForURL($datarray['author-link']);
        $datarray['created']       = DateTimeFormat::utcNow();
        $datarray['edited']        = DateTimeFormat::utcNow();
        $datarray['commented']     = DateTimeFormat::utcNow();
@@ -808,7 +808,6 @@ function item_post(App $a) {
                                $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';
                                $params =  [
                                        'fromName' => $a->user['username'],
                                        'fromEmail' => $a->user['email'],
@@ -816,7 +815,7 @@ function item_post(App $a) {
                                        'replyTo' => $a->user['email'],
                                        'messageSubject' => $subject,
                                        'htmlVersion' => $message,
-                                       'textVersion' => html2plain($html.$disclaimer)
+                                       'textVersion' => Friendica\Content\Text\HTML::toPlaintext($html.$disclaimer)
                                ];
                                Emailer::send($params);
                        }