Permalink
Browse files

Upgraded ADOdb to 2.50 because it fixes some bugs with PHP 4.3.0

  • Loading branch information...
1 parent 8da0e0e commit 666122b94b3cdd7c128bbbaf6d67be6021727814 moodler committed Nov 30, 2002
Showing with 18,203 additions and 16,048 deletions.
  1. +248 −245 lib/adodb/adodb-cryptsession.php
  2. +272 −272 lib/adodb/adodb-csvlib.inc.php
  3. +77 −73 lib/adodb/adodb-errorhandler.inc.php
  4. +87 −85 lib/adodb/adodb-errorpear.inc.php
  5. +390 −371 lib/adodb/adodb-lib.inc.php
  6. +289 −239 lib/adodb/adodb-pager.inc.php
  7. +341 −341 lib/adodb/adodb-pear.inc.php
  8. +279 −267 lib/adodb/adodb-session.php
  9. +2,879 −2,485 lib/adodb/adodb.inc.php
  10. +61 −61 lib/adodb/crypt.inc.php
  11. +69 −69 lib/adodb/drivers/adodb-access.inc.php
  12. +562 −558 lib/adodb/drivers/adodb-ado.inc.php
  13. +43 −43 lib/adodb/drivers/adodb-ado_access.inc.php
  14. +57 −53 lib/adodb/drivers/adodb-ado_mssql.inc.php
  15. +63 −63 lib/adodb/drivers/adodb-borland_ibase.inc.php
  16. +193 −193 lib/adodb/drivers/adodb-csv.inc.php
  17. +213 −180 lib/adodb/drivers/adodb-db2.inc.php
  18. +253 −258 lib/adodb/drivers/adodb-fbsql.inc.php
  19. +51 −51 lib/adodb/drivers/adodb-firebird.inc.php
  20. +486 −406 lib/adodb/drivers/adodb-ibase.inc.php
  21. +29 −29 lib/adodb/drivers/adodb-informix.inc.php
  22. +301 −296 lib/adodb/drivers/adodb-informix72.inc.php
  23. +627 −543 lib/adodb/drivers/adodb-mssql.inc.php
  24. +66 −0 lib/adodb/drivers/adodb-mssqlpo.inc.php
  25. +499 −442 lib/adodb/drivers/adodb-mysql.inc.php
  26. +74 −53 lib/adodb/drivers/adodb-mysqlt.inc.php
  27. +994 −808 lib/adodb/drivers/adodb-oci8.inc.php
  28. +55 −55 lib/adodb/drivers/adodb-oci805.inc.php
  29. +154 −154 lib/adodb/drivers/adodb-oci8po.inc.php
  30. +537 −492 lib/adodb/drivers/adodb-odbc.inc.php
  31. +88 −43 lib/adodb/drivers/adodb-odbc_mssql.inc.php
  32. +111 −111 lib/adodb/drivers/adodb-odbc_oracle.inc.php
  33. +258 −254 lib/adodb/drivers/adodb-oracle.inc.php
  34. +64 −64 lib/adodb/drivers/adodb-postgres.inc.php
  35. +598 −536 lib/adodb/drivers/adodb-postgres64.inc.php
  36. +65 −64 lib/adodb/drivers/adodb-postgres7.inc.php
  37. +29 −29 lib/adodb/drivers/adodb-proxy.inc.php
  38. +166 −166 lib/adodb/drivers/adodb-sqlanywhere.inc.php
  39. +287 −275 lib/adodb/drivers/adodb-sybase.inc.php
  40. +90 −89 lib/adodb/drivers/adodb-vfp.inc.php
  41. +164 −160 lib/adodb/license.txt
  42. +163 −0 lib/adodb/pivottable.inc.php
  43. +2,749 −2,324 lib/adodb/readme.htm
  44. +58 −58 lib/adodb/readme.txt
  45. +52 −0 lib/adodb/rsfilter.inc.php
  46. +96 −95 lib/adodb/server.php
  47. +85 −85 lib/adodb/tests/benchmark.php
  48. +194 −194 lib/adodb/tests/client.php
  49. +985 −801 lib/adodb/tests/test.php
  50. +39 −39 lib/adodb/tests/test2.php
  51. +31 −31 lib/adodb/tests/test3.php
  52. +80 −77 lib/adodb/tests/test4.php
  53. +47 −45 lib/adodb/tests/test5.php
  54. +28 −28 lib/adodb/tests/testcache.php
  55. +194 −191 lib/adodb/tests/testdatabases.inc.php
  56. +35 −35 lib/adodb/tests/testgenid.php
  57. +49 −49 lib/adodb/tests/testmssql.php
  58. +69 −69 lib/adodb/tests/testoci8.php
  59. +82 −0 lib/adodb/tests/testoci8cursor.php
  60. +75 −56 lib/adodb/tests/testpaging.php
  61. +33 −33 lib/adodb/tests/testpear.php
  62. +30 −23 lib/adodb/tests/testsessions.php
  63. +288 −266 lib/adodb/tips_portable_sql.htm
  64. +129 −129 lib/adodb/toexport.inc.php
  65. +153 −154 lib/adodb/tohtml.inc.php
  66. +290 −290 lib/adodb/tute.htm
