Фикс нотиса "Undefined variable: topic_id". Спасибо Lange за тестирование. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@531 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08 2013-08-02 19:45:32 +00:00
commit 5e3fba174b
2 changed files with 10 additions and 1 deletions

View file

@ -57,7 +57,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
$bb_cfg['tp_release_date'] = '02-08-2013';
$bb_cfg['tp_release_state'] = 'R530';
$bb_cfg['tp_release_state'] = 'R531';
// Database
$charset = 'utf8';

View file

@ -448,6 +448,15 @@ function send_torrent_with_passkey ($filename)
}
}
// Get $topic_id
$topic_id_sql = 'SELECT topic_id FROM ' . BB_POSTS . ' WHERE post_id = ' . (int) $post_id;
if (!($topic_id_result = DB()->sql_query($topic_id_sql)))
{
message_die(GENERAL_ERROR, 'Could not query post information', '', __LINE__, __FILE__, $topic_id_sql);
}
$topic_id_row = DB()->sql_fetchrow($topic_id_result);
$topic_id = $topic_id_row['topic_id'];
if (!$attachment['tracker_status'])
{
message_die(GENERAL_ERROR, $lang['PASSKEY_ERR_TOR_NOT_REG']);