mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r567
Проверка на полноту загрузки config.php; проверка на удаленность куки дебага у обычных пользователей; фикс некорректной загрузки ajax.php в r566. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@567 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
3b2e125d6b
commit
357b3708fb
3 changed files with 16 additions and 9 deletions
|
@ -56,7 +56,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'] = '23-01-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R566';
|
||||
$bb_cfg['tp_release_state'] = 'R567';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
@ -223,7 +223,7 @@ define('TEMPLATES_DIR', BB_PATH .'/templates/');
|
|||
define('TRIGGERS_DIR', BB_PATH .'/triggers/' );
|
||||
|
||||
// URLs
|
||||
$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
|
||||
$bb_cfg['ajax_url'] = '/ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
|
||||
$bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php"
|
||||
$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
|
||||
$bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php"
|
||||
|
@ -539,3 +539,5 @@ $bb_cfg['captcha'] = array(
|
|||
|
||||
// SEO
|
||||
$bb_cfg['seo_link_home_page'] = false;
|
||||
|
||||
define('BB_CFG_LOADED', true);
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
if (!defined('BB_SCRIPT')) define('BB_SCRIPT', 'undefined');
|
||||
if (!defined('BB_CFG_LOADED')) trigger_error('bb_cfg not loaded', E_USER_ERROR);
|
||||
|
||||
// Exit if board is disabled via ON/OFF trigger
|
||||
if (!defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE'))
|
||||
|
@ -93,11 +94,6 @@ if (!defined('IN_AJAX'))
|
|||
ob_start('send_page');
|
||||
}
|
||||
|
||||
if (DEBUG === true)
|
||||
{
|
||||
require(DEV_DIR .'init_debug.php');
|
||||
}
|
||||
|
||||
// Cookie params
|
||||
$c = $bb_cfg['cookie_prefix'];
|
||||
define('COOKIE_DATA', $c .'data');
|
||||
|
@ -124,6 +120,15 @@ if (DBG_USER)
|
|||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($_COOKIE['explain']);
|
||||
}
|
||||
|
||||
if (DEBUG === true)
|
||||
{
|
||||
require(DEV_DIR .'init_debug.php');
|
||||
}
|
||||
|
||||
define('DELETED', -1);
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ $template->assign_vars(array(
|
|||
'THIS_AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], !bf($userdata['user_opt'], 'user_opt', 'allow_avatar')),
|
||||
'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'),
|
||||
'AUTOLOGIN_DISABLED' => !$bb_cfg['allow_autologin'],
|
||||
'S_LOGIN_ACTION' => BB_ROOT . LOGIN_URL,
|
||||
'S_LOGIN_ACTION' => LOGIN_URL,
|
||||
|
||||
'U_CUR_DOWNLOADS' => PROFILE_URL . $userdata['user_id'],
|
||||
'U_FAQ' => $bb_cfg['faq_url'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue