From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- demos/blog/protected/Pages/Posts/EditCategory.php | 120 +++++++++++----------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'demos/blog/protected/Pages/Posts/EditCategory.php') diff --git a/demos/blog/protected/Pages/Posts/EditCategory.php b/demos/blog/protected/Pages/Posts/EditCategory.php index 76013264..d60418be 100644 --- a/demos/blog/protected/Pages/Posts/EditCategory.php +++ b/demos/blog/protected/Pages/Posts/EditCategory.php @@ -1,61 +1,61 @@ - - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - */ - -/** - * EditCategory class - * - * @author Qiang Xue - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - */ -class EditCategory extends BlogPage -{ - private $_category; - - public function onInit($param) - { - parent::onInit($param); - $id=TPropertyValue::ensureInteger($this->Request['id']); - $this->_category=$this->DataAccess->queryCategoryByID($id); - if($this->_category===null) - throw new BlogException(500,'category_id_invalid',$id); - } - - public function onLoad($param) - { - parent::onLoad($param); - if(!$this->IsPostBack) - { - $this->CategoryName->Text=$this->_category->Name; - $this->CategoryDescription->Text=$this->_category->Description; - } - } - - public function saveButtonClicked($sender,$param) - { - if($this->IsValid) - { - $this->_category->Name=$this->CategoryName->Text; - $this->_category->Description=$this->CategoryDescription->Text; - $this->DataAccess->updateCategory($this->_category); - $this->gotoPage('Posts.ListPost',array('cat'=>$this->_category->ID)); - } - } - - public function checkCategoryName($sender,$param) - { - $name=$this->CategoryName->Text; - $param->IsValid=$this->DataAccess->queryCategoryByName($name)===null; - } -} - + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + */ + +/** + * EditCategory class + * + * @author Qiang Xue + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ +class EditCategory extends BlogPage +{ + private $_category; + + public function onInit($param) + { + parent::onInit($param); + $id=TPropertyValue::ensureInteger($this->Request['id']); + $this->_category=$this->DataAccess->queryCategoryByID($id); + if($this->_category===null) + throw new BlogException(500,'category_id_invalid',$id); + } + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsPostBack) + { + $this->CategoryName->Text=$this->_category->Name; + $this->CategoryDescription->Text=$this->_category->Description; + } + } + + public function saveButtonClicked($sender,$param) + { + if($this->IsValid) + { + $this->_category->Name=$this->CategoryName->Text; + $this->_category->Description=$this->CategoryDescription->Text; + $this->DataAccess->updateCategory($this->_category); + $this->gotoPage('Posts.ListPost',array('cat'=>$this->_category->ID)); + } + } + + public function checkCategoryName($sender,$param) + { + $name=$this->CategoryName->Text; + $param->IsValid=$this->DataAccess->queryCategoryByName($name)===null; + } +} + ?> \ No newline at end of file -- cgit v1.2.3