[pLog-svn] r6622 - plog/branches/lifetype-1.2/class/action/admin

Jon Daley plogworld at jon.limedaley.com
Sun Jun 22 18:28:14 EDT 2008


 	I see that adminaddarticlecategory has not always had a required 
category - it must have been added at some point, as none of my categories 
have descriptions.

On Sun, 22 Jun 2008, Jon Daley wrote:

> 	Thanks.  I did not check the templates.  Anyone have opinions on 
> whether I should "fix" it by making all descriptions optional (ie. change the 
> templates) or whether we should have some descriptions optional and some not? 
> I don't use the global category stuff at all myself - is there a reason that 
> those descriptions should be mandatory when others aren't?
>
> On Mon, 23 Jun 2008, Mark Wu wrote:
>
>> Not all description are optional. Did you check the related template?
>> 
>> Take  the addGlobalArticleCategory and UpdateGlobalArticleCategory for
>> example, the description field in both of them are not optional.
>> 
>> Please kindly check the template before change these.
>> 
>> Or you have to change the template, too.
>> 
>>> -----Original Message-----
>>> From: plog-svn-bounces at devel.lifetype.net
>>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of
>>> jondaley at devel.lifetype.net
>>> Sent: Sunday, June 22, 2008 2:43 AM
>>> To: plog-svn at devel.lifetype.net
>>> Subject: [pLog-svn] r6622 -
>>> plog/branches/lifetype-1.2/class/action/admin
>>> 
>>> Author: jondaley
>>> Date: 2008-06-21 14:43:24 -0400 (Sat, 21 Jun 2008) New Revision: 6622
>>> 
>>> Modified:
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddarticlec
>>> ategoryaction.class.php
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddblogcate
>>> goryaction.class.php
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddglobalar
>>> ticlecategoryaction.class.php
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateartic
>>> lecategoryaction.class.php
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateblogc
>>> ategoryaction.class.php
>>> 
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdategloba
>>> larticlecategoryaction.class.php
>>> Log:
>>> description is optional
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddarticlec
>>> ategoryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddarticlec
>>> ategoryaction.class.php	2008-06-21 18:41:40 UTC (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddarticlec
>>> ategoryaction.class.php	2008-06-21 18:43:24 UTC (rev 6622)
>>> @@ -31,7 +31,7 @@
>>>
>>>  			// register two validators
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			$this->registerFieldValidator(
>>> "categoryInMainPage", new IntegerValidator(), true );
>>>
>>>  			// and the view we should show in case
>>> there is a validation error
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddblogcate
>>> goryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddblogcate
>>> goryaction.class.php	2008-06-21 18:41:40 UTC (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddblogcate
>>> goryaction.class.php	2008-06-21 18:43:24 UTC (rev 6622)
>>> @@ -27,7 +27,7 @@
>>>
>>>  			// register two validators
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			// and the view we should show in case
>>> there is a validation error
>>>  			$errorView = new AdminTemplatedView(
>>> $this->_blogInfo, "newblogcategory" );
>>>  			$errorView->setErrorMessage(
>>> $this->_locale->tr("error_adding_blog_category" ));
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddglobalar
>>> ticlecategoryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddglobalar
>>> ticlecategoryaction.class.php	2008-06-21 18:41:40 UTC (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminaddglobalar
>>> ticlecategoryaction.class.php	2008-06-21 18:43:24 UTC (rev 6622)
>>> @@ -33,7 +33,7 @@
>>>
>>>  			// register two validators
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			// and the view we should show in case
>>> there is a validation error
>>>  			$errorView = new AdminTemplatedView(
>>> $this->_blogInfo, "newglobalarticlecategory" );
>>>  			$errorView->setErrorMessage(
>>> $this->_locale->tr("error_adding_global_article_category" ));
>>> 
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateartic
>>> lecategoryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateartic
>>> lecategoryaction.class.php	2008-06-21 18:41:40 UTC (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateartic
>>> lecategoryaction.class.php	2008-06-21 18:43:24 UTC (rev 6622)
>>> @@ -35,7 +35,7 @@
>>>  			// data validation settings
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>>  			$this->registerFieldValidator(
>>> "categoryId", new IntegerValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			$this->registerFieldValidator(
>>> "categoryInMainPage", new IntegerValidator(), true );
>>>  			$errorView = new AdminTemplatedView(
>>> $this->_blogInfo, "editarticlecategory" );
>>>  			$errorView->setErrorMessage(
>>> $this->_locale->tr("error_updating_article_category" ));
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateblogc
>>> ategoryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateblogc
>>> ategoryaction.class.php	2008-06-21 18:41:40 UTC (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdateblogc
>>> ategoryaction.class.php	2008-06-21 18:43:24 UTC (rev 6622)
>>> @@ -34,7 +34,7 @@
>>>  			// data validation settings
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>>  			$this->registerFieldValidator(
>>> "categoryId", new IntegerValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			$errorView = new AdminTemplatedView(
>>> $this->_blogInfo, "editblogcategory" );
>>>  			$errorView->setErrorMessage(
>>> $this->_locale->tr("error_updating_article_category" ));
>>>  			$this->setValidationErrorView( $errorView );
>>> 
>>> Modified:
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdategloba
>>> larticlecategoryaction.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdategloba
>>> larticlecategoryaction.class.php	2008-06-21 18:41:40 UTC
>>> (rev 6621)
>>> +++
>>> plog/branches/lifetype-1.2/class/action/admin/adminupdategloba
>>> larticlecategoryaction.class.php	2008-06-21 18:43:24 UTC
>>> (rev 6622)
>>> @@ -38,7 +38,7 @@
>>>  			// data validation settings
>>>  			$this->registerFieldValidator(
>>> "categoryName", new StringValidator());
>>>  			$this->registerFieldValidator(
>>> "categoryId", new IntegerValidator());
>>> -			$this->registerFieldValidator(
>>> "categoryDescription", new StringValidator());
>>> +			$this->registerFieldValidator(
>>> "categoryDescription", new
>>> +StringValidator(), true );
>>>  			$errorView = new AdminTemplatedView(
>>> $this->_blogInfo, "editglobalarticlecategory" );
>>>  			$errorView->setErrorMessage(
>>> $this->_locale->tr("error_updating_article_category" ));
>>>  			$this->setValidationErrorView( $errorView );
>>> 
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://limedaley.com/mailman/listinfo/plog-svn
>> 
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>> 
>
>

-- 
Jon Daley
http://jon.limedaley.com
~~
Quarrels would not last long if the fault were only on one side.
-- Francois de la Rochefoucauld


More information about the pLog-svn mailing list