Add Temporal::MYSQL constant
- Rename Temporal::convert() parameter names
This commit is contained in:
parent
b854905150
commit
38ff1b455b
5 changed files with 21 additions and 20 deletions
|
@ -9,6 +9,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
function poco_init(App $a) {
|
||||
$system_mode = false;
|
||||
|
@ -43,7 +44,7 @@ function poco_init(App $a) {
|
|||
if ($a->argc > 1 && $a->argv[1] === '@global') {
|
||||
// List of all profiles that this server recently had data from
|
||||
$global = true;
|
||||
$update_limit = date("Y-m-d H:i:s", time() - 30 * 86400);
|
||||
$update_limit = date(Temporal::MYSQL, time() - 30 * 86400);
|
||||
}
|
||||
if ($a->argc > 2 && $a->argv[2] === '@me') {
|
||||
$justme = true;
|
||||
|
@ -80,7 +81,7 @@ function poco_init(App $a) {
|
|||
$sql_extra = sprintf(" AND `contact`.`id` = %d ", intval($cid));
|
||||
}
|
||||
if (x($_GET, 'updatedSince')) {
|
||||
$update_limit = date("Y-m-d H:i:s", strtotime($_GET['updatedSince']));
|
||||
$update_limit = date(Temporal::MYSQL, strtotime($_GET['updatedSince']));
|
||||
}
|
||||
if ($global) {
|
||||
$contacts = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND `updated` >= `last_failure` AND NOT `hide` AND `network` IN ('%s', '%s', '%s')",
|
||||
|
|
|
@ -236,7 +236,7 @@ function profile_content(App $a, $update = 0)
|
|||
if ($is_owner || !$last_updated) {
|
||||
$sql_extra4 = " AND `item`.`unseen`";
|
||||
} else {
|
||||
$gmupdate = gmdate("Y-m-d H:i:s", $last_updated);
|
||||
$gmupdate = gmdate(Temporal::MYSQL, $last_updated);
|
||||
$sql_extra4 = " AND `item`.`received` > '" . $gmupdate . "'";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue