summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorwei <>2007-01-24 05:52:22 +0000
committerwei <>2007-01-24 05:52:22 +0000
commite306989c6d03aac37e2557465b4812ea21970065 (patch)
tree7e2524a33cedf49831eb3c5ae15cd1bed3c3ab2c /demos/quickstart
parentdec4042d10caa5a54b753fab950f16218fa62d8d (diff)
Fixed #517, #519, #521
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php5
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml4
-rw-r--r--demos/quickstart/protected/pages/Database/ActiveRecord.page18
3 files changed, 23 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
index d9a261d6..f0d127b9 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
@@ -1,4 +1,4 @@
-<?php
+<?php
class Home extends TPage
{
@@ -9,7 +9,8 @@ class Home extends TPage
{
parent::__construct();
$lang = $this->Request['lang'];
- if(CultureInfo::validCulture($lang)) //only valid lang is permitted
+ $info = new CultureInfo();
+ if($info->validCulture($lang)) //only valid lang is permitted
$this->getApplication()->getGlobalization()->setCulture($lang);
}
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml b/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
index e6fa03ec..5c80f48b 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<paths>
@@ -8,7 +8,7 @@
</paths>
<modules>
- <module id="globalization" class="TGlobalizationAutoDetect">
+ <module id="globalization2" class="TGlobalizationAutoDetect">
<translation type="XLIFF" source="I18NSample.messages" />
</module>
</modules>
diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page
index 0e8b8f7d..59d62495 100644
--- a/demos/quickstart/protected/pages/Database/ActiveRecord.page
+++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page
@@ -373,6 +373,24 @@ $finder->deleteByPk(array( array($key1,$key2), array($key3,$key4), .. ));
</com:TTextHighlighter>
</p>
+<h3 id="138052a"><tt>deleteAll()</tt> and <tt>deleteBy*()</tt></h3>
+<p id="690502a" class="block-content">
+To delete by a criteria, use <tt>deleteAll($criteria)</tt> and <tt>deleteBy*()</tt>
+with similar synatx to <tt>findAll($criteria)</tt> and <tt>findAllBy*()</tt> as
+described above.
+</p>
+<com:TTextHighlighter Language="php" CssClass="source block-content" id="code_690163a">
+//delete all records with matching Name
+$finder->deleteAll('Name = ?', $name);
+$finder->deleteByName($name);
+
+//delete by username and password
+$finder->deleteBy_Username_And_Password($name,$pass);
+</com:TTextHighlighter>
+</p>
+
+
+
<h2 id="138053">Transactions</h2>
<p id="690504" class="block-content">All Active Record objects contains the property <tt>DbConnection</tt>
that can be used to obtain a transaction object.