Minor updates

git-svn-id: file:///svn/phpbb/trunk@559 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
uid42062 2001-07-04 23:28:58 +00:00
parent fea9ffeb59
commit 523ec50f28

View file

@ -64,7 +64,6 @@ else
{ {
message_die(GENERAL_MESSAGE, "You have reached this page in error, please go back and try again"); message_die(GENERAL_MESSAGE, "You have reached this page in error, please go back and try again");
} }
if(!$result = $db->sql_query($sql)) if(!$result = $db->sql_query($sql))
{ {
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
@ -88,15 +87,11 @@ $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
if(!$is_auth['auth_read'] || !$is_auth['auth_view']) if(!$is_auth['auth_read'] || !$is_auth['auth_view'])
{ {
// //
// Ooopss, user is not authed // The user is not authed to read this forum ...
// to read this forum ...
// //
include('includes/page_header.'.$phpEx);
$msg = $lang['Sorry_auth'] . $is_auth['auth_read_type'] . $lang['can_read'] . $lang['this_forum']; $msg = $lang['Sorry_auth'] . $is_auth['auth_read_type'] . $lang['can_read'] . $lang['this_forum'];
message_die(GENERAL_MESSAGE, $msg); message_die(GENERAL_MESSAGE, $msg);
} }
// //
// End of auth check // End of auth check
@ -155,11 +150,9 @@ else
} }
// //
// Generate a 'Show posts in previous x days' // Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// select box. If the postdays var is POSTed // then get it's value, find the number of topics with dates newer than it (to properly
// then get it's value, find the number of topics // handle pagination) and alter the main query
// with dates newer than it (to properly handle
// pagination) and alter the main query
// //
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364); $previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Topics'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']); $previous_days_text = array($lang['All_Topics'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']);
@ -229,6 +222,7 @@ $total_topics = $db->sql_numrows($t_result);
// //
$post_new_topic_url = append_sid("posting.".$phpEx."?mode=newtopic&".POST_FORUM_URL."=$forum_id"); $post_new_topic_url = append_sid("posting.".$phpEx."?mode=newtopic&".POST_FORUM_URL."=$forum_id");
$template->assign_vars(array( $template->assign_vars(array(
"L_DISPLAY_TOPICS" => $lang['Display_topics'],
"U_POST_NEW_TOPIC" => $post_new_topic_url, "U_POST_NEW_TOPIC" => $post_new_topic_url,
"S_SELECT_POST_DAYS" => $select_post_days, "S_SELECT_POST_DAYS" => $select_post_days,
"S_POST_DAYS_ACTION" => append_sid("viewforum.$phpEx?".POST_FORUM_URL."=".$forum_id."&start=$start"))); "S_POST_DAYS_ACTION" => append_sid("viewforum.$phpEx?".POST_FORUM_URL."=".$forum_id."&start=$start")));