summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--framework/Caching/TDbCache.php6
-rw-r--r--framework/I18N/core/MessageSource_gettext.php4
-rw-r--r--framework/Util/TLogRouter.php154
4 files changed, 84 insertions, 82 deletions
diff --git a/HISTORY b/HISTORY
index 678be1d5..c6e036db 100644
--- a/HISTORY
+++ b/HISTORY
@@ -15,6 +15,8 @@ BUG: Ticket#872 - use PATH_SEPARATOR in phpunit.php (fragmaster b)
BUG: Ticket#886 - TSimpleDateFormatter: One month offset in time stamp with date pattern "yyyy" (Knut)
BUG: Ticket#897 - TSimpleDateFormatter: If no YearPattern is set it should default to current year (Knut)
BUG: Ticket#899 - TSqlCriteria: SQL-statements with limit and offset doesn't work (Knut)
+BUG: Ticket#904 - TDbConnection: Add emulate prepares workaround for boolean compares (Knut)
+BUG: Ticket#908 - TDbCache::init / Exception (Knut)
ENH: Added Prado.Validation.validateControl(id) on client side to validate a specific control (Michael)
ENH: Added MessageSource_Database to I18N (uses TDbConnection) (Michael)
ENH: Ticket#890 - Minor optimization: Use $var===null over is_null($var) (Knut)
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php
index 9c29daa0..2c2c863d 100644
--- a/framework/Caching/TDbCache.php
+++ b/framework/Caching/TDbCache.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Caching
@@ -146,7 +146,7 @@ class TDbCache extends TCache
$db->createCommand($sql)->execute();
}
else
- throw TConfigurationException('db_cachetable_inexistent',$this->_cacheTable);
+ throw new TConfigurationException('db_cachetable_inexistent',$this->_cacheTable);
}
parent::init($config);
@@ -392,4 +392,4 @@ class TDbCache extends TCache
}
}
-?>
+?>
diff --git a/framework/I18N/core/MessageSource_gettext.php b/framework/I18N/core/MessageSource_gettext.php
index dfcce621..5428e32b 100644
--- a/framework/I18N/core/MessageSource_gettext.php
+++ b/framework/I18N/core/MessageSource_gettext.php
@@ -450,8 +450,8 @@ class MessageSource_gettext extends MessageSource
if($po->save() && $mo->save($mo_file))
return array($variant, $mo_file, $po_file);
else
- throw TException("Unable to create file $po_file and $mo_file");
+ throw new TException("Unable to create file $po_file and $mo_file");
}
}
-?>
+?>
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 90f19534..5c755985 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Util
@@ -757,7 +757,7 @@ class TDbLogRoute extends TLogRoute
if($this->_autoCreate)
$this->createDbTable();
else
- throw TConfigurationException('db_logtable_inexistent',$this->_logTable);
+ throw new TConfigurationException('db_logtable_inexistent',$this->_logTable);
}
parent::init($config);
@@ -891,79 +891,79 @@ class TDbLogRoute extends TLogRoute
}
}
-
-/**
- * TFirebugLogRoute class.
- *
- * TFirebugLogRoute prints selected log messages in the firebug log console.
- *
- * {@link http://www.getfirebug.com/ FireBug Website}
- *
- * @author Enrico Stahn <mail@enricostahn.com>, Christophe Boulain <Christophe.Boulain@gmail.com>
- * @version $Id$
- * @package System.Util
- * @since 3.1.2
- */
-class TFirebugLogRoute extends TBrowserLogRoute
-{
- protected function renderHeader ()
- {
- $string = <<<EOD
-
-<script type="text/javascript">
-/*<![CDATA[*/
-if (typeof(console) == 'object')
-{
- console.log ("[Cumulated Time] [Time] [Level] [Category] [Message]");
-
-EOD;
-
- return $string;
- }
-
- protected function renderMessage ($log, $info)
- {
- $logfunc = $this->getFirebugLoggingFunction($log[1]);
- $total = sprintf('%0.6f', $info['total']);
- $delta = sprintf('%0.6f', $info['delta']);
- $msg = trim($this->formatLogMessage($log[0],$log[1],$log[2],''));
- $msg = preg_replace('/\(line[^\)]+\)$/','',$msg); //remove line number info
- $msg = "[{$total}] [{$delta}] ".$msg; // Add time spent and cumulated time spent
- $string = $logfunc . '(\'' . addslashes($msg) . '\');' . "\n";
-
- return $string;
- }
-
-
- protected function renderFooter ()
- {
- $string = <<<EOD
-
-}
-</script>
-
-EOD;
-
- return $string;
- }
-
- protected function getFirebugLoggingFunction($level)
- {
- switch ($level)
- {
- case TLogger::DEBUG:
- case TLogger::INFO:
- case TLogger::NOTICE:
- return 'console.log';
- case TLogger::WARNING:
- return 'console.warn';
- case TLogger::ERROR:
- case TLogger::ALERT:
- case TLogger::FATAL:
- return 'console.error';
- }
- return 'console.log';
- }
-
+
+/**
+ * TFirebugLogRoute class.
+ *
+ * TFirebugLogRoute prints selected log messages in the firebug log console.
+ *
+ * {@link http://www.getfirebug.com/ FireBug Website}
+ *
+ * @author Enrico Stahn <mail@enricostahn.com>, Christophe Boulain <Christophe.Boulain@gmail.com>
+ * @version $Id$
+ * @package System.Util
+ * @since 3.1.2
+ */
+class TFirebugLogRoute extends TBrowserLogRoute
+{
+ protected function renderHeader ()
+ {
+ $string = <<<EOD
+
+<script type="text/javascript">
+/*<![CDATA[*/
+if (typeof(console) == 'object')
+{
+ console.log ("[Cumulated Time] [Time] [Level] [Category] [Message]");
+
+EOD;
+
+ return $string;
+ }
+
+ protected function renderMessage ($log, $info)
+ {
+ $logfunc = $this->getFirebugLoggingFunction($log[1]);
+ $total = sprintf('%0.6f', $info['total']);
+ $delta = sprintf('%0.6f', $info['delta']);
+ $msg = trim($this->formatLogMessage($log[0],$log[1],$log[2],''));
+ $msg = preg_replace('/\(line[^\)]+\)$/','',$msg); //remove line number info
+ $msg = "[{$total}] [{$delta}] ".$msg; // Add time spent and cumulated time spent
+ $string = $logfunc . '(\'' . addslashes($msg) . '\');' . "\n";
+
+ return $string;
+ }
+
+
+ protected function renderFooter ()
+ {
+ $string = <<<EOD
+
+}
+</script>
+
+EOD;
+
+ return $string;
+ }
+
+ protected function getFirebugLoggingFunction($level)
+ {
+ switch ($level)
+ {
+ case TLogger::DEBUG:
+ case TLogger::INFO:
+ case TLogger::NOTICE:
+ return 'console.log';
+ case TLogger::WARNING:
+ return 'console.warn';
+ case TLogger::ERROR:
+ case TLogger::ALERT:
+ case TLogger::FATAL:
+ return 'console.error';
+ }
+ return 'console.log';
+ }
+
}
-?>
+?>