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

Chuck Hagenbuch chuck at horde.org
Thu Nov 30 12:08:56 PST 2006


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?

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the dev mailing list