]> git.mxchange.org Git - friendica.git/blobdiff - include/enotify.php
format_network_name calls
[friendica.git] / include / enotify.php
index cf8b195deb9a055eb5d6589a422d4b519c9b4ef3..2033027e3d1ca54eefe47d9f04b1ab72fbc021b8 100644 (file)
@@ -15,6 +15,7 @@ use Friendica\Model\Contact;
 use Friendica\Model\Item;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Emailer;
+use Friendica\Util\Strings;
 
 /**
  * @brief Creates a notification entry and possibly sends a mail
@@ -157,7 +158,7 @@ function notification($params)
                        $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'];
 
                // "a post"
@@ -457,7 +458,7 @@ function notification($params)
                Logger::log("adding notification entry", Logger::DEBUG);
                do {
                        $dups = false;
-                       $hash = random_string();
+                       $hash = Strings::getRandomHex();
                        if (DBA::exists('notify', ['hash' => $hash])) {
                                $dups = true;
                        }
@@ -590,7 +591,7 @@ function notification($params)
                $content_allowed = ((!Config::get('system', 'enotify_no_content')) || ($params['type'] == SYSTEM_EMAIL));
 
                // load the template for private message notifications
-               $tpl = get_markup_template('email_notify_html.tpl');
+               $tpl = Renderer::getMarkupTemplate('email_notify_html.tpl');
                $email_html_body = Renderer::replaceMacros($tpl, [
                        '$banner'       => $datarray['banner'],
                        '$product'      => $datarray['product'],
@@ -611,7 +612,7 @@ function notification($params)
                ]);
 
                // load the template for private message notifications
-               $tpl = get_markup_template('email_notify_text.tpl');
+               $tpl = Renderer::getMarkupTemplate('email_notify_text.tpl');
                $email_text_body = Renderer::replaceMacros($tpl, [
                        '$banner'       => $datarray['banner'],
                        '$product'      => $datarray['product'],