]> git.mxchange.org Git - friendica.git/commitdiff
Fix for issue "Field 'type' doesn't have a default value" in the challenge table.
authorMichael Vogel <icarus@dabo.de>
Sat, 8 Nov 2014 19:52:15 +0000 (20:52 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 8 Nov 2014 19:52:15 +0000 (20:52 +0100)
mod/dfrn_notify.php
mod/dfrn_poll.php

index 7f160de44390e0b4be395083bb9fea802d226afd..2aa654534621dbb186a5dd6b61db1068397ae212 100644 (file)
@@ -175,6 +175,8 @@ function dfrn_notify_content(&$a) {
 
                $dfrn_id = notags(trim($_GET['dfrn_id']));
                $dfrn_version = (float) $_GET['dfrn_version'];
+               $type = "";
+               $last_update = "";
 
                logger('dfrn_notify: new notification dfrn_id=' . $dfrn_id);
 
@@ -190,11 +192,13 @@ function dfrn_notify_content(&$a) {
 
                $r = q("DELETE FROM `challenge` WHERE `expire` < " . intval(time()));
 
-               $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` )
+               $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` , `type`, `last_update` )
                        VALUES( '%s', '%s', %d ) ",
                        dbesc($hash),
                        dbesc($dfrn_id),
-                       intval(time() + 90 )
+                       intval(time() + 90 ),
+                       dbesc($type),
+                       dbesc($last_update)
                );
 
                logger('dfrn_notify: challenge=' . $hash, LOGGER_DEBUG );
index b9fcd8c4a4c7be4978944d1882cf57a0dfa3124c..b5f60a0397e39020cd77253b925e2386136e0277 100644 (file)
@@ -389,7 +389,7 @@ function dfrn_poll_content(&$a) {
        $sec             = ((x($_GET,'sec'))             ? $_GET['sec']                  : '');
        $dfrn_version    = ((x($_GET,'dfrn_version'))    ? (float) $_GET['dfrn_version'] : 2.0);
        $perm            = ((x($_GET,'perm'))            ? $_GET['perm']                 : 'r');
-       $quiet                   = ((x($_GET,'quiet'))                   ? true                                                  : false);
+       $quiet           = ((x($_GET,'quiet'))           ? true                          : false);
 
        $direction = (-1);
        if(strpos($dfrn_id,':') == 1) {