summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2007-05-08 02:22:27 +0000
committerwei <>2007-05-08 02:22:27 +0000
commit7f4d9089574a35b733ee36bf4880bb9eb4beab84 (patch)
tree3d140949838994731d047ffd28c816659727ed5a
parent8cfeb336ca6696b454dc34820a9f0d06c3e36cad (diff)
Fixed Sqlmap using TAPCCache problem. Adding test code for #488.
-rw-r--r--.gitattributes2
-rw-r--r--framework/Data/SqlMap/TSqlMapConfig.php2
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket488.page27
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket488.php13
4 files changed, 43 insertions, 1 deletions
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 @@
+<com:TContent ID="Content">
+
+<com:TTextBox ID="Password" />
+
+<com:TActiveCustomValidator
+ ID="LoginValidate"
+ ControlToValidate="Password"
+ Text="Login failed."
+ Display="Dynamic"
+ OnServerValidate="login"
+ ValidationGroup="UserAccountLogin"
+ ClientSide.ObserveChanges="false">
+ <prop:ClientSide.OnValidationError>
+ console.log('OnValidationError')
+ </prop:ClientSide.OnValidationError>
+ <prop:ClientSide.OnValidate>
+ console.log('OnValidate');
+ </prop:ClientSide.OnValidate>
+ <prop:ActiveControl.ClientSide
+ OnLoading="console.log('loading')"
+ OnComplete="console.log('completing')"
+ />
+</com:TActiveCustomValidator>
+
+<com:TActiveButton Text="Click" ValidationGroup="UserAccountLogin" />
+
+</com:TContent> \ 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 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket488 extends TPage
+{
+ function login($sender,$param)
+ {
+ //$param->IsValid = $this->Password == 'Prado';
+ }
+}
+
+?> \ No newline at end of file