From b4403995107c4440b4e19dd5e5e8385e0eac2a5a Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 29 Oct 2006 12:53:33 +0000 Subject: merge from 3.0 branch till 1481. --- HISTORY | 9 +++++++-- UPGRADE | 4 ++++ .../protected/pages/GettingStarted/CommandLine.page | 15 +++++++-------- framework/Web/Services/TPageService.php | 4 ++-- framework/Web/THttpRequest.php | 4 ++-- framework/Web/UI/WebControls/TRepeater.php | 4 +--- index.html | 5 +++-- 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/HISTORY b/HISTORY index 675a9713..71a086af 100644 --- a/HISTORY +++ b/HISTORY @@ -13,9 +13,13 @@ NEW: TJsonService CHG: All validators ClientSide.OnSuccess becomes ClientSide.OnValidationSuccess, and OnSuccess event becomes OnValidationSuccess. (Wei) CHG: All validators ClientSide.OnError becomes ClientSide.OnValidationError, and OnError event becomes OnValidationError. (Wei) +Version 3.0.6 December 4, 2006 +============================== +CHG: constructUrl() now encodes & into & by default (Qiang) +CHG: TRepeater does not render anymore for empty item template (Qiang) -Version 3.0.5 October 8, 2006 -=============================== +Version 3.0.5 October 23, 2006 +============================== BUG: Ticket#409 - Multiple page services will mess up page caching (Qiang) BUG: Ticket#417 - SelectedIndex in template incorrect caused by bug in TList (Qiang) CHG: Ticket#358 - TFileUpload::saveAs() now returns false instead of exception when error (Qiang) @@ -23,6 +27,7 @@ ENH: Ticket#361 - Introduced include template tag that supports including extern ENH: Ticket#366 - white spaces are now allowed around attribute names in template (Qiang) ENH: Ticket#378 - PRADO applications can now run in command line (Qiang) ENH: Ticket#379 - TAuthorizationRule performance enhancement (Qiang) +ENH: Ticket#382 - Untranslated messages can be marked now (Wei) ENH: Ticket#394 - Enhancing TDropDownListColumn to allow specifying both text and value (Qiang) ENH: Easier to customize the TDatePicker using CssClass (Wei) ENH: Added an interactive PHP shell, usage: "prado-cli.php shell" (Wei) diff --git a/UPGRADE b/UPGRADE index ba0a999f..17386019 100644 --- a/UPGRADE +++ b/UPGRADE @@ -21,6 +21,10 @@ Upgrading from v3.0.x - Validator OnSuccess event becomes OnValidationSuccess. - Validator OnError event becomes OnValidationError. +Upgrading from v3.0.5 +--------------------- +- constructUrl() now encodes & into & by default. +- TRepeater does not render anymore for empty item template. Upgrading from v3.0.4 --------------------- diff --git a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page index cf204a40..690de59b 100644 --- a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page +++ b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page @@ -1,7 +1,7 @@

Command Line Tool

The optional prado-cli.php PHP script file in the framework -directory provides command line tools to perform various tendious taks in Prado. +directory provides command line tools to perform various tedious takes in Prado. The prado-cli.php can be used to create Prado project skeletons, create initial test fixtures, and access to an interactive PHP shell.

@@ -44,14 +44,14 @@ are optional parameters.

  1. Change to the directory where you want to create the project skeleton.
  2. Type, php ../prado/framework/prado-cli.php -c helloworld, where - hellowworld is the directory name that you want to create the project skeleton files.
  3. + helloworld is the directory name that you want to create the project skeleton files.
  4. Type, php ../prado/framework/prado-cli.php -t helloworld to create the test fixtures for the helloworld project.

Interactive Shell

-The interactive shell allows you to evaluate PHP statements from te command line. +The interactive shell allows you to evaluate PHP statements from the command line. The prado-cli.php script can be used to start the shell and load an existing Prado project. For example, let us load the blog demo project. Assume that your command line is in the prado distribution directory and you type. @@ -63,7 +63,7 @@ $: php framework/prado-cli.php shell demos/blog The output should be Command line tools for Prado 3.0.5. -** Loaded Prado appplication in directory "demos\blog\protected". +** Loaded Prado application in directory "demos\blog\protected". PHP-Shell - Version 0.3.1 (c) 2006, Jan Kneschke @@ -73,7 +73,7 @@ PHP-Shell - Version 0.3.1 Then we will get an instance of the Prado blog application, and from that instance we want an instance of the 'data' module. Notice that -a semicolon at the end of the line supresses the output. +a semicolon at the end of the line suppresses the output. >> $app = Prado::getApplication(); @@ -97,11 +97,10 @@ PostRecord#1 [Title] => 'Welcome to Prado Weblog' [Content] => 'Congratulations! You have successfully installed Prado Blog -- a PRADO-driven weblog system. A default administrator account has been created. - Please login with admin/prado and update your password as soon as possib -le.' + Please login with admin/prado and update your password as soon as possible.' [Status] => 0 [CommentCount] => 0 )

-
\ No newline at end of file + diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index ac4787f2..3e33fbb4 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -462,11 +462,11 @@ class TPageService extends TService * Constructs a URL with specified page path and GET parameters. * @param string page path * @param array list of GET parameters, null if no GET parameters required - * @param boolean whether to encode the ampersand in URL, defaults to false. + * @param boolean whether to encode the ampersand in URL, defaults to true. * @param boolean whether to encode the GET parameters (their names and values), defaults to true. * @return string URL for the page and GET parameters */ - public function constructUrl($pagePath,$getParams=null,$encodeAmpersand=false,$encodeGetItems=true) + public function constructUrl($pagePath,$getParams=null,$encodeAmpersand=true,$encodeGetItems=true) { return $this->getRequest()->constructUrl($this->getID(),$pagePath,$getParams,$encodeAmpersand,$encodeGetItems); } diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 90007fa2..44efb14b 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -482,12 +482,12 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar * @param string service ID * @param string service parameter * @param array GET parameters, null if not needed - * @param boolean whether to encode the ampersand in URL, defaults to false. + * @param boolean whether to encode the ampersand in URL, defaults to true. * @param boolean whether to encode the GET parameters (their names and values), defaults to true. * @return string URL * @see parseUrl */ - public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=false,$encodeGetItems=true) + public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=true,$encodeGetItems=true) { $url=$serviceID.'='.$serviceParam; $amp=$encodeAmpersand?'&':'&'; diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index 357a8730..046e0a88 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -364,10 +364,8 @@ class TRepeater extends TDataBoundControl implements INamingContainer */ public function render($writer) { - if($this->_items && $this->_items->getCount()) + if($this->_items && $this->_items->getCount() || $this->_emptyTemplate!==null) $this->renderContents($writer); - else if($this->_emptyTemplate!==null) - parent::render($writer); } /** diff --git a/index.html b/index.html index 3a0a9657..889c93ed 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@

PRADO Framework for PHP 5

-

Version 3.0.5, October 8, 2006
+

Version 3.0.5, October 23, 2006
Copyright© 2004-2006 by PradoSoft
All Rights Reserved.

@@ -69,8 +69,9 @@ PRADO component tags when you use it to edit PRADO templates.

Documentation

Credits

-- cgit v1.2.3