* **disable_email_validation** (Boolean) - Disables the check if a mail address is in a valid format and can be resolved via DNS.
* **disable_url_validation** (Boolean) - Disables the DNS lookup of an URL.
* **dlogfile - location of the developer log file
+* **dlogip - restricts develop log writes to requests originating from this IP address
* **frontend_worker_timeout** - Value in minutes after we think that a frontend task was killed by the webserver. Default value is 10.
* **hsts** (Boolean) - Enables the sending of HTTP Strict Transport Security headers
* **ignore_cache** (Boolean) - For development only. Disables the item cache.
return;
}
- $logfile = Config::get('system','dlogfile');
-
+ $logfile = Config::get('system', 'dlogfile');
if (! $logfile) {
return;
}
+ $dlogip = Config::get('system', 'dlogip');
+ if (!is_null($dlogip) && $_SERVER['REMOTE_ADDR'] != $dlogip) {
+ return;
+ }
+
if (count($LOGGER_LEVELS) == 0) {
foreach (get_defined_constants() as $k => $v) {
if (substr($k, 0, 7) == "LOGGER_") {
PConfig::set($newuid, 'system', 'previous_addr', $old_handle);
- // Generate a new guid for the account. Otherwise there will be problems with diaspora
- dba::update('user', ['guid' => generate_user_guid()], ['uid' => $newuid]);
-
foreach ($account['profile'] as &$profile) {
foreach ($profile as $k => &$v) {
$v = str_replace([$oldbaseurl, $oldaddr], [$newbaseurl, $newaddr], $v);
/**
* Checks Converts any date string into a SQL compatible date string
*
+ * @deprecated since version 3.6
* @param string $date a date string in any format
*
* @return string SQL style date string
*/
public static function date($date = 'now')
{
- $timestamp = strtotime($date);
-
- // Don't allow lower date strings as '0001-01-01 00:00:00'
- if ($timestamp < -62135596800) {
- $timestamp = -62135596800;
- }
-
- return date(DateTimeFormat::MYSQL, (int)$timestamp);
+ return DateTimeFormat::utc($date);
}
}
$last_updated = "";
foreach ($entries as $entry) {
- $published = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue;
- $updated = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue;
+ $published = DateTimeFormat::utc($xpath->query('atom:published/text()', $entry)->item(0)->nodeValue);
+ $updated = DateTimeFormat::utc($xpath->query('atom:updated/text()' , $entry)->item(0)->nodeValue);
- if ($last_updated < $published)
+ if ($last_updated < $published) {
$last_updated = $published;
+ }
- if ($last_updated < $updated)
+ if ($last_updated < $updated) {
$last_updated = $updated;
+ }
}
// Maybe there aren't any entries. Then check if it is a valid feed
$last_updated = NULL_DATE;
}
}
- $fields = ['updated' => DBM::date($last_updated), 'last_contact' => DBM::date()];
+
+ $fields = ['updated' => $last_updated, 'last_contact' => DateTimeFormat::utcNow()];
dba::update('gcontact', $fields, ['nurl' => normalise_link($profile)]);
if (($gcontacts[0]["generation"] == 0)) {
logger("Profile ".$profile." was last updated at ".$last_updated, LOGGER_DEBUG);
- return($last_updated);
+ return $last_updated;
}
public static function updateNeeded($created, $updated, $last_failure, $last_contact)
Sérgio Lima
Taekus
Tazman DeVille
+Thecross
Thomas
Thomas Willingham
thorsten23