diff --git a/upload/ajax/edit_user_profile.php b/upload/ajax/edit_user_profile.php index 6c49c0f1e..7af95f872 100644 --- a/upload/ajax/edit_user_profile.php +++ b/upload/ajax/edit_user_profile.php @@ -123,7 +123,6 @@ switch ($field) { $this->ajax_die($lang['INVALID_DATE'] . $this->request['value']); } - $value = $value - (3600 * -1); $this->response['new_value'] = bb_date($value); break; diff --git a/upload/ajax/topic_tpl.php b/upload/ajax/topic_tpl.php index e5524cc75..8e2ad698a 100644 --- a/upload/ajax/topic_tpl.php +++ b/upload/ajax/topic_tpl.php @@ -18,7 +18,7 @@ switch ($mode) case 'save': 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")) { @@ -94,7 +94,7 @@ switch ($mode) case 'assign': 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']) { diff --git a/upload/callseed.php b/upload/callseed.php index 9e9a84cab..47bac5b95 100644 --- a/upload/callseed.php +++ b/upload/callseed.php @@ -48,30 +48,7 @@ function call_seed($topic_id, $t_info, $to_user_id) $subj = DB()->escape($subj); $text = DB()->escape($text); - $sql = "INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip) - 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; - } + send_pm($to_user_id, $subj, $text, $userdata['user_id']); } $u_id = array(); diff --git a/upload/config.php b/upload/config.php index dcc3e0469..8f6a7fd09 100644 --- a/upload/config.php +++ b/upload/config.php @@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.6 (RC)'; -$bb_cfg['tp_release_date'] = '08-03-2014'; -$bb_cfg['tp_release_state'] = 'R584'; +$bb_cfg['tp_release_date'] = '15-05-2014'; +$bb_cfg['tp_release_state'] = 'R585'; // Database $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['search_help_url'] = 'viewtopic.php?t=4'; // Помощь по поиску -$bb_cfg['bt_min_ratio_allow_dl_tor'] = 0; // 0 - disable -$bb_cfg['bt_min_ratio_warning'] = 0; // 0 - disable -$bb_cfg['bt_min_ratio_dl_button'] = 0; // 0 - disable +$bb_cfg['bt_min_ratio_allow_dl_tor'] = 0.3; // 0 - disable +$bb_cfg['bt_min_ratio_warning'] = 0.6; // 0 - disable +$bb_cfg['bt_min_ratio_dl_button'] = 0.5; // 0 - disable $tr_cfg = array( 'autoclean' => true, @@ -414,10 +414,13 @@ else } ini_set('error_log', LOG_DIR .'php_err.log'); -// magic quotes -if (get_magic_quotes_gpc()) die('set magic_quotes off'); -// json -if (!function_exists('json_encode')) die('not json_encode'); +// Check some variable +// Magic quotes +if (get_magic_quotes_gpc()) die('Set magic_quotes off'); +// 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 define('BB_ENABLED', TRIGGERS_DIR .'$on'); diff --git a/upload/includes/bbcode.php b/upload/includes/bbcode.php index 720e4290c..630bca666 100644 --- a/upload/includes/bbcode.php +++ b/upload/includes/bbcode.php @@ -781,8 +781,6 @@ class bbcode */ 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'); return $text; } diff --git a/upload/includes/sessions.php b/upload/includes/sessions.php index cbb0dd070..8bf61342a 100644 --- a/upload/includes/sessions.php +++ b/upload/includes/sessions.php @@ -37,10 +37,10 @@ class user_common * Defaults options for guests */ var $opt_js_guest = array( - 'h_av' => 1, - 'h_rnk_i' => 1, - 'h_smile' => 1, - 'h_sig' => 1, + 'h_av' => 1, // hide avatar + 'h_rnk_i' => 1, // hide rank images + 'h_smile' => 1, // hide smilies + 'h_sig' => 1, // hide signatures ); /** @@ -755,7 +755,7 @@ class user_common $excluded[] = $not_auth; } - if(bf($this->opt, 'user_opt', 'hide_porn_forums')) + if (bf($this->opt, 'user_opt', 'hide_porn_forums')) { global $datastore; @@ -765,9 +765,12 @@ class user_common $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']; + } } } diff --git a/upload/viewtopic.php b/upload/viewtopic.php index a0ae3f664..0d7afd9a7 100644 --- a/upload/viewtopic.php +++ b/upload/viewtopic.php @@ -436,7 +436,6 @@ if ( count($orig_word) ) // templating vars // $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"; $view_forum_url = "viewforum.php?f=$forum_id"; $view_prev_topic_url = "viewtopic.php?t=$topic_id&view=previous#newest";