mirror of https://github.com/BOINC/boinc.git
- web: after post to a thread, show a page of the most recent posts
(but don't change user's sort prefs) svn path=/trunk/boinc/; revision=25872
This commit is contained in:
parent
075d544c9f
commit
6f98eae87d
|
@ -4918,7 +4918,7 @@ David 12 July 2012
|
|||
html/inc/
|
||||
forum.inc
|
||||
|
||||
David 12 July 2012
|
||||
David 13 July 2012
|
||||
- web: when posting to a thread, show a page of its most recent posts
|
||||
- feeder: add --by_batch option: interleaves jobs from different batches.
|
||||
From Jack Harris.
|
||||
|
@ -4928,3 +4928,11 @@ David 12 July 2012
|
|||
html/user/
|
||||
forum_reply.php
|
||||
forum_user_posts.php
|
||||
|
||||
David 13 July 2012
|
||||
- web: after post to a thread, show a page of the most recent posts
|
||||
(but don't change user's sort prefs)
|
||||
|
||||
html/user/
|
||||
forum_thread.php
|
||||
forum_reply.php
|
||||
|
|
|
@ -77,7 +77,7 @@ if ($content && (!$preview)){
|
|||
$content, $parent_post_id, $logged_in_user, $forum,
|
||||
$thread, $add_signature
|
||||
);
|
||||
header('Location: forum_thread.php?id='.$thread->id);
|
||||
header("Location: forum_thread.php?id=$thread->id&temp_sort_style=".CREATE_TIME_NEW);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ require_once('../inc/news.inc');
|
|||
|
||||
$threadid = get_int('id');
|
||||
$sort_style = get_int('sort', true);
|
||||
$temp_sort_style = get_int('temp_sort_style', true);
|
||||
$start = get_int('start', true);
|
||||
$postid = get_int('postid', true);
|
||||
$filter = get_str('filter', true);
|
||||
|
@ -70,14 +71,9 @@ if ($thread->hidden) {
|
|||
}
|
||||
|
||||
$title = cleanup_title($thread->title);
|
||||
if (!$sort_style) {
|
||||
// get the sorting style from the user or a cookie
|
||||
if ($logged_in_user){
|
||||
$sort_style = $logged_in_user->prefs->thread_sorting;
|
||||
} else if (array_key_exists('sorting', $_COOKIE)) {
|
||||
list($forum_style, $sort_style) = explode("|",$_COOKIE['sorting']);
|
||||
}
|
||||
} else {
|
||||
if ($temp_sort_style) {
|
||||
$sort_style = $temp_sort_style;
|
||||
} else if ($sort_style) {
|
||||
if ($logged_in_user){
|
||||
$logged_in_user->prefs->thread_sorting = $sort_style;
|
||||
$logged_in_user->prefs->update("thread_sorting=$sort_style");
|
||||
|
@ -89,6 +85,13 @@ if (!$sort_style) {
|
|||
implode("|", array($forum_style, $sort_style)),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
// get the sorting style from the user or a cookie
|
||||
if ($logged_in_user){
|
||||
$sort_style = $logged_in_user->prefs->thread_sorting;
|
||||
} else if (array_key_exists('sorting', $_COOKIE)) {
|
||||
list($forum_style, $sort_style) = explode("|",$_COOKIE['sorting']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($logged_in_user && $logged_in_user->prefs->jump_to_unread){
|
||||
|
|
Loading…
Reference in New Issue