mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
r540
Исправление ошибки SEED_COUNT (благодарность Phoenix за предложенный способ решения). Переименование пользователя-гостя. Упрощение логики файла подключения модулей профиля. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@540 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
daf25c67ca
commit
d9ec260167
6 changed files with 18 additions and 24 deletions
|
@ -1469,7 +1469,7 @@ CREATE TABLE IF NOT EXISTS `bb_users` (
|
||||||
-- Дамп данных таблицы `bb_users`
|
-- Дамп данных таблицы `bb_users`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `bb_users` VALUES (-1, 0, 'Anonymous', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
INSERT INTO `bb_users` VALUES (-1, 0, 'Guest', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||||
INSERT INTO `bb_users` VALUES (2, 1, 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 0, 0, '0', 0, '0', 1, 1, 4.00, '', 0, 0, 0, 304, 1, '', 1, 0, 0, 0, 'admin@admin.com', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
INSERT INTO `bb_users` VALUES (2, 1, 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 0, 0, '0', 0, '0', 1, 1, 4.00, '', 0, 0, 0, 304, 1, '', 1, 0, 0, 0, 'admin@admin.com', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||||
INSERT INTO `bb_users` VALUES (-746, 0, 'bot', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 144, 0, 'bot.gif', 1, 0, 0, 0, 'bot@bot.bot', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
INSERT INTO `bb_users` VALUES (-746, 0, 'bot', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 144, 0, 'bot.gif', 1, 0, 0, 0, 'bot@bot.bot', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||||
|
|
||||||
|
@ -1660,4 +1660,4 @@ CREATE TABLE IF NOT EXISTS `xbt_scrape_log` (
|
||||||
`uid` int(11) NOT NULL DEFAULT '0',
|
`uid` int(11) NOT NULL DEFAULT '0',
|
||||||
`mtime` int(11) NOT NULL DEFAULT '0',
|
`mtime` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
@ -602,4 +602,5 @@ $template->assign_vars(array(
|
||||||
'SEED_EXIST' => ($seeders || defined('SEEDER_EXIST')),
|
'SEED_EXIST' => ($seeders || defined('SEEDER_EXIST')),
|
||||||
'LEECH_EXIST' => ($leechers || defined('LEECHER_EXIST')),
|
'LEECH_EXIST' => ($leechers || defined('LEECHER_EXIST')),
|
||||||
'TOR_HELP_LINKS' => $bb_cfg['tor_help_links'],
|
'TOR_HELP_LINKS' => $bb_cfg['tor_help_links'],
|
||||||
|
'CALL_SEED' => ($bb_cfg['callseed'] && $tor_reged && !isset($bb_cfg['tor_no_tor_act'][$tor_info['tor_status']])),
|
||||||
));
|
));
|
|
@ -100,8 +100,8 @@ function call_seed($topic_id, $t_info, $to_user_id)
|
||||||
if ($msg_error == "OK")
|
if ($msg_error == "OK")
|
||||||
{
|
{
|
||||||
$sql = "SELECT seeders, leechers FROM ". BB_BT_TRACKER_SNAP ." WHERE topic_id = $topic_id LIMIT 1";
|
$sql = "SELECT seeders, leechers FROM ". BB_BT_TRACKER_SNAP ." WHERE topic_id = $topic_id LIMIT 1";
|
||||||
$row = DB()->fetch_row($sql);
|
$row = DB()->fetch_row($sql);
|
||||||
if ($row['seeders'] <= 2)
|
if ($row['seeders'] <= 2)
|
||||||
{
|
{
|
||||||
$sql = "SELECT user_id FROM ". BB_BT_DLSTATUS ." WHERE topic_id = $topic_id AND user_id != {$userdata['user_id']}";
|
$sql = "SELECT user_id FROM ". BB_BT_DLSTATUS ." WHERE topic_id = $topic_id AND user_id != {$userdata['user_id']}";
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||||
$bb_cfg['tp_release_date'] = '07-08-2013';
|
$bb_cfg['tp_release_date'] = '08-08-2013';
|
||||||
$bb_cfg['tp_release_state'] = 'R539';
|
$bb_cfg['tp_release_state'] = 'R540';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$charset = 'utf8';
|
$charset = 'utf8';
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('IN_FORUM', true);
|
|
||||||
define('IN_PROFILE', true);
|
define('IN_PROFILE', true);
|
||||||
define('BB_SCRIPT', 'profile');
|
define('BB_SCRIPT', 'profile');
|
||||||
define('BB_ROOT', './');
|
define('BB_ROOT', './');
|
||||||
require(BB_ROOT . "common.php");
|
require(BB_ROOT . 'common.php');
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->session_start();
|
$user->session_start();
|
||||||
|
|
||||||
// session id check
|
$mode = (string) @$_REQUEST['mode'];
|
||||||
$sid = request_var('sid', '');
|
|
||||||
$mode = request_var('mode', '');
|
|
||||||
$mode = htmlspecialchars($mode);
|
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
|
@ -22,10 +18,7 @@ switch ($mode)
|
||||||
|
|
||||||
case 'register':
|
case 'register':
|
||||||
case 'editprofile':
|
case 'editprofile':
|
||||||
if (IS_GUEST && $mode == 'editprofile' )
|
if (IS_GUEST && $mode == 'editprofile') login_redirect();
|
||||||
{
|
|
||||||
login_redirect();
|
|
||||||
}
|
|
||||||
|
|
||||||
require(INC_DIR . 'ucp/usercp_register.php');
|
require(INC_DIR . 'ucp/usercp_register.php');
|
||||||
break;
|
break;
|
||||||
|
@ -41,23 +34,23 @@ switch ($mode)
|
||||||
case 'email':
|
case 'email':
|
||||||
require(INC_DIR .'ucp/usercp_email.php');
|
require(INC_DIR .'ucp/usercp_email.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bonus':
|
case 'bonus':
|
||||||
if (IS_GUEST) login_redirect();
|
if (IS_GUEST) login_redirect();
|
||||||
|
|
||||||
require(INC_DIR . 'ucp/usercp_bonus.php');
|
require(INC_DIR . 'ucp/usercp_bonus.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'watch':
|
case 'watch':
|
||||||
if (IS_GUEST) login_redirect();
|
if (IS_GUEST) login_redirect();
|
||||||
|
|
||||||
require(INC_DIR . 'ucp/usercp_topic_watch.php');
|
require(INC_DIR . 'ucp/usercp_topic_watch.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'viewdraft':
|
case 'viewdraft':
|
||||||
require(INC_DIR . 'ucp/usercp_viewdraft.php');
|
require(INC_DIR . 'ucp/usercp_viewdraft.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
bb_die('Invalid mode');
|
bb_die('Invalid mode');
|
||||||
}
|
}
|
|
@ -79,7 +79,7 @@ $(document).ready(function(){
|
||||||
<a href="{SPMODE_FULL_HREF}" class="gen">{L_SPMODE_FULL}</a>
|
<a href="{SPMODE_FULL_HREF}" class="gen">{L_SPMODE_FULL}</a>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</div>
|
</div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ $(document).ready(function(){
|
||||||
<!-- IF DL_BUT_CANCEL --><input type="submit" name="dl_set_cancel" value="{L_DL_CANCEL}" class="liteoption" /><!-- ENDIF -->
|
<!-- IF DL_BUT_CANCEL --><input type="submit" name="dl_set_cancel" value="{L_DL_CANCEL}" class="liteoption" /><!-- ENDIF -->
|
||||||
</form>
|
</form>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF $bb_cfg['callseed'] && not SEED_COUNT --><form action="callseed.php?t={TOPIC_ID}" method="post"><input type="submit" value="{L_CALLSEED}" class="liteoption" /> </form><!-- ENDIF -->
|
<!-- IF CALL_SEED --><form action="callseed.php?t={TOPIC_ID}" method="post"><input type="submit" value="{L_CALLSEED}" class="liteoption" /> </form><!-- ENDIF -->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue