[Hastymail-cvs] SF.net SVN: hastymail:[2148] trunk/hastymail2
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2013-02-05 21:23:54
|
Revision: 2148 http://hastymail.svn.sourceforge.net/hastymail/?rev=2148&view=rev Author: sailfrog Date: 2013-02-05 21:23:47 +0000 (Tue, 05 Feb 2013) Log Message: ----------- - fix strict warnings in new PDO code - add support for old db_pear_type for sites who have not upgraded there config file - change the placeholder for the calendar event insert from 'null' to 'default'. null does not work in postresql. I need to check with Ben to make sure this works with firebird/sqlite Modified Paths: -------------- trunk/hastymail2/db/db.php trunk/hastymail2/lib/utility_classes.php trunk/hastymail2/plugins/calendar/cal_include.php Modified: trunk/hastymail2/db/db.php =================================================================== --- trunk/hastymail2/db/db.php 2013-02-03 08:41:54 UTC (rev 2147) +++ trunk/hastymail2/db/db.php 2013-02-05 21:23:47 UTC (rev 2148) @@ -162,18 +162,18 @@ $result_set = array(); if ($force) { $src = 'write handle'; - $res =& $this->db_write->query($sql); + $res = $this->db_write->query($sql); } else { $src = 'read handle'; - $res =& $this->db_read->query($sql); + $res = $this->db_read->query($sql); } $this->sql_list[] = $src.': '.$sql; if (!$res) { - $this->debug[] = $src.': sql id: '.(count($this->sql_list) - 1).' : '.str_replace('**', "\n **", $res->userinfo); + $this->debug[] = $src.': sql id: '.(count($this->sql_list) - 1).' : select failed: '.$sql; } else { - while ($row =& $res->fetch($this->fetch_mode)) { + while ($row = $res->fetch($this->fetch_mode)) { $result_set[] = $row; } if ($explain) { @@ -196,7 +196,7 @@ $src = 'write handle'; $this->sql_list[] = $src.': '.$sql; if (!$res) { - $this->debug[] = $src.': '.(count($this->sql_list) - 1).' : '.str_replace('**', "\n **", $res->userinfo); + $this->debug[] = $src.': '.(count($this->sql_list) - 1).' : write failed: '.$sql; } else { } Modified: trunk/hastymail2/lib/utility_classes.php =================================================================== --- trunk/hastymail2/lib/utility_classes.php 2013-02-03 08:41:54 UTC (rev 2147) +++ trunk/hastymail2/lib/utility_classes.php 2013-02-05 21:23:47 UTC (rev 2148) @@ -1423,6 +1423,9 @@ global $include_path; global $conf; global $fd; + if (isset($conf['db_pear_type']) && !isset($conf['db_adapter'])) { + $conf['db_adapter'] = $conf['db_pear_type']; + } if (isset($conf['db_type']) && isset($conf['db_adapter']) && isset($conf['db_username']) && isset($conf['db_password']) && isset($conf['db_hostname']) && isset($conf['db_database'])) { $db_lib = 'db'; Modified: trunk/hastymail2/plugins/calendar/cal_include.php =================================================================== --- trunk/hastymail2/plugins/calendar/cal_include.php 2013-02-03 08:41:54 UTC (rev 2147) +++ trunk/hastymail2/plugins/calendar/cal_include.php 2013-02-05 21:23:47 UTC (rev 2148) @@ -343,7 +343,7 @@ else { $duration = 0; } - $sql = 'insert into calendar values(null, '. + $sql = 'insert into calendar values(default, '. $tools->db_quote($tools->username).', '. $tools->db_quote($date_str).', '. floatval($duration).', '. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |