mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Minor improvements (#297)
* Minor improvements * Update CHANGELOG.md * Update config.php * Update admin_ug_auth.php * Updated * Update admin_disallow.php * Update admin_ranks.php * Update admin_smilies.php * Update scrape.php * Update scrape.php * Update view_torrent.php
This commit is contained in:
parent
4d99225376
commit
933e4b3283
@ -1,5 +1,13 @@
|
|||||||
# 📖 Change Log
|
# 📖 Change Log
|
||||||
|
|
||||||
|
## [v2.1.5-2023.10](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.10) (2023-11-04)
|
||||||
|
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.09...v2.1.5-2023.10)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Release v2.1.5-2023.10 🎉
|
||||||
|
- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
||||||
## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04)
|
## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08-HotFix...v2.1.5-2023.09)
|
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08-HotFix...v2.1.5-2023.09)
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ if ($view == 'search')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$s_forums = '';
|
$s_forums = '';
|
||||||
$list_cat = [];
|
$list_cat = array();
|
||||||
while ($row = DB()->sql_fetchrow($result))
|
while ($row = DB()->sql_fetchrow($result))
|
||||||
{ //sf
|
{ //sf
|
||||||
$s_forums .= '<option value="' . $row['forum_id'] . '">' . (($row['forum_parent']) ? HTML_SF_SPACER : '') . htmlCHR($row['forum_name']) . '</option>';
|
$s_forums .= '<option value="' . $row['forum_id'] . '">' . (($row['forum_parent']) ? HTML_SF_SPACER : '') . htmlCHR($row['forum_name']) . '</option>';
|
||||||
|
@ -17,7 +17,7 @@ if (isset($_POST['add_name']))
|
|||||||
|
|
||||||
if ($disallowed_user == '')
|
if ($disallowed_user == '')
|
||||||
{
|
{
|
||||||
bb_die($lang['FIELDS_EMPTY']);
|
bb_die($lang['FIELDS_EMPTY'] . '<br /><br />'. sprintf($lang['CLICK_RETURN_DISALLOWADMIN'], '<a href="admin_disallow.php">', '</a>') . '<br /><br />'. sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
if( validate_username($disallowed_user) )
|
if( validate_username($disallowed_user) )
|
||||||
{
|
{
|
||||||
@ -94,4 +94,4 @@ $template->assign_vars(array(
|
|||||||
'S_FORM_ACTION' => 'admin_disallow.php',
|
'S_FORM_ACTION' => 'admin_disallow.php',
|
||||||
));
|
));
|
||||||
|
|
||||||
print_page('admin_disallow.tpl', 'admin');
|
print_page('admin_disallow.tpl', 'admin');
|
||||||
|
@ -48,7 +48,7 @@ if ($mode != '')
|
|||||||
{
|
{
|
||||||
if (empty($rank_id))
|
if (empty($rank_id))
|
||||||
{
|
{
|
||||||
bb_die($lang['MUST_SELECT_RANK']);
|
bb_die($lang['MUST_SELECT_RANK'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT * FROM " . BB_RANKS . " WHERE rank_id = $rank_id";
|
$sql = "SELECT * FROM " . BB_RANKS . " WHERE rank_id = $rank_id";
|
||||||
@ -100,7 +100,7 @@ if ($mode != '')
|
|||||||
|
|
||||||
if ($rank_title == '')
|
if ($rank_title == '')
|
||||||
{
|
{
|
||||||
bb_die($lang['MUST_SELECT_RANK']);
|
bb_die($lang['MUST_SELECT_RANK'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($special_rank == 1)
|
if ($special_rank == 1)
|
||||||
@ -127,7 +127,7 @@ if ($mode != '')
|
|||||||
$sql = "UPDATE " . BB_USERS . " SET user_rank = 0 WHERE user_rank = $rank_id";
|
$sql = "UPDATE " . BB_USERS . " SET user_rank = 0 WHERE user_rank = $rank_id";
|
||||||
if (!$result = DB()->sql_query($sql))
|
if (!$result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
bb_die($lang['NO_UPDATE_RANKS']);
|
bb_die($lang['NO_UPDATE_RANKS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql = "UPDATE " . BB_RANKS . "
|
$sql = "UPDATE " . BB_RANKS . "
|
||||||
@ -186,7 +186,7 @@ if ($mode != '')
|
|||||||
$sql = "UPDATE " . BB_USERS . " SET user_rank = 0 WHERE user_rank = $rank_id";
|
$sql = "UPDATE " . BB_USERS . " SET user_rank = 0 WHERE user_rank = $rank_id";
|
||||||
if (!$result = DB()->sql_query($sql))
|
if (!$result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
bb_die($lang['NO_UPDATE_RANKS']);
|
bb_die($lang['NO_UPDATE_RANKS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$datastore->update('ranks');
|
$datastore->update('ranks');
|
||||||
@ -195,7 +195,7 @@ if ($mode != '')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bb_die($lang['MUST_SELECT_RANK']);
|
bb_die($lang['MUST_SELECT_RANK'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -251,4 +251,4 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print_page('admin_ranks.tpl', 'admin');
|
print_page('admin_ranks.tpl', 'admin');
|
||||||
|
@ -20,7 +20,7 @@ else
|
|||||||
|
|
||||||
$delimeter = '=+:';
|
$delimeter = '=+:';
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
$smiley_paks = [];
|
$smiley_paks = array();
|
||||||
|
|
||||||
// Read a listing of uploaded smilies for use in the add or edit smliey code
|
// Read a listing of uploaded smilies for use in the add or edit smliey code
|
||||||
$dir = @opendir(BB_ROOT . $bb_cfg['smilies_path']);
|
$dir = @opendir(BB_ROOT . $bb_cfg['smilies_path']);
|
||||||
@ -277,7 +277,7 @@ else if ( $mode != '' )
|
|||||||
// If no code was entered complain
|
// If no code was entered complain
|
||||||
if ($smile_code == '' || $smile_url == '')
|
if ($smile_code == '' || $smile_url == '')
|
||||||
{
|
{
|
||||||
bb_die($lang['FIELDS_EMPTY']);
|
bb_die($lang['FIELDS_EMPTY'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert < and > to proper htmlentities for parsing
|
// Convert < and > to proper htmlentities for parsing
|
||||||
@ -309,7 +309,7 @@ else if ( $mode != '' )
|
|||||||
// If no code was entered complain
|
// If no code was entered complain
|
||||||
if ($smile_code == '' || $smile_url == '')
|
if ($smile_code == '' || $smile_url == '')
|
||||||
{
|
{
|
||||||
bb_die($lang['FIELDS_EMPTY']);
|
bb_die($lang['FIELDS_EMPTY'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert < and > to proper htmlentities for parsing
|
// Convert < and > to proper htmlentities for parsing
|
||||||
|
@ -75,7 +75,12 @@ if ($submit && $mode == 'user')
|
|||||||
{
|
{
|
||||||
if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID)
|
if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID)
|
||||||
{
|
{
|
||||||
bb_die($lang['AUTH_GENERAL_ERROR']);
|
$message = $lang['AUTH_GENERAL_ERROR'] .'<br /><br />';
|
||||||
|
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode='. $mode .'">', '</a>') .'<br /><br />';
|
||||||
|
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||||
|
|
||||||
|
bb_die($message);
|
||||||
|
unset($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
DB()->query("UPDATE ". BB_USERS ." SET user_level = ". ADMIN ." WHERE user_id = $user_id LIMIT 1");
|
DB()->query("UPDATE ". BB_USERS ." SET user_level = ". ADMIN ." WHERE user_id = $user_id LIMIT 1");
|
||||||
@ -95,7 +100,12 @@ if ($submit && $mode == 'user')
|
|||||||
// ignore if you're trying to change yourself from an admin to user!
|
// ignore if you're trying to change yourself from an admin to user!
|
||||||
if ($userdata['user_id'] == $user_id)
|
if ($userdata['user_id'] == $user_id)
|
||||||
{
|
{
|
||||||
bb_die($lang['AUTH_SELF_ERROR']);
|
$message = $lang['AUTH_SELF_ERROR'] .'<br /><br />';
|
||||||
|
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode='. $mode .'">', '</a>') .'<br /><br />';
|
||||||
|
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||||
|
|
||||||
|
bb_die($message);
|
||||||
|
unset($message);
|
||||||
}
|
}
|
||||||
// Update users level, reset to USER
|
// Update users level, reset to USER
|
||||||
DB()->query("UPDATE ". BB_USERS ." SET user_level = ". USER ." WHERE user_id = $user_id LIMIT 1");
|
DB()->query("UPDATE ". BB_USERS ." SET user_level = ". USER ." WHERE user_id = $user_id LIMIT 1");
|
||||||
|
@ -5,7 +5,7 @@ require('./pagestart.php');
|
|||||||
// Generate relevant output
|
// Generate relevant output
|
||||||
if (isset($_GET['pane']) && $_GET['pane'] == 'left')
|
if (isset($_GET['pane']) && $_GET['pane'] == 'left')
|
||||||
{
|
{
|
||||||
$module = [];
|
$module = array();
|
||||||
if (!$module = CACHE('bb_cache')->get('admin_module_' . $user->id))
|
if (!$module = CACHE('bb_cache')->get('admin_module_' . $user->id))
|
||||||
{
|
{
|
||||||
$dir = @opendir('.');
|
$dir = @opendir('.');
|
||||||
|
@ -12,11 +12,7 @@ if (isset($_GET['?info_hash']) && !isset($_GET['info_hash']))
|
|||||||
$_GET['info_hash'] = $_GET['?info_hash'];
|
$_GET['info_hash'] = $_GET['?info_hash'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_GET['info_hash']))
|
if (!isset($_GET['info_hash']) || strlen($_GET['info_hash']) != 20)
|
||||||
{
|
|
||||||
msg_die('info_hash was not provided');
|
|
||||||
}
|
|
||||||
if (strlen($_GET['info_hash']) != 20)
|
|
||||||
{
|
{
|
||||||
msg_die('Invalid info_hash: ' . bin2hex($_GET['info_hash']));
|
msg_die('Invalid info_hash: ' . bin2hex($_GET['info_hash']));
|
||||||
}
|
}
|
||||||
@ -50,9 +46,9 @@ $row = DB()->fetch_row("
|
|||||||
");
|
");
|
||||||
|
|
||||||
$output['files'][$info_hash] = array(
|
$output['files'][$info_hash] = array(
|
||||||
'complete' => (int) $row['seeders'],
|
'complete' => (int) $row['seeders'],
|
||||||
'downloaded' => (int) $row['complete_count'],
|
'downloaded' => (int) $row['complete_count'],
|
||||||
'incomplete' => (int) $row['leechers'],
|
'incomplete' => (int) $row['leechers'],
|
||||||
);
|
);
|
||||||
|
|
||||||
echo bencode($output);
|
echo bencode($output);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (!(PHP_VERSION_ID >= 50303)) die('TorrentPier II requires PHP version 5.3.3+. Your PHP version '. PHP_VERSION);
|
||||||
if (isset($_REQUEST['GLOBALS'])) die();
|
if (isset($_REQUEST['GLOBALS'])) die();
|
||||||
|
|
||||||
ignore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
@ -30,11 +31,13 @@ if (file_exists(BB_ROOT . 'library/config.local.php'))
|
|||||||
{
|
{
|
||||||
require(BB_ROOT . 'library/config.local.php');
|
require(BB_ROOT . 'library/config.local.php');
|
||||||
}
|
}
|
||||||
elseif (file_exists(BB_ROOT . 'library/config.php'))
|
else
|
||||||
{
|
{
|
||||||
require(BB_ROOT . 'library/config.php');
|
require(BB_ROOT . 'library/config.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!defined('BB_CFG_LOADED')) trigger_error('Configuration file could not be loaded', E_USER_ERROR);
|
||||||
|
|
||||||
// Get mods config
|
// Get mods config
|
||||||
if (file_exists(BB_ROOT . 'library/config.mods.php'))
|
if (file_exists(BB_ROOT . 'library/config.mods.php'))
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,10 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||||||
|
|
||||||
global $userdata, $lang, $bb_cfg;
|
global $userdata, $lang, $bb_cfg;
|
||||||
|
|
||||||
$mode = (string) $this->request['mode'];
|
if (!$mode = (string) $this->request['mode'])
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid mode (empty)');
|
||||||
|
}
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
@ -59,7 +62,7 @@ switch ($mode)
|
|||||||
|
|
||||||
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
|
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
|
||||||
{
|
{
|
||||||
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND);
|
file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND);
|
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND);
|
||||||
@ -116,4 +119,4 @@ switch ($mode)
|
|||||||
$this->ajax_die('Invalid mode');
|
$this->ajax_die('Invalid mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->response['mode'] = $mode;
|
$this->response['mode'] = $mode;
|
||||||
|
@ -4,7 +4,7 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||||||
|
|
||||||
global $userdata, $lang, $bb_cfg;
|
global $userdata, $lang, $bb_cfg;
|
||||||
|
|
||||||
if (!$user_id = $this->request['user_id'])
|
if (!$user_id = intval($this->request['user_id']))
|
||||||
{
|
{
|
||||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,10 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||||||
|
|
||||||
global $userdata, $bb_cfg, $lang, $datastore, $log_action;
|
global $userdata, $bb_cfg, $lang, $datastore, $log_action;
|
||||||
|
|
||||||
$mode = (string) $this->request['mode'];
|
if (!$mode = (string) $this->request['mode'])
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid mode (empty)');
|
||||||
|
}
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,10 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||||||
|
|
||||||
global $bb_cfg, $lang;
|
global $bb_cfg, $lang;
|
||||||
|
|
||||||
$mode = (string) $this->request['mode'];
|
if (!$mode = (string) $this->request['mode'])
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid mode (empty)');
|
||||||
|
}
|
||||||
$map = new sitemap();
|
$map = new sitemap();
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
@ -43,4 +46,4 @@ switch ($mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->response['html'] = $html;
|
$this->response['html'] = $html;
|
||||||
$this->response['mode'] = $mode;
|
$this->response['mode'] = $mode;
|
||||||
|
@ -4,7 +4,10 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
|||||||
|
|
||||||
global $bb_cfg, $lang, $userdata;
|
global $bb_cfg, $lang, $userdata;
|
||||||
|
|
||||||
$mode = (string) $this->request['mode'];
|
if (!$mode = (string) $this->request['mode'])
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid mode (empty)');
|
||||||
|
}
|
||||||
|
|
||||||
$html = '<img src="./styles/images/good.gif">';
|
$html = '<img src="./styles/images/good.gif">';
|
||||||
switch($mode)
|
switch($mode)
|
||||||
@ -72,4 +75,4 @@ switch($mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->response['html'] = $html;
|
$this->response['html'] = $html;
|
||||||
$this->response['mode'] = $mode;
|
$this->response['mode'] = $mode;
|
||||||
|
@ -17,7 +17,7 @@ $torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB
|
|||||||
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
|
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
|
||||||
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
|
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
|
||||||
|
|
||||||
if (!file_exists($filename) || (false === ($file_contents = file_get_contents($filename))))
|
if (!@file_exists($filename) || (false === ($file_contents = @file_get_contents($filename))))
|
||||||
{
|
{
|
||||||
if (IS_AM)
|
if (IS_AM)
|
||||||
{
|
{
|
||||||
|
@ -15,8 +15,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? idn_to_utf8($_SERVER['SERVER_
|
|||||||
$domain_ssl = false;
|
$domain_ssl = false;
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
$bb_cfg['tp_version'] = '2.1.5-2023.09';
|
$bb_cfg['tp_version'] = '2.1.5-2023.10';
|
||||||
$bb_cfg['tp_release_date'] = '04-10-2023';
|
$bb_cfg['tp_release_date'] = '04-11-2023';
|
||||||
$bb_cfg['tp_release_state'] = 'LTS';
|
$bb_cfg['tp_release_state'] = 'LTS';
|
||||||
$bb_cfg['tp_zf_version'] = '2.4.13';
|
$bb_cfg['tp_zf_version'] = '2.4.13';
|
||||||
|
|
||||||
@ -281,6 +281,8 @@ $bb_cfg['user_session_gc_ttl'] = 1800; // number of seconds that a s
|
|||||||
$bb_cfg['session_cache_gc_ttl'] = 1200; // sec
|
$bb_cfg['session_cache_gc_ttl'] = 1200; // sec
|
||||||
$bb_cfg['max_last_visit_days'] = 14; // days
|
$bb_cfg['max_last_visit_days'] = 14; // days
|
||||||
$bb_cfg['last_visit_update_intrv'] = 3600; // sec
|
$bb_cfg['last_visit_update_intrv'] = 3600; // sec
|
||||||
|
$bb_cfg['last_visit_date_format'] = 'Y-m-d H:i'; // формат даты последнего визита на сайте
|
||||||
|
$bb_cfg['last_activity_date_format'] = 'Y-m-d H:i'; // формат даты последней активности на сайте
|
||||||
|
|
||||||
// Registration
|
// Registration
|
||||||
$bb_cfg['invalid_logins'] = 5; // Количество неверных попыток ввода пароля, перед выводом проверки капчей
|
$bb_cfg['invalid_logins'] = 5; // Количество неверных попыток ввода пароля, перед выводом проверки капчей
|
||||||
@ -288,6 +290,7 @@ $bb_cfg['new_user_reg_disabled'] = false; // Запретить рег
|
|||||||
$bb_cfg['unique_ip'] = false; // Запретить регистрацию нескольких учетных записей с одного ip
|
$bb_cfg['unique_ip'] = false; // Запретить регистрацию нескольких учетных записей с одного ip
|
||||||
$bb_cfg['new_user_reg_restricted'] = false; // Ограничить регистрацию новых пользователей по времени с 01:00 до 17:00
|
$bb_cfg['new_user_reg_restricted'] = false; // Ограничить регистрацию новых пользователей по времени с 01:00 до 17:00
|
||||||
$bb_cfg['reg_email_activation'] = true; // Требовать активацию учетной записи по email
|
$bb_cfg['reg_email_activation'] = true; // Требовать активацию учетной записи по email
|
||||||
|
$bb_cfg['reg_date_format'] = 'Y-m-d H:i'; // формат даты регистрации / даты вступления пользователя
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
$bb_cfg['emailer_disabled'] = false; // отключить ли отправку почты с сайта
|
$bb_cfg['emailer_disabled'] = false; // отключить ли отправку почты с сайта
|
||||||
@ -382,18 +385,14 @@ define('CRON_ALLOWED', TRIGGERS_DIR .'cron_allowed');
|
|||||||
define('CRON_RUNNING', TRIGGERS_DIR .'cron_running');
|
define('CRON_RUNNING', TRIGGERS_DIR .'cron_running');
|
||||||
|
|
||||||
// Date format
|
// Date format
|
||||||
$bb_cfg['date_format'] = 'Y-m-d'; // общий формат даты (оставлено для обратной совместимости. Если есть возможность, то используйте лучше одну из переменных ниже, исходя из целей)
|
$bb_cfg['date_format'] = 'Y-m-d'; // общий формат даты (оставлено для обратной совместимости)
|
||||||
$bb_cfg['current_time_date_format'] = 'd-M H:i'; // формат блока "текущее время" на сайте
|
|
||||||
$bb_cfg['reg_date_format'] = 'Y-m-d H:i'; // формат даты регистрации / даты вступления пользователя
|
|
||||||
$bb_cfg['last_visit_date_format'] = 'Y-m-d H:i'; // формат даты последнего визита на сайте
|
|
||||||
$bb_cfg['last_activity_date_format'] = 'Y-m-d H:i'; // формат даты последней активности на сайте
|
|
||||||
$bb_cfg['last_post_date_format'] = 'd-M-y H:i'; // формат даты последнего поста (на странице просмотра форума и на главной)
|
|
||||||
|
|
||||||
// Subforums
|
// Subforums
|
||||||
$bb_cfg['sf_on_first_page_only'] = true;
|
$bb_cfg['sf_on_first_page_only'] = true;
|
||||||
|
|
||||||
// Forums
|
// Forums
|
||||||
$bb_cfg['allowed_topics_per_page'] = array(50, 100, 150, 200, 250, 300);
|
$bb_cfg['allowed_topics_per_page'] = array(50, 100, 150, 200, 250, 300);
|
||||||
|
$bb_cfg['last_post_date_format'] = 'd-M-y H:i'; // формат даты последнего поста (на странице просмотра форума и на главной)
|
||||||
|
|
||||||
// Topics
|
// Topics
|
||||||
$bb_cfg['show_quick_reply'] = true; // показывать форму быстрого ответа
|
$bb_cfg['show_quick_reply'] = true; // показывать форму быстрого ответа
|
||||||
@ -499,6 +498,7 @@ $bb_cfg['mem_on_start'] = (MEM_USAGE) ? memory_get_usage() : 0;
|
|||||||
$bb_cfg['translate_dates'] = true; // in displaying time
|
$bb_cfg['translate_dates'] = true; // in displaying time
|
||||||
$bb_cfg['use_word_censor'] = true; // использовать цензор слов
|
$bb_cfg['use_word_censor'] = true; // использовать цензор слов
|
||||||
$bb_cfg['show_jumpbox'] = true; // показывать ли jumpbox
|
$bb_cfg['show_jumpbox'] = true; // показывать ли jumpbox
|
||||||
|
$bb_cfg['current_time_date_format'] = 'd-M H:i'; // формат блока "текущее время" на сайте
|
||||||
|
|
||||||
$bb_cfg['allow_change'] = array(
|
$bb_cfg['allow_change'] = array(
|
||||||
'language' => true,
|
'language' => true,
|
||||||
|
@ -732,8 +732,10 @@ class sql_db
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@define('IN_FIRST_SLOW_QUERY', true);
|
if (!defined('IN_FIRST_SLOW_QUERY'))
|
||||||
|
{
|
||||||
|
define('IN_FIRST_SLOW_QUERY', true);
|
||||||
|
}
|
||||||
CACHE('bb_cache')->set('dont_log_slow_query', $new_priority, $ignoring_time);
|
CACHE('bb_cache')->set('dont_log_slow_query', $new_priority, $ignoring_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,10 @@ function cron_get_file_lock ()
|
|||||||
|
|
||||||
function cron_track_running ($mode)
|
function cron_track_running ($mode)
|
||||||
{
|
{
|
||||||
@define('CRON_STARTMARK', TRIGGERS_DIR .'cron_started_at_'. date('Y-m-d_H-i-s') .'_by_pid_'. getmypid());
|
if (!defined('CRON_STARTMARK'))
|
||||||
|
{
|
||||||
|
define('CRON_STARTMARK', TRIGGERS_DIR . 'cron_started_at_' . date('Y-m-d_H-i-s') . '_by_pid_' . getmypid());
|
||||||
|
}
|
||||||
|
|
||||||
if ($mode == 'start')
|
if ($mode == 'start')
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
if (!(PHP_VERSION_ID >= 50303)) die('TorrentPier II requires PHP version 5.3.3+. Your PHP version '. PHP_VERSION);
|
|
||||||
if (!defined('BB_CFG_LOADED')) trigger_error('Configuration file could not be loaded', E_USER_ERROR);
|
|
||||||
|
|
||||||
// Define some basic configuration arrays
|
// Define some basic configuration arrays
|
||||||
unset($stopwords, $synonyms_match, $synonyms_replace);
|
unset($stopwords, $synonyms_match, $synonyms_replace);
|
||||||
|
Loading…
Reference in New Issue
Block a user