From ffeae7e04888a3362d951b0100ad6f377a4efbe4 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Feb 2017 05:45:06 +0000 Subject: [PATCH] Bugfix for bugfix :-) --- include/dbm.php | 4 ++-- include/socgraph.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/dbm.php b/include/dbm.php index 0e12417501..e88f2a4d9d 100644 --- a/include/dbm.php +++ b/include/dbm.php @@ -93,9 +93,9 @@ class dbm { * @param string $date a date string in any format * @return string SQL style date string */ - public static function date($date) { + public static function date($date = 'now') { $timestamp = strtotime($date); - return date('Y-m-d H:i:s'); + return date('Y-m-d H:i:s', $timestamp); } } ?> diff --git a/include/socgraph.php b/include/socgraph.php index 8f6a551d84..a0dd88df2d 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -622,7 +622,7 @@ function poco_last_updated($profile, $force = false) { $last_updated = "0000-00-00 00:00:00"; q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'", - dbesc(dbm::date($last_updated)), dbesc(datetime_convert()), dbesc(normalise_link($profile))); + dbesc(dbm::date($last_updated)), dbesc(dbm::date()), dbesc(normalise_link($profile))); if (($gcontacts[0]["generation"] == 0)) q("UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'", -- 2.39.5