diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-11 02:21:52 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-11 02:21:52 +0000 |
commit | 1e11060934f95a1e347179f95497544ddbc29592 (patch) | |
tree | 1efceb3a724470e202cfb0a52c23403524294768 | |
parent | 8f6866beaa823f6724fdb4916238449ac35361a5 (diff) | |
download | forums-1e11060934f95a1e347179f95497544ddbc29592.tar forums-1e11060934f95a1e347179f95497544ddbc29592.tar.gz forums-1e11060934f95a1e347179f95497544ddbc29592.tar.bz2 forums-1e11060934f95a1e347179f95497544ddbc29592.tar.xz forums-1e11060934f95a1e347179f95497544ddbc29592.zip |
More updates for Euclid, minor update to subSilver, fixed bug #490798
git-svn-id: file:///svn/phpbb/trunk@1550 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/functions.php | 4 | ||||
-rw-r--r-- | phpBB/language/lang_english/lang_main.php | 5 | ||||
-rw-r--r-- | phpBB/modcp.php | 124 | ||||
-rw-r--r-- | phpBB/templates/Euclid/modcp_split.tpl | 113 | ||||
-rw-r--r-- | phpBB/templates/subSilver/modcp_split.tpl | 10 |
5 files changed, 159 insertions, 97 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8d5915368c..01ef706e13 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -200,7 +200,7 @@ function make_jumpbox($match_forum_id = 0) // // Simple version of jumpbox, just lists authed forums // -function make_forum_select($box_name) +function make_forum_select($box_name, $ignore_forum = false) { global $db, $userdata; @@ -217,7 +217,7 @@ function make_forum_select($box_name) $forum_list = ""; while( $row = $db->sql_fetchrow($q_forums) ) { - if( $is_auth_ary[$row['forum_id']]['auth_read'] ) + if( $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] ) { $forum_list .= "<option value=\"" . $row['forum_id'] . "\">" . $row['forum_name'] . "</option>"; } diff --git a/phpBB/language/lang_english/lang_main.php b/phpBB/language/lang_english/lang_main.php index f7e8cd541c..815ef56dbf 100644 --- a/phpBB/language/lang_english/lang_main.php +++ b/phpBB/language/lang_english/lang_main.php @@ -46,7 +46,6 @@ $lang['Forum'] = "Forum"; $lang['Category'] = "Category"; $lang['Topic'] = "Topic"; $lang['Topics'] = "Topics"; -$lang['Reply'] = "Reply"; $lang['Replies'] = "Replies"; $lang['Views'] = "Views"; $lang['Post'] = "Post"; @@ -82,7 +81,6 @@ $lang['No'] = "No"; $lang['Enabled'] = "Enabled"; $lang['Disabled'] = "Disabled"; $lang['Error'] = "Error"; -$lang['Success'] = "Success"; $lang['Next'] = "Next"; $lang['Previous'] = "Previous"; @@ -305,7 +303,6 @@ $lang['Confirm_delete_poll'] = "Are you sure you want to delete this poll?"; $lang['Flood_Error'] = "You cannot make another post so soon after your last, please try again in a short while"; $lang['Empty_subject'] = "You must specify a subject when posting a new topic"; $lang['Empty_message'] = "You must enter a message when posting"; -$lang['Announce_and_sticky'] = "You cannot post a topic that is both an announcement and a sticky topic"; $lang['Forum_locked'] = "This forum is locked you cannot post, reply to or edit topics"; $lang['Topic_locked'] = "This topic is locked you cannot edit posts or make replies"; $lang['No_post_id'] = "You must select a post to edit"; @@ -715,7 +712,6 @@ $lang['You_been_banned'] = "You have been banned from this forum<br />Please con // // Viewonline // -$lang['Who_is_online'] = "Who is online"; $lang['Reg_users_online'] = "There are %d Registered and "; // There ae 5 Registered and $lang['Hidden_users_online'] = "%d Hidden users online"; // 6 Hidden users online $lang['Guest_users_online'] = "There are %d Guest users online"; // There are 10 Guest users online @@ -754,6 +750,7 @@ $lang['Topics_Removed'] = "The selected topics have been successfully removed fr $lang['Topics_Locked'] = "The selected topics have been locked"; $lang['Topics_Moved'] = "The selected topics have been moved"; $lang['Topics_Unlocked'] = "The selected topics have been unlocked"; +$lang['No_Topics_Moved'] = "No topics were moved"; $lang['Confirm_delete_topic'] = "Are you sure you want to remove the selected topic/s?"; $lang['Confirm_lock_topic'] = "Are you sure you want to lock the selected topic/s?"; diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 0c3ed4d080..8ea50ae0a8 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -489,85 +489,94 @@ switch($mode) { $new_forum_id = $HTTP_POST_VARS['new_forum']; $old_forum_id = $forum_id; - $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id); - $topic_list = ""; - for($i = 0; $i < count($topics); $i++) + if( $new_forum_id != $old_forum_id ) { - if( $topic_list != "" ) + $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id); + + $topic_list = ""; + for($i = 0; $i < count($topics); $i++) { - $topic_list .= ", "; + if( $topic_list != "" ) + { + $topic_list .= ", "; + } + $topic_list .= $topics[$i]; } - $topic_list .= $topics[$i]; - } - $sql_select = "SELECT * - FROM " . TOPICS_TABLE . " - WHERE topic_id IN ($topic_list)"; + $sql_select = "SELECT * + FROM " . TOPICS_TABLE . " + WHERE topic_id IN ($topic_list)"; - if( !$result = $db->sql_query($sql_select, BEGIN_TRANSACTION) ) - { - message_die(GENERAL_ERROR, "Could not select from topic table!", "Error", __LINE__, __FILE__, $sql_select); - } + if( !$result = $db->sql_query($sql_select, BEGIN_TRANSACTION) ) + { + message_die(GENERAL_ERROR, "Could not select from topic table!", "Error", __LINE__, __FILE__, $sql_select); + } - $row = $db->sql_fetchrowset($result); + $row = $db->sql_fetchrowset($result); - for($i = 0; $i < count($row); $i++) - { - $topic_id = $row[$i]['topic_id']; - - if( isset($HTTP_POST_VARS['move_leave_shadow']) ) + for($i = 0; $i < count($row); $i++) { - // Insert topic in the old forum that indicates that the forum has moved. - $sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_last_post_id, topic_moved_id) - VALUES ($old_forum_id, '" . addslashes($row[$i]['topic_title']) . "', '" . $row[$i]['topic_poster'] . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)"; + $topic_id = $row[$i]['topic_id']; + + if( isset($HTTP_POST_VARS['move_leave_shadow']) ) + { + // Insert topic in the old forum that indicates that the forum has moved. + $sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_last_post_id, topic_moved_id) + VALUES ($old_forum_id, '" . addslashes($row[$i]['topic_title']) . "', '" . $row[$i]['topic_poster'] . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)"; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Could not insert shadow topic", "Error", __LINE__, __FILE__, $sql); + } + } + + $sql = "UPDATE " . TOPICS_TABLE . " + SET forum_id = $new_forum_id + WHERE topic_id = $topic_id"; if( !$result = $db->sql_query($sql) ) { - message_die(GENERAL_ERROR, "Could not insert shadow topic", "Error", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not update old topic", "Error", __LINE__, __FILE__, $sql); } - } - $sql = "UPDATE " . TOPICS_TABLE . " - SET forum_id = $new_forum_id - WHERE topic_id = $topic_id"; - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Could not update old topic", "Error", __LINE__, __FILE__, $sql); + $sql = "UPDATE " . POSTS_TABLE . " + SET forum_id = $new_forum_id + WHERE topic_id = $topic_id"; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Could not update post topic ids", "Error", __LINE__, __FILE__, $sql); + } } - $sql = "UPDATE " . POSTS_TABLE . " - SET forum_id = $new_forum_id - WHERE topic_id = $topic_id"; - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Could not update post topic ids", "Error", __LINE__, __FILE__, $sql); - } - } + // Sync the forum indexes + sync("forum", $new_forum_id); + sync("forum", $old_forum_id); - // Sync the forum indexes - sync("forum", $new_forum_id); - sync("forum", $old_forum_id); + $message = $lang['Topics_Moved'] . "<br /><br />"; + + } + else + { + $message = $lang['No_Topics_Moved'] . "<br /><br />"; + } if( !empty($topic_id) ) { $redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); - $message = sprintf($lang['Click_return_topic'], "<a href=\"$redirect_page\">", "</a>"); + $message .= sprintf($lang['Click_return_topic'], "<a href=\"$redirect_page\">", "</a>"); } else { $redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id"); - $message = sprintf($lang['Click_return_modcp'], "<a href=\"$redirect_page\">", "</a>"); + $message .= sprintf($lang['Click_return_modcp'], "<a href=\"$redirect_page\">", "</a>"); } - $return_forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id"); - $returnforum = sprintf($lang['Click_return_forum'], "<a href=\"$return_forum_url\">", "</a>"); - $message = $message . "<br \><br \>$returnforum"; + $message = $message . "<br \><br \>" . sprintf($lang['Click_return_forum'], "<a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id") . "\">", "</a>"); $template->assign_vars(array( "META" => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">') ); - message_die(GENERAL_MESSAGE, $lang['Topics_Moved'] . "<br /><br />" . $message); + message_die(GENERAL_MESSAGE, $message); } else { @@ -608,7 +617,7 @@ switch($mode) "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], - "S_FORUM_BOX" => make_forum_select("new_forum"), + "S_FORUM_BOX" => make_forum_select("new_forum", $forum_id), "S_MODCP_ACTION" => append_sid("modcp.$phpEx"), "S_HIDDEN_FIELDS" => $hidden_fields) ); @@ -739,7 +748,7 @@ switch($mode) $new_topic_id = $db->sql_nextid(); - if($HTTP_POST_VARS['split_type_all']) + if( $HTTP_POST_VARS['split_type_all'] ) { $post_id_sql = ""; for($i = 0; $i < count($posts); $i++) @@ -755,7 +764,7 @@ switch($mode) SET topic_id = $new_topic_id WHERE post_id IN ($post_id_sql)"; } - else if($HTTP_POST_VARS['split_type_beyond']) + else if( $HTTP_POST_VARS['split_type_beyond'] ) { $sql = "UPDATE " . POSTS_TABLE . " SET topic_id = $new_topic_id @@ -818,11 +827,16 @@ switch($mode) "L_SUBMIT" => $lang['Submit'], "L_SPLIT_AFTER" => $lang['Split_after'], "L_POST_SUBJECT" => $lang['Post_subject'], + "L_MARK_ALL" => $lang['Mark_all'], + "L_UNMARK_ALL" => $lang['Unmark_all'], + + "FORUM_NAME" => $forum_name, + + "U_VIEW_FORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"), "S_SPLIT_ACTION" => append_sid("modcp.$phpEx"), "S_HIDDEN_FIELDS" => $s_hidden_fields, - - "FORUM_INPUT" => make_forum_select("new_forum_id", $forum_id)) + "S_FORUM_SELECT" => make_forum_select("new_forum_id")) ); for($i = 0; $i < $total_posts; $i++) @@ -869,7 +883,7 @@ switch($mode) $message = make_clickable($message); - if($board_config['allow_smilies'] && $postrow[$i]['enable_smilies']) + if( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] ) { $message = smilies_pass($message); } @@ -1155,4 +1169,4 @@ switch($mode) include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?> +?>
\ No newline at end of file diff --git a/phpBB/templates/Euclid/modcp_split.tpl b/phpBB/templates/Euclid/modcp_split.tpl index f26f3b959f..4949f16ffd 100644 --- a/phpBB/templates/Euclid/modcp_split.tpl +++ b/phpBB/templates/Euclid/modcp_split.tpl @@ -1,12 +1,30 @@ -<form method="post" action="{S_SPLIT_ACTION}"><table width="98%" cellspacing="0" cellpadding="4" border="0" align="center"> + +<script language="Javascript" type="text/javascript"> +<!-- + // + // Should really check the browser to stop this whining ... + // + function select_switch(status) + { + for (i = 0; i < document.split_list.length; i++) + { + document.split_list.elements[i].checked = status; + } + } +//--> +</script> + +<form action="{S_SPLIT_ACTION}" method="post" name="split_list"> + +<table width="98%" cellspacing="0" cellpadding="4" border="0" align="center"> <tr> - <td align="left" valign="bottom" nowrap><span class="gensmall"><a href="{U_INDEX}">{SITENAME} {L_INDEX}</a> -> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> - </tr> + <td align="left" valign="bottom" nowrap><span class="gensmall"><a href="{U_INDEX}">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td> + </tr> </table> -<table width="98%" cellpadding="1" cellspacing="0" border="0" align="center"> +<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center"> <tr> - <td class="tablebg"><table width="100%" cellpadding="4" cellspacing="1" border="0"> + <td class="tablebg"><table width="100%" cellspacing="1" cellpadding="4" border="0"> <tr> <td class="cat" colspan="3" align="center"><span class="cattitle">{L_SPLIT_TOPIC}</span><br /><span class="gensmall">{L_SPLIT_TOPIC_EXPLAIN}</span></td> </tr> @@ -16,62 +34,97 @@ </tr> <tr> <td class="row1"><span class="gen">{L_SPLIT_FORUM}</span></td> - <td class="row2" colspan="2"><span class="courier">{FORUM_INPUT}</span></td> + <td class="row2" colspan="2"><span class="courier">{S_FORUM_SELECT}</span></td> </tr> <tr> - <td class="cat" colspan="3"><table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> - <tr> - <td width="50%" align="center"><input class="button" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"></td> - <td width="50%" align="center"><input class="button" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td> - </tr> - </table></td> + <td class="cat" colspan="3" height="30" align="center"><input class="liteoptiontable" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"> <input class="liteoptiontable" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td> </tr> <tr> - <th>{L_AUTHOR}</th> - <th>{L_MESSAGE}</th> - <th>{L_SELECT}</th> + <th width="160" height="25"><table width="160" cellspacing="0" cellpadding="0" border="0"> + <tr> + <th>{L_AUTHOR}</th> + </tr> + </table></th> + <th width="100%" height="25"><table width="100%" cellspacing="0" cellpadding="0" border="0"> + <tr> + <th width="95%">{L_MESSAGE}</th> + </tr> + </table></th> </tr> - <!-- BEGIN postrow --> + </table></td> + </tr> + <tr> + <td class="cat" height="2"><img src="images/spacer.gif" height="2"></td> + </tr> +</table> + +<!-- BEGIN postrow --> +<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center"> + <tr> + <td class="tablebg"><table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="{postrow.ROW_COLOR}"> - <td align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><table width="170" cellspacing="0" cellpadding="0" border="0"> + <td width="160" align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><table width="160" cellspacing="0" cellpadding="0" border="0"> <tr> - <td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span><br /></td> + <td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span></td> </tr> </table></td> <td width="100%" valign="top"><table width="100%" cellspacing="1" cellpadding="0" border="0"> <tr> <td valign="top"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> - <td valign="middle"><img src="images/icon_minipost.gif" alt="Post image icon" /><span class="gensmall">{L_POSTED}: {postrow.POST_DATE} {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> - </tr> - <tr> - <td colspan="2"><hr /></td> + <td valign="middle"><span class="gensmall">{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> </tr> </table></td> </tr> <tr> - <td width="100%" height="100%" valign="top"><span class="gen">{postrow.MESSAGE}</span></td> + <td width="100%" height="100%" valign="top"><hr /><span class="gen">{postrow.MESSAGE}</span></td> </tr> </table></td> - <td width="5%" align="center"> <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}"> </td> </tr> - <!-- END postrow --> - <tr> - <td class="cat" colspan="3"><table width="60%" cellspacing="0" cellpadding="0" border="0" align="center"> + <tr bgcolor="{postrow.ROW_COLOR}"> + <td align="left" valign="middle"><table cellspacing="0" cellpadding="0" border="0"> <tr> - <td width="50%" align="center"><input class="button" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"></td> - <td width="50%" align="center"><input class="button" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td> + <td valign="middle"><a href="#top"><img src="templates/Euclid/images/topic.gif" border="0" alt="" /></a></td> + <td> </td> + <td valign="middle"><span class="gensmall">{postrow.POST_DATE}</span></td> </tr> </table></td> + <td valign="middle"><table width="100%" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td align="right" valign="middle"><span class="gen">{L_SELECT}: <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></span></td> + </tr> + </table></td> + </tr> + </table></td> + </tr> + <tr> + <td class="cat" height="2"><img src="images/spacer.gif" height="2"></td> + </tr> +</table> +<!-- END postrow --> + +<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center"> + <tr> + <td class="tablebg"><table width="100%" cellspacing="1" cellpadding="4" border="0"> + <tr> + <td class="cat" colspan="3" height="30" align="center"><input class="liteoptiontable" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"> <input class="liteoptiontable" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td> </tr> </table></td> </tr> </table> -{S_HIDDEN_FIELDS}</form> +<table width="98%" cellspacing="0" cellpadding="4" border="0" align="center"> + <tr> + <td align="right"><span class="gensmall"><a href="javascript:select_switch(true);">{L_MARK_ALL}</a> :: <a href="javascript:select_switch(false);">{L_UNMARK_ALL}</a></span></td> + </tr> +</table> <table cellspacing="2" border="0" width="98%" align="center"> <tr> <td width="40%"><span class="gensmall"><b>{S_TIMEZONE}</b></span></td> </tr> </table> + +{S_HIDDEN_FIELDS} + +</form> diff --git a/phpBB/templates/subSilver/modcp_split.tpl b/phpBB/templates/subSilver/modcp_split.tpl index b61505e65c..6cca35f5a6 100644 --- a/phpBB/templates/subSilver/modcp_split.tpl +++ b/phpBB/templates/subSilver/modcp_split.tpl @@ -21,7 +21,7 @@ </tr> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td> - <td class="row2" colspan="2"><span class="courier">{FORUM_INPUT}</span></td> + <td class="row2" colspan="2"><span class="courier">{S_FORUM_SELECT}</span></td> </tr> <tr> <td class="cat" colspan="3" height="28"> @@ -48,19 +48,17 @@ <td width="100%" valign="top" class="{postrow.ROW_CLASS}"> <table width="100%" cellspacing="0" cellpadding="3" border="0"> <tr> - <td valign="middle"><img src="images/icon_minipost.gif" alt="Post image icon"><span class="postdetails">{L_POSTED}: + <td valign="middle"><img src="templates/subSilver/images/icon_minipost.gif" alt="Post image icon"><span class="postdetails">{L_POSTED}: {postrow.POST_DATE} {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> </tr> <tr> <td valign="top"> <hr size="1" /> - <span class="postbody">{postrow.MESSAGE}</span></td> + <span class="postbody">{postrow.MESSAGE}</span></td> </tr> </table> </td> - <td width="5%" align="center" class="{postrow.ROW_CLASS}"> - <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /> - </td> + <td width="5%" align="center" class="{postrow.ROW_CLASS}"><input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></td> </tr> <tr> <td colspan="3" height="1" class="row3"><img src="templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td> |