diff options
author | Arun Persaud <arun@nubati.net> | 2015-10-04 17:03:34 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2015-10-04 17:05:32 -0700 |
commit | 65de9655c6002bbfee76f1c3c45b312615fb375a (patch) | |
tree | cbaf2ae3fd9d5bf7db8425a8c2b6e809c77b56e2 /include/register.php | |
parent | a4cdb155b19c40d9b85a06d8aae0c6b291f439fc (diff) | |
download | e-DoKo-65de9655c6002bbfee76f1c3c45b312615fb375a.tar.gz e-DoKo-65de9655c6002bbfee76f1c3c45b312615fb375a.tar.bz2 e-DoKo-65de9655c6002bbfee76f1c3c45b312615fb375a.zip |
BUGFIX: fix mysql insert statements (null values for timestamps didn't work anymore)
a dreamhost update to a newer sql version changed the default behavior for
null inserts for timestamps. They don't insert the current timestamp anymore
when a config option for mysql is set (which seems to be the case).
solution: instead of inserting null always insert current_timestamp
Diffstat (limited to 'include/register.php')
-rw-r--r-- | include/register.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/register.php b/include/register.php index 028e1bb..d0b18b1 100644 --- a/include/register.php +++ b/include/register.php @@ -113,7 +113,7 @@ if(myisset('Rfullname','Remail','Rtimezone') ) $r=DB_query('INSERT INTO User VALUES(NULL,'.DB_quote_smart($_REQUEST['Rfullname']). ','.DB_quote_smart($_REQUEST['Remail']). ','.DB_quote_smart($hash). - ','.DB_quote_smart($_REQUEST['Rtimezone']).',NULL,NULL)'); + ','.DB_quote_smart($_REQUEST['Rtimezone']).',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)'); } else /* hash function didn't work */ $r=0; @@ -124,7 +124,7 @@ if(myisset('Rfullname','Remail','Rtimezone') ) $r=DB_query('INSERT INTO User VALUES(NULL,'.DB_quote_smart($_REQUEST['Rfullname']). ','.DB_quote_smart($_REQUEST['Remail']). ','.DB_quote_smart(md5($password)). - ','.DB_quote_smart($_REQUEST['Rtimezone']).',NULL,NULL)'); + ','.DB_quote_smart($_REQUEST['Rtimezone']).',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)'); if($r) { include_once('openid.php'); |