|
From: Paul S. O. <ps...@us...> - 2002-05-12 00:47:44
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv6987
Modified Files:
Tag: phpBB-2_0_0
common.php modcp.php privmsg.php viewtopic.php
Log Message:
Loads of bug fixes and updates
Index: common.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/common.php,v
retrieving revision 1.74
retrieving revision 1.74.2.1
diff -C2 -r1.74 -r1.74.2.1
*** common.php 18 Mar 2002 23:45:24 -0000 1.74
--- common.php 12 May 2002 00:47:40 -0000 1.74.2.1
***************
*** 171,184 ****
$sql = "SELECT *
FROM " . CONFIG_TABLE;
! if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
! else
{
! while($row = $db->sql_fetchrow($result))
! {
! $board_config[$row['config_name']] = $row['config_value'];
! }
}
--- 171,182 ----
$sql = "SELECT *
FROM " . CONFIG_TABLE;
! if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
!
! while ( $row = $db->sql_fetchrow($result) )
{
! $board_config[$row['config_name']] = $row['config_value'];
}
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/modcp.php,v
retrieving revision 1.71.2.1
retrieving revision 1.71.2.2
diff -C2 -r1.71.2.1 -r1.71.2.2
*** modcp.php 7 Apr 2002 14:59:33 -0000 1.71.2.1
--- modcp.php 12 May 2002 00:47:40 -0000 1.71.2.2
***************
*** 331,335 ****
{
// Not confirmed, show confirmation message
-
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
--- 331,334 ----
***************
*** 382,385 ****
--- 381,389 ----
if ( $confirm )
{
+ if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
+ {
+ message_die(GENERAL_MESSAGE, $lang['None_selected']);
+ }
+
$new_forum_id = $HTTP_POST_VARS['new_forum'];
$old_forum_id = $forum_id;
***************
*** 521,524 ****
--- 525,533 ----
case 'lock':
+ if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
+ {
+ message_die(GENERAL_MESSAGE, $lang['None_selected']);
+ }
+
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
***************
*** 560,563 ****
--- 569,577 ----
case 'unlock':
+ if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
+ {
+ message_die(GENERAL_MESSAGE, $lang['None_selected']);
+ }
+
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
***************
*** 859,863 ****
WHERE poster_id = $poster_id
GROUP BY poster_ip
! ORDER BY postings DESC";
if ( !($result = $db->sql_query($sql)) )
{
--- 873,877 ----
WHERE poster_id = $poster_id
GROUP BY poster_ip
! ORDER BY " . (( SQL_LAYER == 'msaccess' ) ? 'COUNT(*)' : 'postings' ) . " DESC";
if ( !($result = $db->sql_query($sql)) )
{
***************
*** 906,910 ****
AND p.poster_ip = '" . $post_row['poster_ip'] . "'
GROUP BY u.user_id, u.username
! ORDER BY postings DESC";
if ( !($result = $db->sql_query($sql)) )
{
--- 920,924 ----
AND p.poster_ip = '" . $post_row['poster_ip'] . "'
GROUP BY u.user_id, u.username
! ORDER BY " . (( SQL_LAYER == 'msaccess' ) ? 'COUNT(*)' : 'postings' ) . " DESC";
if ( !($result = $db->sql_query($sql)) )
{
***************
*** 1004,1013 ****
{
$folder_img = $images['folder_announce'];
! $folder_alt = $lang['Announcement'];
}
else if ( $row['topic_type'] == POST_STICKY )
{
$folder_img = $images['folder_sticky'];
! $folder_alt = $lang['Sticky'];
}
else
--- 1018,1027 ----
{
$folder_img = $images['folder_announce'];
! $folder_alt = $lang['Topic_Announcement'];
}
else if ( $row['topic_type'] == POST_STICKY )
{
$folder_img = $images['folder_sticky'];
! $folder_alt = $lang['Topic_Sticky'];
}
else
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.96.2.2
retrieving revision 1.96.2.3
diff -C2 -r1.96.2.2 -r1.96.2.3
*** privmsg.php 7 Apr 2002 13:33:51 -0000 1.96.2.2
--- privmsg.php 12 May 2002 00:47:40 -0000 1.96.2.3
***************
*** 1800,1839 ****
// Define correct icons
//
! if ( $folder == 'inbox' )
{
! $post_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0"></a>';
! $reply_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=reply&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['Post_reply_pm'] . '" border="0"></a>';
! $quote_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=quote&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['Post_quote_pm'] . '" border="0"></a>';
! $edit_pm_img = '';
!
! $l_box_name = $lang['Inbox'];
! }
! else if ( $folder == 'outbox' )
! {
! $post_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0"></a>';
! $reply_pm_img = '';
! $quote_pm_img = '';
! $edit_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=edit&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_editmsg'] . '" alt="' . $lang['Edit_pm'] . '" border="0"></a>';
!
! $l_box_name = $lang['Outbox'];
! }
! else if ( $folder == 'savebox' )
! {
! $post_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0"></a>';
! $reply_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=reply&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['Post_reply_pm'] . '" border="0"></a>';
! $quote_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=quote&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['Post_quote_pm'] . '" border="0"></a>';
! $edit_pm_img = '';
!
! $l_box_name = $lang['Savedbox'];
! }
! else if ( $folder == 'sentbox' )
! {
! $post_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0"></a>';
! $reply_pm_img = '';
! $quote_pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=quote&" . POST_POST_URL . "=$privmsg_id") . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['Post_quote_pm'] . '" border="0"></a>';
! $edit_pm_img = '';
!
! $l_box_name = $lang['Sentbox'];
}
//
--- 1800,1821 ----
// Define correct icons
//
! switch ( $folder )
{
! case 'inbox':
! $l_box_name = $lang['Inbox'];
! break;
! case 'outbox':
! $l_box_name = $lang['Outbox'];
! break;
! case 'savebox':
! $l_box_name = $lang['Savedbox'];
! break;
! case 'sentbox':
! $l_box_name = $lang['Sentbox'];
! break;
}
+ $post_pm = append_sid("privmsg.$phpEx?mode=post");
+ $post_pm_img = '<a href="' . $post_pm . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0"></a>';
+ $post_pm = '<a href="' . $post_pm . '">' . $lang['Post_new_pm'] . '</a>';
//
***************
*** 1842,1869 ****
if ( $folder != 'outbox' )
{
! if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
! {
! $inbox_limit_pct = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100);
! }
! else
! {
! $inbox_limit_pct = 100;
! }
! if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
! {
! $inbox_limit_img_length = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']);
! }
! else
! {
! $inbox_limit_img_length = $board_config['privmsg_graphic_length'];
! }
! if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
! {
! $inbox_limit_remain = $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total;
! }
! else
! {
! $inbox_limit_remain = 0;
! }
$template->assign_block_vars('switch_box_size_notice', array());
--- 1824,1830 ----
if ( $folder != 'outbox' )
{
! $inbox_limit_pct = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100) : 100;
! $inbox_limit_img_length = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']) : $board_config['privmsg_graphic_length'];
! $inbox_limit_remain = ( $board_config['max_' . $folder . '_privmsgs'] > 0 ) ? $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total : 0;
$template->assign_block_vars('switch_box_size_notice', array());
***************
*** 1901,1904 ****
--- 1862,1866 ----
'POST_PM_IMG' => $post_pm_img,
+ 'POST_PM' => $post_pm,
'INBOX_LIMIT_IMG_WIDTH' => $inbox_limit_img_length,
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.186.2.1
retrieving revision 1.186.2.2
diff -C2 -r1.186.2.1 -r1.186.2.2
*** viewtopic.php 5 Apr 2002 15:11:29 -0000 1.186.2.1
--- viewtopic.php 12 May 2002 00:47:40 -0000 1.186.2.2
***************
*** 322,329 ****
$min_post_time = time() - ($post_days * 86400);
! $sql = "SELECT COUNT(post_id) AS num_posts
! FROM " . POSTS_TABLE . "
! WHERE topic_id = $topic_id
! AND post_time >= $min_post_time";
if ( !($result = $db->sql_query($sql)) )
{
--- 322,330 ----
$min_post_time = time() - ($post_days * 86400);
! $sql = "SELECT COUNT(p.post_id) AS num_posts
! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
! WHERE t.topic_id = $topic_id
! AND p.topic_id = t.topic_id
! AND p.post_time >= $min_post_time";
if ( !($result = $db->sql_query($sql)) )
{
|