Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-06-23 07:45:36 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-06-23 07:45:36 +0400
commit7e1b5d6b762340cbff1bb928d15815980c7649a7 (patch)
treee07da179b9e1372866d2349777bd1cc6b4c9e8cf /libs/Zend/Db
parent999f46479294713104c962bfe7469e9b6e7a4bbf (diff)
parentc98ea06f2cccec81c6ccce49162a583494e44d91 (diff)
Diffstat (limited to 'libs/Zend/Db')
-rw-r--r--libs/Zend/Db/Adapter/Abstract.php38
-rw-r--r--libs/Zend/Db/Adapter/Db2.php46
-rw-r--r--libs/Zend/Db/Adapter/Db2/Exception.php14
-rw-r--r--libs/Zend/Db/Adapter/Exception.php21
-rw-r--r--libs/Zend/Db/Adapter/Mysqli.php38
-rw-r--r--libs/Zend/Db/Adapter/Mysqli/Exception.php8
-rw-r--r--libs/Zend/Db/Adapter/Oracle.php40
-rw-r--r--libs/Zend/Db/Adapter/Oracle/Exception.php8
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Abstract.php46
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Ibm.php22
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Ibm/Db2.php14
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Ibm/Ids.php14
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Mssql.php90
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Mysql.php12
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Oci.php14
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Pgsql.php18
-rw-r--r--libs/Zend/Db/Adapter/Pdo/Sqlite.php22
-rw-r--r--libs/Zend/Db/Adapter/Sqlsrv.php93
-rw-r--r--libs/Zend/Db/Adapter/Sqlsrv/Exception.php10
-rw-r--r--libs/Zend/Db/Exception.php8
-rw-r--r--libs/Zend/Db/Expr.php6
-rw-r--r--libs/Zend/Db/Profiler.php31
-rw-r--r--libs/Zend/Db/Profiler/Exception.php8
-rw-r--r--libs/Zend/Db/Profiler/Firebug.php42
-rw-r--r--libs/Zend/Db/Profiler/Query.php6
-rw-r--r--libs/Zend/Db/Select.php85
-rw-r--r--libs/Zend/Db/Select/Exception.php8
-rw-r--r--libs/Zend/Db/Statement.php30
-rw-r--r--libs/Zend/Db/Statement/Db2.php28
-rw-r--r--libs/Zend/Db/Statement/Db2/Exception.php8
-rw-r--r--libs/Zend/Db/Statement/Exception.php31
-rw-r--r--libs/Zend/Db/Statement/Interface.php6
-rw-r--r--libs/Zend/Db/Statement/Mysqli.php32
-rw-r--r--libs/Zend/Db/Statement/Mysqli/Exception.php8
-rw-r--r--libs/Zend/Db/Statement/Oracle.php38
-rw-r--r--libs/Zend/Db/Statement/Oracle/Exception.php8
-rw-r--r--libs/Zend/Db/Statement/Pdo.php52
-rw-r--r--libs/Zend/Db/Statement/Pdo/Ibm.php10
-rw-r--r--libs/Zend/Db/Statement/Pdo/Oci.php30
-rw-r--r--libs/Zend/Db/Statement/Sqlsrv.php25
-rw-r--r--libs/Zend/Db/Statement/Sqlsrv/Exception.php8
-rw-r--r--libs/Zend/Db/Table.php27
-rw-r--r--libs/Zend/Db/Table/Abstract.php100
-rw-r--r--libs/Zend/Db/Table/Definition.php26
-rw-r--r--libs/Zend/Db/Table/Exception.php8
-rw-r--r--libs/Zend/Db/Table/Row.php8
-rw-r--r--libs/Zend/Db/Table/Row/Abstract.php130
-rw-r--r--libs/Zend/Db/Table/Row/Exception.php8
-rw-r--r--libs/Zend/Db/Table/Rowset.php8
-rw-r--r--libs/Zend/Db/Table/Rowset/Abstract.php20
-rw-r--r--libs/Zend/Db/Table/Rowset/Exception.php8
-rw-r--r--libs/Zend/Db/Table/Select.php14
-rw-r--r--libs/Zend/Db/Table/Select/Exception.php8
53 files changed, 737 insertions, 704 deletions
diff --git a/libs/Zend/Db/Adapter/Abstract.php b/libs/Zend/Db/Adapter/Abstract.php
index bd00da96f4..09ab9e692d 100644
--- a/libs/Zend/Db/Adapter/Abstract.php
+++ b/libs/Zend/Db/Adapter/Abstract.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 18633 2009-10-17 05:36:58Z ralph $
+ * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db
*/
-require_once 'Zend/Db.php';
+// require_once 'Zend/Db.php';
/**
* @see Zend_Db_Select
*/
-require_once 'Zend/Db/Select.php';
+// require_once 'Zend/Db/Select.php';
/**
* Class for connecting to SQL databases and performing common operations.
@@ -37,7 +37,7 @@ require_once 'Zend/Db/Select.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Adapter_Abstract
@@ -175,7 +175,7 @@ abstract class Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception('Adapter parameters must be in an array or a Zend_Config object');
}
}
@@ -230,7 +230,7 @@ abstract class Zend_Db_Adapter_Abstract
break;
default:
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception('Case must be one of the following constants: '
. 'Zend_Db::CASE_NATURAL, Zend_Db::CASE_LOWER, Zend_Db::CASE_UPPER');
}
@@ -272,7 +272,7 @@ abstract class Zend_Db_Adapter_Abstract
// we need at least a dbname
if (! array_key_exists('dbname', $config)) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'dbname' that names the database instance");
}
@@ -280,7 +280,7 @@ abstract class Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'password' for login credentials");
}
@@ -288,7 +288,7 @@ abstract class Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'username' for login credentials");
}
}
@@ -358,7 +358,7 @@ abstract class Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Profiler_Exception
*/
- require_once 'Zend/Db/Profiler/Exception.php';
+ // require_once 'Zend/Db/Profiler/Exception.php';
throw new Zend_Db_Profiler_Exception('Profiler argument must be an instance of either Zend_Db_Profiler'
. ' or Zend_Config when provided as an object');
}
@@ -379,16 +379,16 @@ abstract class Zend_Db_Adapter_Abstract
}
if ($profilerInstance === null) {
- if (!class_exists($profilerClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($profilerClass);
- }
+ // if (!class_exists($profilerClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($profilerClass);
+ // }
$profilerInstance = new $profilerClass();
}
if (!$profilerInstance instanceof Zend_Db_Profiler) {
/** @see Zend_Db_Profiler_Exception */
- require_once 'Zend/Db/Profiler/Exception.php';
+ // require_once 'Zend/Db/Profiler/Exception.php';
throw new Zend_Db_Profiler_Exception('Class ' . get_class($profilerInstance) . ' does not extend '
. 'Zend_Db_Profiler');
}
@@ -579,7 +579,7 @@ abstract class Zend_Db_Adapter_Abstract
$i++;
} else {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception(get_class($this) ." doesn't support positional or named binding");
}
}
@@ -902,7 +902,7 @@ abstract class Zend_Db_Adapter_Abstract
return str_replace('?', $this->quote($value, $type), $text);
} else {
while ($count > 0) {
- if (strpos($text, '?') != false) {
+ if (strpos($text, '?') !== false) {
$text = substr_replace($text, $this->quote($value, $type), strpos($text, '?'), 1);
}
--$count;
@@ -1097,7 +1097,7 @@ abstract class Zend_Db_Adapter_Abstract
{
if ($this->_allowSerialization == false) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception(get_class($this) ." is not allowed to be serialized");
}
$this->_connection = false;
diff --git a/libs/Zend/Db/Adapter/Db2.php b/libs/Zend/Db/Adapter/Db2.php
index 9d9e9849f3..bde2100793 100644
--- a/libs/Zend/Db/Adapter/Db2.php
+++ b/libs/Zend/Db/Adapter/Db2.php
@@ -15,31 +15,31 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Db2.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Db2.php 20096 2010-01-06 02:05:09Z bkarwin $
*
*/
/**
* @see Zend_Db
*/
-require_once 'Zend/Db.php';
+// require_once 'Zend/Db.php';
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Statement_Db2
*/
-require_once 'Zend/Db/Statement/Db2.php';
+// require_once 'Zend/Db/Statement/Db2.php';
/**
* @package Zend_Db
- * @copyright Copyright (c) 2005-2009 Zend Technologies Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@@ -127,7 +127,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception('The IBM DB2 extension is required for this adapter but the extension is not loaded');
}
@@ -184,7 +184,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception(db2_conn_errormsg(), db2_conn_error());
}
}
@@ -223,10 +223,10 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
{
$this->_connect();
$stmtClass = $this->_defaultStmtClass;
- if (!class_exists($stmtClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($stmtClass);
- }
+ // if (!class_exists($stmtClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($stmtClass);
+ // }
$stmt = new $stmtClass($this, $sql);
$stmt->setFetchMode($this->_fetchMode);
return $stmt;
@@ -258,7 +258,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception("execution mode not supported");
break;
}
@@ -373,7 +373,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
if ($schemaName === null && $this->_config['schema'] != null) {
$schemaName = $this->_config['schema'];
}
-
+
if (!$this->_isI5) {
$sql = "SELECT DISTINCT c.tabschema, c.tabname, c.colname, c.colno,
@@ -402,14 +402,14 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
$sql = "SELECT DISTINCT C.TABLE_SCHEMA, C.TABLE_NAME, C.COLUMN_NAME, C.ORDINAL_POSITION,
C.DATA_TYPE, C.COLUMN_DEFAULT, C.NULLS ,C.LENGTH, C.SCALE, LEFT(C.IDENTITY,1),
LEFT(tc.TYPE, 1) AS tabconsttype, k.COLSEQ
- FROM QSYS2.SYSCOLUMNS C
+ FROM QSYS2.SYSCOLUMNS C
LEFT JOIN (QSYS2.syskeycst k JOIN QSYS2.SYSCST tc
ON (k.TABLE_SCHEMA = tc.TABLE_SCHEMA
AND k.TABLE_NAME = tc.TABLE_NAME
- AND LEFT(tc.type,1) = 'P'))
+ AND LEFT(tc.type,1) = 'P'))
ON (C.TABLE_SCHEMA = k.TABLE_SCHEMA
AND C.TABLE_NAME = k.TABLE_NAME
- AND C.COLUMN_NAME = k.COLUMN_NAME)
+ AND C.COLUMN_NAME = k.COLUMN_NAME)
WHERE "
. $this->quoteInto('UPPER(C.TABLE_NAME) = UPPER(?)', $tableName);
@@ -583,7 +583,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception(
db2_conn_errormsg($this->_connection),
db2_conn_error($this->_connection));
@@ -603,7 +603,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception(
db2_conn_errormsg($this->_connection),
db2_conn_error($this->_connection));
@@ -631,14 +631,14 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception('FETCH_BOUND is not supported yet');
break;
default:
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception("Invalid fetch mode '$mode' specified");
break;
}
@@ -659,7 +659,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception("LIMIT argument count=$count is not valid");
}
@@ -668,7 +668,7 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Db2_Exception
*/
- require_once 'Zend/Db/Adapter/Db2/Exception.php';
+ // require_once 'Zend/Db/Adapter/Db2/Exception.php';
throw new Zend_Db_Adapter_Db2_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Db2/Exception.php b/libs/Zend/Db/Adapter/Db2/Exception.php
index 621274745d..8104606d59 100644
--- a/libs/Zend/Db/Adapter/Db2/Exception.php
+++ b/libs/Zend/Db/Adapter/Db2/Exception.php
@@ -15,22 +15,22 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Adapter_Exception
*/
-require_once 'Zend/Db/Adapter/Exception.php';
+// require_once 'Zend/Db/Adapter/Exception.php';
/**
* Zend_Db_Adapter_Db2_Exception
*
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Db2_Exception extends Zend_Db_Adapter_Exception
@@ -38,8 +38,8 @@ class Zend_Db_Adapter_Db2_Exception extends Zend_Db_Adapter_Exception
protected $code = '00000';
protected $message = 'unknown exception';
- function __construct($msg = 'unknown exception', $state = '00000') {
- $this->message = $msg;
- $this->code = $state;
+ function __construct($message = 'unknown exception', $code = '00000', Exception $e = null)
+ {
+ parent::__construct($message, $code, $e);
}
}
diff --git a/libs/Zend/Db/Adapter/Exception.php b/libs/Zend/Db/Adapter/Exception.php
index 51c06874a6..2510ef6526 100644
--- a/libs/Zend/Db/Adapter/Exception.php
+++ b/libs/Zend/Db/Adapter/Exception.php
@@ -15,44 +15,43 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 17860 2009-08-27 22:48:48Z beberlei $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Exception
*/
-require_once 'Zend/Db/Exception.php';
+// require_once 'Zend/Db/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Exception extends Zend_Db_Exception
{
protected $_chainedException = null;
- public function __construct($message = null, Exception $e = null)
+ public function __construct($message = '', $code = 0, Exception $e = null)
{
- if ($e) {
- $this->_chainedException = $e;
- $this->code = $e->getCode();
+ if ($e && (0 === $code)) {
+ $code = $e->getCode();
}
- parent::__construct($message);
+ parent::__construct($message, $code, $e);
}
public function hasChainedException()
{
- return ($this->_chainedException!==null);
+ return ($this->_previous !== null);
}
public function getChainedException()
{
- return $this->_chainedException;
+ return $this->getPrevious();
}
}
diff --git a/libs/Zend/Db/Adapter/Mysqli.php b/libs/Zend/Db/Adapter/Mysqli.php
index 3b686948c8..eb9437d059 100644
--- a/libs/Zend/Db/Adapter/Mysqli.php
+++ b/libs/Zend/Db/Adapter/Mysqli.php
@@ -15,38 +15,38 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Mysqli.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Mysqli.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Profiler
*/
-require_once 'Zend/Db/Profiler.php';
+// require_once 'Zend/Db/Profiler.php';
/**
* @see Zend_Db_Select
*/
-require_once 'Zend/Db/Select.php';
+// require_once 'Zend/Db/Select.php';
/**
* @see Zend_Db_Statement_Mysqli
*/
-require_once 'Zend/Db/Statement/Mysqli.php';
+// require_once 'Zend/Db/Statement/Mysqli.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
@@ -140,7 +140,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception($this->getConnection()->error);
}
return $result;
@@ -200,7 +200,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception($this->getConnection()->error);
}
@@ -287,7 +287,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception('The Mysqli extension is required for this adapter but the extension is not loaded');
}
@@ -329,7 +329,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception(mysqli_connect_error());
}
@@ -374,10 +374,10 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
$this->_stmt->close();
}
$stmtClass = $this->_defaultStmtClass;
- if (!class_exists($stmtClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($stmtClass);
- }
+ // if (!class_exists($stmtClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($stmtClass);
+ // }
$stmt = new $stmtClass($this, $sql);
if ($stmt === false) {
return false;
@@ -467,14 +467,14 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception('FETCH_BOUND is not supported yet');
break;
default:
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception("Invalid fetch mode '$mode' specified");
}
}
@@ -494,7 +494,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception("LIMIT argument count=$count is not valid");
}
@@ -503,7 +503,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Mysqli_Exception
*/
- require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Adapter/Mysqli/Exception.php';
throw new Zend_Db_Adapter_Mysqli_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Mysqli/Exception.php b/libs/Zend/Db/Adapter/Mysqli/Exception.php
index f2fbd8f958..f7f9f4a8fa 100644
--- a/libs/Zend/Db/Adapter/Mysqli/Exception.php
+++ b/libs/Zend/Db/Adapter/Mysqli/Exception.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*
*/
/**
* Zend
*/
-require_once 'Zend/Db/Adapter/Exception.php';
+// require_once 'Zend/Db/Adapter/Exception.php';
/**
* Zend_Db_Adapter_Mysqli_Exception
@@ -32,7 +32,7 @@ require_once 'Zend/Db/Adapter/Exception.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Mysqli_Exception extends Zend_Db_Adapter_Exception
diff --git a/libs/Zend/Db/Adapter/Oracle.php b/libs/Zend/Db/Adapter/Oracle.php
index 233335825d..17fb8488f4 100644
--- a/libs/Zend/Db/Adapter/Oracle.php
+++ b/libs/Zend/Db/Adapter/Oracle.php
@@ -15,26 +15,26 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Oracle.php 18415 2009-09-25 17:46:24Z mikaelkael $
+ * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Statement_Oracle
*/
-require_once 'Zend/Db/Statement/Oracle.php';
+// require_once 'Zend/Db/Statement/Oracle.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
@@ -115,14 +115,14 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception('The OCI8 extension is required for this adapter but the extension is not loaded');
}
$this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
$connectionFuncName = ($this->_config['persistent'] == true) ? 'oci_pconnect' : 'oci_connect';
-
+
$this->_connection = @$connectionFuncName(
$this->_config['username'],
$this->_config['password'],
@@ -134,7 +134,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception(oci_error());
}
}
@@ -204,10 +204,10 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
{
$this->_connect();
$stmtClass = $this->_defaultStmtClass;
- if (!class_exists($stmtClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($stmtClass);
- }
+ // if (!class_exists($stmtClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($stmtClass);
+ // }
$stmt = new $stmtClass($this, $sql);
if ($stmt instanceof Zend_Db_Statement_Oracle) {
$stmt->setLobAsString($this->getLobAsString());
@@ -360,7 +360,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
TC.DATA_SCALE, TC.DATA_PRECISION, C.CONSTRAINT_TYPE, CC.POSITION
FROM ALL_TAB_COLUMNS TC
LEFT JOIN (ALL_CONS_COLUMNS CC JOIN ALL_CONSTRAINTS C
- ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND C.CONSTRAINT_TYPE = 'P'))
+ ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND CC.OWNER = C.OWNER AND C.CONSTRAINT_TYPE = 'P'))
ON TC.TABLE_NAME = CC.TABLE_NAME AND TC.COLUMN_NAME = CC.COLUMN_NAME
WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME)";
$bind[':TBNAME'] = $tableName;
@@ -467,7 +467,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
}
$this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
@@ -485,7 +485,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
}
$this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
@@ -513,14 +513,14 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception('FETCH_BOUND is not supported yet');
break;
default:
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception("Invalid fetch mode '$mode' specified");
break;
}
@@ -542,7 +542,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception("LIMIT argument count=$count is not valid");
}
@@ -551,7 +551,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception("LIMIT argument offset=$offset is not valid");
}
@@ -588,7 +588,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Adapter/Oracle/Exception.php';
+ // require_once 'Zend/Db/Adapter/Oracle/Exception.php';
throw new Zend_Db_Adapter_Oracle_Exception("Invalid execution mode '$mode' specified");
break;
}
diff --git a/libs/Zend/Db/Adapter/Oracle/Exception.php b/libs/Zend/Db/Adapter/Oracle/Exception.php
index 39809b10df..a2f43ae893 100644
--- a/libs/Zend/Db/Adapter/Oracle/Exception.php
+++ b/libs/Zend/Db/Adapter/Oracle/Exception.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Adapter_Exception
*/
-require_once 'Zend/Db/Adapter/Exception.php';
+// require_once 'Zend/Db/Adapter/Exception.php';
/**
* Zend_Db_Adapter_Oracle_Exception
@@ -31,7 +31,7 @@ require_once 'Zend/Db/Adapter/Exception.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Oracle_Exception extends Zend_Db_Adapter_Exception
diff --git a/libs/Zend/Db/Adapter/Pdo/Abstract.php b/libs/Zend/Db/Adapter/Pdo/Abstract.php
index 9d05f417b4..0ffc1f428f 100644
--- a/libs/Zend/Db/Adapter/Pdo/Abstract.php
+++ b/libs/Zend/Db/Adapter/Pdo/Abstract.php
@@ -15,22 +15,22 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 17860 2009-08-27 22:48:48Z beberlei $
+ * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Statement_Pdo
*/
-require_once 'Zend/Db/Statement/Pdo.php';
+// require_once 'Zend/Db/Statement/Pdo.php';
/**
@@ -39,7 +39,7 @@ require_once 'Zend/Db/Statement/Pdo.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
@@ -99,7 +99,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded');
}
@@ -108,7 +108,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception('The ' . $this->_pdoType . ' driver is not currently installed');
}
@@ -119,7 +119,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
if (isset($this->_config['persistent']) && ($this->_config['persistent'] == true)) {
$this->_config['driver_options'][PDO::ATTR_PERSISTENT] = true;
}
-
+
try {
$this->_connection = new PDO(
$dsn,
@@ -140,8 +140,8 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
- throw new Zend_Db_Adapter_Exception($e->getMessage(), $e);
+ // require_once 'Zend/Db/Adapter/Exception.php';
+ throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -177,10 +177,10 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
{
$this->_connect();
$stmtClass = $this->_defaultStmtClass;
- if (!class_exists($stmtClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($stmtClass);
- }
+ // if (!class_exists($stmtClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($stmtClass);
+ // }
$stmt = new $stmtClass($this, $sql);
$stmt->setFetchMode($this->_fetchMode);
return $stmt;
@@ -240,7 +240,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -258,26 +258,26 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
if ($sql instanceof Zend_Db_Select) {
$sql = $sql->assemble();
}
-
+
try {
$affected = $this->getConnection()->exec($sql);
-
+
if ($affected === false) {
$errorInfo = $this->getConnection()->errorInfo();
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception($errorInfo[2]);
}
-
+
return $affected;
} catch (PDOException $e) {
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
- throw new Zend_Db_Adapter_Exception($e->getMessage(), $e);
+ // require_once 'Zend/Db/Adapter/Exception.php';
+ throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -338,7 +338,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded');
}
switch ($mode) {
@@ -354,7 +354,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Invalid fetch mode '$mode' specified");
break;
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Ibm.php b/libs/Zend/Db/Adapter/Pdo/Ibm.php
index 47d91da0dc..22738248a9 100644
--- a/libs/Zend/Db/Adapter/Pdo/Ibm.php
+++ b/libs/Zend/Db/Adapter/Pdo/Ibm.php
@@ -15,30 +15,30 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Ibm.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Ibm.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/** @see Zend_Db_Adapter_Pdo_Abstract */
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/** @see Zend_Db_Abstract_Pdo_Ibm_Db2 */
-require_once 'Zend/Db/Adapter/Pdo/Ibm/Db2.php';
+// require_once 'Zend/Db/Adapter/Pdo/Ibm/Db2.php';
/** @see Zend_Db_Abstract_Pdo_Ibm_Ids */
-require_once 'Zend/Db/Adapter/Pdo/Ibm/Ids.php';
+// require_once 'Zend/Db/Adapter/Pdo/Ibm/Ids.php';
/** @see Zend_Db_Statement_Pdo_Ibm */
-require_once 'Zend/Db/Statement/Pdo/Ibm.php';
+// require_once 'Zend/Db/Statement/Pdo/Ibm.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Ibm extends Zend_Db_Adapter_Pdo_Abstract
@@ -131,12 +131,12 @@ class Zend_Db_Adapter_Pdo_Ibm extends Zend_Db_Adapter_Pdo_Abstract
}
} catch (PDOException $e) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
$error = strpos($e->getMessage(), 'driver does not support that attribute');
if ($error) {
- throw new Zend_Db_Adapter_Exception("PDO_IBM driver extension is downlevel. Please use driver release version 1.2.1 or later");
+ throw new Zend_Db_Adapter_Exception("PDO_IBM driver extension is downlevel. Please use driver release version 1.2.1 or later", 0, $e);
} else {
- throw new Zend_Db_Adapter_Exception($e->getMessage());
+ throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e);
}
}
}
@@ -178,7 +178,7 @@ class Zend_Db_Adapter_Pdo_Ibm extends Zend_Db_Adapter_Pdo_Abstract
if (array_key_exists('host', $this->_config) &&
!array_key_exists('port', $config)) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration must have a key for 'port' when 'host' is specified");
}
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Ibm/Db2.php b/libs/Zend/Db/Adapter/Pdo/Ibm/Db2.php
index 99182c0576..94899d4462 100644
--- a/libs/Zend/Db/Adapter/Pdo/Ibm/Db2.php
+++ b/libs/Zend/Db/Adapter/Pdo/Ibm/Db2.php
@@ -15,24 +15,24 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Db2.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Db2.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/** @see Zend_Db_Adapter_Pdo_Ibm */
-require_once 'Zend/Db/Adapter/Pdo/Ibm.php';
+// require_once 'Zend/Db/Adapter/Pdo/Ibm.php';
/** @see Zend_Db_Statement_Pdo_Ibm */
-require_once 'Zend/Db/Statement/Pdo/Ibm.php';
+// require_once 'Zend/Db/Statement/Pdo/Ibm.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Ibm_Db2
@@ -168,13 +168,13 @@ class Zend_Db_Adapter_Pdo_Ibm_Db2
$count = intval($count);
if ($count < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
} else {
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Ibm/Ids.php b/libs/Zend/Db/Adapter/Pdo/Ibm/Ids.php
index 766106332b..5777e5621c 100644
--- a/libs/Zend/Db/Adapter/Pdo/Ibm/Ids.php
+++ b/libs/Zend/Db/Adapter/Pdo/Ibm/Ids.php
@@ -15,24 +15,24 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Ids.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Ids.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/** @see Zend_Db_Adapter_Pdo_Ibm */
-require_once 'Zend/Db/Adapter/Pdo/Ibm.php';
+// require_once 'Zend/Db/Adapter/Pdo/Ibm.php';
/** @see Zend_Db_Statement_Pdo_Ibm */
-require_once 'Zend/Db/Statement/Pdo/Ibm.php';
+// require_once 'Zend/Db/Statement/Pdo/Ibm.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Ibm_Ids
@@ -250,7 +250,7 @@ class Zend_Db_Adapter_Pdo_Ibm_Ids
$count = intval($count);
if ($count < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
} else if ($count == 0) {
$limit_sql = str_ireplace("SELECT", "SELECT * FROM (SELECT", $sql);
@@ -259,7 +259,7 @@ class Zend_Db_Adapter_Pdo_Ibm_Ids
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
if ($offset == 0) {
diff --git a/libs/Zend/Db/Adapter/Pdo/Mssql.php b/libs/Zend/Db/Adapter/Pdo/Mssql.php
index b61a4d61cc..0bd7a1bfbd 100644
--- a/libs/Zend/Db/Adapter/Pdo/Mssql.php
+++ b/libs/Zend/Db/Adapter/Pdo/Mssql.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Mssql.php 17792 2009-08-24 16:18:02Z ralph $
+ * @version $Id: Mssql.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Pdo_Abstract
*/
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/**
@@ -33,7 +33,7 @@ require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Mssql extends Zend_Db_Adapter_Pdo_Abstract
@@ -254,7 +254,7 @@ class Zend_Db_Adapter_Pdo_Mssql extends Zend_Db_Adapter_Pdo_Abstract
if ($schemaName != null) {
$sql .= ", @table_owner = " . $this->quoteIdentifier($schemaName, true);
}
-
+
$stmt = $this->query($sql);
$primaryKeysResult = $stmt->fetchAll(Zend_Db::FETCH_NUM);
$primaryKeyColumn = array();
@@ -319,14 +319,14 @@ class Zend_Db_Adapter_Pdo_Mssql extends Zend_Db_Adapter_Pdo_Abstract
$count = intval($count);
if ($count <= 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
@@ -335,46 +335,46 @@ class Zend_Db_Adapter_Pdo_Mssql extends Zend_Db_Adapter_Pdo_Abstract
'SELECT $1TOP ' . ($count+$offset) . ' ',
$sql
);
-
+
if ($offset > 0) {
- $orderby = stristr($sql, 'ORDER BY');
-
- if ($orderby !== false) {
- $orderParts = explode(',', substr($orderby, 8));
- $pregReplaceCount = null;
- $orderbyInverseParts = array();
- foreach ($orderParts as $orderPart) {
- $orderPart = rtrim($orderPart);
- $inv = preg_replace('/\s+desc$/i', ' ASC', $orderPart, 1, $pregReplaceCount);
- if ($pregReplaceCount) {
- $orderbyInverseParts[] = $inv;
- continue;
- }
- $inv = preg_replace('/\s+asc$/i', ' DESC', $orderPart, 1, $pregReplaceCount);
- if ($pregReplaceCount) {
- $orderbyInverseParts[] = $inv;
- continue;
- } else {
- $orderbyInverseParts[] = $orderPart . ' DESC';
- }
- }
-
- $orderbyInverse = 'ORDER BY ' . implode(', ', $orderbyInverseParts);
- }
-
-
-
-
- $sql = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $sql . ') AS inner_tbl';
- if ($orderby !== false) {
- $sql .= ' ' . $orderbyInverse . ' ';
- }
- $sql .= ') AS outer_tbl';
- if ($orderby !== false) {
- $sql .= ' ' . $orderby;
- }
+ $orderby = stristr($sql, 'ORDER BY');
+
+ if ($orderby !== false) {
+ $orderParts = explode(',', substr($orderby, 8));
+ $pregReplaceCount = null;
+ $orderbyInverseParts = array();
+ foreach ($orderParts as $orderPart) {
+ $orderPart = rtrim($orderPart);
+ $inv = preg_replace('/\s+desc$/i', ' ASC', $orderPart, 1, $pregReplaceCount);
+ if ($pregReplaceCount) {
+ $orderbyInverseParts[] = $inv;
+ continue;
+ }
+ $inv = preg_replace('/\s+asc$/i', ' DESC', $orderPart, 1, $pregReplaceCount);
+ if ($pregReplaceCount) {
+ $orderbyInverseParts[] = $inv;
+ continue;
+ } else {
+ $orderbyInverseParts[] = $orderPart . ' DESC';
+ }
+ }
+
+ $orderbyInverse = 'ORDER BY ' . implode(', ', $orderbyInverseParts);
+ }
+
+
+
+
+ $sql = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $sql . ') AS inner_tbl';
+ if ($orderby !== false) {
+ $sql .= ' ' . $orderbyInverse . ' ';
+ }
+ $sql .= ') AS outer_tbl';
+ if ($orderby !== false) {
+ $sql .= ' ' . $orderby;
+ }
}
-
+
return $sql;
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Mysql.php b/libs/Zend/Db/Adapter/Pdo/Mysql.php
index 98551812cc..0e4d794922 100644
--- a/libs/Zend/Db/Adapter/Pdo/Mysql.php
+++ b/libs/Zend/Db/Adapter/Pdo/Mysql.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Mysql.php 16942 2009-07-22 04:03:09Z ralph $
+ * @version $Id: Mysql.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Pdo_Abstract
*/
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/**
@@ -33,7 +33,7 @@ require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract
@@ -235,14 +235,14 @@ class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract
$count = intval($count);
if ($count <= 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Oci.php b/libs/Zend/Db/Adapter/Pdo/Oci.php
index 91ce3ac370..fb47ad1c0b 100644
--- a/libs/Zend/Db/Adapter/Pdo/Oci.php
+++ b/libs/Zend/Db/Adapter/Pdo/Oci.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Oci.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Oci.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Pdo_Abstract
*/
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/**
@@ -33,7 +33,7 @@ require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Oci extends Zend_Db_Adapter_Pdo_Abstract
@@ -186,7 +186,7 @@ class Zend_Db_Adapter_Pdo_Oci extends Zend_Db_Adapter_Pdo_Abstract
TC.DATA_SCALE, TC.DATA_PRECISION, C.CONSTRAINT_TYPE, CC.POSITION
FROM ALL_TAB_COLUMNS TC
LEFT JOIN (ALL_CONS_COLUMNS CC JOIN ALL_CONSTRAINTS C
- ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND C.CONSTRAINT_TYPE = 'P'))
+ ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND CC.OWNER = C.OWNER AND C.CONSTRAINT_TYPE = 'P'))
ON TC.TABLE_NAME = CC.TABLE_NAME AND TC.COLUMN_NAME = CC.COLUMN_NAME
WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME)";
$bind[':TBNAME'] = $tableName;
@@ -347,14 +347,14 @@ class Zend_Db_Adapter_Pdo_Oci extends Zend_Db_Adapter_Pdo_Abstract
$count = intval($count);
if ($count <= 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Pgsql.php b/libs/Zend/Db/Adapter/Pdo/Pgsql.php
index 0c1d0ca2e8..bec14b569b 100644
--- a/libs/Zend/Db/Adapter/Pdo/Pgsql.php
+++ b/libs/Zend/Db/Adapter/Pdo/Pgsql.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Pgsql.php 18646 2009-10-18 13:16:21Z mikaelkael $
+ * @version $Id: Pgsql.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Pdo_Abstract
*/
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/**
@@ -33,7 +33,7 @@ require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Pgsql extends Zend_Db_Adapter_Pdo_Abstract
@@ -195,15 +195,15 @@ class Zend_Db_Adapter_Pdo_Pgsql extends Zend_Db_Adapter_Pdo_Abstract
$desc = array();
foreach ($result as $key => $row) {
$defaultValue = $row[$default_value];
- if ($row[$type] == 'varchar') {
- if (preg_match('/character varying(?:\((\d+)\))?/', $row[$complete_type], $matches)) {
+ if ($row[$type] == 'varchar' || $row[$type] == 'bpchar' ) {
+ if (preg_match('/character(?: varying)?(?:\((\d+)\))?/', $row[$complete_type], $matches)) {
if (isset($matches[1])) {
$row[$length] = $matches[1];
} else {
$row[$length] = null; // unlimited
}
}
- if (preg_match("/^'(.*?)'::character varying$/", $defaultValue, $matches)) {
+ if (preg_match("/^'(.*?)'::(?:character varying|bpchar)$/", $defaultValue, $matches)) {
$defaultValue = $matches[1];
}
}
@@ -249,7 +249,7 @@ class Zend_Db_Adapter_Pdo_Pgsql extends Zend_Db_Adapter_Pdo_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
@@ -258,7 +258,7 @@ class Zend_Db_Adapter_Pdo_Pgsql extends Zend_Db_Adapter_Pdo_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Pdo/Sqlite.php b/libs/Zend/Db/Adapter/Pdo/Sqlite.php
index 82687d5a9d..f1e6562ef7 100644
--- a/libs/Zend/Db/Adapter/Pdo/Sqlite.php
+++ b/libs/Zend/Db/Adapter/Pdo/Sqlite.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Sqlite.php 18214 2009-09-18 05:30:19Z ralph $
+ * @version $Id: Sqlite.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Pdo_Abstract
*/
-require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
+// require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
/**
@@ -33,7 +33,7 @@ require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
@@ -106,7 +106,7 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
// we need at least a dbname
if (! array_key_exists('dbname', $config)) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'dbname' that names the database instance");
}
}
@@ -140,7 +140,7 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
if ($retval === false) {
$error = $this->_connection->errorInfo();
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception($error[2]);
}
@@ -148,7 +148,7 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
if ($retval === false) {
$error = $this->_connection->errorInfo();
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception($error[2]);
}
}
@@ -198,11 +198,11 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
public function describeTable($tableName, $schemaName = null)
{
$sql = 'PRAGMA ';
-
+
if ($schemaName) {
$sql .= $this->quoteIdentifier($schemaName) . '.';
}
-
+
$sql .= 'table_info('.$this->quoteIdentifier($tableName).')';
$stmt = $this->query($sql);
@@ -275,14 +275,14 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
$count = intval($count);
if ($count <= 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
diff --git a/libs/Zend/Db/Adapter/Sqlsrv.php b/libs/Zend/Db/Adapter/Sqlsrv.php
index 3de2500ea1..533523759e 100644
--- a/libs/Zend/Db/Adapter/Sqlsrv.php
+++ b/libs/Zend/Db/Adapter/Sqlsrv.php
@@ -15,25 +15,26 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Sqlsrv.php 21197 2010-02-24 16:12:53Z rob $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Statement_Sqlsrv
*/
-require_once 'Zend/Db/Statement/Sqlsrv.php';
+// require_once 'Zend/Db/Statement/Sqlsrv.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
@@ -120,7 +121,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Sqlsrv_Exception
*/
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception('The Sqlsrv extension is required for this adapter but the extension is not loaded');
}
@@ -147,11 +148,11 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
foreach ($this->_config['driver_options'] as $option => $value) {
// A value may be a constant.
if (is_string($value)) {
- $constantValue = @constant(strtoupper($value));
- if ($constantValue === null) {
- $connectionInfo[$option] = $value;
+ $constantName = strtoupper($value);
+ if (defined($constantName)) {
+ $connectionInfo[$option] = constant($constantName);
} else {
- $connectionInfo[$option] = $constantValue;
+ $connectionInfo[$option] = $value;
}
}
}
@@ -163,7 +164,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Sqlsrv_Exception
*/
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
}
}
@@ -180,7 +181,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
// we need at least a dbname
if (! array_key_exists('dbname', $config)) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'dbname' that names the database instance");
}
@@ -188,7 +189,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'password' for login credentials.
If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
}
@@ -197,7 +198,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
/**
* @see Zend_Db_Adapter_Exception
*/
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'username' for login credentials.
If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
}
@@ -238,12 +239,12 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
$sql = "SERIALIZABLE";
break;
default:
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception("Invalid transaction isolation level mode '$level' specified");
}
if (!sqlsrv_query($this->_connection, "SET TRANSACTION ISOLATION LEVEL $sql;")) {
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception("Transaction cannot be changed to '$level'");
}
@@ -286,13 +287,13 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
$this->_connect();
$stmtClass = $this->_defaultStmtClass;
- if (!class_exists($stmtClass)) {
+ // if (!class_exists($stmtClass)) {
/**
* @see Zend_Loader
*/
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($stmtClass);
- }
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($stmtClass);
+ // }
$stmt = new $stmtClass($this, $sql);
$stmt->setFetchMode($this->_fetchMode);
@@ -518,7 +519,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
protected function _beginTransaction()
{
if (!sqlsrv_begin_transaction($this->_connection)) {
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
}
}
@@ -532,7 +533,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
protected function _commit()
{
if (!sqlsrv_commit($this->_connection)) {
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
}
}
@@ -546,7 +547,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
protected function _rollBack()
{
if (!sqlsrv_rollback($this->_connection)) {
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
}
}
@@ -570,11 +571,11 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
$this->_fetchMode = $mode;
break;
case Zend_Db::FETCH_BOUND: // bound to PHP variable
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception('FETCH_BOUND is not supported yet');
break;
default:
- require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception("Invalid fetch mode '$mode' specified");
break;
}
@@ -593,34 +594,40 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
{
$count = intval($count);
if ($count <= 0) {
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
}
$offset = intval($offset);
if ($offset < 0) {
/** @see Zend_Db_Adapter_Exception */
- require_once 'Zend/Db/Adapter/Exception.php';
+ // require_once 'Zend/Db/Adapter/Exception.php';
throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
}
- $orderby = stristr($sql, 'ORDER BY');
- if ($orderby !== false) {
- $sort = (stripos($orderby, ' desc') !== false) ? 'desc' : 'asc';
- $order = str_ireplace('ORDER BY', '', $orderby);
- $order = trim(preg_replace('/\bASC\b|\bDESC\b/i', '', $order));
- }
-
- $sql = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . ($count+$offset) . ' ', $sql);
-
- $sql = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $sql . ') AS inner_tbl';
- if ($orderby !== false) {
- $sql .= ' ORDER BY ' . $order . ' ';
- $sql .= (stripos($sort, 'asc') !== false) ? 'DESC' : 'ASC';
- }
- $sql .= ') AS outer_tbl';
- if ($orderby !== false) {
- $sql .= ' ORDER BY ' . $order . ' ' . $sort;
+ if ($offset == 0) {
+ $sql = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . $count . ' ', $sql);
+ } else {
+ $orderby = stristr($sql, 'ORDER BY');
+ if ($orderby !== false) {
+ $sort = (stripos($orderby, ' desc') !== false) ? 'desc' : 'asc';
+ $order = str_ireplace('ORDER BY', '', $orderby);
+ $order = trim(preg_replace('/\bASC\b|\bDESC\b/i', '', $order));
+ }
+
+ $sql = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . ($count+$offset) . ' ', $sql);
+
+ $sql = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $sql . ') AS inner_tbl';
+ if ($orderby !== false) {
+ $innerOrder = preg_replace('/\".*\".\"(.*)\"/i', '"inner_tbl"."$1"', $order);
+ $sql .= ' ORDER BY ' . $innerOrder . ' ';
+ $sql .= (stripos($sort, 'asc') !== false) ? 'DESC' : 'ASC';
+ }
+ $sql .= ') AS outer_tbl';
+ if ($orderby !== false) {
+ $outerOrder = preg_replace('/\".*\".\"(.*)\"/i', '"outer_tbl"."$1"', $order);
+ $sql .= ' ORDER BY ' . $outerOrder . ' ' . $sort;
+ }
}
return $sql;
diff --git a/libs/Zend/Db/Adapter/Sqlsrv/Exception.php b/libs/Zend/Db/Adapter/Sqlsrv/Exception.php
index a07b3eb9a3..1f68aa9c56 100644
--- a/libs/Zend/Db/Adapter/Sqlsrv/Exception.php
+++ b/libs/Zend/Db/Adapter/Sqlsrv/Exception.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- *
+ * @version $Id: Exception.php 20629 2010-01-25 21:17:23Z ralph $
*/
/**
* @see Zend_Db_Adapter_Exception
*/
-require_once 'Zend/Db/Adapter/Exception.php';
+// require_once 'Zend/Db/Adapter/Exception.php';
/**
* Zend_Db_Adapter_Sqlsrv_Exception
@@ -31,7 +31,7 @@ require_once 'Zend/Db/Adapter/Exception.php';
* @category Zend
* @package Zend_Db
* @subpackage Adapter
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Adapter_Sqlsrv_Exception extends Zend_Db_Adapter_Exception
@@ -58,6 +58,6 @@ class Zend_Db_Adapter_Sqlsrv_Exception extends Zend_Db_Adapter_Exception
$code = (int) $message['code'];
$message = (string) $message['message'];
}
- parent::__construct($message, new Exception($message, $code));
+ parent::__construct($message, $code, new Exception($message, $code));
}
}
diff --git a/libs/Zend/Db/Exception.php b/libs/Zend/Db/Exception.php
index 3d30302674..43e374b1b0 100644
--- a/libs/Zend/Db/Exception.php
+++ b/libs/Zend/Db/Exception.php
@@ -14,20 +14,20 @@
*
* @category Zend
* @package Zend_Db
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Exception
*/
-require_once 'Zend/Exception.php';
+// require_once 'Zend/Exception.php';
/**
* @category Zend
* @package Zend_Db
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Exception extends Zend_Exception
diff --git a/libs/Zend/Db/Expr.php b/libs/Zend/Db/Expr.php
index 2f2b7d51db..df366b3b2a 100644
--- a/libs/Zend/Db/Expr.php
+++ b/libs/Zend/Db/Expr.php
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Expr
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Expr.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Expr.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
@@ -43,7 +43,7 @@
* @category Zend
* @package Zend_Db
* @subpackage Expr
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Expr
diff --git a/libs/Zend/Db/Profiler.php b/libs/Zend/Db/Profiler.php
index d0b2af5f1a..9d695b877d 100644
--- a/libs/Zend/Db/Profiler.php
+++ b/libs/Zend/Db/Profiler.php
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Profiler.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Profiler.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
@@ -25,7 +25,7 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Profiler
@@ -68,6 +68,15 @@ class Zend_Db_Profiler
*/
const TRANSACTION = 64;
+ /**
+ * Inform that a query is stored (in case of filtering)
+ */
+ const STORED = 'stored';
+
+ /**
+ * Inform that a query is ignored (in case of filtering)
+ */
+ const IGNORED = 'ignored';
/**
* Array of Zend_Db_Profiler_Query objects.
@@ -269,7 +278,7 @@ class Zend_Db_Profiler
/**
* @see Zend_Db_Profiler_Query
*/
- require_once 'Zend/Db/Profiler/Query.php';
+ // require_once 'Zend/Db/Profiler/Query.php';
$this->_queryProfiles[] = new Zend_Db_Profiler_Query($queryText, $queryType);
end($this->_queryProfiles);
@@ -289,7 +298,7 @@ class Zend_Db_Profiler
{
// Don't do anything if the Zend_Db_Profiler is not enabled.
if (!$this->_enabled) {
- return;
+ return self::IGNORED;
}
// Check for a valid query handle.
@@ -297,7 +306,7 @@ class Zend_Db_Profiler
/**
* @see Zend_Db_Profiler_Exception
*/
- require_once 'Zend/Db/Profiler/Exception.php';
+ // require_once 'Zend/Db/Profiler/Exception.php';
throw new Zend_Db_Profiler_Exception("Profiler has no query with handle '$queryId'.");
}
@@ -308,7 +317,7 @@ class Zend_Db_Profiler
/**
* @see Zend_Db_Profiler_Exception
*/
- require_once 'Zend/Db/Profiler/Exception.php';
+ // require_once 'Zend/Db/Profiler/Exception.php';
throw new Zend_Db_Profiler_Exception("Query with profiler handle '$queryId' has already ended.");
}
@@ -321,7 +330,7 @@ class Zend_Db_Profiler
*/
if (null !== $this->_filterElapsedSecs && $qp->getElapsedSecs() < $this->_filterElapsedSecs) {
unset($this->_queryProfiles[$queryId]);
- return;
+ return self::IGNORED;
}
/**
@@ -330,8 +339,10 @@ class Zend_Db_Profiler
*/
if (null !== $this->_filterTypes && !($qp->getQueryType() & $this->_filterTypes)) {
unset($this->_queryProfiles[$queryId]);
- return;
+ return self::IGNORED;
}
+
+ return self::STORED;
}
/**
@@ -348,7 +359,7 @@ class Zend_Db_Profiler
/**
* @see Zend_Db_Profiler_Exception
*/
- require_once 'Zend/Db/Profiler/Exception.php';
+ // require_once 'Zend/Db/Profiler/Exception.php';
throw new Zend_Db_Profiler_Exception("Query handle '$queryId' not found in profiler log.");
}
diff --git a/libs/Zend/Db/Profiler/Exception.php b/libs/Zend/Db/Profiler/Exception.php
index 3494622c2d..6caab626f7 100644
--- a/libs/Zend/Db/Profiler/Exception.php
+++ b/libs/Zend/Db/Profiler/Exception.php
@@ -15,23 +15,23 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Exception
*/
-require_once 'Zend/Db/Exception.php';
+// require_once 'Zend/Db/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Profiler_Exception extends Zend_Db_Exception
diff --git a/libs/Zend/Db/Profiler/Firebug.php b/libs/Zend/Db/Profiler/Firebug.php
index 35a4ebd7b9..0ffaf142be 100644
--- a/libs/Zend/Db/Profiler/Firebug.php
+++ b/libs/Zend/Db/Profiler/Firebug.php
@@ -15,27 +15,27 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Firebug.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Firebug.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/** Zend_Db_Profiler */
-require_once 'Zend/Db/Profiler.php';
+// require_once 'Zend/Db/Profiler.php';
/** Zend_Wildfire_Plugin_FirePhp */
-require_once 'Zend/Wildfire/Plugin/FirePhp.php';
+// require_once 'Zend/Wildfire/Plugin/FirePhp.php';
/** Zend_Wildfire_Plugin_FirePhp_TableMessage */
-require_once 'Zend/Wildfire/Plugin/FirePhp/TableMessage.php';
+// require_once 'Zend/Wildfire/Plugin/FirePhp/TableMessage.php';
/**
* Writes DB events as log messages to the Firebug Console via FirePHP.
- *
+ *
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler
@@ -45,25 +45,25 @@ class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler
* @var string
*/
protected $_label = null;
-
+
/**
* The label template for this profiler
* @var string
*/
protected $_label_template = '%label% (%totalCount% @ %totalDuration% sec)';
-
+
/**
* The message envelope holding the profiling summary
* @var Zend_Wildfire_Plugin_FirePhp_TableMessage
*/
protected $_message = null;
-
+
/**
* The total time taken for all profiled queries.
* @var float
*/
protected $_totalElapsedTime = 0;
-
+
/**
* Constructor
*
@@ -90,7 +90,7 @@ class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler
parent::setEnabled($enable);
if ($this->getEnabled()) {
-
+
if (!$this->_message) {
$this->_message = new Zend_Wildfire_Plugin_FirePhp_TableMessage($this->_label);
$this->_message->setBuffered(true);
@@ -106,7 +106,7 @@ class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler
$this->_message->setDestroy(true);
$this->_message = null;
}
-
+
}
return $this;
@@ -121,28 +121,28 @@ class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler
*/
public function queryEnd($queryId)
{
- parent::queryEnd($queryId);
-
- if (!$this->getEnabled()) {
+ $state = parent::queryEnd($queryId);
+
+ if (!$this->getEnabled() || $state == self::IGNORED) {
return;
}
$this->_message->setDestroy(false);
$profile = $this->getQueryProfile($queryId);
-
+
$this->_totalElapsedTime += $profile->getElapsedSecs();
-
+
$this->_message->addRow(array((string)round($profile->getElapsedSecs(),5),
$profile->getQuery(),
($params=$profile->getQueryParams())?$params:null));
-
+
$this->updateMessageLabel();
}
-
+
/**
* Update the label of the message holding the profile info.
- *
+ *
* @return void
*/
protected function updateMessageLabel()
diff --git a/libs/Zend/Db/Profiler/Query.php b/libs/Zend/Db/Profiler/Query.php
index 74f3fe1aec..aacc16fbb9 100644
--- a/libs/Zend/Db/Profiler/Query.php
+++ b/libs/Zend/Db/Profiler/Query.php
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Query.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Query.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
@@ -25,7 +25,7 @@
* @category Zend
* @package Zend_Db
* @subpackage Profiler
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Profiler_Query
diff --git a/libs/Zend/Db/Select.php b/libs/Zend/Db/Select.php
index c8f1c77607..721f3ec859 100644
--- a/libs/Zend/Db/Select.php
+++ b/libs/Zend/Db/Select.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Select.php 18511 2009-10-12 14:33:35Z ralph $
+ * @version $Id: Select.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Expr
*/
-require_once 'Zend/Db/Expr.php';
+// require_once 'Zend/Db/Expr.php';
/**
@@ -38,7 +38,7 @@ require_once 'Zend/Db/Expr.php';
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Select
@@ -173,7 +173,7 @@ class Zend_Db_Select
*/
public function getBind()
{
- return $this->_bind;
+ return $this->_bind;
}
/**
@@ -184,9 +184,9 @@ class Zend_Db_Select
*/
public function bind($bind)
{
- $this->_bind = $bind;
+ $this->_bind = $bind;
- return $this;
+ return $this;
}
/**
@@ -243,14 +243,15 @@ class Zend_Db_Select
public function columns($cols = '*', $correlationName = null)
{
if ($correlationName === null && count($this->_parts[self::FROM])) {
- $correlationName = current(array_keys($this->_parts[self::FROM]));
+ $correlationNameKeys = array_keys($this->_parts[self::FROM]);
+ $correlationName = current($correlationNameKeys);
}
if (!array_key_exists($correlationName, $this->_parts[self::FROM])) {
/**
* @see Zend_Db_Select_Exception
*/
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("No table has been specified for the FROM clause");
}
@@ -262,20 +263,31 @@ class Zend_Db_Select
/**
* Adds a UNION clause to the query.
*
- * The first parameter $select can be a string, an existing Zend_Db_Select
- * object or an array of either of these types.
+ * The first parameter has to be an array of Zend_Db_Select or
+ * sql query strings.
*
- * @param array|string|Zend_Db_Select $select One or more select clauses for the UNION.
+ * <code>
+ * $sql1 = $db->select();
+ * $sql2 = "SELECT ...";
+ * $select = $db->select()
+ * ->union(array($sql1, $sql2))
+ * ->order("id");
+ * </code>
+ *
+ * @param array $select Array of select clauses for the union.
* @return Zend_Db_Select This Zend_Db_Select object.
*/
public function union($select = array(), $type = self::SQL_UNION)
{
if (!is_array($select)) {
- $select = array();
+ // require_once 'Zend/Db/Select/Exception.php';
+ throw new Zend_Db_Select_Exception(
+ "union() only accepts an array of Zend_Db_Select instances of sql query strings."
+ );
}
if (!in_array($type, self::$_unionTypes)) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Invalid union type '{$type}'");
}
@@ -454,7 +466,7 @@ class Zend_Db_Select
* </code>
*
* @param string $cond The WHERE condition.
- * @param string $value OPTIONAL A single value to quote into the condition.
+ * @param mixed $value OPTIONAL The value to quote into the condition.
* @param constant $type OPTIONAL The type of the given value
* @return Zend_Db_Select This Zend_Db_Select object.
*/
@@ -471,7 +483,7 @@ class Zend_Db_Select
* Otherwise identical to where().
*
* @param string $cond The WHERE condition.
- * @param string $value OPTIONAL A single value to quote into the condition.
+ * @param mixed $value OPTIONAL The value to quote into the condition.
* @param constant $type OPTIONAL The type of the given value
* @return Zend_Db_Select This Zend_Db_Select object.
*
@@ -514,7 +526,7 @@ class Zend_Db_Select
* appears. See {@link where()} for an example
*
* @param string $cond The HAVING condition.
- * @param string|Zend_Db_Expr $val A single value to quote into the condition.
+ * @param string|Zend_Db_Expr $val The value to quote into the condition.
* @return Zend_Db_Select This Zend_Db_Select object.
*/
public function having($cond)
@@ -539,7 +551,7 @@ class Zend_Db_Select
* Otherwise identical to orHaving().
*
* @param string $cond The HAVING condition.
- * @param string $val A single value to quote into the condition.
+ * @param mixed $val The value to quote into the condition.
* @return Zend_Db_Select This Zend_Db_Select object.
*
* @see having()
@@ -652,7 +664,7 @@ class Zend_Db_Select
{
$part = strtolower($part);
if (!array_key_exists($part, $this->_parts)) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Invalid Select part '$part'");
}
return $this->_parts[$part];
@@ -745,12 +757,12 @@ class Zend_Db_Select
/**
* @see Zend_Db_Select_Exception
*/
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Invalid join type '$type'");
}
if (count($this->_parts[self::UNION])) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Invalid use of table with " . self::SQL_UNION);
}
@@ -786,16 +798,16 @@ class Zend_Db_Select
list($schema, $tableName) = explode('.', $tableName);
}
+ $lastFromCorrelationName = null;
if (!empty($correlationName)) {
if (array_key_exists($correlationName, $this->_parts[self::FROM])) {
/**
* @see Zend_Db_Select_Exception
*/
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("You cannot define a correlation name '$correlationName' more than once");
}
-
- $lastFromCorrelationName = null;
+
if ($type == self::FROM) {
// append this from after the last from joinType
$tmpFromParts = $this->_parts[self::FROM];
@@ -827,7 +839,7 @@ class Zend_Db_Select
// add to the columns from this joined table
if ($type == self::FROM && $lastFromCorrelationName == null) {
$lastFromCorrelationName = true;
- }
+ }
$this->_tableCols($correlationName, $cols, $lastFromCorrelationName);
return $this;
@@ -861,7 +873,7 @@ class Zend_Db_Select
public function _joinUsing($type, $name, $cond, $cols = '*', $schema = null)
{
if (empty($this->_parts[self::FROM])) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("You can only perform a joinUsing after specifying a FROM table");
}
@@ -945,7 +957,7 @@ class Zend_Db_Select
} else {
$tmpColumns = array();
}
-
+
// find the correlation name to insert after
if (is_string($afterCorrelationName)) {
while ($tmpColumns) {
@@ -960,7 +972,7 @@ class Zend_Db_Select
foreach ($columnValues as $columnValue) {
array_push($this->_parts[self::COLUMNS], $columnValue);
}
-
+
// finish ensuring that all previous values are applied (if they exist)
while ($tmpColumns) {
array_push($this->_parts[self::COLUMNS], array_shift($tmpColumns));
@@ -972,7 +984,7 @@ class Zend_Db_Select
* Internal function for creating the where clause
*
* @param string $condition
- * @param string $value optional
+ * @param mixed $value optional
* @param string $type optional
* @param boolean $bool true = AND, false = OR
* @return string clause
@@ -980,7 +992,7 @@ class Zend_Db_Select
protected function _where($condition, $value = null, $type = null, $bool = true)
{
if (count($this->_parts[self::UNION])) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION);
}
@@ -1104,7 +1116,7 @@ class Zend_Db_Select
$tmp = '';
$joinType = ($table['joinType'] == self::FROM) ? self::INNER_JOIN : $table['joinType'];
-
+
// Add join clause (if applicable)
if (! empty($from)) {
$tmp .= ' ' . strtoupper($joinType) . ' ';
@@ -1246,8 +1258,7 @@ class Zend_Db_Select
if (!empty($this->_parts[self::LIMIT_OFFSET])) {
$offset = (int) $this->_parts[self::LIMIT_OFFSET];
- // This should reduce to the max integer PHP can support
- $count = intval(9223372036854775807);
+ $count = PHP_INT_MAX;
}
if (!empty($this->_parts[self::LIMIT_COUNT])) {
@@ -1303,11 +1314,11 @@ class Zend_Db_Select
if ($type) {
$type .= ' join';
if (!in_array($type, self::$_joinTypes)) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Unrecognized method '$method()'");
}
if (in_array($type, array(self::CROSS_JOIN, self::NATURAL_JOIN))) {
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Cannot perform a joinUsing with method '$method()'");
}
} else {
@@ -1317,7 +1328,7 @@ class Zend_Db_Select
return call_user_func_array(array($this, '_joinUsing'), $args);
}
- require_once 'Zend/Db/Select/Exception.php';
+ // require_once 'Zend/Db/Select/Exception.php';
throw new Zend_Db_Select_Exception("Unrecognized method '$method()'");
}
diff --git a/libs/Zend/Db/Select/Exception.php b/libs/Zend/Db/Select/Exception.php
index 23fdf2dfec..dc02cb40ab 100644
--- a/libs/Zend/Db/Select/Exception.php
+++ b/libs/Zend/Db/Select/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Exception
*/
-require_once 'Zend/Db/Exception.php';
+// require_once 'Zend/Db/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
diff --git a/libs/Zend/Db/Statement.php b/libs/Zend/Db/Statement.php
index 7dada0964a..df99fa0133 100644
--- a/libs/Zend/Db/Statement.php
+++ b/libs/Zend/Db/Statement.php
@@ -15,20 +15,20 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Statement.php 17858 2009-08-27 22:04:38Z ralph $
+ * @version $Id: Statement.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db
*/
-require_once 'Zend/Db.php';
+// require_once 'Zend/Db.php';
/**
* @see Zend_Db_Statement_Interface
*/
-require_once 'Zend/Db/Statement/Interface.php';
+// require_once 'Zend/Db/Statement/Interface.php';
/**
* Abstract class to emulate a PDOStatement for native database adapters.
@@ -36,7 +36,7 @@ require_once 'Zend/Db/Statement/Interface.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
@@ -46,7 +46,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
* @var resource|object The driver level statement object/resource
*/
protected $_stmt = null;
-
+
/**
* @var Zend_Db_Adapter_Abstract
*/
@@ -120,14 +120,14 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* Internal method called by abstract statment constructor to setup
* the driver level statement
- *
+ *
* @return void
*/
protected function _prepare($sql)
{
return;
}
-
+
/**
* @param string $sql
* @return void
@@ -148,7 +148,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$val'");
}
} else if ($val[0] == ':') {
@@ -156,7 +156,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception("Invalid bind-variable name '$val'");
}
}
@@ -241,7 +241,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception('Invalid bind-variable position');
}
@@ -263,7 +263,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$parameter'");
}
@@ -433,7 +433,7 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
/**
* @see Zend_Db_Statement_Exception
*/
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception('invalid fetch mode');
break;
}
@@ -472,9 +472,9 @@ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface
{
return $this->_adapter;
}
-
+
/**
- * Gets the resource or object setup by the
+ * Gets the resource or object setup by the
* _parse
* @return unknown_type
*/
diff --git a/libs/Zend/Db/Statement/Db2.php b/libs/Zend/Db/Statement/Db2.php
index c2dac3a646..729d65c61a 100644
--- a/libs/Zend/Db/Statement/Db2.php
+++ b/libs/Zend/Db/Statement/Db2.php
@@ -15,22 +15,22 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Db2.php 17857 2009-08-27 22:01:47Z ralph $
+ * @version $Id: Db2.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement
*/
-require_once 'Zend/Db/Statement.php';
+// require_once 'Zend/Db/Statement.php';
/**
* Extends for DB2 native adapter.
*
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Db2 extends Zend_Db_Statement
@@ -65,7 +65,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Db2_Exception
*/
- require_once 'Zend/Db/Statement/Db2/Exception.php';
+ // require_once 'Zend/Db/Statement/Db2/Exception.php';
throw new Zend_Db_Statement_Db2_Exception(
db2_stmt_errormsg(),
db2_stmt_error()
@@ -100,7 +100,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Db2_Exception
*/
- require_once 'Zend/Db/Statement/Db2/Exception.php';
+ // require_once 'Zend/Db/Statement/Db2/Exception.php';
throw new Zend_Db_Statement_Db2_Exception(
db2_stmt_errormsg(),
db2_stmt_error()
@@ -154,7 +154,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
$error = db2_stmt_error();
if ($error === '') {
- return false;
+ return false;
}
return $error;
@@ -168,10 +168,10 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
*/
public function errorInfo()
{
- $error = $this->errorCode();
- if ($error === false){
- return false;
- }
+ $error = $this->errorCode();
+ if ($error === false){
+ return false;
+ }
/*
* Return three-valued array like PDO. But DB2 does not distinguish
@@ -208,7 +208,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Db2_Exception
*/
- require_once 'Zend/Db/Statement/Db2/Exception.php';
+ // require_once 'Zend/Db/Statement/Db2/Exception.php';
throw new Zend_Db_Statement_Db2_Exception(
db2_stmt_errormsg(),
db2_stmt_error());
@@ -272,7 +272,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Db2_Exception
*/
- require_once 'Zend/Db/Statement/Db2/Exception.php';
+ // require_once 'Zend/Db/Statement/Db2/Exception.php';
throw new Zend_Db_Statement_Db2_Exception("Invalid fetch mode '$style' specified");
break;
}
@@ -306,7 +306,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Db2_Exception
*/
- require_once 'Zend/Db/Statement/Db2/Exception.php';
+ // require_once 'Zend/Db/Statement/Db2/Exception.php';
throw new Zend_Db_Statement_Db2_Exception(__FUNCTION__ . '() is not implemented');
}
diff --git a/libs/Zend/Db/Statement/Db2/Exception.php b/libs/Zend/Db/Statement/Db2/Exception.php
index 0b04bf4af2..d77b5d830c 100644
--- a/libs/Zend/Db/Statement/Db2/Exception.php
+++ b/libs/Zend/Db/Statement/Db2/Exception.php
@@ -15,20 +15,20 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Statement_Exception
*/
-require_once 'Zend/Db/Statement/Exception.php';
+// require_once 'Zend/Db/Statement/Exception.php';
/**
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
diff --git a/libs/Zend/Db/Statement/Exception.php b/libs/Zend/Db/Statement/Exception.php
index 7c9d58992a..511888a5e3 100644
--- a/libs/Zend/Db/Statement/Exception.php
+++ b/libs/Zend/Db/Statement/Exception.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 17860 2009-08-27 22:48:48Z beberlei $
+ * @version $Id: Exception.php 20514 2010-01-22 07:57:10Z ralph $
*/
/**
* @see Zend_Db_Exception
*/
-require_once 'Zend/Db/Exception.php';
+// require_once 'Zend/Db/Exception.php';
/**
* Zend_Db_Statement_Exception
@@ -31,36 +31,19 @@ require_once 'Zend/Db/Exception.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Exception extends Zend_Db_Exception
{
/**
- * @var Exception
- */
- protected $_chainedException = null;
-
- /**
- * @param string $message
- * @param string|int $code
- * @param Exception $chainedException
- */
- public function __construct($message = null, $code = null, Exception $chainedException=null)
- {
- $this->message = $message;
- $this->code = $code;
- $this->_chainedException = $chainedException;
- }
-
- /**
* Check if this general exception has a specific database driver specific exception nested inside.
- *
+ *
* @return bool
*/
public function hasChainedException()
{
- return ($this->_chainedException!==null);
+ return ($this->getPrevious() !== null);
}
/**
@@ -68,6 +51,6 @@ class Zend_Db_Statement_Exception extends Zend_Db_Exception
*/
public function getChainedException()
{
- return $this->_chainedException;
+ return $this->getPrevious();
}
}
diff --git a/libs/Zend/Db/Statement/Interface.php b/libs/Zend/Db/Statement/Interface.php
index 2cf951b057..701c64010e 100644
--- a/libs/Zend/Db/Statement/Interface.php
+++ b/libs/Zend/Db/Statement/Interface.php
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Interface.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
@@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Db_Statement_Interface
diff --git a/libs/Zend/Db/Statement/Mysqli.php b/libs/Zend/Db/Statement/Mysqli.php
index a1870f13fa..51dba7160f 100644
--- a/libs/Zend/Db/Statement/Mysqli.php
+++ b/libs/Zend/Db/Statement/Mysqli.php
@@ -15,25 +15,25 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Mysqli.php 18195 2009-09-17 20:58:05Z bittarman $
+ * @version $Id: Mysqli.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement
*/
-require_once 'Zend/Db/Statement.php';
+// require_once 'Zend/Db/Statement.php';
+
-
/**
* Extends for Mysqli
*
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
@@ -73,7 +73,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Mysqli_Exception
*/
- require_once 'Zend/Db/Statement/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error, $mysqli->errno);
}
}
@@ -210,7 +210,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Mysqli_Exception
*/
- require_once 'Zend/Db/Statement/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno);
}
@@ -222,7 +222,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Mysqli_Exception
*/
- require_once 'Zend/Db/Statement/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno);
}
}
@@ -275,12 +275,12 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
// fetch the next result
$retval = $this->_stmt->fetch();
switch ($retval) {
- case null: // end of data
- case false: // error occurred
- $this->_stmt->reset();
- return false;
- default:
- // fallthrough
+ case null: // end of data
+ case false: // error occurred
+ $this->_stmt->reset();
+ return false;
+ default:
+ // fallthrough
}
// make sure we have a fetch mode
@@ -319,7 +319,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Mysqli_Exception
*/
- require_once 'Zend/Db/Statement/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
throw new Zend_Db_Statement_Mysqli_Exception("Invalid fetch mode '$style' specified");
break;
}
@@ -339,7 +339,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Mysqli_Exception
*/
- require_once 'Zend/Db/Statement/Mysqli/Exception.php';
+ // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
throw new Zend_Db_Statement_Mysqli_Exception(__FUNCTION__.'() is not implemented');
}
diff --git a/libs/Zend/Db/Statement/Mysqli/Exception.php b/libs/Zend/Db/Statement/Mysqli/Exception.php
index a90162db02..4847231476 100644
--- a/libs/Zend/Db/Statement/Mysqli/Exception.php
+++ b/libs/Zend/Db/Statement/Mysqli/Exception.php
@@ -15,20 +15,20 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Statement_Exception
*/
-require_once 'Zend/Db/Statement/Exception.php';
+// require_once 'Zend/Db/Statement/Exception.php';
/**
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
diff --git a/libs/Zend/Db/Statement/Oracle.php b/libs/Zend/Db/Statement/Oracle.php
index 0c8c18a6bd..d84d2bab7f 100644
--- a/libs/Zend/Db/Statement/Oracle.php
+++ b/libs/Zend/Db/Statement/Oracle.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Oracle.php 18636 2009-10-17 05:44:41Z ralph $
+ * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement
*/
-require_once 'Zend/Db/Statement.php';
+// require_once 'Zend/Db/Statement.php';
/**
* Extends for Oracle.
@@ -31,7 +31,7 @@ require_once 'Zend/Db/Statement.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Oracle extends Zend_Db_Statement
@@ -92,7 +92,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection));
}
}
@@ -125,7 +125,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
}
@@ -249,7 +249,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
}
}
@@ -259,7 +259,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
}
@@ -323,7 +323,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(
array(
'code' => 'HYC00',
@@ -337,7 +337,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception($error);
}
@@ -374,7 +374,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(
array(
'code' => 'HYC00',
@@ -402,7 +402,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(
array(
'code' => 'HYC00',
@@ -419,7 +419,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception($error);
}
if (!$rows) {
@@ -442,7 +442,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception($error);
}
}
@@ -472,7 +472,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception($error);
}
@@ -481,7 +481,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
}
@@ -516,7 +516,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception($error);
}
@@ -538,7 +538,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Statement_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(
array(
'code' => 'HYC00',
@@ -567,7 +567,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
- require_once 'Zend/Db/Statement/Oracle/Exception.php';
+ // require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
}
diff --git a/libs/Zend/Db/Statement/Oracle/Exception.php b/libs/Zend/Db/Statement/Oracle/Exception.php
index 26f5412eef..d5e21bad3f 100644
--- a/libs/Zend/Db/Statement/Oracle/Exception.php
+++ b/libs/Zend/Db/Statement/Oracle/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Statement_Exception
*/
-require_once 'Zend/Db/Statement/Exception.php';
+// require_once 'Zend/Db/Statement/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
diff --git a/libs/Zend/Db/Statement/Pdo.php b/libs/Zend/Db/Statement/Pdo.php
index c0f6bc5248..b9e9400d28 100644
--- a/libs/Zend/Db/Statement/Pdo.php
+++ b/libs/Zend/Db/Statement/Pdo.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Pdo.php 18079 2009-09-11 17:46:45Z ralph $
+ * @version $Id: Pdo.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement
*/
-require_once 'Zend/Db/Statement.php';
+// require_once 'Zend/Db/Statement.php';
/**
* Proxy class to wrap a PDOStatement object.
@@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate
@@ -57,7 +57,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
$this->_stmt = $this->_adapter->getConnection()->prepare($sql);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -81,7 +81,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->bindColumn($column, $param, $type);
}
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -113,7 +113,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
}
return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -132,9 +132,9 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
if (is_string($parameter) && $parameter[0] != ':') {
$parameter = ":$parameter";
}
-
+
$this->_bindParam[$parameter] = $value;
-
+
try {
if ($type === null) {
return $this->_stmt->bindValue($parameter, $value);
@@ -142,7 +142,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->bindValue($parameter, $value, $type);
}
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -158,7 +158,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->closeCursor();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -175,7 +175,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->columnCount();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -192,7 +192,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->errorCode();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -209,7 +209,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->errorInfo();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -230,8 +230,8 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->execute();
}
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
- throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
+ // require_once 'Zend/Db/Statement/Exception.php';
+ throw new Zend_Db_Statement_Exception($e->getMessage(), (int) $e->getCode(), $e);
}
}
@@ -252,7 +252,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->fetch($style, $cursor, $offset);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -290,7 +290,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->fetchAll($style);
}
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -307,7 +307,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->fetchColumn($col);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -325,7 +325,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->fetchObject($class, $config);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -342,7 +342,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->getAttribute($key);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -359,7 +359,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->getColumnMeta($column);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -377,7 +377,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->nextRowset();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -395,7 +395,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->rowCount();
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -413,7 +413,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->setAttribute($key, $val);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@@ -431,7 +431,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
try {
return $this->_stmt->setFetchMode($mode);
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
diff --git a/libs/Zend/Db/Statement/Pdo/Ibm.php b/libs/Zend/Db/Statement/Pdo/Ibm.php
index 29ae3db62e..20b6aea7a9 100644
--- a/libs/Zend/Db/Statement/Pdo/Ibm.php
+++ b/libs/Zend/Db/Statement/Pdo/Ibm.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Ibm.php 17860 2009-08-27 22:48:48Z beberlei $
+ * @version $Id: Ibm.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement_Pdo
*/
-require_once 'Zend/Db/Statement/Pdo.php';
+// require_once 'Zend/Db/Statement/Pdo.php';
/**
* Proxy class to wrap a PDOStatement object for IBM Databases.
@@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement/Pdo.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Pdo_Ibm extends Zend_Db_Statement_Pdo
@@ -86,7 +86,7 @@ class Zend_Db_Statement_Pdo_Ibm extends Zend_Db_Statement_Pdo
return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options);
}
} catch (PDOException $e) {
- require_once 'Zend/Db/Statement/Exception.php';
+ // require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
diff --git a/libs/Zend/Db/Statement/Pdo/Oci.php b/libs/Zend/Db/Statement/Pdo/Oci.php
index e4b1edc638..2306228187 100644
--- a/libs/Zend/Db/Statement/Pdo/Oci.php
+++ b/libs/Zend/Db/Statement/Pdo/Oci.php
@@ -15,15 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Oci.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Oci.php 21105 2010-02-19 21:27:09Z mikaelkael $
*/
/**
* @see Zend_Db_Statement_Pdo
*/
-require_once 'Zend/Db/Statement/Pdo.php';
+// require_once 'Zend/Db/Statement/Pdo.php';
/**
* Proxy class to wrap a PDOStatement object for IBM Databases.
@@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement/Pdo.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Pdo_Oci extends Zend_Db_Statement_Pdo
@@ -66,4 +66,26 @@ class Zend_Db_Statement_Pdo_Oci extends Zend_Db_Statement_Pdo
}
return $results;
}
+
+
+ /**
+ * Fetches a row from the result set.
+ *
+ * @param int $style OPTIONAL Fetch mode for this fetch operation.
+ * @param int $cursor OPTIONAL Absolute, relative, or other.
+ * @param int $offset OPTIONAL Number for absolute or relative cursors.
+ * @return mixed Array, object, or scalar depending on fetch mode.
+ * @throws Zend_Db_Statement_Exception
+ */
+ public function fetch($style = null, $cursor = null, $offset = null)
+ {
+ $row = parent::fetch($style, $cursor, $offset);
+
+ $remove = $this->_adapter->foldCase('zend_db_rownum');
+ if (is_array($row) && array_key_exists($remove, $row)) {
+ unset($row[$remove]);
+ }
+
+ return $row;
+ }
} \ No newline at end of file
diff --git a/libs/Zend/Db/Statement/Sqlsrv.php b/libs/Zend/Db/Statement/Sqlsrv.php
index 45c243edf1..9663c83ccf 100644
--- a/libs/Zend/Db/Statement/Sqlsrv.php
+++ b/libs/Zend/Db/Statement/Sqlsrv.php
@@ -15,14 +15,15 @@
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Sqlsrv.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement
*/
-require_once 'Zend/Db/Statement.php';
+// require_once 'Zend/Db/Statement.php';
/**
* Extends for Microsoft SQL Server Driver for PHP
@@ -30,7 +31,7 @@ require_once 'Zend/Db/Statement.php';
* @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
@@ -65,7 +66,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$this->_stmt = sqlsrv_prepare($connection, $sql);
if (!$this->_stmt) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
}
@@ -201,7 +202,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$this->_stmt = sqlsrv_query($connection, $this->_originalSQL, $params);
if (!$this->_stmt) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
}
@@ -232,7 +233,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$values = sqlsrv_fetch_array($this->_stmt, SQLSRV_FETCH_ASSOC);
if (!$values && (null !== $error = sqlsrv_errors())) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception($error);
}
@@ -269,7 +270,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$row = $this->_fetchBound($row);
break;
default:
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception("Invalid fetch mode '$style' specified");
break;
}
@@ -292,7 +293,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
if (!sqlsrv_fetch($this->_stmt)) {
if (null !== $error = sqlsrv_errors()) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception($error);
}
@@ -302,7 +303,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$data = sqlsrv_get_field($this->_stmt, $col); //0-based
if ($data === false) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
}
@@ -326,7 +327,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
$obj = sqlsrv_fetch_object($this->_stmt);
if ($error = sqlsrv_errors()) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception($error);
}
@@ -372,7 +373,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
public function nextRowset()
{
if (sqlsrv_next_result($this->_stmt) === false) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
}
@@ -401,7 +402,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
// Strict check is necessary; 0 is a valid return value
if ($num_rows === false) {
- require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
+ // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
}
diff --git a/libs/Zend/Db/Statement/Sqlsrv/Exception.php b/libs/Zend/Db/Statement/Sqlsrv/Exception.php
index 02378627f9..cbd4cf4d45 100644
--- a/libs/Zend/Db/Statement/Sqlsrv/Exception.php
+++ b/libs/Zend/Db/Statement/Sqlsrv/Exception.php
@@ -12,21 +12,23 @@
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
+ * @category Zend
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Statement_Exception
*/
-require_once 'Zend/Db/Statement/Exception.php';
+// require_once 'Zend/Db/Statement/Exception.php';
/**
* @package Zend_Db
* @subpackage Statement
- * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Sqlsrv_Exception extends Zend_Db_Statement_Exception
diff --git a/libs/Zend/Db/Table.php b/libs/Zend/Db/Table.php
index 20319fd1ec..ba22f7f262 100644
--- a/libs/Zend/Db/Table.php
+++ b/libs/Zend/Db/Table.php
@@ -15,20 +15,20 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Table.php 16733 2009-07-15 13:16:50Z ralph $
+ * @version $Id: Table.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
- * Zend_Db_Table_Abstract
+ * @see Zend_Db_Table_Abstract
*/
-require_once 'Zend/Db/Table/Abstract.php';
+// require_once 'Zend/Db/Table/Abstract.php';
/**
* @see Zend_Db_Table_Definition
*/
-require_once 'Zend/Db/Table/Definition.php';
+// require_once 'Zend/Db/Table/Definition.php';
/**
* Class for SQL table interface.
@@ -36,25 +36,25 @@ require_once 'Zend/Db/Table/Definition.php';
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table extends Zend_Db_Table_Abstract
{
-
+
/**
* __construct() - For concrete implementation of Zend_Db_Table
*
* @param string|array $config string can reference a Zend_Registry key for a db adapter
- * OR it can refernece the name of a table
- * @param unknown_type $definition
+ * OR it can reference the name of a table
+ * @param array|Zend_Db_Table_Definition $definition
*/
public function __construct($config = array(), $definition = null)
{
if ($definition !== null && is_array($definition)) {
$definition = new Zend_Db_Table_Definition($definition);
}
-
+
if (is_string($config)) {
if (Zend_Registry::isRegistered($config)) {
trigger_error(__CLASS__ . '::' . __METHOD__ . '(\'registryName\') is not valid usage of Zend_Db_Table, '
@@ -73,12 +73,7 @@ class Zend_Db_Table extends Zend_Db_Table_Abstract
}
}
}
-
+
parent::__construct($config);
}
-
-
-
-
-
}
diff --git a/libs/Zend/Db/Table/Abstract.php b/libs/Zend/Db/Table/Abstract.php
index f0a6ea18d7..e07ed22517 100644
--- a/libs/Zend/Db/Table/Abstract.php
+++ b/libs/Zend/Db/Table/Abstract.php
@@ -15,25 +15,25 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 17822 2009-08-26 00:03:56Z ralph $
+ * @version $Id: Abstract.php 21079 2010-02-18 18:15:49Z tech13 $
*/
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Adapter/Abstract.php';
+// require_once 'Zend/Db/Adapter/Abstract.php';
/**
* @see Zend_Db_Adapter_Abstract
*/
-require_once 'Zend/Db/Select.php';
+// require_once 'Zend/Db/Select.php';
/**
* @see Zend_Db
*/
-require_once 'Zend/Db.php';
+// require_once 'Zend/Db.php';
/**
* Class for SQL table interface.
@@ -41,7 +41,7 @@ require_once 'Zend/Db.php';
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Table_Abstract
@@ -93,14 +93,14 @@ abstract class Zend_Db_Table_Abstract
* @var unknown_type
*/
protected $_definition = null;
-
+
/**
* Optional definition config name used in concrete implementation
*
* @var string
*/
protected $_definitionConfigName = null;
-
+
/**
* Default cache for information provided by the adapter's describeTable() method.
*
@@ -326,7 +326,7 @@ abstract class Zend_Db_Table_Abstract
return $this;
}
-
+
/**
* setDefinition()
*
@@ -338,7 +338,7 @@ abstract class Zend_Db_Table_Abstract
$this->_definition = $definition;
return $this;
}
-
+
/**
* getDefinition()
*
@@ -348,7 +348,7 @@ abstract class Zend_Db_Table_Abstract
{
return $this->_definition;
}
-
+
/**
* setDefinitionConfigName()
*
@@ -360,7 +360,7 @@ abstract class Zend_Db_Table_Abstract
$this->_definitionConfigName = $definitionConfigName;
return $this;
}
-
+
/**
* getDefinitionConfigName()
*
@@ -466,11 +466,11 @@ abstract class Zend_Db_Table_Abstract
$refMap = $this->_getReferenceMapNormalized();
if ($ruleKey !== null) {
if (!isset($refMap[$ruleKey])) {
- require_once "Zend/Db/Table/Exception.php";
+ // require_once "Zend/Db/Table/Exception.php";
throw new Zend_Db_Table_Exception("No reference rule \"$ruleKey\" from table $thisClass to table $tableClassname");
}
if ($refMap[$ruleKey][self::REF_TABLE_CLASS] != $tableClassname) {
- require_once "Zend/Db/Table/Exception.php";
+ // require_once "Zend/Db/Table/Exception.php";
throw new Zend_Db_Table_Exception("Reference rule \"$ruleKey\" does not reference table $tableClassname");
}
return $refMap[$ruleKey];
@@ -480,7 +480,7 @@ abstract class Zend_Db_Table_Abstract
return $reference;
}
}
- require_once "Zend/Db/Table/Exception.php";
+ // require_once "Zend/Db/Table/Exception.php";
throw new Zend_Db_Table_Exception("No reference from table $thisClass to table $tableClassname");
}
@@ -603,11 +603,11 @@ abstract class Zend_Db_Table_Abstract
return null;
}
if (is_string($db)) {
- require_once 'Zend/Registry.php';
+ // require_once 'Zend/Registry.php';
$db = Zend_Registry::get($db);
}
if (!$db instanceof Zend_Db_Adapter_Abstract) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('Argument must be of type Zend_Db_Adapter_Abstract, or a Registry key where a Zend_Db_Adapter_Abstract object is stored');
}
return $db;
@@ -698,11 +698,11 @@ abstract class Zend_Db_Table_Abstract
return null;
}
if (is_string($metadataCache)) {
- require_once 'Zend/Registry.php';
+ // require_once 'Zend/Registry.php';
$metadataCache = Zend_Registry::get($metadataCache);
}
if (!$metadataCache instanceof Zend_Cache_Core) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('Argument must be of type Zend_Cache_Core, or a Registry key where a Zend_Cache_Core object is stored');
}
return $metadataCache;
@@ -750,7 +750,7 @@ abstract class Zend_Db_Table_Abstract
if (! $this->_db) {
$this->_db = self::getDefaultAdapter();
if (!$this->_db instanceof Zend_Db_Adapter_Abstract) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('No adapter found for ' . get_class($this));
}
}
@@ -803,10 +803,10 @@ abstract class Zend_Db_Table_Abstract
// If $this has a metadata cache
if (null !== $this->_metadataCache) {
// Define the cache identifier where the metadata are saved
-
+
//get db configuration
$dbConfig = $this->_db->getConfig();
-
+
// Define the cache identifier where the metadata are saved
$cacheId = md5( // port:host/dbname:schema.table (based on availabilty)
(isset($dbConfig['options']['port']) ? ':'.$dbConfig['options']['port'] : null)
@@ -823,11 +823,7 @@ abstract class Zend_Db_Table_Abstract
$metadata = $this->_db->describeTable($this->_name, $this->_schema);
// If $this has a metadata cache, then cache the metadata
if (null !== $this->_metadataCache && !$this->_metadataCache->save($metadata, $cacheId)) {
- /**
- * @see Zend_Db_Table_Exception
- */
- require_once 'Zend/Db/Table/Exception.php';
- throw new Zend_Db_Table_Exception('Failed saving metadata to metadataCache');
+ trigger_error('Failed saving metadata to metadataCache', E_USER_NOTICE);
}
}
@@ -876,7 +872,7 @@ abstract class Zend_Db_Table_Abstract
// if no primary key was specified and none was found in the metadata
// then throw an exception.
if (empty($this->_primary)) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('A table must have a primary key, but none was found');
}
} else if (!is_array($this->_primary)) {
@@ -888,7 +884,7 @@ abstract class Zend_Db_Table_Abstract
$cols = $this->_getCols();
if (! array_intersect((array) $this->_primary, $cols) == (array) $this->_primary) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception("Primary key column(s) ("
. implode(',', (array) $this->_primary)
. ") are not columns in this table ("
@@ -990,7 +986,7 @@ abstract class Zend_Db_Table_Abstract
}
if (!array_key_exists($key, $info)) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('There is no table information for the key "' . $key . '"');
}
@@ -1005,7 +1001,7 @@ abstract class Zend_Db_Table_Abstract
*/
public function select($withFromPart = self::SELECT_WITHOUT_FROM_PART)
{
- require_once 'Zend/Db/Table/Select.php';
+ // require_once 'Zend/Db/Table/Select.php';
$select = new Zend_Db_Table_Select($this);
if ($withFromPart == self::SELECT_WITH_FROM_PART) {
$select->from($this->info(self::NAME), Zend_Db_Table_Select::SQL_WILDCARD, $this->info(self::SCHEMA));
@@ -1092,7 +1088,7 @@ abstract class Zend_Db_Table_Abstract
/**
* @see Zend_Db_Table_Exception
*/
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception('Column "' . $column . '" not found in table.');
}
@@ -1225,12 +1221,12 @@ abstract class Zend_Db_Table_Abstract
$keyNames = array_values((array) $this->_primary);
if (count($args) < count($keyNames)) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception("Too few columns for the primary key");
}
if (count($args) > count($keyNames)) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception("Too many columns for the primary key");
}
@@ -1247,7 +1243,7 @@ abstract class Zend_Db_Table_Abstract
if ($numberTerms == 0) {
$numberTerms = $keyValuesCount;
} else if ($keyValuesCount != $numberTerms) {
- require_once 'Zend/Db/Table/Exception.php';
+ // require_once 'Zend/Db/Table/Exception.php';
throw new Zend_Db_Table_Exception("Missing value(s) for the primary key");
}
$keyValues = array_values($keyValues);
@@ -1280,13 +1276,13 @@ abstract class Zend_Db_Table_Abstract
// issue ZF-5775 (empty where clause should return empty rowset)
if ($whereClause == null) {
$rowsetClass = $this->getRowsetClass();
- if (!class_exists($rowsetClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($rowsetClass);
- }
+ // if (!class_exists($rowsetClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($rowsetClass);
+ // }
return new $rowsetClass(array('table' => $this, 'rowClass' => $this->getRowClass(), 'stored' => true));
}
-
+
return $this->fetchAll($whereClause);
}
@@ -1333,10 +1329,10 @@ abstract class Zend_Db_Table_Abstract
);
$rowsetClass = $this->getRowsetClass();
- if (!class_exists($rowsetClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($rowsetClass);
- }
+ // if (!class_exists($rowsetClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($rowsetClass);
+ // }
return new $rowsetClass($data);
}
@@ -1382,10 +1378,10 @@ abstract class Zend_Db_Table_Abstract
);
$rowClass = $this->getRowClass();
- if (!class_exists($rowClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($rowClass);
- }
+ // if (!class_exists($rowClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($rowClass);
+ // }
return new $rowClass($data);
}
@@ -1445,10 +1441,10 @@ abstract class Zend_Db_Table_Abstract
);
$rowClass = $this->getRowClass();
- if (!class_exists($rowClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($rowClass);
- }
+ // if (!class_exists($rowClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($rowClass);
+ // }
$row = new $rowClass($config);
$row->setFromArray($data);
return $row;
diff --git a/libs/Zend/Db/Table/Definition.php b/libs/Zend/Db/Table/Definition.php
index edea0ee640..30e601a5b1 100644
--- a/libs/Zend/Db/Table/Definition.php
+++ b/libs/Zend/Db/Table/Definition.php
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Definition.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Definition.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
@@ -26,17 +26,17 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Definition
{
-
+
/**
* @var array
*/
protected $_tableConfigs = array();
-
+
/**
* __construct()
*
@@ -50,7 +50,7 @@ class Zend_Db_Table_Definition
$this->setOptions($options);
}
}
-
+
/**
* setConfig()
*
@@ -62,7 +62,7 @@ class Zend_Db_Table_Definition
$this->setOptions($config->toArray());
return $this;
}
-
+
/**
* setOptions()
*
@@ -76,7 +76,7 @@ class Zend_Db_Table_Definition
}
return $this;
}
-
+
/**
* @param string $tableName
* @param array $tableConfig
@@ -87,15 +87,15 @@ class Zend_Db_Table_Definition
// @todo logic here
$tableConfig[Zend_Db_Table::DEFINITION_CONFIG_NAME] = $tableName;
$tableConfig[Zend_Db_Table::DEFINITION] = $this;
-
+
if (!isset($tableConfig[Zend_Db_Table::NAME])) {
$tableConfig[Zend_Db_Table::NAME] = $tableName;
}
-
+
$this->_tableConfigs[$tableName] = $tableConfig;
return $this;
}
-
+
/**
* getTableConfig()
*
@@ -106,7 +106,7 @@ class Zend_Db_Table_Definition
{
return $this->_tableConfigs[$tableName];
}
-
+
/**
* removeTableConfig()
*
@@ -116,7 +116,7 @@ class Zend_Db_Table_Definition
{
unset($this->_tableConfigs[$tableName]);
}
-
+
/**
* hasTableConfig()
*
diff --git a/libs/Zend/Db/Table/Exception.php b/libs/Zend/Db/Table/Exception.php
index 2d85136109..3757324052 100644
--- a/libs/Zend/Db/Table/Exception.php
+++ b/libs/Zend/Db/Table/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Exception
*/
-require_once 'Zend/Db/Exception.php';
+// require_once 'Zend/Db/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Exception extends Zend_Db_Exception
diff --git a/libs/Zend/Db/Table/Row.php b/libs/Zend/Db/Table/Row.php
index 970c493419..5e80a644c0 100644
--- a/libs/Zend/Db/Table/Row.php
+++ b/libs/Zend/Db/Table/Row.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Row.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Row.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Table_Row_Abstract
*/
-require_once 'Zend/Db/Table/Row/Abstract.php';
+// require_once 'Zend/Db/Table/Row/Abstract.php';
/**
@@ -34,7 +34,7 @@ require_once 'Zend/Db/Table/Row/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Row extends Zend_Db_Table_Row_Abstract
diff --git a/libs/Zend/Db/Table/Row/Abstract.php b/libs/Zend/Db/Table/Row/Abstract.php
index 501bae171a..c7243eb003 100644
--- a/libs/Zend/Db/Table/Row/Abstract.php
+++ b/libs/Zend/Db/Table/Row/Abstract.php
@@ -15,24 +15,24 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Abstract.php 22230 2010-05-21 20:59:18Z ralph $
*/
/**
* @see Zend_Db
*/
-require_once 'Zend/Db.php';
+// require_once 'Zend/Db.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
+abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess, IteratorAggregate
{
/**
@@ -122,7 +122,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if (isset($config['data'])) {
if (!is_array($config['data'])) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('Data must be an array');
}
$this->_data = $config['data'];
@@ -157,7 +157,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
protected function _transformColumn($columnName)
{
if (!is_string($columnName)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('Specified column is not a string');
}
// Perform no transformation by default
@@ -175,7 +175,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
{
$columnName = $this->_transformColumn($columnName);
if (!array_key_exists($columnName, $this->_data)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Specified column \"$columnName\" is not in the row");
}
return $this->_data[$columnName];
@@ -193,7 +193,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
{
$columnName = $this->_transformColumn($columnName);
if (!array_key_exists($columnName, $this->_data)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Specified column \"$columnName\" is not in the row");
}
$this->_data[$columnName] = $value;
@@ -211,11 +211,11 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
{
$columnName = $this->_transformColumn($columnName);
if (!array_key_exists($columnName, $this->_data)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Specified column \"$columnName\" is not in the row");
}
if ($this->isConnected() && in_array($columnName, $this->_table->info('primary'))) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Specified column \"$columnName\" is a primary key and should not be unset");
}
unset($this->_data[$columnName]);
@@ -293,13 +293,14 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
}
/**
- * Does nothing
+ * Proxy to __unset
* Required by the ArrayAccess implementation
*
* @param string $offset
*/
public function offsetUnset($offset)
{
+ return $this->__unset($offset);
}
/**
@@ -341,7 +342,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
$tableClass = get_class($table);
if (! $table instanceof $this->_tableClass) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("The specified Table is of class $tableClass, expecting class to be instance of $this->_tableClass");
}
@@ -351,13 +352,13 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
$info = $this->_table->info();
if ($info['cols'] != array_keys($this->_data)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('The specified Table does not have the same columns as the Row');
}
if (! array_intersect((array) $this->_primary, $info['primary']) == (array) $this->_primary) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("The specified Table '$tableClass' does not have the same primary key as the Row");
}
@@ -450,7 +451,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
* A read-only row cannot be saved.
*/
if ($this->_readOnly === true) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('This row has been marked read-only');
}
@@ -472,9 +473,9 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if (is_array($primaryKey)) {
$newPrimaryKey = $primaryKey;
} else {
- //ZF-6167 Use tempPrimaryKey temporary to avoid that zend encoding fails.
+ //ZF-6167 Use tempPrimaryKey temporary to avoid that zend encoding fails.
$tempPrimaryKey = (array) $this->_primary;
- $newPrimaryKey = array(current($tempPrimaryKey) => $primaryKey);
+ $newPrimaryKey = array(current($tempPrimaryKey) => $primaryKey);
}
/**
@@ -508,7 +509,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
* A read-only row cannot be saved.
*/
if ($this->_readOnly === true) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('This row has been marked read-only');
}
@@ -597,7 +598,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
* A read-only row cannot be deleted.
*/
if ($this->_readOnly === true) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('This row has been marked read-only');
}
@@ -641,6 +642,11 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
return $result;
}
+ public function getIterator()
+ {
+ return new ArrayIterator((array) $this->_data);
+ }
+
/**
* Returns the column/value data as an array.
*
@@ -686,7 +692,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
protected function _getTable()
{
if (!$this->_connected) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('Cannot save a Row unless it is connected');
}
return $this->_table;
@@ -701,7 +707,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
protected function _getPrimaryKey($useDirty = true)
{
if (!is_array($this->_primary)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("The primary key must be set as an array");
}
@@ -712,7 +718,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
$array = array_intersect_key($this->_cleanData, $primary);
}
if (count($primary) != count($array)) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("The specified Table '$this->_tableClass' does not have the same primary key as the Row");
}
return $array;
@@ -754,7 +760,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
$row = $this->_getTable()->fetchRow($where);
if (null === $row) {
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception('Cannot refresh row as parent is missing');
}
@@ -865,13 +871,13 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if (is_string($dependentTable)) {
$dependentTable = $this->_getTableFromString($dependentTable);
}
-
+
if (!$dependentTable instanceof Zend_Db_Table_Abstract) {
$type = gettype($dependentTable);
if ($type == 'object') {
$type = get_class($dependentTable);
}
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Dependent table must be a Zend_Db_Table_Abstract, but it is $type");
}
@@ -921,13 +927,13 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if (is_string($parentTable)) {
$parentTable = $this->_getTableFromString($parentTable);
}
-
+
if (!$parentTable instanceof Zend_Db_Table_Abstract) {
$type = gettype($parentTable);
if ($type == 'object') {
$type = get_class($parentTable);
}
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Parent table must be a Zend_Db_Table_Abstract, but it is $type");
}
@@ -937,7 +943,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
&& ($parentTable->getDefinition() == null)) {
$parentTable->setOptions(array(Zend_Db_Table_Abstract::DEFINITION => $tableDefinition));
}
-
+
if ($select === null) {
$select = $parentTable->select();
} else {
@@ -955,7 +961,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
$parentColumnName = $parentDb->foldCase($map[Zend_Db_Table_Abstract::REF_COLUMNS][$i]);
$parentColumn = $parentDb->quoteIdentifier($parentColumnName, true);
$parentInfo = $parentTable->info();
-
+
// determine where part
$type = $parentInfo[Zend_Db_Table_Abstract::METADATA][$parentColumnName]['DATA_TYPE'];
$nullable = $parentInfo[Zend_Db_Table_Abstract::METADATA][$parentColumnName]['NULLABLE'];
@@ -966,7 +972,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
} else {
$select->where("$parentColumn = ?", $value, $type);
}
-
+
}
return $parentTable->fetchRow($select);
@@ -989,13 +995,13 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if (is_string($intersectionTable)) {
$intersectionTable = $this->_getTableFromString($intersectionTable);
}
-
+
if (!$intersectionTable instanceof Zend_Db_Table_Abstract) {
$type = gettype($intersectionTable);
if ($type == 'object') {
$type = get_class($intersectionTable);
}
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Intersection table must be a Zend_Db_Table_Abstract, but it is $type");
}
@@ -1005,17 +1011,17 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
&& ($intersectionTable->getDefinition() == null)) {
$intersectionTable->setOptions(array(Zend_Db_Table_Abstract::DEFINITION => $tableDefinition));
}
-
+
if (is_string($matchTable)) {
$matchTable = $this->_getTableFromString($matchTable);
}
-
+
if (! $matchTable instanceof Zend_Db_Table_Abstract) {
$type = gettype($matchTable);
if ($type == 'object') {
$type = get_class($matchTable);
}
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Match table must be a Zend_Db_Table_Abstract, but it is $type");
}
@@ -1025,7 +1031,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
&& ($matchTable->getDefinition() == null)) {
$matchTable->setOptions(array(Zend_Db_Table_Abstract::DEFINITION => $tableDefinition));
}
-
+
if ($select === null) {
$select = $matchTable->select();
} else {
@@ -1050,7 +1056,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
}
$joinCond = implode(' AND ', $joinCond);
- $select->from(array('i' => $interName), Zend_Db_Select::SQL_WILDCARD, $interSchema)
+ $select->from(array('i' => $interName), array(), $interSchema)
->joinInner(array('m' => $matchName), $joinCond, Zend_Db_Select::SQL_WILDCARD, $matchSchema)
->setIntegrityCheck(false);
@@ -1077,15 +1083,15 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
);
$rowsetClass = $matchTable->getRowsetClass();
- if (!class_exists($rowsetClass)) {
- try {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($rowsetClass);
- } catch (Zend_Exception $e) {
- require_once 'Zend/Db/Table/Row/Exception.php';
- throw new Zend_Db_Table_Row_Exception($e->getMessage());
- }
- }
+ // if (!class_exists($rowsetClass)) {
+ // try {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($rowsetClass);
+ // } catch (Zend_Exception $e) {
+ // require_once 'Zend/Db/Table/Row/Exception.php';
+ // throw new Zend_Db_Table_Row_Exception($e->getMessage(), $e->getCode(), $e);
+ // }
+ // }
$rowset = new $rowsetClass($config);
return $rowset;
}
@@ -1148,7 +1154,7 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
return $this->findDependentRowset($class, $ruleKey1, $select);
}
- require_once 'Zend/Db/Table/Row/Exception.php';
+ // require_once 'Zend/Db/Table/Row/Exception.php';
throw new Zend_Db_Table_Row_Exception("Unrecognized method '$method()'");
}
@@ -1164,29 +1170,29 @@ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess
if ($this->_table instanceof Zend_Db_Table_Abstract) {
$tableDefinition = $this->_table->getDefinition();
-
+
if ($tableDefinition !== null && $tableDefinition->hasTableConfig($tableName)) {
return new Zend_Db_Table($tableName, $tableDefinition);
- }
- }
-
- // assume the tableName is the class name
- if (!class_exists($tableName)) {
- try {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($tableName);
- } catch (Zend_Exception $e) {
- require_once 'Zend/Db/Table/Row/Exception.php';
- throw new Zend_Db_Table_Row_Exception($e->getMessage());
}
}
+ // assume the tableName is the class name
+ // if (!class_exists($tableName)) {
+ // try {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($tableName);
+ // } catch (Zend_Exception $e) {
+ // require_once 'Zend/Db/Table/Row/Exception.php';
+ // throw new Zend_Db_Table_Row_Exception($e->getMessage(), $e->getCode(), $e);
+ // }
+ // }
+
$options = array();
-
+
if (($table = $this->_getTable())) {
$options['db'] = $table->getAdapter();
}
-
+
if (isset($tableDefinition) && $tableDefinition !== null) {
$options[Zend_Db_Table_Abstract::DEFINITION] = $tableDefinition;
}
diff --git a/libs/Zend/Db/Table/Row/Exception.php b/libs/Zend/Db/Table/Row/Exception.php
index 12d17febcd..236c4bec42 100644
--- a/libs/Zend/Db/Table/Row/Exception.php
+++ b/libs/Zend/Db/Table/Row/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Table_Exception
*/
-require_once 'Zend/Db/Table/Exception.php';
+// require_once 'Zend/Db/Table/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Row_Exception extends Zend_Db_Table_Exception
diff --git a/libs/Zend/Db/Table/Rowset.php b/libs/Zend/Db/Table/Rowset.php
index b7e495d6d0..186abe14fd 100644
--- a/libs/Zend/Db/Table/Rowset.php
+++ b/libs/Zend/Db/Table/Rowset.php
@@ -16,16 +16,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Rowset.php 16203 2009-06-21 18:56:17Z thomas $
+ * @version $Id: Rowset.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Table_Rowset_Abstract
*/
-require_once 'Zend/Db/Table/Rowset/Abstract.php';
+// require_once 'Zend/Db/Table/Rowset/Abstract.php';
/**
@@ -35,7 +35,7 @@ require_once 'Zend/Db/Table/Rowset/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Rowset extends Zend_Db_Table_Rowset_Abstract
diff --git a/libs/Zend/Db/Table/Rowset/Abstract.php b/libs/Zend/Db/Table/Rowset/Abstract.php
index d9e324baf1..8cafadc91e 100644
--- a/libs/Zend/Db/Table/Rowset/Abstract.php
+++ b/libs/Zend/Db/Table/Rowset/Abstract.php
@@ -15,16 +15,16 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Countable, ArrayAccess
@@ -111,10 +111,10 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
if (isset($config['rowClass'])) {
$this->_rowClass = $config['rowClass'];
}
- if (!class_exists($this->_rowClass)) {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($this->_rowClass);
- }
+ // if (!class_exists($this->_rowClass)) {
+ // require_once 'Zend/Loader.php';
+ // Zend_Loader::loadClass($this->_rowClass);
+ // }
if (isset($config['data'])) {
$this->_data = $config['data'];
}
@@ -321,7 +321,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
{
$position = (int) $position;
if ($position < 0 || $position >= $this->_count) {
- require_once 'Zend/Db/Table/Rowset/Exception.php';
+ // require_once 'Zend/Db/Table/Rowset/Exception.php';
throw new Zend_Db_Table_Rowset_Exception("Illegal index $position");
}
$this->_pointer = $position;
@@ -390,8 +390,8 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
$this->seek($position);
$row = $this->current();
} catch (Zend_Db_Table_Rowset_Exception $e) {
- require_once 'Zend/Db/Table/Rowset/Exception.php';
- throw new Zend_Db_Table_Rowset_Exception('No row could be found at position ' . (int) $position);
+ // require_once 'Zend/Db/Table/Rowset/Exception.php';
+ throw new Zend_Db_Table_Rowset_Exception('No row could be found at position ' . (int) $position, 0, $e);
}
if ($seek == false) {
$this->seek($key);
diff --git a/libs/Zend/Db/Table/Rowset/Exception.php b/libs/Zend/Db/Table/Rowset/Exception.php
index 99b4dc54a4..8696c74e06 100644
--- a/libs/Zend/Db/Table/Rowset/Exception.php
+++ b/libs/Zend/Db/Table/Rowset/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Table_Exception
*/
-require_once 'Zend/Db/Table/Exception.php';
+// require_once 'Zend/Db/Table/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Rowset_Exception extends Zend_Db_Table_Exception
diff --git a/libs/Zend/Db/Table/Select.php b/libs/Zend/Db/Table/Select.php
index c99a5ad8de..699c071884 100644
--- a/libs/Zend/Db/Table/Select.php
+++ b/libs/Zend/Db/Table/Select.php
@@ -16,22 +16,22 @@
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Select.php 18200 2009-09-17 21:25:37Z beberlei $
+ * @version $Id: Select.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Select
*/
-require_once 'Zend/Db/Select.php';
+// require_once 'Zend/Db/Select.php';
/**
* @see Zend_Db_Table_Abstract
*/
-require_once 'Zend/Db/Table/Abstract.php';
+// require_once 'Zend/Db/Table/Abstract.php';
/**
@@ -40,7 +40,7 @@ require_once 'Zend/Db/Table/Abstract.php';
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Table_Select extends Zend_Db_Select
@@ -195,7 +195,7 @@ class Zend_Db_Table_Select extends Zend_Db_Select
if (count($this->_parts[self::UNION]) == 0) {
-
+
// If no fields are specified we assume all fields from primary table
if (!count($fields)) {
$this->from($primary, self::SQL_WILDCARD, $schema);
@@ -211,7 +211,7 @@ class Zend_Db_Table_Select extends Zend_Db_Select
// Check each column to ensure it only references the primary table
if ($column) {
if (!isset($from[$table]) || $from[$table]['tableName'] != $primary) {
- require_once 'Zend/Db/Table/Select/Exception.php';
+ // require_once 'Zend/Db/Table/Select/Exception.php';
throw new Zend_Db_Table_Select_Exception('Select query cannot join with another table');
}
}
diff --git a/libs/Zend/Db/Table/Select/Exception.php b/libs/Zend/Db/Table/Select/Exception.php
index 886f11876e..ac03702c2d 100644
--- a/libs/Zend/Db/Table/Select/Exception.php
+++ b/libs/Zend/Db/Table/Select/Exception.php
@@ -15,21 +15,21 @@
* @category Zend
* @package Zend_Db
* @subpackage Select
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
+ * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Db_Exception
*/
-require_once 'Zend/Db/Select/Exception.php';
+// require_once 'Zend/Db/Select/Exception.php';
/**
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/