Skip to content

Commit

Permalink
MediaManager: Check DOKU_PREF cookie value for validness
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Oct 30, 2011
1 parent 1888d1b commit 3629bc8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,11 @@ function _media_get_display_param($param, $values) {
// FIXME: Set cookie
return $_REQUEST[$param];
} else {
return get_doku_pref($param, $values['default']);
$val = get_doku_pref($param, $values['default']);
if (!in_array($val, $values)) {
$val = $values['default'];
}
return $val;
}
}

Expand Down

0 comments on commit 3629bc8

Please sign in to comment.