diff --git a/classes/Oauth_application.php b/classes/Oauth_application.php index ed838d0602..aa43038806 100644 --- a/classes/Oauth_application.php +++ b/classes/Oauth_application.php @@ -190,7 +190,7 @@ class Oauth_application extends Managed_DataObject 'type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'type of app, 1 = browser, 2 = desktop'), 'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'default access type, bit 1 = read, bit 2 = write'), 'created' => array('type' => 'datetime', 'description' => 'date this record was created'), - 'modified' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was modified'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), ), 'primary key' => array('id'), 'unique keys' => array( diff --git a/lib/database/mysqlschema.php b/lib/database/mysqlschema.php index 41235f89f5..9c6cf0e01d 100644 --- a/lib/database/mysqlschema.php +++ b/lib/database/mysqlschema.php @@ -461,7 +461,7 @@ class MysqlSchema extends Schema $phrase[] = "ENGINE '{$engine}'"; } if (strtolower($oldProps['TABLE_COLLATION']) !== "{$charset}_bin") { - $phrase[] = "CONVERT TO CHARACTER SET '{$charset} COLLATE '{$charset}_bin'"; + $phrase[] = "CONVERT TO CHARACTER SET '{$charset}' COLLATE '{$charset}_bin'"; $phrase[] = "DEFAULT CHARACTER SET '{$charset}'"; $phrase[] = "DEFAULT COLLATE '{$charset}_bin'"; } diff --git a/lib/database/pgsqlschema.php b/lib/database/pgsqlschema.php index 5cf9aad5eb..3c2ab76ef2 100644 --- a/lib/database/pgsqlschema.php +++ b/lib/database/pgsqlschema.php @@ -328,7 +328,8 @@ class PgsqlSchema extends Schema { $data = $this->fetchQueryData( <<conn->quote($val); } diff --git a/lib/modules/Realtime/classes/Realtime_channel.php b/lib/modules/Realtime/classes/Realtime_channel.php index 00ca056fe0..3178380e5d 100644 --- a/lib/modules/Realtime/classes/Realtime_channel.php +++ b/lib/modules/Realtime/classes/Realtime_channel.php @@ -85,7 +85,7 @@ class Realtime_channel extends Managed_DataObject 'created' => ['type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'], - 'modified' => ['type' => 'datetime', + 'modified' => ['type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'], ], diff --git a/lib/util/daemon.php b/lib/util/daemon.php index c7d8329412..8798ae52a4 100644 --- a/lib/util/daemon.php +++ b/lib/util/daemon.php @@ -78,12 +78,12 @@ class Daemon public function background() { - // Database connection will likely get lost after forking + // Database connection will be likely lost after forking. $this->resetDb(); // Double-forking. foreach (['single', 'double'] as $v) { - switch ($pid = pcntl_fork()) { + switch (($pid = pcntl_fork())) { case -1: // error common_log(LOG_ERR, 'Could not fork.'); return false; diff --git a/plugins/EmailSummary/classes/Email_summary_status.php b/plugins/EmailSummary/classes/Email_summary_status.php index 1e8d7898f1..4737d697e6 100644 --- a/plugins/EmailSummary/classes/Email_summary_status.php +++ b/plugins/EmailSummary/classes/Email_summary_status.php @@ -44,7 +44,7 @@ class Email_summary_status extends Managed_DataObject public $send_summary; // bool not_null default_true public $last_summary_id; // int(4) null public $created; // datetime not_null - public $modified; // datetime not_null + public $modified; // timestamp not_null public static function schemaDef() { diff --git a/plugins/Poll/classes/User_poll_prefs.php b/plugins/Poll/classes/User_poll_prefs.php index cf3272e2bc..9ee591055a 100644 --- a/plugins/Poll/classes/User_poll_prefs.php +++ b/plugins/Poll/classes/User_poll_prefs.php @@ -41,7 +41,7 @@ class User_poll_prefs extends Managed_DataObject public $user_id; // int id public $hide_responses; // bool public $created; // datetime - public $modified; // datetime + public $modified; // timestamp /** * The One True Thingy that must be defined and declared.