From 46be9b76ef4b4cc56a73a8691966408312357448 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 24 Jul 2019 22:28:03 +0100 Subject: [PATCH] [CORE] Fix wrong Profile_list schema and set created in user_im_prefs properly - by XRevan86 This reverts 496ab8c9, which was a bad correction of user_im_prefs values --- actions/confirmaddress.php | 1 + classes/Profile_list.php | 4 ++-- classes/User_im_prefs.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php index 9ac6848d7a..6c5da340b6 100644 --- a/actions/confirmaddress.php +++ b/actions/confirmaddress.php @@ -140,6 +140,7 @@ class ConfirmaddressAction extends ManagedAction $user_im_prefs->screenname = $confirm->address; $user_im_prefs->transport = $confirm->address_type; $user_im_prefs->user_id = $cur->id; + $user_im_prefs->created = common_sql_now(); $result = $user_im_prefs->insert(); if ($result === false) { diff --git a/classes/Profile_list.php b/classes/Profile_list.php index 72dcf6bf35..5e7ead795d 100644 --- a/classes/Profile_list.php +++ b/classes/Profile_list.php @@ -48,8 +48,8 @@ class Profile_list extends Managed_DataObject 'description' => array('type' => 'text', 'description' => 'description of the people tag'), 'private' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'is this tag private'), - 'created' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was added'), - 'modified' => array('type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date the tag was modified'), + 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the tag was added'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was modified'), 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'), 'mainpage' => array('type' => 'varchar', 'length' => 191, 'description' => 'page to link to'), diff --git a/classes/User_im_prefs.php b/classes/User_im_prefs.php index eb5b67269a..6a5fc7f3ab 100644 --- a/classes/User_im_prefs.php +++ b/classes/User_im_prefs.php @@ -57,8 +57,8 @@ class User_im_prefs extends Managed_DataObject 'notify' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Notify when a new notice is sent'), 'replies' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Send replies from people not subscribed to'), 'updatefrompresence' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Send replies from people not subscribed to.'), - 'created' => array('type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'), - 'modified' => array('type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'), + 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), ), 'primary key' => array('user_id', 'transport'), 'unique keys' => array(