Фиксы багов по запросам на форуме, большое спасибо всем запостившим найденное; удаление поиска пользователей с отключенными ЛС (после r600 будет универсальная обработка для поля bf в базе данных); фикс ошибки из-за которой не учитывались сообщения пользователя в счетчике его сообщений; пара фиксов предыдущих ревизий. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@580 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-02-02 21:44:03 +00:00
commit 43b028988d
25 changed files with 193 additions and 246 deletions

View file

@ -638,27 +638,27 @@ CREATE TABLE IF NOT EXISTS `bb_cron` (
-- Дамп данных таблицы `bb_cron` -- Дамп данных таблицы `bb_cron`
-- --
INSERT INTO `bb_cron` VALUES ('', 0, 'Site backup', 'site_backup.php', 'daily', '1', '05:00:00', 10, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (1, 0, 'Site backup', 'site_backup.php', 'daily', '1', '05:00:00', 10, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 0, 'DB backup', 'db_backup.php', 'daily', '1', '05:00:00', 20, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (2, 0, 'DB backup', 'db_backup.php', 'daily', '1', '05:00:00', 20, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Avatars cleanup', 'avatars_cleanup.php', 'weekly', '1', '05:00:00', 30, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (3, 1, 'Avatars cleanup', 'avatars_cleanup.php', 'weekly', '1', '05:00:00', 30, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Board maintenance', 'bb_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (4, 1, 'Board maintenance', 'bb_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune forums', 'prune_forums.php', 'daily', NULL, '05:00:00', 50, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (5, 1, 'Prune forums', 'prune_forums.php', 'daily', NULL, '05:00:00', 50, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', NULL, '05:00:00', 60, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (6, 1, 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', NULL, '05:00:00', 60, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Logs cleanup', 'clean_log.php', 'daily', NULL, '05:00:00', 70, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (7, 1, 'Logs cleanup', 'clean_log.php', 'daily', NULL, '05:00:00', 70, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Tracker maintenance', 'tr_maintenance.php', 'daily', NULL, '05:00:00', 90, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (8, 1, 'Tracker maintenance', 'tr_maintenance.php', 'daily', NULL, '05:00:00', 90, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Clean dlstat', 'clean_dlstat.php', 'daily', NULL, '05:00:00', 100, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (9, 1, 'Clean dlstat', 'clean_dlstat.php', 'daily', NULL, '05:00:00', 100, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Prune inactive users', 'prune_inactive_users.php', 'daily', NULL, '05:00:00', 110, '', '', NULL, 1, '', 0, 1, 0); INSERT INTO `bb_cron` VALUES (10, 1, 'Prune inactive users', 'prune_inactive_users.php', 'daily', NULL, '05:00:00', 110, '', '', NULL, 1, '', 0, 1, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Sessions cleanup', 'sessions_cleanup.php', 'interval', NULL, NULL, 255, '', '', '00:03:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (11, 1, 'Sessions cleanup', 'sessions_cleanup.php', 'interval', NULL, NULL, 255, '', '', '00:03:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'DS update ''cat_forums''', 'ds_update_cat_forums.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (12, 1, 'DS update ''cat_forums''', 'ds_update_cat_forums.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'DS update ''stats''', 'ds_update_stats.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (13, 1, 'DS update ''stats''', 'ds_update_stats.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Flash topic view', 'flash_topic_view.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (14, 1, 'Flash topic view', 'flash_topic_view.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Clean search results', 'clean_search_results.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (15, 1, 'Clean search results', 'clean_search_results.php', 'interval', NULL, NULL, 255, '', '', '00:10:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', NULL, NULL, 20, '', '', '00:15:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (16, 1, 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', NULL, NULL, 20, '', '', '00:15:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', NULL, NULL, 10, '', '', '00:10:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (17, 1, 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', NULL, NULL, 10, '', '', '00:10:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', NULL, NULL, 255, '', '', '01:00:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', NULL, NULL, 255, '', '', '01:00:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES ('', 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
-- -------------------------------------------------------- -- --------------------------------------------------------

View file

@ -13,6 +13,26 @@ $confirm = request_var('confirm', '');
if ($confirm) if ($confirm)
{ {
DB()->query("
CREATE TABLE IF NOT EXISTS `bb_poll_users` (
`topic_id` int(10) unsigned NOT NULL,
`user_id` int(11) NOT NULL,
`vote_ip` varchar(32) NOT NULL,
`vote_dt` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`topic_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
");
DB()->query("
CREATE TABLE IF NOT EXISTS `bb_poll_votes` (
`topic_id` int(10) unsigned NOT NULL,
`vote_id` tinyint(4) unsigned NOT NULL,
`vote_text` varchar(255) NOT NULL,
`vote_result` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`topic_id`,`vote_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
");
DB()->query(" DB()->query("
INSERT INTO bb_poll_votes INSERT INTO bb_poll_votes
(topic_id, vote_id, vote_text, vote_result) (topic_id, vote_id, vote_text, vote_result)

View file

@ -88,10 +88,7 @@ if ($submit && $mode == 'extensions')
$extensions['_' . $extension_change_list[$i]]['group_id'] = intval($group_select_list[$i]); $extensions['_' . $extension_change_list[$i]]['group_id'] = intval($group_select_list[$i]);
} }
$sql = 'SELECT * $sql = 'SELECT * FROM ' . BB_EXTENSIONS . ' ORDER BY ext_id';
FROM ' . BB_EXTENSIONS . '
ORDER BY ext_id';
if ( !($result = DB()->sql_query($sql)) ) if ( !($result = DB()->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Couldn\'t get Extension Informations.', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Couldn\'t get Extension Informations.', '', __LINE__, __FILE__, $sql);
@ -153,7 +150,7 @@ if ($submit && $mode == 'extensions')
'ADD_EXTENSION_EXPLAIN' => $extension_explain) 'ADD_EXTENSION_EXPLAIN' => $extension_explain)
); );
if (!$error) if (!@$error)
{ {
// check extension // check extension
$sql = 'SELECT extension $sql = 'SELECT extension
@ -184,7 +181,7 @@ if ($submit && $mode == 'extensions')
} }
} }
if (!$error) if (!@$error)
{ {
$sql_ary = array( $sql_ary = array(
'group_id' => (int) $extension_group, 'group_id' => (int) $extension_group,
@ -394,7 +391,7 @@ if ($submit && $mode == 'groups')
} }
} }
if (!$error) if (!@$error)
{ {
$filesize = ($size_select == 'kb') ? round($filesize * 1024) : ( ($size_select == 'mb') ? round($filesize * 1048576) : $filesize ); $filesize = ($size_select == 'kb') ? round($filesize * 1024) : ( ($size_select == 'mb') ? round($filesize * 1048576) : $filesize );

View file

@ -19,11 +19,11 @@ $errors = $user_id_sql = array();
if (isset($_POST['submit'])) if (isset($_POST['submit']))
{ {
if(!$subject) $errors[] = $lang['EMPTY_SUBJECT']; if (!$subject) $errors[] = $lang['EMPTY_SUBJECT'];
if(!$message) $errors[] = $lang['EMPTY_MESSAGE']; if (!$message) $errors[] = $lang['EMPTY_MESSAGE'];
if(!$group_id) $errors[] = $lang['GROUP_NOT_EXIST']; if (!$group_id) $errors[] = $lang['GROUP_NOT_EXIST'];
if(!$errors) if (!$errors)
{ {
$sql = DB()->fetch_rowset("SELECT ban_userid FROM ". BB_BANLIST ." WHERE ban_userid != 0"); $sql = DB()->fetch_rowset("SELECT ban_userid FROM ". BB_BANLIST ." WHERE ban_userid != 0");
@ -76,11 +76,9 @@ if (isset($_POST['submit']))
} }
} }
// //
// Generate page // Generate page
// //
$sql = "SELECT group_id, group_name $sql = "SELECT group_id, group_name
FROM ". BB_GROUPS ." FROM ". BB_GROUPS ."
WHERE group_single_user = 0 WHERE group_single_user = 0
@ -93,7 +91,6 @@ foreach (DB()->fetch_rowset($sql) as $row)
$groups[$row['group_name']] = $row['group_id']; $groups[$row['group_name']] = $row['group_id'];
} }
$template->assign_vars(array( $template->assign_vars(array(
'MESSAGE' => $message, 'MESSAGE' => $message,
'SUBJECT' => $subject, 'SUBJECT' => $subject,

View file

@ -83,7 +83,7 @@ elseif ($mode == 'add' || $mode == 'edit')
{ {
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc) DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')"); VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')");
$message = $lang['ADEDD']; $message = $lang['ADDED'];
} }
bb_die($message); bb_die($message);

View file

@ -1118,18 +1118,6 @@ else
$select_sql .= " WHERE u.user_active = 0 $select_sql .= " WHERE u.user_active = 0
AND u.user_id <> ".GUEST_UID; AND u.user_id <> ".GUEST_UID;
break;
case 'disabled_pms':
$text = $lang['SEARCH_FOR_DISABLED_PMS'];
$total_sql .= "SELECT COUNT(user_id) AS total
FROM ".BB_USERS."
WHERE user_allow_pm = 0
AND user_id <> ".GUEST_UID;
$select_sql .= " WHERE u.user_allow_pm = 0
AND u.user_id <> ".GUEST_UID;
break; break;
default: default:
message_die(GENERAL_MESSAGE, $lang['SEARCH_INVALID']); message_die(GENERAL_MESSAGE, $lang['SEARCH_INVALID']);

View file

@ -138,7 +138,7 @@ switch($this->request['type'])
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies'])); $this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
} }
} }
DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id"); DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id LIMIT 1");
if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id']) if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id'])
{ {
DB()->query("UPDATE ". BB_POSTS ." SET post_edit_time = '". TIMENOW ."', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id LIMIT 1"); DB()->query("UPDATE ". BB_POSTS ." SET post_edit_time = '". TIMENOW ."', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id LIMIT 1");
@ -305,7 +305,7 @@ switch($this->request['type'])
user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify); user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
} }
$this->response['redirect'] = make_url(POST_URL ."$post_id#$post_id"); $this->response['redirect'] = make_url(POST_URL . "$post_id#$post_id");
break; break;
default: default:

View file

@ -54,9 +54,9 @@ $domain_name = 'torrentpier.me'; // Enter here your primary d
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
// Increase number of revision after update // Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)'; $bb_cfg['tp_version'] = '2.6 (unstable)';
$bb_cfg['tp_release_date'] = '02-02-2014'; $bb_cfg['tp_release_date'] = '02-02-2014';
$bb_cfg['tp_release_state'] = 'R579'; $bb_cfg['tp_release_state'] = 'R580';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';

View file

@ -257,6 +257,7 @@ else if (@$_POST['joingroup'])
'GROUP_MODERATOR' => $moderator['username'], 'GROUP_MODERATOR' => $moderator['username'],
'U_GROUPCP' => make_url(GROUP_URL . $group_id), 'U_GROUPCP' => make_url(GROUP_URL . $group_id),
)); ));
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
} }
@ -402,7 +403,7 @@ else
WHERE user_id = ". $group_info['group_moderator'] ." WHERE user_id = ". $group_info['group_moderator'] ."
"); ");
// Members // Members
$count_members = DB()->fetch_rowset(" $count_members = DB()->fetch_rowset("
SELECT u.username, u.user_rank, u.user_id, u.user_opt, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, ug.user_pending, ug.user_time SELECT u.username, u.user_rank, u.user_id, u.user_opt, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, ug.user_pending, ug.user_time
FROM ". BB_USER_GROUP ." ug, ". BB_USERS ." u FROM ". BB_USER_GROUP ." ug, ". BB_USERS ." u
@ -412,7 +413,7 @@ else
AND u.user_id = ug.user_id AND u.user_id = ug.user_id
ORDER BY u.username ORDER BY u.username
"); ");
$count_members = count($count_members); $count_members = count($count_members);
// Get user information for this group // Get user information for this group
$modgroup_pending_count = 0; $modgroup_pending_count = 0;
@ -514,16 +515,16 @@ else
generate_user_info($group_moderator, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time); generate_user_info($group_moderator, $bb_cfg['default_dateformat'], $is_moderator, $from, $posts, $joined, $pm, $email, $www, $user_time);
$group_type = ''; $group_type = '';
if($group_info['group_type'] == GROUP_OPEN) if ($group_info['group_type'] == GROUP_OPEN)
{ {
$group_type = $lang['GROUP_OPEN']; $group_type = $lang['GROUP_OPEN'];
} }
elseif($group_info['group_type'] == GROUP_CLOSED) elseif ($group_info['group_type'] == GROUP_CLOSED)
{ {
$group_type = $lang['GROUP_CLOSED']; $group_type = $lang['GROUP_CLOSED'];
} }
elseif($group_info['group_type'] == GROUP_HIDDEN) elseif ($group_info['group_type'] == GROUP_HIDDEN)
{ {
$group_type = $lang['GROUP_HIDDEN']; $group_type = $lang['GROUP_HIDDEN'];
} }
@ -546,7 +547,7 @@ else
'MOD_WWW' => $www, 'MOD_WWW' => $www,
'MOD_TIME' => ( !empty($group_info['group_time']) ) ? bb_date($group_info['group_time']) : $lang['NONE'], 'MOD_TIME' => ( !empty($group_info['group_time']) ) ? bb_date($group_info['group_time']) : $lang['NONE'],
'U_SEARCH_USER' => "search.php?mode=searchuser", 'U_SEARCH_USER' => "search.php?mode=searchuser",
'GROUP_TYPE' => $group_type, 'GROUP_TYPE' => $group_type,
'S_GROUP_OPEN_TYPE' => GROUP_OPEN, 'S_GROUP_OPEN_TYPE' => GROUP_OPEN,
'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED, 'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED,
'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN, 'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN,

View file

@ -272,9 +272,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
} }
else if ($post_data['first_post']) else if ($post_data['first_post'])
{ {
$sql = "SELECT MIN(post_id) AS first_post_id $sql = "SELECT MIN(post_id) AS first_post_id FROM " . BB_POSTS . " WHERE topic_id = $topic_id";
FROM " . BB_POSTS . "
WHERE topic_id = $topic_id";
if (!($result = DB()->sql_query($sql))) if (!($result = DB()->sql_query($sql)))
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
@ -290,7 +288,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
$topic_update_sql .= 'topic_replies = topic_replies - 1'; $topic_update_sql .= 'topic_replies = topic_replies - 1';
} }
} }
else if ($mode != 'poll_delete') else
{ {
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : ""); $forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
$topic_update_sql = "topic_last_post_id = $post_id, topic_last_post_time = ". TIMENOW . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id"); $topic_update_sql = "topic_last_post_id = $post_id, topic_last_post_time = ". TIMENOW . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id");
@ -304,14 +302,18 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
if ($topic_update_sql != '') if ($topic_update_sql != '')
{ {
$sql = "UPDATE " . BB_TOPICS . " SET $sql = "UPDATE " . BB_TOPICS . " SET $topic_update_sql WHERE topic_id = $topic_id";
$topic_update_sql
WHERE topic_id = $topic_id";
if (!DB()->sql_query($sql)) if (!DB()->sql_query($sql))
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
} }
$sql = "UPDATE " . BB_USERS . " SET user_posts = user_posts $sign WHERE user_id = $user_id";
if (!DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
} }
// //

View file

@ -905,7 +905,7 @@ if ($submit && !$errors)
$sql_args = DB()->build_array('UPDATE', $db_data); $sql_args = DB()->build_array('UPDATE', $db_data);
DB()->query("UPDATE ". BB_USERS ." SET $sql_args WHERE user_id = {$pr_data['user_id']}"); DB()->query("UPDATE ". BB_USERS ." SET $sql_args WHERE user_id = {$pr_data['user_id']} LIMIT 1");
if ($pr_data['user_id'] != $userdata['user_id']) if ($pr_data['user_id'] != $userdata['user_id'])
{ {

View file

@ -2703,8 +2703,7 @@ $lang['LIST_OF_PATTERNS'] = 'List of patterns';
$lang['ADD_TEMPLATE'] = 'Add the template'; $lang['ADD_TEMPLATE'] = 'Add the template';
$lang['TEMPLATE_DISABLE'] = 'Template disabled'; $lang['TEMPLATE_DISABLE'] = 'Template disabled';
$lang['FOR_NEW_TEMPLATE'] = 'for new patterns!'; $lang['FOR_NEW_TEMPLATE'] = 'for new patterns!';
$lang['ADEDD'] = 'added'; $lang['CHANGED'] = 'Changed';
$lang['CHANGED'] = 'changed';
$lang['REMOVED'] = 'Removed'; $lang['REMOVED'] = 'Removed';
$lang['QUESTION'] = 'Are you sure want to delete?'; $lang['QUESTION'] = 'Are you sure want to delete?';
$lang['NOT_CHOOSE'] = 'you do not choose'; $lang['NOT_CHOOSE'] = 'you do not choose';
@ -3138,7 +3137,6 @@ $lang['SEARCH_FOR_BANNED'] = 'Searching banned users';
$lang['SEARCH_FOR_ADMINS'] = 'Searching Administrators'; $lang['SEARCH_FOR_ADMINS'] = 'Searching Administrators';
$lang['SEARCH_FOR_MODS'] = 'Searching Moderators'; $lang['SEARCH_FOR_MODS'] = 'Searching Moderators';
$lang['SEARCH_FOR_DISABLED'] = 'Searching for disabled users'; $lang['SEARCH_FOR_DISABLED'] = 'Searching for disabled users';
$lang['SEARCH_FOR_DISABLED_PMS'] = 'Searching for users with disabled Private Messages';
$lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Searching for users with a post count greater than %d'; $lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Searching for users with a post count greater than %d';
$lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Searching for users with a post count less than %d'; $lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Searching for users with a post count less than %d';
$lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Searching for users with a post count between %d and %d'; $lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Searching for users with a post count between %d and %d';
@ -3171,7 +3169,6 @@ $lang['SEARCH_USERS_GROUPS_EXPLAIN'] = 'View all members of the selected group.'
$lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'View all carriers of the selected rank.'; $lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'View all carriers of the selected rank.';
$lang['BANNED_USERS'] = 'Banned Users'; $lang['BANNED_USERS'] = 'Banned Users';
$lang['DISABLED_USERS'] = 'Disabled Users'; $lang['DISABLED_USERS'] = 'Disabled Users';
$lang['USERS_DISABLED_PMS'] = 'Users with disabled PMs';
$lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Administrators - All users with Administrator powers; Moderators - All forum moderators; Banned Users - All accounts that have been banned on these forums; Disabled Users - All users with disabled accounts (either manually disabled or never verified their email address); Users with disabled PMs - Selects users who have the Private Messages priviliges removed (Done via User Management)'; $lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Administrators - All users with Administrator powers; Moderators - All forum moderators; Banned Users - All accounts that have been banned on these forums; Disabled Users - All users with disabled accounts (either manually disabled or never verified their email address); Users with disabled PMs - Selects users who have the Private Messages priviliges removed (Done via User Management)';
$lang['POSTCOUNT'] = 'Postcount'; $lang['POSTCOUNT'] = 'Postcount';
$lang['EQUALS'] = 'Equals'; $lang['EQUALS'] = 'Equals';

View file

@ -2718,8 +2718,7 @@ $lang['LIST_OF_PATTERNS'] = 'Список шаблонов';
$lang['ADD_TEMPLATE'] = 'Добавить шаблон'; $lang['ADD_TEMPLATE'] = 'Добавить шаблон';
$lang['TEMPLATE_DISABLE'] = 'Шаблон отключен'; $lang['TEMPLATE_DISABLE'] = 'Шаблон отключен';
$lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!'; $lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!';
$lang['ADEDD_TPL'] = 'добавлено'; $lang['CHANGED'] = 'Изменено';
$lang['CHANGED'] = 'изменено';
$lang['REMOVED'] = 'Удалено'; $lang['REMOVED'] = 'Удалено';
$lang['QUESTION'] = 'Вы уверены, что хотите удалить?'; $lang['QUESTION'] = 'Вы уверены, что хотите удалить?';
$lang['NOT_CHOOSE'] = 'вы ничего не выбрали'; $lang['NOT_CHOOSE'] = 'вы ничего не выбрали';
@ -3164,7 +3163,6 @@ $lang['SEARCH_FOR_BANNED'] = 'Поиск забаненных пользоват
$lang['SEARCH_FOR_ADMINS'] = 'Поиск администраторов'; $lang['SEARCH_FOR_ADMINS'] = 'Поиск администраторов';
$lang['SEARCH_FOR_MODS'] = 'Поиск модераторов'; $lang['SEARCH_FOR_MODS'] = 'Поиск модераторов';
$lang['SEARCH_FOR_DISABLED'] = 'Поиск отключенных пользователей'; $lang['SEARCH_FOR_DISABLED'] = 'Поиск отключенных пользователей';
$lang['SEARCH_FOR_DISABLED_PMS'] = 'Поиск пользователей с отключенными личными сообщениями';
$lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Поиск пользователей с количеством сообщений более %d'; $lang['SEARCH_FOR_POSTCOUNT_GREATER'] = 'Поиск пользователей с количеством сообщений более %d';
$lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Поиск пользователей с количеством сообщений менее %d'; $lang['SEARCH_FOR_POSTCOUNT_LESSER'] = 'Поиск пользователей с количеством сообщений менее %d';
$lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Поиск пользователей с количеством сообщений от %d до %d'; $lang['SEARCH_FOR_POSTCOUNT_RANGE'] = 'Поиск пользователей с количеством сообщений от %d до %d';
@ -3197,7 +3195,6 @@ $lang['SEARCH_USERS_GROUPS_EXPLAIN'] = 'Просмотреть всех член
$lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'Просмотреть всех носителей выбранного звания.'; $lang['SEARCH_USERS_RANKS_EXPLAIN'] = 'Просмотреть всех носителей выбранного звания.';
$lang['BANNED_USERS'] = 'Забаненные пользователи'; $lang['BANNED_USERS'] = 'Забаненные пользователи';
$lang['DISABLED_USERS'] = 'Отключенные пользователи'; $lang['DISABLED_USERS'] = 'Отключенные пользователи';
$lang['USERS_DISABLED_PMS'] = 'Пользователи с отключенными ЛС';
$lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Администраторы - все пользователи с правами администратора; Модераторы - все модераторы форумов; Забаненные пользователи - все учётные записи, запрещённые на трекере; отключенные пользователи - все пользователи с отключенными учётными записями (вручную, или не подтвердившие свой адрес email); Пользователи с отключенными ЛС - Пользователи, не имеющие права пользоваться личными сообщениями (установлено через управление пользователями)'; $lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Администраторы - все пользователи с правами администратора; Модераторы - все модераторы форумов; Забаненные пользователи - все учётные записи, запрещённые на трекере; отключенные пользователи - все пользователи с отключенными учётными записями (вручную, или не подтвердившие свой адрес email); Пользователи с отключенными ЛС - Пользователи, не имеющие права пользоваться личными сообщениями (установлено через управление пользователями)';
$lang['POSTCOUNT'] = 'Число сообщений'; $lang['POSTCOUNT'] = 'Число сообщений';
$lang['EQUALS'] = 'Равно'; $lang['EQUALS'] = 'Равно';

View file

@ -138,7 +138,7 @@ for ($i=ord('A'), $cnt=ord('Z'); $i <= $cnt; $i++)
$select_letter .= ': '; $select_letter .= ': ';
for ($i=224, $cnt=255; $i <= $cnt; $i++) for ($i=224, $cnt=255; $i <= $cnt; $i++)
{ {
$select_letter .= ($by_letter == iconv('windows-1251', 'UTF-8', chr($i))) ? '<b>'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</b>&nbsp;' : '<a class="genmed" href="'. ("memberlist.php?letter=%". strtoupper(base_convert($i, 10, 16)) ."&amp;mode=$mode&amp;order=$sort_order") .'">'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</a>&nbsp;'; $select_letter .= ($by_letter == iconv('windows-1251', 'UTF-8', chr($i))) ? '<b>'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</b>&nbsp;' : '<a class="genmed" href="'. ("memberlist.php?letter=%". strtoupper(base_convert($i, 10, 16)) ."&amp;mode=$mode&amp;order=$sort_order") .'">'. iconv('windows-1251', 'UTF-8', chr($i-32)) .'</a>&nbsp;';
} }
$select_letter .= ':&nbsp;'; $select_letter .= ':&nbsp;';
@ -152,9 +152,7 @@ $template->assign_vars(array(
)); ));
// per-letter selection end // per-letter selection end
$sql = "SELECT username, user_id, user_rank, user_opt, user_posts, user_regdate, user_from, user_website, user_email $sql = "SELECT username, user_id, user_rank, user_opt, user_posts, user_regdate, user_from, user_website, user_email FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")";
FROM ". BB_USERS ."
WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")";
if ( $username ) if ( $username )
{ {
$username = preg_replace('/\*/', '%', clean_username($username)); $username = preg_replace('/\*/', '%', clean_username($username));
@ -173,25 +171,24 @@ if ($result = DB()->fetch_rowset($sql))
$posts = $row['user_posts']; $posts = $row['user_posts'];
$pm = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. (PM_URL . "?mode=post&amp;". POST_USERS_URL ."=$user_id") .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . (PM_URL . "?mode=post&amp;". POST_USERS_URL ."=$user_id") .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>'; $pm = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. (PM_URL . "?mode=post&amp;". POST_USERS_URL ."=$user_id") .'">'. $lang['SEND_PM_TXTB'] .'</a>' : '<a href="' . (PM_URL . "?mode=post&amp;". POST_USERS_URL ."=$user_id") .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM) if (bf($row['user_opt'], 'user_opt', 'viewemail') || IS_AM)
{ {
$email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&amp;". POST_USERS_URL ."=$user_id") : 'mailto:'. $row['user_email']; $email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&amp;". POST_USERS_URL ."=$user_id") : 'mailto:'. $row['user_email'];
$email = '<a class="editable" href="'. $email_uri .'">'. $row['user_email'] .'</a>'; $email = '<a class="editable" href="'. $email_uri .'">'. $row['user_email'] .'</a>';
}
else
{
$email = '';
}
} if ($row['user_website'])
else {
{ $www = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww">'. $lang['VISIT_WEBSITE_TXTB'] .'</a>' : '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['VISIT_WEBSITE'] . '" title="' . $lang['VISIT_WEBSITE'] . '" border="0" /></a>';
$email = ''; }
} else
{
if ($row['user_website']) $www = '';
{ }
$www = ($bb_cfg['text_buttons']) ? '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww">'. $lang['VISIT_WEBSITE_TXTB'] .'</a>' : '<a class="txtb" href="'. $row['user_website'] .'" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['VISIT_WEBSITE'] . '" title="' . $lang['VISIT_WEBSITE'] . '" border="0" /></a>';
}
else
{
$www = '';
}
$row_class = !($i % 2) ? 'row1' : 'row2'; $row_class = !($i % 2) ? 'row1' : 'row2';
$template->assign_block_vars('memberrow', array( $template->assign_block_vars('memberrow', array(
@ -211,10 +208,11 @@ if ($result = DB()->fetch_rowset($sql))
} }
else else
{ {
$template->assign_block_vars('no_username', array( $template->assign_block_vars('no_username', array(
'NO_USER_ID_SPECIFIED' => $lang['NO_USER_ID_SPECIFIED'] ) 'NO_USER_ID_SPECIFIED' => $lang['NO_USER_ID_SPECIFIED'],
); ));
} }
$paginationurl = "memberlist.php?mode=$mode&amp;order=$sort_order&amp;letter=$by_letter"; $paginationurl = "memberlist.php?mode=$mode&amp;order=$sort_order&amp;letter=$by_letter";
if ($paginationusername) $paginationurl .= "&amp;username=$paginationusername"; if ($paginationusername) $paginationurl .= "&amp;username=$paginationusername";
if ( $mode != 'topten' || $bb_cfg['topics_per_page'] < 10 ) if ( $mode != 'topten' || $bb_cfg['topics_per_page'] < 10 )

View file

@ -86,7 +86,7 @@ switch ($mode)
bb_die('Вы не выбрали, за что голосуете'); bb_die('Вы не выбрали, за что голосуете');
} }
DB()->query("INSERT IGNORE INTO ". BB_POLL_USERS ." (topic_id, user_id, vote_dt) VALUES ($topic_id, {$userdata['user_id']}, ". TIMENOW .")"); DB()->query("INSERT IGNORE INTO ". BB_POLL_USERS ." (topic_id, user_id, vote_ip, vote_dt) VALUES ($topic_id, {$userdata['user_id']}, '". USER_IP ."', ". TIMENOW .")");
CACHE('bb_poll_data')->rm("poll_$topic_id"); CACHE('bb_poll_data')->rm("poll_$topic_id");

View file

@ -167,11 +167,11 @@ if ($post_info = DB()->fetch_row($sql))
if ($post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod']) if ($post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])
{ {
message_die(GENERAL_MESSAGE, $lang['FORUM_LOCKED']); message_die(GENERAL_MESSAGE, $lang['FORUM_LOCKED']);
} }
elseif ($mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod']) elseif ($mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{ {
message_die(GENERAL_MESSAGE, $lang['TOPIC_LOCKED']); message_die(GENERAL_MESSAGE, $lang['TOPIC_LOCKED']);
} }
if ($mode == 'editpost' || $mode == 'delete') if ($mode == 'editpost' || $mode == 'delete')
@ -246,21 +246,21 @@ if (!$is_auth[$is_auth_type])
if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id']) if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
{ {
if($tor_status = join(',', $bb_cfg['tor_cannot_new'])) if ($tor_status = join(',', $bb_cfg['tor_cannot_new']))
{ {
$sql = DB()->fetch_rowset("SELECT t.topic_title, t.topic_id, tor.tor_status $sql = DB()->fetch_rowset("SELECT t.topic_title, t.topic_id, tor.tor_status
FROM ". BB_BT_TORRENTS ." tor, ". BB_TOPICS ." t FROM ". BB_BT_TORRENTS ." tor, ". BB_TOPICS ." t
WHERE poster_id = {$userdata['user_id']} WHERE poster_id = {$userdata['user_id']}
AND tor.topic_id = t.topic_id AND tor.topic_id = t.topic_id
AND tor.tor_status IN ($tor_status) AND tor.tor_status IN ($tor_status)
ORDER BY tor.reg_time ORDER BY tor.reg_time
"); ");
$topics = ''; $topics = '';
foreach($sql as $row) foreach($sql as $row)
{ {
$topics .= $bb_cfg['tor_icons'][$row['tor_status']] .'<a href="'. TOPIC_URL . $row['topic_id'] .'">'. $row['topic_title'] .'</a><div class="spacer_12"></div>'; $topics .= $bb_cfg['tor_icons'][$row['tor_status']] .'<a href="'. TOPIC_URL . $row['topic_id'] .'">'. $row['topic_title'] .'</a><div class="spacer_12"></div>';
} }
if ($topics) bb_die($topics . $lang['UNEXECUTED_RELEASE']); if ($topics) bb_die($topics . $lang['UNEXECUTED_RELEASE']);
} }
require(INC_DIR .'topic_templates.php'); require(INC_DIR .'topic_templates.php');
@ -415,38 +415,38 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg) if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg)
{ {
include(INC_DIR .'functions_torrent.php'); include(INC_DIR .'functions_torrent.php');
if(!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID)) if (!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID))
{ {
if($bb_cfg['premod']) if ($bb_cfg['premod'])
{ {
// Получение списка id форумов начиная с parent // Получение списка id форумов начиная с parent
$forum_parent = $forum_id; $forum_parent = $forum_id;
if ($post_info['forum_parent']) $forum_parent = $post_info['forum_parent']; if ($post_info['forum_parent']) $forum_parent = $post_info['forum_parent'];
$count_sql = " $count_rowset = DB()->fetch_rowset("SELECT forum_id FROM ". BB_FORUMS ." WHERE forum_parent = $forum_parent");
SELECT forum_id $sub_forums = array();
FROM ". BB_FORUMS ." foreach ($count_rowset as $count_row)
WHERE forum_parent = $forum_parent {
"; if ($count_row['forum_id'] != $forum_id) $sub_forums[] = $count_row['forum_id'];
$count_rowset = DB()->fetch_rowset($count_sql); }
$sub_forums = array(); $sub_forums[] = $forum_id;
foreach ($count_rowset as $count_row) $sub_forums = join(',', $sub_forums);
{ // Подсчёт проверенных релизов в форумах раздела
if ($count_row['forum_id'] != $forum_id) $sub_forums[] = $count_row['forum_id']; $count_checked_releases = DB()->fetch_row("
} SELECT COUNT(*) AS checked_releases
$sub_forums[] = $forum_id; FROM ". BB_BT_TORRENTS ."
$sub_forums = join(',', $sub_forums); WHERE poster_id = ". $userdata['user_id'] ."
// Подсчёт проверенных релизов в форумах раздела AND forum_id IN($sub_forums)
$count_checked_releases = DB()->fetch_row(" AND tor_status IN(". TOR_APPROVED .",". TOR_DOUBTFUL .",". TOR_TMP .")
SELECT COUNT(*) AS checked_releases LIMIT 1
FROM ". BB_BT_TORRENTS ." ", 'checked_releases');
WHERE poster_id = ". $userdata['user_id'] ." if ($count_checked_releases || IS_AM)
AND forum_id IN($sub_forums) {
AND tor_status IN(". TOR_APPROVED .",". TOR_DOUBTFUL .",". TOR_TMP .") tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED);
LIMIT 1 }
", 'checked_releases'); else
{
if ($count_checked_releases || IS_AM) tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED); tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_PREMOD);
else tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_PREMOD); }
} }
else tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED); else tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_NOT_APPROVED);
} }
@ -467,7 +467,7 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
} }
} }
if( $refresh || $error_msg || ($submit && $topic_has_new_posts) ) if ($refresh || $error_msg || ($submit && $topic_has_new_posts))
{ {
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : ''; $username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : ''; $subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
@ -518,7 +518,7 @@ else
define('WORD_LIST_OBTAINED', TRUE); define('WORD_LIST_OBTAINED', TRUE);
} }
if($post_info['post_attachment'] && !IS_AM) $message = $post_info['topic_title']; if ($post_info['post_attachment'] && !IS_AM) $message = $post_info['topic_title'];
// Use trim to get rid of spaces placed there by MS-SQL 2000 // Use trim to get rid of spaces placed there by MS-SQL 2000
$quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username']; $quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];
@ -528,10 +528,10 @@ else
// hide sid // hide sid
$message = preg_replace('#(?<=[\?&;]sid=)[a-zA-Z0-9]{12}#', 'sid', $message); $message = preg_replace('#(?<=[\?&;]sid=)[a-zA-Z0-9]{12}#', 'sid', $message);
if ( !empty($orig_word) ) if (!empty($orig_word))
{ {
$subject = ( !empty($subject) ) ? preg_replace($orig_word, $replace_word, $subject) : ''; $subject = (!empty($subject)) ? preg_replace($orig_word, $replace_word, $subject) : '';
$message = ( !empty($message) ) ? preg_replace($orig_word, $replace_word, $message) : ''; $message = (!empty($message)) ? preg_replace($orig_word, $replace_word, $message) : '';
} }
if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0 ) if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0 )
@ -560,9 +560,7 @@ if (IS_GUEST || ($mode == 'editpost' && $post_info['poster_id'] == GUEST_UID))
$template->assign_var('POSTING_USERNAME'); $template->assign_var('POSTING_USERNAME');
} }
//
// Notify checkbox // Notify checkbox
//
if (!IS_GUEST) if (!IS_GUEST)
{ {
if ($mode != 'editpost' || ($mode == 'editpost' && $post_info['poster_id'] != GUEST_UID)) if ($mode != 'editpost' || ($mode == 'editpost' && $post_info['poster_id'] != GUEST_UID))
@ -571,9 +569,7 @@ if (!IS_GUEST)
} }
} }
//
// Topic type selection // Topic type selection
//
$topic_type_toggle = ''; $topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{ {
@ -616,7 +612,7 @@ if ($post_info['allow_reg_tracker'] && $post_data['first_post'] && ($topic_dl_ty
WHERE p.post_id = $post_id WHERE p.post_id = $post_id
"; ";
$result = DB()->fetch_row($sql); $result = DB()->fetch_row($sql);
if(!empty($result['attach_id'])) if (!empty($result['attach_id']))
{ {
if (!$topic_type_toggle) if (!$topic_type_toggle)
{ {
@ -669,9 +665,7 @@ $template->set_filenames(array(
'body' => 'posting.tpl', 'body' => 'posting.tpl',
)); ));
//
// Output the data to the template // Output the data to the template
//
$template->assign_vars(array( $template->assign_vars(array(
'FORUM_NAME' => htmlCHR($forum_name), 'FORUM_NAME' => htmlCHR($forum_name),
'PAGE_TITLE' => $page_title, 'PAGE_TITLE' => $page_title,
@ -708,9 +702,7 @@ if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
)); ));
} }
//
// Topic review // Topic review
//
if( $mode == 'reply' && $is_auth['auth_read'] ) if( $mode == 'reply' && $is_auth['auth_read'] )
{ {
topic_review($topic_id); topic_review($topic_id);

View file

@ -1100,7 +1100,7 @@ else if ( $submit || $refresh || $mode != '' )
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
} }
cache_rm_user_sessions ($to_userdata['user_id']); cache_rm_user_sessions ($to_userdata['user_id']);
if ( bf($to_userdata['user_opt'], 'user_opt', 'notify_pm') && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] ) if ( bf($to_userdata['user_opt'], 'user_opt', 'notify_pm') && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] )
{ {

View file

@ -128,7 +128,7 @@
</tr> </tr>
<!-- END forums_exist --> <!-- END forums_exist -->
<tr> <tr>
<td class="row1" nowrap="nowrap"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option><option value="disabled_pms">{L_USERS_DISABLED_PMS}</option></select>&nbsp;<input type="submit" class="post2" class="post2" name="search_misc" value="{L_SEARCH}" /></span></td> <td class="row1" nowrap="nowrap"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option></select>&nbsp;<input type="submit" class="post2" class="post2" name="search_misc" value="{L_SEARCH}" /></span></td>
</tr> </tr>
<tr> <tr>
<td class="row2"><span class="small">{L_SEARCH_USERS_MISC_EXPLAIN}</span></td> <td class="row2"><span class="small">{L_SEARCH_USERS_MISC_EXPLAIN}</span></td>

View file

@ -147,8 +147,6 @@
<!-- IF ATTACHBOX --><!-- INCLUDE posting_attach.tpl --><!-- ENDIF --> <!-- IF ATTACHBOX --><!-- INCLUDE posting_attach.tpl --><!-- ENDIF -->
<!-- IF POLLBOX --><!-- INCLUDE posting_poll.tpl --><!-- ENDIF -->
</table> </table>
</form> </form>

View file

@ -1,40 +0,0 @@
<tbody class="pad_4">
<tr>
<th colspan="2" class="thHead">{L_ADD_POLL}</th>
</tr>
<tr>
<td><b>{L_POLL_QUESTION}</b></td>
<td><input type="text" name="poll_title" size="50" maxlength="255" value="{POLL_TITLE}" /></td>
</tr>
<!-- BEGIN poll_option_rows -->
<tr>
<td><b>{L_POLL_OPTION}</b></td>
<td>
<input type="text" name="poll_option_text[{poll_option_rows.S_POLL_OPTION_NUM}]" size="50" maxlength="255" value="{poll_option_rows.POLL_OPTION}" />&nbsp;
<input type="submit" name="edit_poll_option" value="{L_UPDATE}" />&nbsp;
<input type="submit" name="del_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_DELETE}" />
</td>
</tr>
<!-- END poll_option_rows -->
<tr>
<td><b>{L_POLL_OPTION}</b></td>
<td>
<input type="text" name="add_poll_option_text" size="50" maxlength="255" value="{ADD_POLL_OPTION}" />&nbsp;
<input type="submit" name="add_poll_option" value="{L_ADD_OPTION}" />
</td>
</tr>
<tr>
<td><b>{L_POLL_FOR}</b></td>
<td>
<input type="text" name="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" />&nbsp;
<b>{L_DAYS}</b>&nbsp;&nbsp;
<span class="small">{L_POLL_FOR_EXPLAIN}</span>
</td>
</tr>
<!-- BEGIN switch_poll_delete_toggle -->
<tr>
<td><b>{L_DELETE_POLL}</b></td>
<td><input type="checkbox" name="poll_delete" /></td>
</tr>
<!-- END switch_poll_delete_toggle -->
</tbody>