mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r212
убираем лишний запрос из viewforum.php git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@212 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
3b372cda91
commit
fdfdd7bd97
3 changed files with 10 additions and 6 deletions
|
@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1;
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.1 Beta';
|
$bb_cfg['tp_version'] = '2.1 Beta';
|
||||||
$bb_cfg['tp_release_state'] = 'R209';
|
$bb_cfg['tp_release_state'] = 'R212';
|
||||||
$bb_cfg['tp_release_date'] = '14-08-2011';
|
$bb_cfg['tp_release_date'] = '16-08-2011';
|
||||||
|
|
||||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||||
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
|
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
|
||||||
|
|
|
@ -73,6 +73,8 @@ foreach (DB()->fetch_rowset($sql) as $row)
|
||||||
$not_auth['user_read'][] = $fid;
|
$not_auth['user_read'][] = $fid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data['forum'][$fid] = $row;
|
||||||
|
|
||||||
// Store forums data
|
// Store forums data
|
||||||
if ($parent_id = $row['forum_parent'])
|
if ($parent_id = $row['forum_parent'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,10 +40,12 @@ $req_page .= ($start) ? "_start{$start}" : '';
|
||||||
define('REQUESTED_PAGE', $req_page);
|
define('REQUESTED_PAGE', $req_page);
|
||||||
caching_output(IS_GUEST, 'send', REQUESTED_PAGE .'_guest');
|
caching_output(IS_GUEST, 'send', REQUESTED_PAGE .'_guest');
|
||||||
|
|
||||||
// Check if the user has actually sent a forum ID
|
if (!$forums = $datastore->get('cat_forums'))
|
||||||
$sql = "SELECT * FROM ". BB_FORUMS ." WHERE forum_id = $forum_id LIMIT 1";
|
{
|
||||||
|
$datastore->update('cat_forums');
|
||||||
if (!$forum_id OR !$forum_data = DB()->fetch_row($sql))
|
$forums = $datastore->get('cat_forums');
|
||||||
|
}
|
||||||
|
if (!$forum_id OR !$forum_data = @$forums['forum'][$forum_id])
|
||||||
{
|
{
|
||||||
bb_die($lang['FORUM_NOT_EXIST']);
|
bb_die($lang['FORUM_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue