Исправления ошибок по запросам тестеров. Дополнительные проверки на используемую конфигурацию серсера в config.php; исправление некорректного редактирования даты последнего визита в профиле; дополнительная проверка на существование форума, для предотвращения ошибки при генерации списка форумов; удаление "обрубка" старой системы шаблонов; переделка функции отправки ЛС в callseed.php на универсальную; человекопонятный текст ошибки при попытке открыть несущетсвующий шаблон; включение рейтинговой системы на трекере по-умолчанию. После небольшого перерыва, начиная с данной ревизии, мы продолжаем работу над движком. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@585 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-05-14 20:57:00 +00:00
commit 649b393989
7 changed files with 25 additions and 46 deletions

View file

@ -123,7 +123,6 @@ switch ($field)
{ {
$this->ajax_die($lang['INVALID_DATE'] . $this->request['value']); $this->ajax_die($lang['INVALID_DATE'] . $this->request['value']);
} }
$value = $value - (3600 * -1);
$this->response['new_value'] = bb_date($value); $this->response['new_value'] = bb_date($value);
break; break;

View file

@ -18,7 +18,7 @@ switch ($mode)
case 'save': case 'save':
if (!$tpl_id = (int) $this->request['tpl_id']) if (!$tpl_id = (int) $this->request['tpl_id'])
{ {
$this->ajax_die('empty tpl_id'); $this->ajax_die('Выбранный шаблон не найден, создайте новый (empty tpl_id)');
} }
if (!$tpl_data = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL ." WHERE tpl_id = $tpl_id LIMIT 1")) if (!$tpl_data = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL ." WHERE tpl_id = $tpl_id LIMIT 1"))
{ {
@ -94,7 +94,7 @@ switch ($mode)
case 'assign': case 'assign':
if (!$tpl_id = (int) $this->request['tpl_id']) if (!$tpl_id = (int) $this->request['tpl_id'])
{ {
$this->ajax_die('empty tpl_id'); $this->ajax_die('Выбранный шаблон не найден, создайте новый (empty tpl_id)');
} }
if (!$forum_id = (int) $this->request['forum_id']) if (!$forum_id = (int) $this->request['forum_id'])
{ {

View file

@ -48,30 +48,7 @@ function call_seed($topic_id, $t_info, $to_user_id)
$subj = DB()->escape($subj); $subj = DB()->escape($subj);
$text = DB()->escape($text); $text = DB()->escape($text);
$sql = "INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip) send_pm($to_user_id, $subj, $text, $userdata['user_id']);
VALUES (". PRIVMSGS_NEW_MAIL .",'$subj',{$userdata['user_id']},$to_user_id,". TIMENOW .",'". USER_IP ."')";
if (!DB()->sql_query($sql)) {
$msg_error = "MSG";
return;
}
$id = DB()->sql_nextid();
$sql = "INSERT INTO ". BB_PRIVMSGS_TEXT ." VALUES($id, '$text')";
if (!DB()->sql_query($sql)) {
$msg_error = "MSG_TEXT";
return;
}
$sql = "UPDATE ". BB_USERS ." SET
user_new_privmsg = user_new_privmsg + 1,
user_last_privmsg = ". TIMENOW .",
user_newest_pm_id = $id
WHERE user_id = $to_user_id";
if (!DB()->sql_query($sql)) {
$msg_error = "POPUP";
return;
}
} }
$u_id = array(); $u_id = array();

View file

@ -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.6 (RC)'; $bb_cfg['tp_version'] = '2.6 (RC)';
$bb_cfg['tp_release_date'] = '08-03-2014'; $bb_cfg['tp_release_date'] = '15-05-2014';
$bb_cfg['tp_release_state'] = 'R584'; $bb_cfg['tp_release_state'] = 'R585';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';
@ -148,9 +148,9 @@ $bb_cfg['what_is_torrent_url_help'] = 'viewtopic.php?t=2'; // Что такое
$bb_cfg['ratio_url_help'] = 'viewtopic.php?t=3'; // Рейтинг и ограничения $bb_cfg['ratio_url_help'] = 'viewtopic.php?t=3'; // Рейтинг и ограничения
$bb_cfg['search_help_url'] = 'viewtopic.php?t=4'; // Помощь по поиску $bb_cfg['search_help_url'] = 'viewtopic.php?t=4'; // Помощь по поиску
$bb_cfg['bt_min_ratio_allow_dl_tor'] = 0; // 0 - disable $bb_cfg['bt_min_ratio_allow_dl_tor'] = 0.3; // 0 - disable
$bb_cfg['bt_min_ratio_warning'] = 0; // 0 - disable $bb_cfg['bt_min_ratio_warning'] = 0.6; // 0 - disable
$bb_cfg['bt_min_ratio_dl_button'] = 0; // 0 - disable $bb_cfg['bt_min_ratio_dl_button'] = 0.5; // 0 - disable
$tr_cfg = array( $tr_cfg = array(
'autoclean' => true, 'autoclean' => true,
@ -414,10 +414,13 @@ else
} }
ini_set('error_log', LOG_DIR .'php_err.log'); ini_set('error_log', LOG_DIR .'php_err.log');
// magic quotes // Check some variable
if (get_magic_quotes_gpc()) die('set magic_quotes off'); // Magic quotes
// json if (get_magic_quotes_gpc()) die('Set magic_quotes off');
if (!function_exists('json_encode')) die('not json_encode'); // JSON
if (!function_exists('json_encode')) die('Json_encode not installed');
// Tidy
if (!function_exists('tidy_repair_string')) die('Set $bb_cfg[\'tidy_post\'] = false in config.php');
// Triggers // Triggers
define('BB_ENABLED', TRIGGERS_DIR .'$on'); define('BB_ENABLED', TRIGGERS_DIR .'$on');

View file

@ -781,8 +781,6 @@ class bbcode
*/ */
function tidy ($text) function tidy ($text)
{ {
if (!function_exists('tidy_repair_string')) die('(see $bb_cfg[\'tidy_post\'] in config.php)');
$text = tidy_repair_string($text, $this->tidy_cfg, 'utf8'); $text = tidy_repair_string($text, $this->tidy_cfg, 'utf8');
return $text; return $text;
} }

View file

@ -37,10 +37,10 @@ class user_common
* Defaults options for guests * Defaults options for guests
*/ */
var $opt_js_guest = array( var $opt_js_guest = array(
'h_av' => 1, 'h_av' => 1, // hide avatar
'h_rnk_i' => 1, 'h_rnk_i' => 1, // hide rank images
'h_smile' => 1, 'h_smile' => 1, // hide smilies
'h_sig' => 1, 'h_sig' => 1, // hide signatures
); );
/** /**
@ -755,7 +755,7 @@ class user_common
$excluded[] = $not_auth; $excluded[] = $not_auth;
} }
if(bf($this->opt, 'user_opt', 'hide_porn_forums')) if (bf($this->opt, 'user_opt', 'hide_porn_forums'))
{ {
global $datastore; global $datastore;
@ -765,9 +765,12 @@ class user_common
$forums = $datastore->get('cat_forums'); $forums = $datastore->get('cat_forums');
} }
foreach($forums['forum'] as $key => $row) if (isset($forums['forum']))
{ {
if($row['allow_porno_topic']) $excluded[] = $row['forum_id']; foreach ($forums['forum'] as $key => $row)
{
if ($row['allow_porno_topic']) $excluded[] = $row['forum_id'];
}
} }
} }

View file

@ -436,7 +436,6 @@ if ( count($orig_word) )
// templating vars // templating vars
// //
$new_topic_url = POSTING_URL . "?mode=newtopic&f=$forum_id"; $new_topic_url = POSTING_URL . "?mode=newtopic&f=$forum_id";
$new_topic_url .= ($t_data['topic_tpl_id']) ? '&tpl=1' : '';
$reply_topic_url = POSTING_URL . "?mode=reply&t=$topic_id"; $reply_topic_url = POSTING_URL . "?mode=reply&t=$topic_id";
$view_forum_url = "viewforum.php?f=$forum_id"; $view_forum_url = "viewforum.php?f=$forum_id";
$view_prev_topic_url = "viewtopic.php?t=$topic_id&view=previous#newest"; $view_prev_topic_url = "viewtopic.php?t=$topic_id&view=previous#newest";