ALTER TABLE `bb_posts` ADD `user_post` TINYINT( 1 ) NOT NULL DEFAULT '1'; мои сообщения аля рутрекер (часть 1) git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@381 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2012-03-06 05:49:18 +00:00
commit 85c0ee4559
5 changed files with 15 additions and 13 deletions

View file

@ -917,6 +917,7 @@ CREATE TABLE `bb_posts` (
`post_edit_count` smallint(5) unsigned NOT NULL default '0',
`post_attachment` tinyint(1) NOT NULL default '0',
`post_reported` tinyint(1) NOT NULL default '0',
`user_post` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`post_id`),
KEY `topic_id` (`topic_id`),
KEY `poster_id` (`poster_id`),
@ -928,7 +929,7 @@ CREATE TABLE `bb_posts` (
-- Дамп данных таблицы `bb_posts`
--
INSERT INTO `bb_posts` VALUES (1, 1, 1, 2, 1309421220, '', '', 0, 0, 0, 0);
INSERT INTO `bb_posts` VALUES (1, 1, 1, 2, 1309421220, '', '', 0, 0, 0, 0, 1);
-- --------------------------------------------------------

View file

@ -39,6 +39,7 @@ define('TOR_TYPE_GOLD', 1);
define('TOR_TYPE_SILVER', 2);
define('ANONYMOUS', -1);
define('BOT_UID', -746);
// DBS
class DBS

View file

@ -52,8 +52,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.4 (beta)';
$bb_cfg['tp_release_state'] = 'R380';
$bb_cfg['tp_release_date'] = '04-03-2012';
$bb_cfg['tp_release_state'] = 'R381';
$bb_cfg['tp_release_date'] = '06-03-2012';
// Database
$charset = 'utf8';
@ -474,8 +474,6 @@ $bb_cfg['ad_blocks'] = array(
);
// Misc
define('BOT_UID', -746);
define('LOADAVG', function_exists('get_loadavg') ? get_loadavg() : 0);
define('MEM_USAGE', function_exists('memory_get_usage'));

View file

@ -1209,7 +1209,8 @@ function get_bt_userdata ($user_id)
return DB()->fetch_row("SELECT bt.*, SUM(tr.speed_up) as speed_up, SUM(tr.speed_down) as speed_down
FROM ". BB_BT_USERS ." bt
LEFT JOIN ". BB_BT_TRACKER ." tr ON (bt.user_id = tr.user_id)
WHERE bt.user_id = ". (int) $user_id);
WHERE bt.user_id = ". (int) $user_id ."
GROUP BY bt.user_id");
}
function get_bt_ratio ($btu)

View file

@ -618,6 +618,7 @@ else
if ($new_topics) $SQL['WHERE'][] = "t.topic_time > $lastvisit";
if ($prev_days) $SQL['WHERE'][] = "$tbl.$time_field > ". $time_opt[$time_val]['sql'];
if ($my_posts) $SQL['WHERE'][] = "p.poster_id = $poster_id_val";
if ($my_posts && $user->id == $poster_id_val) $SQL['WHERE'][] = "p.user_post = 1";
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
if ($text_match_sql)