mirror of
https://github.com/friendica/friendica
synced 2025-04-24 07:50:11 +00:00
Move Temporal::convert() to DateTimeFormat::convert()
This commit is contained in:
parent
b7a7355292
commit
5e7285b9ba
64 changed files with 568 additions and 551 deletions
|
@ -13,8 +13,8 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\XML;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
require_once 'include/html2plain.php';
|
||||
|
@ -43,7 +43,7 @@ class NotificationsManager extends BaseObject
|
|||
{
|
||||
$rets = [];
|
||||
foreach ($notes as $n) {
|
||||
$local_time = Temporal::local($n['date']);
|
||||
$local_time = DateTimeFormat::local($n['date']);
|
||||
$n['timestamp'] = strtotime($local_time);
|
||||
$n['date_rel'] = relative_date($n['date']);
|
||||
$n['msg_html'] = bbcode($n['msg'], false, false, false, false);
|
||||
|
@ -244,7 +244,7 @@ class NotificationsManager extends BaseObject
|
|||
$default_item_image = proxy_url($it['photo'], false, PROXY_SIZE_MICRO);
|
||||
$default_item_url = $it['url'];
|
||||
$default_item_text = strip_tags(bbcode($it['msg']));
|
||||
$default_item_when = Temporal::local($it['date'], 'r');
|
||||
$default_item_when = DateTimeFormat::local($it['date'], 'r');
|
||||
$default_item_ago = relative_date($it['date']);
|
||||
break;
|
||||
|
||||
|
@ -254,7 +254,7 @@ class NotificationsManager extends BaseObject
|
|||
$default_item_image = proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO);
|
||||
$default_item_url = $it['author-link'];
|
||||
$default_item_text = L10n::t("%s commented on %s's post", $it['author-name'], $it['pname']);
|
||||
$default_item_when = Temporal::local($it['created'], 'r');
|
||||
$default_item_when = DateTimeFormat::local($it['created'], 'r');
|
||||
$default_item_ago = relative_date($it['created']);
|
||||
break;
|
||||
|
||||
|
@ -266,7 +266,7 @@ class NotificationsManager extends BaseObject
|
|||
$default_item_text = (($it['id'] == $it['parent'])
|
||||
? L10n::t("%s created a new post", $it['author-name'])
|
||||
: L10n::t("%s commented on %s's post", $it['author-name'], $it['pname']));
|
||||
$default_item_when = Temporal::local($it['created'], 'r');
|
||||
$default_item_when = DateTimeFormat::local($it['created'], 'r');
|
||||
$default_item_ago = relative_date($it['created']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue