r1154 - in trunk: core/DB core/Form incubator/classes/DB

From: <voxusAT@ATshadanakar.org>
Date: Wed, 28 Dec 2005 15:17:32 +0300 (MSK)

Author: voxus
Date: 2005-12-28 15:17:31 +0300 (Wed, 28 Dec 2005)
New Revision: 1154

Modified:
   trunk/core/DB/IBase.class.php
   trunk/core/DB/MySQL.class.php
   trunk/core/DB/SQLite.class.php
   trunk/core/Form/DateRangeList.class.php
   trunk/incubator/classes/DB/MSSQL.class.php
   trunk/incubator/classes/DB/OraSQL.class.php
Log:
* extending r1146

Modified: trunk/core/DB/IBase.class.php
===================================================================
--- trunk/core/DB/IBase.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/core/DB/IBase.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -209,7 +209,7 @@
                 private function checkSingle($result)
                 {
                         if (ibase_num_rows($result) > 1)
- throw new DatabaseException(
+ throw new TooManyRowsException(
                                         "query returned too many rows (we need only one)"
                                 );
                         

Modified: trunk/core/DB/MySQL.class.php
===================================================================
--- trunk/core/DB/MySQL.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/core/DB/MySQL.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -170,7 +170,7 @@
                 private function checkSingle($result)
                 {
                         if (mysql_num_rows($result) > 1)
- throw new DatabaseException(
+ throw new TooManyRowsException(
                                         "query returned too many rows (we need only one)"
                                 );
                         

Modified: trunk/core/DB/SQLite.class.php
===================================================================
--- trunk/core/DB/SQLite.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/core/DB/SQLite.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -222,7 +222,7 @@
                 private function checkSingle($result)
                 {
                         if (sqlite_num_rows($result) > 1)
- throw new DatabaseException(
+ throw new TooManyRowsException(
                                         "query returned too many rows (we need only one)"
                                 );
                         

Modified: trunk/core/Form/DateRangeList.class.php
===================================================================
--- trunk/core/Form/DateRangeList.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/core/Form/DateRangeList.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -40,6 +40,20 @@
                         return ($this->value !== array());
                 }
                 
+ public function toString()
+ {
+ if ($this->value) {
+ $out = array();
+
+ foreach ($this->value as $range)
+ $out[] = $range->toDateString();
+
+ return implode(', ', $out);
+ }
+
+ return null;
+ }
+
                 public static function stringToDateRangeList($string)
                 {
                         $list = array();
@@ -117,20 +131,6 @@
                         );
                 }
                 
- public function toString()
- {
- if ($this->value) {
- $out = array();
-
- foreach ($this->value as $range)
- $out[] = $range->toDateString();
-
- return implode(', ', $out);
- }
-
- return null;
- }
-
                 private static function toDate($date)
                 {
                         if (strpos($date, '.') !== false) {

Modified: trunk/incubator/classes/DB/MSSQL.class.php
===================================================================
--- trunk/incubator/classes/DB/MSSQL.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/incubator/classes/DB/MSSQL.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -170,7 +170,7 @@
                 private function checkSingle($result)
                 {
                         if (mssql_num_rows($result) > 1)
- throw new DatabaseException(
+ throw new TooManyRowsException(
                                         'query returned too many rows (we need only one)'
                                 );
                         

Modified: trunk/incubator/classes/DB/OraSQL.class.php
===================================================================
--- trunk/incubator/classes/DB/OraSQL.class.php 2005-12-28 12:14:01 UTC (rev 1153)
+++ trunk/incubator/classes/DB/OraSQL.class.php 2005-12-28 12:17:31 UTC (rev 1154)
@@ -193,7 +193,7 @@
                 private function checkSingle($result)
                 {
                         if (oci_num_rows($result) > 1)
- throw new DatabaseException(
+ throw new TooManyRowsException(
                                         'query returned too many rows (we need only one)'
                                 );
                         
Received on Wed Dec 28 2005 - 15:17:32 MSK

This archive was generated by hypermail 2.2.0 : Sat Oct 27 2007 - 19:42:38 MSD