mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Move Temporal::convert() to DateTimeFormat::convert()
This commit is contained in:
parent
13fb4a312d
commit
1900da6c42
15 changed files with 77 additions and 77 deletions
|
@ -53,8 +53,8 @@ use Friendica\Model\Group;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
function statusnet_install()
|
||||
{
|
||||
|
@ -760,7 +760,7 @@ function statusnet_cron(App $a, $b)
|
|||
$abandon_days = 0;
|
||||
}
|
||||
|
||||
$abandon_limit = date(Temporal::MYSQL, time() - $abandon_days * 86400);
|
||||
$abandon_limit = date(DateTimeFormat::MYSQL, time() - $abandon_days * 86400);
|
||||
|
||||
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'statusnet' AND `k` = 'import' AND `v` ORDER BY RAND()");
|
||||
if (count($r)) {
|
||||
|
@ -936,7 +936,7 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
|
|||
`location`, `about`, `writable`, `blocked`, `readonly`, `pending` )
|
||||
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, 0, 0, 0 ) ",
|
||||
intval($uid),
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
dbesc($contact->statusnet_profile_url),
|
||||
dbesc(normalise_link($contact->statusnet_profile_url)),
|
||||
dbesc(statusnet_address($contact)),
|
||||
|
@ -977,13 +977,13 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
|
|||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
intval($contact_id)
|
||||
);
|
||||
} else {
|
||||
// update profile photos once every two weeks as we have no notification of when they change.
|
||||
//$update_photo = (($r[0]['avatar-date'] < Temporal::convert('now -2 days', '', '', )) ? true : false);
|
||||
$update_photo = ($r[0]['avatar-date'] < Temporal::utc('now -12 hours'));
|
||||
//$update_photo = (($r[0]['avatar-date'] < DateTimeFormat::convert('now -2 days', '', '', )) ? true : false);
|
||||
$update_photo = ($r[0]['avatar-date'] < DateTimeFormat::utc('now -12 hours'));
|
||||
|
||||
// check that we have all the photos, this has been known to fail on occasion
|
||||
if ((!$r[0]['photo']) || (!$r[0]['thumb']) || (!$r[0]['micro']) || ($update_photo)) {
|
||||
|
@ -1008,9 +1008,9 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
|
|||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(Temporal::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
dbesc(DateTimeFormat::utcNow()),
|
||||
dbesc($contact->statusnet_profile_url),
|
||||
dbesc(normalise_link($contact->statusnet_profile_url)),
|
||||
dbesc(statusnet_address($contact)),
|
||||
|
@ -1197,8 +1197,8 @@ function statusnet_createpost(App $a, $uid, $post, $self, $create_user, $only_ex
|
|||
$postarray['body'] = $converted["body"];
|
||||
$postarray['tag'] = $converted["tags"];
|
||||
|
||||
$postarray['created'] = Temporal::utc($content->created_at);
|
||||
$postarray['edited'] = Temporal::utc($content->created_at);
|
||||
$postarray['created'] = DateTimeFormat::utc($content->created_at);
|
||||
$postarray['edited'] = DateTimeFormat::utc($content->created_at);
|
||||
|
||||
if (is_string($content->place->name)) {
|
||||
$postarray["location"] = $content->place->name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue