diff options
13 files changed, 105 insertions, 8 deletions
diff --git a/.gitattributes b/.gitattributes index 91595e98..3b19663d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -99,6 +99,12 @@ docs/application.xml -text docs/conceptual-structure.vsd -text docs/request-sequence.vsd -text framework/.htaccess -text +framework/3rdParty/SafeHtml/HTMLSax3.php -text +framework/3rdParty/SafeHtml/HTMLSax3/Decorators.php -text +framework/3rdParty/SafeHtml/HTMLSax3/States.php -text +framework/3rdParty/SafeHtml/TSafeHtmlParser.php -text +framework/3rdParty/SafeHtml/license.txt -text +framework/3rdParty/SafeHtml/readme.txt -text framework/3rdParty/geshi/docs/COPYING -text framework/3rdParty/geshi/docs/README -text framework/3rdParty/geshi/docs/THANKS -text @@ -421,12 +427,6 @@ framework/I18N/core/data/zh_TW.dat -text framework/I18N/core/util.php -text framework/I18N/schema/mysql.sql -text framework/I18N/schema/sqlite.sql -text -framework/IO/SafeHtml/HTMLSax3.php -text -framework/IO/SafeHtml/HTMLSax3/Decorators.php -text -framework/IO/SafeHtml/HTMLSax3/States.php -text -framework/IO/SafeHtml/license.txt -text -framework/IO/SafeHtml/readme.txt -text -framework/IO/TSafeHtml.php -text framework/IO/TTextWriter.php -text framework/Log/TLogRouter.php -text framework/Log/TLogger.php -text @@ -562,8 +562,13 @@ tests/FunctionalTests/protected/pages/Home.page -text tests/FunctionalTests/protected/pages/Home.zh_CN.page -text tests/FunctionalTests/protected/pages/I18N/BasicI18N.page -text tests/FunctionalTests/protected/pages/I18N/BasicI18N.php -text +tests/FunctionalTests/protected/pages/Layout.php -text +tests/FunctionalTests/protected/pages/Layout.tpl -text tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page -text tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php -text +tests/FunctionalTests/protected/pages/ViewSource.page -text +tests/FunctionalTests/protected/pages/ViewSource.php -text +tests/FunctionalTests/protected/pages/config.xml -text tests/FunctionalTests/protected/tests/HomePageTest.php -text tests/FunctionalTests/selenium/SeleneseRunner.html -text tests/FunctionalTests/selenium/SeleniumLog.html -text diff --git a/framework/IO/SafeHtml/HTMLSax3.php b/framework/3rdParty/SafeHtml/HTMLSax3.php index 35e50f55..35e50f55 100644 --- a/framework/IO/SafeHtml/HTMLSax3.php +++ b/framework/3rdParty/SafeHtml/HTMLSax3.php diff --git a/framework/IO/SafeHtml/HTMLSax3/Decorators.php b/framework/3rdParty/SafeHtml/HTMLSax3/Decorators.php index 6256706c..6256706c 100644 --- a/framework/IO/SafeHtml/HTMLSax3/Decorators.php +++ b/framework/3rdParty/SafeHtml/HTMLSax3/Decorators.php diff --git a/framework/IO/SafeHtml/HTMLSax3/States.php b/framework/3rdParty/SafeHtml/HTMLSax3/States.php index 2b863a59..2b863a59 100644 --- a/framework/IO/SafeHtml/HTMLSax3/States.php +++ b/framework/3rdParty/SafeHtml/HTMLSax3/States.php diff --git a/framework/IO/TSafeHtml.php b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php index 311ae2a3..2cedb36e 100644 --- a/framework/IO/TSafeHtml.php +++ b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php @@ -19,7 +19,7 @@ /**
* This package requires HTMLSax3 package
*/
-Prado::using('System.IO..SafeHtml.HTMLSax3');
+Prado::using('System.3rdParty.SafeHtml.HTMLSax3');
/**
@@ -55,7 +55,7 @@ Prado::using('System.IO..SafeHtml.HTMLSax3'); * @version Release: @package_version@
* @link http://pear.php.net/package/SafeHTML
*/
-class TSafeHtml
+class TSafeHtmlParser
{
/**
* Storage for resulting HTML output
diff --git a/framework/IO/SafeHtml/license.txt b/framework/3rdParty/SafeHtml/license.txt index 21496aa2..21496aa2 100644 --- a/framework/IO/SafeHtml/license.txt +++ b/framework/3rdParty/SafeHtml/license.txt diff --git a/framework/IO/SafeHtml/readme.txt b/framework/3rdParty/SafeHtml/readme.txt index d525f92c..d525f92c 100644 --- a/framework/IO/SafeHtml/readme.txt +++ b/framework/3rdParty/SafeHtml/readme.txt diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 9e8b7a04..d397cc56 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -288,6 +288,14 @@ class THttpRequest extends TModule }
/**
+ * @return TMap list of input variables, include GET, POST
+ */
+ public function getParameters()
+ {
+ return $this->_items;
+ }
+
+ /**
* @return THttpCookieCollection list of cookies to be sent
*/
public function getCookies()
diff --git a/tests/FunctionalTests/protected/pages/Layout.php b/tests/FunctionalTests/protected/pages/Layout.php new file mode 100644 index 00000000..2c6e02d6 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Layout.php @@ -0,0 +1,8 @@ +<?php
+
+class Layout extends TTemplateControl
+{
+
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/Layout.tpl b/tests/FunctionalTests/protected/pages/Layout.tpl new file mode 100644 index 00000000..36fabe71 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Layout.tpl @@ -0,0 +1,36 @@ +<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<com:THead Title="PRADO QuickStart Tutorial">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+
+<com:TContentPlaceHolder ID="Content" />
+
+<div class="w3c">
+<a href="http://validator.w3.org/check?uri=referer">
+ Validate XHTML 1.0
+</a>
+<a href="?page=ViewSource&source=<%= $this->Request->ServiceParameter %>"
+ style="margin: 0 1em;"
+ onclick="window.open(this.href); return false;"
+ onkeypress="window.open(this.href); return false;">View Source</a>
+</div>
+</body>
+</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/ViewSource.page b/tests/FunctionalTests/protected/pages/ViewSource.page new file mode 100644 index 00000000..900c45f6 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/ViewSource.page @@ -0,0 +1,18 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+
+<com:THead Title="PRADO QuickStart Source View">
+<meta http-equiv="content-language" content="en"/>
+</com:THead>
+
+<body>
+<div id="sourceList">
+<com:TLiteral ID="SourceList" />
+</div>
+<div id="sourceView">
+<com:TTextHighlighter ID="Highlighter" ShowLineNumbers="true" CssClass="source">
+<com:TLiteral ID="SourceView" />
+</com:TTextHighlighter>
+</div>
+</body>
+</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/ViewSource.php b/tests/FunctionalTests/protected/pages/ViewSource.php new file mode 100644 index 00000000..eeaf0f80 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/ViewSource.php @@ -0,0 +1,12 @@ +<?php
+
+class ViewSource extends TPage
+{
+ protected function onLoad($param)
+ {
+ $pageName = $this->Request->getParameter("source");
+ var_dump($pageName);
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/config.xml b/tests/FunctionalTests/protected/pages/config.xml new file mode 100644 index 00000000..1a551a90 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/config.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <paths>
+ <alias id="Pages" path="." />
+ </paths>
+ <pages MasterClass="Pages.Layout">
+ <page id="ViewSource" MasterClass="" />
+ </pages>
+</configuration>
\ No newline at end of file |