]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
More missed calls
[friendica.git] / include / items.php
index 7883038db1afeac4b1e479f86266501ed624319b..85da1d1ccf892f68abd8edc45ac59d445b213e15 100644 (file)
@@ -6,6 +6,7 @@ use Friendica\App;
 use Friendica\Content\Feature;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Core\System;
@@ -322,13 +323,13 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                $arr['protocol'] = PROTOCOL_DFRN;
 
                // We have to avoid duplicates. So we create the GUID in form of a hash of the plink or uri.
-               // In difference to the call to "Item::GuidFromUri" several lines below we add the hash of our own host.
+               // In difference to the call to "Item::guidFromUri" several lines below we add the hash of our own host.
                // This is done because our host is the original creator of the post.
                if (!isset($arr['guid'])) {
                        if (isset($arr['plink'])) {
-                               $arr['guid'] = Item::GuidFromUri($arr['plink'], $a->get_hostname());
+                               $arr['guid'] = Item::guidFromUri($arr['plink'], $a->get_hostname());
                        } elseif (isset($arr['uri'])) {
-                               $arr['guid'] = Item::GuidFromUri($arr['uri'], $a->get_hostname());
+                               $arr['guid'] = Item::guidFromUri($arr['uri'], $a->get_hostname());
                        }
                }
        } else {
@@ -338,9 +339,9 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
        if ($notify) {
                $guid_prefix = "";
        } elseif ((trim($arr['guid']) == "") && (trim($arr['plink']) != "")) {
-               $arr['guid'] = Item::GuidFromUri($arr['plink']);
+               $arr['guid'] = Item::guidFromUri($arr['plink']);
        } elseif ((trim($arr['guid']) == "") && (trim($arr['uri']) != "")) {
-               $arr['guid'] = Item::GuidFromUri($arr['uri']);
+               $arr['guid'] = Item::guidFromUri($arr['uri']);
        } else {
                $parsed = parse_url($arr["author-link"]);
                $guid_prefix = hash("crc32", $parsed["host"]);
@@ -1495,7 +1496,7 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
                                        'to_email'     => $r[0]['email'],
                                        'uid'          => $r[0]['uid'],
                                        'link'             => System::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']) : L10n::t('[Name Withheld]')),
                                        'source_link'  => $contact_record['url'],
                                        'source_photo' => $contact_record['photo'],
                                        'verb'         => ($sharing ? ACTIVITY_FRIEND : ACTIVITY_FOLLOW),
@@ -1867,7 +1868,7 @@ function drop_item($id) {
        );
 
        if (!DBM::is_result($r)) {
-               notice(t('Item not found.') . EOL);
+               notice(L10n::t('Item not found.') . EOL);
                goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
        }
 
@@ -1907,12 +1908,12 @@ function drop_item($id) {
 
                        return replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'get',
-                               '$message' => t('Do you really want to delete this item?'),
+                               '$message' => L10n::t('Do you really want to delete this item?'),
                                '$extra_inputs' => $inputs,
-                               '$confirm' => t('Yes'),
+                               '$confirm' => L10n::t('Yes'),
                                '$confirm_url' => $query['base'],
                                '$confirm_name' => 'confirmed',
-                               '$cancel' => t('Cancel'),
+                               '$cancel' => L10n::t('Cancel'),
                        ]);
                }
                // Now check how the user responded to the confirmation query
@@ -1926,7 +1927,7 @@ function drop_item($id) {
                goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
                //NOTREACHED
        } else {
-               notice(t('Permission denied.') . EOL);
+               notice(L10n::t('Permission denied.') . EOL);
                goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
                //NOTREACHED
        }
@@ -2015,13 +2016,13 @@ function posted_date_widget($url, $uid, $wall) {
        $cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
 
        $o = replace_macros(get_markup_template('posted_date_widget.tpl'),[
-               '$title' => t('Archives'),
+               '$title' => L10n::t('Archives'),
                '$size' => $visible_years,
                '$cutoff_year' => $cutoff_year,
                '$cutoff' => $cutoff,
                '$url' => $url,
                '$dates' => $ret,
-               '$showmore' => t('show more')
+               '$showmore' => L10n::t('show more')
 
        ]);
        return $o;