diff options
Diffstat (limited to 'demos/blog/protected/Portlets/SearchPortlet.php')
-rw-r--r-- | demos/blog/protected/Portlets/SearchPortlet.php | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/demos/blog/protected/Portlets/SearchPortlet.php b/demos/blog/protected/Portlets/SearchPortlet.php index 10ef0499..4f7d6ebf 100644 --- a/demos/blog/protected/Portlets/SearchPortlet.php +++ b/demos/blog/protected/Portlets/SearchPortlet.php @@ -1,39 +1,39 @@ -<?php
-/**
- * SearchPortlet class file
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright © 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id$
- */
-
-Prado::using('Application.Portlets.Portlet');
-
-/**
- * SearchPortlet class
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright © 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- */
-class SearchPortlet extends Portlet
-{
- public function onInit($param)
- {
- parent::onInit($param);
- if(!$this->Page->IsPostBack && ($keyword=$this->Request['keyword'])!==null)
- $this->Keyword->Text=$keyword;
- }
-
- public function search($sender,$param)
- {
- $keyword=$this->Keyword->Text;
- $url=$this->Service->constructUrl('SearchPost',array('keyword'=>$keyword),false);
- $this->Response->redirect($url);
- }
-}
-
+<?php +/** + * SearchPortlet class file + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + */ + +Prado::using('Application.Portlets.Portlet'); + +/** + * SearchPortlet class + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ +class SearchPortlet extends Portlet +{ + public function onInit($param) + { + parent::onInit($param); + if(!$this->Page->IsPostBack && ($keyword=$this->Request['keyword'])!==null) + $this->Keyword->Text=$keyword; + } + + public function search($sender,$param) + { + $keyword=$this->Keyword->Text; + $url=$this->Service->constructUrl('SearchPost',array('keyword'=>$keyword),false); + $this->Response->redirect($url); + } +} + ?>
\ No newline at end of file |