|
From: <al...@us...> - 2008-08-28 20:48:39
|
Revision: 658
http://sciret.svn.sourceforge.net/sciret/?rev=658&view=rev
Author: alpeb
Date: 2008-08-28 20:48:37 +0000 (Thu, 28 Aug 2008)
Log Message:
-----------
after saving the preferences, redirect to home using the article filter just chosen in the preferences
Modified Paths:
--------------
trunk/actions/SavePreferences.php
Modified: trunk/actions/SavePreferences.php
===================================================================
--- trunk/actions/SavePreferences.php 2008-08-28 20:46:48 UTC (rev 657)
+++ trunk/actions/SavePreferences.php 2008-08-28 20:48:37 UTC (rev 658)
@@ -11,9 +11,10 @@
require 'actions/Action.php';
-class SavePreferences extends Action {
-
- function dispatch() {
+class SavePreferences extends Action
+{
+ function dispatch()
+ {
if (in_array($_POST['startBrowsing'], array('all', 'articles', 'bookmarks'))) {
$this->user->setPreference('startBrowsing', $_POST['startBrowsing']);
}
@@ -32,7 +33,7 @@
$this->user->setPreference('navigationType', $_POST['navigationType']);
}
- if (($this->user->getRole() & User::ROLE_ADMIN) == User::ROLE_ADMIN) {
+ if (($this->user->role & User::ROLE_ADMIN) == User::ROLE_ADMIN) {
$this->configuration->setConfigValue('publishKB', $_POST['publishKB'] == '1'? '1' : '0');
$this->configuration->setConfigValue('publishArticlesAuto', $_POST['publishArticlesAuto'] == '1'? '1' : '0');
$this->configuration->setConfigValue('publishBookmarksAuto', $_POST['publishBookmarksAuto'] == '1'? '1' : '0');
@@ -55,8 +56,6 @@
$this->user->save();
$_SESSION['message'] = $this->user->lang('Preferences saved successfully');
- Library::redirect(Library::getLink(array('view' => 'MainView')));
+ Library::redirect(Library::getLink(array('view' => 'MainView', 'set' => $this->user->getPreference('startBrowsing'))));
}
}
-
-?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|