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;
$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 {
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"]);
'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),
);
if (!DBM::is_result($r)) {
- notice(t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
}
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
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
}
$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;