[Solar-talk] _flash add_ok?

Paul M Jones pmjones at solarphp.com
Mon Oct 16 06:42:35 PDT 2006


On Aug 8, 2006, at 8:02 AM, Jeff Surgeson wrote:

>>> In your add method's you set a _flash value after the save() like so
>>> $this->_flash->set('add_ok', true) however appear to not do
>>> anything with it.
>>>
>>> Is it there just in case, or does it have another purpose that I am
>>> missing?
>>
>> What I'm *supposed* to be doing is checking that flash again in the
>> following actionEdit() method, so that I can show an "add succeeded"
>> message.  Am I not doing so?
>
> No it would appear not, there are lots of references to _flash->set 
> ('add_ok',
> true) in most of your  try blocks in add methods but can find no  
> edit methods
> or any other method that makes use of it.

Hi Jeff, going back through archived emails (as usual I am terribly  
behind).  Based on your comment/reminder above, you'll find in the  
most-recent Solar release that I'm now reading the flash setting from  
the "add" action in the "edit" action, after the redirect.  At about  
line 450 in Solar_App_Bookmarks:

         // was this from a quickmark or an add operation?
         if ($this->_session->getFlash('add_ok')) {
             $form->setStatus(true);
             $form->feedback = $this->locale('SUCCESS_ADDED');
         }


Hope this helps, let me know if it does not.



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list