Skip to content

Commit

Permalink
Don't save Guest forum mode to database (just session)
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed May 13, 2005
1 parent 8be944a commit acb50c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mod/forum/discuss.php
Expand Up @@ -77,10 +77,14 @@
unset($SESSION->fromdiscussion); unset($SESSION->fromdiscussion);


if ($mode) { if ($mode) {
set_user_preference("forum_displaymode", $mode); if (isguest()) {
$USER->preference['forum_displaymode'] = $mode; // don't save it in database
} else {
set_user_preference('forum_displaymode', $mode);
}
} }


$displaymode = get_user_preferences("forum_displaymode", $CFG->forum_displaymode); $displaymode = get_user_preferences('forum_displaymode', $CFG->forum_displaymode);


if ($parent) { if ($parent) {
if (abs($displaymode) == 1) { // If flat AND parent, then force nested display this time if (abs($displaymode) == 1) { // If flat AND parent, then force nested display this time
Expand Down

0 comments on commit acb50c1

Please sign in to comment.