From 7f4d9089574a35b733ee36bf4880bb9eb4beab84 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 8 May 2007 02:22:27 +0000 Subject: Fixed Sqlmap using TAPCCache problem. Adding test code for #488. --- .gitattributes | 2 ++ framework/Data/SqlMap/TSqlMapConfig.php | 2 +- .../tickets/protected/pages/Ticket488.page | 27 ++++++++++++++++++++++ .../tickets/protected/pages/Ticket488.php | 13 +++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket488.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket488.php diff --git a/.gitattributes b/.gitattributes index a007f8b1..e36a617b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2530,6 +2530,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket477.page -text tests/FunctionalTests/tickets/protected/pages/Ticket477.php -text tests/FunctionalTests/tickets/protected/pages/Ticket484.page -text tests/FunctionalTests/tickets/protected/pages/Ticket484.php -text +tests/FunctionalTests/tickets/protected/pages/Ticket488.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket488.php -text tests/FunctionalTests/tickets/protected/pages/Ticket500.page -text tests/FunctionalTests/tickets/protected/pages/Ticket500.php -text tests/FunctionalTests/tickets/protected/pages/Ticket504.page -text diff --git a/framework/Data/SqlMap/TSqlMapConfig.php b/framework/Data/SqlMap/TSqlMapConfig.php index 95c16336..ea5f5c38 100644 --- a/framework/Data/SqlMap/TSqlMapConfig.php +++ b/framework/Data/SqlMap/TSqlMapConfig.php @@ -61,7 +61,7 @@ class TSqlMapConfig extends TDataSourceConfig { $cache = $this->getApplication()->getCache(); if(!is_null($cache)) - return $cache->add($this->getCacheKey(), $manager); + return $cache->set($this->getCacheKey(), $manager); } return false; } diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket488.page b/tests/FunctionalTests/tickets/protected/pages/Ticket488.page new file mode 100644 index 00000000..4bb8df47 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket488.page @@ -0,0 +1,27 @@ + + + + + + + console.log('OnValidationError') + + + console.log('OnValidate'); + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket488.php b/tests/FunctionalTests/tickets/protected/pages/Ticket488.php new file mode 100644 index 00000000..e9610d1d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket488.php @@ -0,0 +1,13 @@ +IsValid = $this->Password == 'Prado'; + } +} + +?> \ No newline at end of file -- cgit v1.2.3