[dev] Turba - last address book stored in session - issue when deleted.

Jan Schneider jan at horde.org
Thu Nov 30 14:36:42 PST 2006


Zitat von Michael Rubinsky <mike at theupstairsroom.com>:

> Quoting Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>>
>>> Ok, I know this is a fringe case, but...If a user has two address   
>>>  books, views one, then goes to the My Address Books page and   
>>> deletes  the one he just viewed, then goes back to the browse  
>>> page,  the error  message about it not being found is displayed,  
>>> but since  there is now  only 1 browseable address book, there is  
>>> no source  selection widget in  the menu.  Yea, he could click on  
>>> the address  book in the side bar  menu, but it is possible that  
>>> the side bar is  not being displayed.
>>>
>>> I have patched it so that if there is only 1 browesable address   
>>> book,  then the session value is cleared, and then the user is   
>>> redirected  back to the browse.php page.  This still displays the   
>>> error, but this  way the user has a way of getting to his  
>>> remaining  address book (which  is probably what was intended here  
>>> anyway).   If there is more than one  browseable book, the session  
>>> value is  cleared, but the user is not  redirected, since they  
>>> will see an  error message as well as the source  selection widget.
>>>
>>> Does this sound reasonable before I commit it?
>>
>> How about clearing the session value if you delete the addressbook   
>> that it contains?
>
> That's essentially what I did, but then I redirect back to  
> browse.php  if there is only 1 browseable source, since there would  
> be no other  way to get at your address book if your are not viewing  
> the side bar.   I guess my question really is, should we redirect  
> only in this case  (when you delete the currently cached address  
> book and have only 1  browseable source left), or redirect back to  
> browse.php whenever we  delete the currently cached address book  
> (regardless of the number of  browseable address books we may have)?  
>  Now that I'm thinking about it  more, I'm leaning more towards the  
> second case...

Why do you redirect at all, instead of staying on the "My Address Books" page?

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list