Commit 76c35fdf authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "save the page-orderby per user"

parents 59d9bd88 97929260
......@@ -213,6 +213,7 @@ function expected_account_preferences() {
'devicedetection' => 1,
'licensedefault' => '',
'viewsperpage' => 20,
'orderpagesby' => 'atoz',
);
}
......
......@@ -3622,7 +3622,12 @@ class View {
$limit = $userlimit;
}
$offset = param_integer('offset', 0);
$orderby = param_variable('orderby', null);
// load default page order from user settings as default and overwrite, if changed
$usersettingorderby = get_account_preference($USER->get('id'), 'orderpagesby');
$orderby = param_variable('orderby', $usersettingorderby);
if ($usersettingorderby !== $orderby) {
set_account_preference($USER->get('id'), 'orderpagesby', $orderby);
}
$query = param_variable('query', null);
$tag = param_variable('tag', null);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment