From db8652122c2b0705eed8e4fde76baccbe497319a Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 31 Jul 2001 18:37:25 +0000 Subject: More compliance updates + select previous posts in viewtopic git-svn-id: file:///svn/phpbb/trunk@770 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4e41e1e9fb..ee87251a6d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -120,8 +120,7 @@ function get_userdata($username) { function make_jumpbox() { - global $db; - global $l_jumpto, $l_noforums, $l_nocategories; + global $lang, $db; $sql = "SELECT c.cat_id, c.cat_title, c.cat_order FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f @@ -141,7 +140,7 @@ function make_jumpbox() $limit_forums = ""; $sql = "SELECT * - FROM ".FORUMS_TABLE." + FROM " . FORUMS_TABLE . " ORDER BY cat_id, forum_order"; if(!$q_forums = $db->sql_query($sql)) { @@ -152,11 +151,11 @@ function make_jumpbox() // $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); - $boxstring = ''; + $boxstring = ''; for($i = 0; $i < $total_categories; $i++) { $boxstring .= "\n"; - $boxstring .= "\n"; + $boxstring .= "\n"; $boxstring .= "\n"; if($total_forums) @@ -165,8 +164,7 @@ function make_jumpbox() { if( $forum_rows[$y]['cat_id'] == $category_rows[$i]['cat_id'] ) { - $name = stripslashes($forum_rows[$y]['forum_name']); - $boxstring .= "\n"; + $boxstring .= "\n"; } } } @@ -191,7 +189,7 @@ function make_forum_box($box_name, $default_forum = -1) $limit_forums = ""; $sql = "SELECT forum_id, forum_name - FROM ".FORUMS_TABLE." + FROM " . FORUMS_TABLE . " ORDER BY cat_id, forum_order"; if(!$q_forums = $db->sql_query($sql)) { @@ -395,7 +393,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for($i = $this_block_start; $i <= $this_block_end; $i++) { - $page_string .= ($i == $on_page) ? "$i" : "$i"; + $page_string .= ($i == $on_page) ? "$i" : "$i"; if($i < $this_block_end) { $page_string .= ", "; @@ -407,7 +405,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add $page_string_prepend = ""; for($i = 0; $i < $this_block_start; $i += 10) { - $page_string_prepend .= "" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ($i + 9) . ", "; + $page_string_prepend .= "" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ($i + 9) . ", "; } $page_string = $page_string_prepend . $page_string; @@ -419,7 +417,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add if(!($total_pages%10)) { - $page_url = append_sid($base_url."&start=".( ( ($this_block_end + 1) * $per_page ) - $per_page ) ); + $page_url = append_sid($base_url."&start=".( ( ($this_block_end + 1) * $per_page ) - $per_page ) ); $page_string_append .= "$total_pages"; } else @@ -427,7 +425,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for($i = $this_block_end + 1; $i < $total_pages; $i += 10) { - $page_string_append .= "" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ((($i + 9) < $total_pages) ? ($i + 9) : $total_pages) . ""; + $page_string_append .= "" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ((($i + 9) < $total_pages) ? ($i + 9) : $total_pages) . ""; if($i < $total_pages - 10) { $page_string_append .= ", "; @@ -441,11 +439,11 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add { if($on_page > 1) { - $page_string = " " . $lang['Previous'] . "  " . $page_string; + $page_string = " " . $lang['Previous'] . "  " . $page_string; } if($on_page < $total_pages) { - $page_string .= "  " . $lang['Next'] . ""; + $page_string .= "  " . $lang['Next'] . ""; } $page_string = $lang['Goto_page'] . ": " . $page_string; -- cgit v1.2.1