From a87703788e1c881173b4f09b41cc38dc30ced07f Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 16 Sep 2001 12:59:00 +0000 Subject: Various changes git-svn-id: file:///svn/phpbb/trunk@1047 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 39 +++++++++++++++++++------------------- phpBB/language/lang_english.php | 3 ++- phpBB/modcp.php | 23 ++++++++++++++-------- phpBB/templates/PSO/modcp_move.tpl | 13 +++++++++++++ 4 files changed, 50 insertions(+), 28 deletions(-) create mode 100644 phpBB/templates/PSO/modcp_move.tpl (limited to 'phpBB') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ecc1727452..155259cddf 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -182,43 +182,44 @@ function make_jumpbox() return($boxstring); } -function make_forum_box($box_name, $default_forum = -1) +// +// Simple version of jumpbox, just lists authed forums +// +function make_forum_select($box_name) { - global $db; + global $db, $userdata; - $limit_forums = ""; + $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata); $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)) + if( !$q_forums = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql); } - $total_forums = $db->sql_numrows($q_forums); - $forum_rows = $db->sql_fetchrowset($q_forums); - $boxstring = '' . $forum_list . ''; } - return($boxstring); + return($forum_list); } + // // Initialise user settings on page load function init_userprefs($userdata) diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index a9b1c6d00a..1ac21588f6 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -605,7 +605,7 @@ $lang['Not_Authorised'] = "Not Authorised"; // Moderator Control Panel // $lang['Mod_CP'] = "Moderator Control Panel"; -$lang['Mod_CP_explain'] = "Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics"; +$lang['Mod_CP_explain'] = "Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics. If this forum is defined as private in some way you can also modify which users can and cannot access it."; $lang['Select'] = "Select"; $lang['Delete'] = "Delete"; $lang['Move'] = "Move"; @@ -620,6 +620,7 @@ $lang['Confirm_delete_topic'] = "Are you sure you want to remove the selected to $lang['Confirm_lock_topic'] = "Are you sure you want to lock the selected topic/s?"; $lang['Confirm_unlock_topic'] = "Are you sure you want to unlock the selected topic/s?"; $lang['Confirm_move_topic'] = "Are you sure you want to move the selected topic/s?"; +$lang['Move_to_forum'] = "Move to forum"; $lang['Split_Topic'] = "Split Topic Control Panel"; $lang['Split_Topic_explain'] = "Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post"; $lang['Split_title'] = "New topic title"; diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 3371c2fa2f..f03363c457 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -455,11 +455,10 @@ switch($mode) { if( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) ) { - message_die(GENERAL_MESSAGE, $lang['None_selected'], $lang['Error']); + message_die(GENERAL_MESSAGE, $lang['None_selected']); } $hidden_fields = ''; - $hidden_fields .= $lang['New_forum'] . ': ' . make_forum_box('new_forum'). '

'; if( isset($HTTP_POST_VARS['topic_id_list']) ) { @@ -478,17 +477,22 @@ switch($mode) // Set template files // $template->set_filenames(array( - "confirm" => "confirm_body.tpl") + "movetopic" => "modcp_move.tpl") ); $template->assign_vars(array( "MESSAGE_TITLE" => $lang['Confirm'], "MESSAGE_TEXT" => $lang['Confirm_move_topic'], + + "L_MOVE_TO_FORUM" => $lang['Move_to_forum'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], - "S_CONFIRM_ACTION" => append_sid("modcp.$phpEx"), - "S_HIDDEN_FIELDS" => $hidden_fields)); - $template->pparse("confirm"); + + "S_FORUM_BOX" => make_forum_select("new_forum"), + "S_MODCP_ACTION" => append_sid("modcp.$phpEx"), + "S_HIDDEN_FIELDS" => $hidden_fields) + ); + $template->pparse("movetopic"); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); @@ -691,7 +695,7 @@ switch($mode) $topic_time = time(); $sql = "INSERT INTO " . TOPICS_TABLE . " - (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) + (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) VALUES ('$post_subject', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")"; if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION)) { @@ -779,7 +783,7 @@ switch($mode) "S_SPLIT_ACTION" => append_sid("modcp.$phpEx"), "S_HIDDEN_FIELDS" => $s_hidden_fields, - "FORUM_INPUT" => make_forum_box("new_forum_id", $forum_id)) + "FORUM_INPUT" => make_forum_select("new_forum_id", $forum_id)) ); for($i = 0; $i < $total_posts; $i++) @@ -968,6 +972,9 @@ switch($mode) break; + case 'auth': + break; + default: $template->assign_vars(array( "L_MOD_CP" => $lang['Mod_CP'], diff --git a/phpBB/templates/PSO/modcp_move.tpl b/phpBB/templates/PSO/modcp_move.tpl new file mode 100644 index 0000000000..9527fc5df8 --- /dev/null +++ b/phpBB/templates/PSO/modcp_move.tpl @@ -0,0 +1,13 @@ + +
+ + + +
+ + + + + + +
{MESSAGE_TITLE}

{L_MOVE_TO_FORUM}   {S_FORUM_BOX}

{MESSAGE_TEXT}


{S_HIDDEN_FIELDS}  

-- cgit v1.2.1