From: <al...@us...> - 2008-10-21 16:24:04
|
Revision: 741 http://sciret.svn.sourceforge.net/sciret/?rev=741&view=rev Author: alpeb Date: 2008-10-21 16:24:01 +0000 (Tue, 21 Oct 2008) Log Message: ----------- fixed problem when hidding/showing categories for anonymous users Modified Paths: -------------- trunk/actions/HideCategory.php trunk/actions/ShowCategory.php Modified: trunk/actions/HideCategory.php =================================================================== --- trunk/actions/HideCategory.php 2008-10-21 16:22:36 UTC (rev 740) +++ trunk/actions/HideCategory.php 2008-10-21 16:24:01 UTC (rev 741) @@ -22,7 +22,10 @@ } $hideCategories[] = (int)$_GET['catId']; $this->user->setPreference('hiddenCategories', implode(',', $hideCategories)); - $this->user->save(); + + if (!$this->user->isAnonymous()) { + $this->user->save(); + } $_SESSION['message'] = $this->user->lang('Category won\'t be shown in the future'); Library::redirect(Library::getLink(array('view' => 'MainView'))); Modified: trunk/actions/ShowCategory.php =================================================================== --- trunk/actions/ShowCategory.php 2008-10-21 16:22:36 UTC (rev 740) +++ trunk/actions/ShowCategory.php 2008-10-21 16:24:01 UTC (rev 741) @@ -30,8 +30,11 @@ } $this->user->setPreference('hiddenCategories', implode(',', $newHideCategories)); - $this->user->save(); + if (!$this->user->isAnonymous()) { + $this->user->save(); + } + $_SESSION['message'] = $this->user->lang('Category will be shown in the future'); Library::redirect(Library::getLink(array( 'view' => 'MainView', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |