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 = '
';
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 @@
+
+