Oops, something went wrong.
Oops, something went wrong.
@@ -1,73 +1,77 @@
-<?php
-/**
- * @version V2.12 12 June 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved.
- * Released under both BSD license and Lesser GPL library license.
- Whenever there is any discrepancy between the two licenses,
- the BSD license will take precedence.
- *
- * Set tabs to 4 for best viewing.
- *
- * Latest version is available at http://php.weblogs.com
- *
-*/
-
-define('ADODB_ERROR_HANDLER','ADODB_Error_Handler');
-
- /**
-* Default Error Handler. This will be called with the following params
-*
-* @param $dbms the RDBMS you are connecting to
-* @param $fn the name of the calling function (in uppercase)
-* @param $errno the native error number from the database
-* @param $errmsg the native error msg from the database
-* @param $p1 $fn specific parameter - see below
-* @param $P2 $fn specific parameter - see below
- */
-function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
-{
- switch($fn) {
- case 'EXECUTE':
- $sql = $p1;
- $inputparams = $p2;
-
- $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")\n";
- break;
-
- case 'PCONNECT':
- case 'CONNECT':
- $host = $p1;
- $database = $p2;
-
- $s = "$dbms error: [$errno: $errmsg] in $fn($host, '****', '****', $database)\n";
- break;
- default:
- $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
- break;
- }
- /*
- * Log connection error somewhere
- * 0 message is sent to PHP's system logger, using the Operating System's system
- * logging mechanism or a file, depending on what the error_log configuration
- * directive is set to.
- * 1 message is sent by email to the address in the destination parameter.
- * This is the only message type where the fourth parameter, extra_headers is used.
- * This message type uses the same internal function as mail() does.
- * 2 message is sent through the PHP debugging connection.
- * This option is only available if remote debugging has been enabled.
- * In this case, the destination parameter specifies the host name or IP address
- * and optionally, port number, of the socket receiving the debug information.
- * 3 message is appended to the file destination
- */
- if (defined('ADODB_ERROR_LOG_TYPE')) {
- $t = date('Y-m-d H:i:s');
- if (defined('ADODB_ERROR_LOG_DEST'))
- error_log("($t) $s", ADODB_ERROR_LOG_TYPE, ADODB_ERROR_LOG_DEST);
- else
- error_log("($t) $s", ADODB_ERROR_LOG_TYPE);
- }
-
-
- //print "<p>$s</p>";
- trigger_error($s,E_USER_ERROR);
-}
-?>
+<?php
+/**
+ * @version V2.50 14 Nov 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license.
+ Whenever there is any discrepancy between the two licenses,
+ the BSD license will take precedence.
+ *
+ * Set tabs to 4 for best viewing.
+ *
+ * Latest version is available at http://php.weblogs.com
+ *
+*/
+
+// added Claudio Bustos clbustos#entelchile.net
+if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR);
+
+define('ADODB_ERROR_HANDLER','ADODB_Error_Handler');
+
+ /**
+* Default Error Handler. This will be called with the following params
+*
+* @param $dbms the RDBMS you are connecting to
+* @param $fn the name of the calling function (in uppercase)
+* @param $errno the native error number from the database
+* @param $errmsg the native error msg from the database
+* @param $p1 $fn specific parameter - see below
+* @param $P2 $fn specific parameter - see below
+ */
+function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
+{
+ if (error_reporting() == 0) return; // obey @ protocol
+ switch($fn) {
+ case 'EXECUTE':
+ $sql = $p1;
+ $inputparams = $p2;
+
+ $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")\n";
+ break;
+
+ case 'PCONNECT':
+ case 'CONNECT':
+ $host = $p1;
+ $database = $p2;
+
+ $s = "$dbms error: [$errno: $errmsg] in $fn($host, '****', '****', $database)\n";
+ break;
+ default:
+ $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
+ break;
+ }
+ /*
+ * Log connection error somewhere
+ * 0 message is sent to PHP's system logger, using the Operating System's system
+ * logging mechanism or a file, depending on what the error_log configuration
+ * directive is set to.
+ * 1 message is sent by email to the address in the destination parameter.
+ * This is the only message type where the fourth parameter, extra_headers is used.
+ * This message type uses the same internal function as mail() does.
+ * 2 message is sent through the PHP debugging connection.
+ * This option is only available if remote debugging has been enabled.
+ * In this case, the destination parameter specifies the host name or IP address
+ * and optionally, port number, of the socket receiving the debug information.
+ * 3 message is appended to the file destination
+ */
+ if (defined('ADODB_ERROR_LOG_TYPE')) {
+ $t = date('Y-m-d H:i:s');
+ if (defined('ADODB_ERROR_LOG_DEST'))
+ error_log("($t) $s", ADODB_ERROR_LOG_TYPE, ADODB_ERROR_LOG_DEST);
+ else
+ error_log("($t) $s", ADODB_ERROR_LOG_TYPE);
+ }
+
+
+ //print "<p>$s</p>";
+ trigger_error($s,ADODB_ERROR_HANDLER_TYPE);
+}
+?>
@@ -1,86 +1,88 @@
-<?php
-/**
- * @version V2.12 12 June 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved.
- * Released under both BSD license and Lesser GPL library license.
- Whenever there is any discrepancy between the two licenses,
- the BSD license will take precedence.
- *
- * Set tabs to 4 for best viewing.
- *
- * Latest version is available at http://php.weblogs.com
- *
-*/
-include_once('PEAR.php');
-
-define('ADODB_ERROR_HANDLER','ADODB_Error_PEAR');
-
-/*
-* Enabled the following if you want to terminate scripts when an error occurs
-*/
-//PEAR::setErrorHandling (PEAR_ERROR_DIE);
-
-/*
-* Name of the PEAR_Error derived class to call.
-*/
-if (!defined('ADODB_PEAR_ERROR_CLASS')) define('ADODB_PEAR_ERROR_CLASS','PEAR_Error');
-
-/*
-* Store the last PEAR_Error object here
-*/
-global $ADODB_Last_PEAR_Error; $ADODB_Last_PEAR_Error = false;
-
- /**
-* Error Handler with PEAR support. This will be called with the following params
-*
-* @param $dbms the RDBMS you are connecting to
-* @param $fn the name of the calling function (in uppercase)
-* @param $errno the native error number from the database
-* @param $errmsg the native error msg from the database
-* @param $p1 $fn specific parameter - see below
-* @param $P2 $fn specific parameter - see below
- */
-function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
-{
-global $ADODB_Last_PEAR_Error;
- switch($fn) {
- case 'EXECUTE':
- $sql = $p1;
- $inputparams = $p2;
-
- $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")";
- break;
-
- case 'PCONNECT':
- case 'CONNECT':
- $host = $p1;
- $database = $p2;
-
- $s = "$dbms error: [$errno: $errmsg] in $fn('$host', ?, ?, '$database')";
- break;
-
- default:
- $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
- break;
- }
-
- $class = ADODB_PEAR_ERROR_CLASS;
- $ADODB_Last_PEAR_Error = new $class($s, $errno,
- $GLOBALS['_PEAR_default_error_mode'],
- $GLOBALS['_PEAR_default_error_options'],
- $errmsg);
-
- //print "<p>!$s</p>";
-}
-
-/**
-* Returns last PEAR_Error object. This error might be for an error that
-* occured several sql statements ago.
-*/
-function &ADODB_PEAR_Error()
-{
-global $ADODB_Last_PEAR_Error;
-
- return $ADODB_Last_PEAR_Error;
-}
-
+<?php
+/**
+ * @version V2.50 14 Nov 2002 (c) 2000-2002 John Lim (jlim@natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license.
+ Whenever there is any discrepancy between the two licenses,
+ the BSD license will take precedence.
+ *
+ * Set tabs to 4 for best viewing.
+ *
+ * Latest version is available at http://php.weblogs.com
+ *
+*/
+include_once('PEAR.php');
+
+define('ADODB_ERROR_HANDLER','ADODB_Error_PEAR');
+
+/*
+* Enabled the following if you want to terminate scripts when an error occurs
+*/
+//PEAR::setErrorHandling (PEAR_ERROR_DIE);
+
+/*
+* Name of the PEAR_Error derived class to call.
+*/
+if (!defined('ADODB_PEAR_ERROR_CLASS')) define('ADODB_PEAR_ERROR_CLASS','PEAR_Error');
+
+/*
+* Store the last PEAR_Error object here
+*/
+global $ADODB_Last_PEAR_Error; $ADODB_Last_PEAR_Error = false;
+
+ /**
+* Error Handler with PEAR support. This will be called with the following params
+*
+* @param $dbms the RDBMS you are connecting to
+* @param $fn the name of the calling function (in uppercase)
+* @param $errno the native error number from the database
+* @param $errmsg the native error msg from the database
+* @param $p1 $fn specific parameter - see below
+* @param $P2 $fn specific parameter - see below
+ */
+function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
+{
+global $ADODB_Last_PEAR_Error;
+
+ if (error_reporting() == 0) return; // obey @ protocol
+ switch($fn) {
+ case 'EXECUTE':
+ $sql = $p1;
+ $inputparams = $p2;
+
+ $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")";
+ break;
+
+ case 'PCONNECT':
+ case 'CONNECT':
+ $host = $p1;
+ $database = $p2;
+
+ $s = "$dbms error: [$errno: $errmsg] in $fn('$host', ?, ?, '$database')";
+ break;
+
+ default:
+ $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
+ break;
+ }
+
+ $class = ADODB_PEAR_ERROR_CLASS;
+ $ADODB_Last_PEAR_Error = new $class($s, $errno,
+ $GLOBALS['_PEAR_default_error_mode'],
+ $GLOBALS['_PEAR_default_error_options'],
+ $errmsg);
+
+ //print "<p>!$s</p>";
+}
+
+/**
+* Returns last PEAR_Error object. This error might be for an error that
+* occured several sql statements ago.
+*/
+function &ADODB_PEAR_Error()
+{
+global $ADODB_Last_PEAR_Error;
+
+ return $ADODB_Last_PEAR_Error;
+}
+
?>
Oops, something went wrong.

0 comments on commit 666122b

Please sign in to comment.