]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Populate 'created' property on ostatus_source
authorChimo <chimo@chromic.org>
Sun, 8 Feb 2015 18:41:29 +0000 (13:41 -0500)
committerChimo <chimo@chromic.org>
Sun, 8 Feb 2015 18:41:29 +0000 (13:41 -0500)
The 'created' column in ostatus_source SQL table has NOT NULL restriction.
INSERTs fail when running MySQL/MariaDB in strict mode if this is not
populated.

plugins/OStatus/classes/Ostatus_source.php

index d122a7e7f4f06622f2ea13b1ea43e19af02fc855..6cecc323e0986e8247a9b218598b8c857f443ba8 100644 (file)
@@ -66,6 +66,7 @@ class Ostatus_source extends Managed_DataObject
         $osource->notice_id = $notice->id;
         $osource->profile_uri = $oprofile->uri;
         $osource->method = $method;
+        $osource->created = common_sql_now();
         if ($osource->insert()) {
            return true;
         } else {