git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@97 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2011-07-12 10:09:13 +00:00
commit 8af4f335b3
9 changed files with 22 additions and 19 deletions

View file

@ -25,6 +25,7 @@ switch ($ajax->action)
case 'mod_action': case 'mod_action':
case 'change_tor_status': case 'change_tor_status':
case 'gen_passkey'; case 'gen_passkey';
require(BB_ROOT .'attach_mod/attachment_mod.php');
require(INC_DIR .'functions_torrent.php'); require(INC_DIR .'functions_torrent.php');
break; break;

View file

@ -52,6 +52,9 @@ switch($mode)
} }
} }
break; break;
case 'refresh_captcha';
$html = CAPTCHA()->get_html();
break;
} }
$this->response['html'] = $html; $this->response['html'] = $html;

View file

@ -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.0.2'; $bb_cfg['tp_version'] = '2.0.2';
$bb_cfg['tp_release_state'] = 'TP II r96'; $bb_cfg['tp_release_state'] = 'TP II r97';
$bb_cfg['tp_release_date'] = '11-07-2011'; $bb_cfg['tp_release_date'] = '12-07-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Попробуйте повторить запрос через несколько минут";
@ -207,7 +207,6 @@ define('DIR_SEPR', DIRECTORY_SEPARATOR);
define('BB_PATH', realpath(BB_ROOT) ); // absolute pathname to the forum root define('BB_PATH', realpath(BB_ROOT) ); // absolute pathname to the forum root
define('ADMIN_DIR', BB_PATH .'/admin/' ); define('ADMIN_DIR', BB_PATH .'/admin/' );
define('CACHE_DIR', BB_PATH .'/cache/' ); define('CACHE_DIR', BB_PATH .'/cache/' );
define('CFG_DIR', BB_PATH .'/config/' );
define('DEV_DIR', BB_PATH .'/develop/' ); define('DEV_DIR', BB_PATH .'/develop/' );
define('INC_DIR', BB_PATH .'/includes/' ); define('INC_DIR', BB_PATH .'/includes/' );
define('LANG_ROOT_DIR', BB_PATH .'/language/' ); define('LANG_ROOT_DIR', BB_PATH .'/language/' );
@ -380,7 +379,7 @@ define('CRON_ALLOWED', TRIGGERS_DIR .'cron_allowed');
define('CRON_RUNNING', TRIGGERS_DIR .'cron_running'); define('CRON_RUNNING', TRIGGERS_DIR .'cron_running');
// Cron // Cron
$bb_cfg['cron_enabled'] = true; // При отвязки крона старт производить из cron.php $bb_cfg['cron_enabled'] = false; // При отвязки крона старт производить из cron.php
$bb_cfg['cron_check_interval'] = 300; // sec $bb_cfg['cron_check_interval'] = 300; // sec
// News // News

View file

@ -7,7 +7,7 @@ class captcha_common
{ {
var $cfg = array(); // êîíôèã var $cfg = array(); // êîíôèã
var $can_bypass = false; // ìîæåò îáîéòè êàï÷ó var $can_bypass = false; // ìîæåò îáîéòè êàï÷ó
var $cap_img_total = 100; // êîëè÷åñòâî òåêóùèõ êàðòèíîê var $cap_img_total = 1000; // êîëè÷åñòâî òåêóùèõ êàðòèíîê
var $new_per_minute = 10; // ñêîëüêî ãåíåðèòü íîâûõ, ñòîëüêî æå áóäåò ïîìå÷àòüñÿ äëÿ óäàëåíèÿ var $new_per_minute = 10; // ñêîëüêî ãåíåðèòü íîâûõ, ñòîëüêî æå áóäåò ïîìå÷àòüñÿ äëÿ óäàëåíèÿ
var $key_ttl = 300; // âðåìÿ æèçíè _code_ êëþ÷à var $key_ttl = 300; // âðåìÿ æèçíè _code_ êëþ÷à
var $cap_sid_len = 20; // äëèíà sid'a var $cap_sid_len = 20; // äëèíà sid'a
@ -89,10 +89,8 @@ class captcha_common
return ' return '
<div><img src="'. $this->new_img_path .'?'. mt_rand() .'" width="120" height="72" alt="pic" /></div> <div><img src="'. $this->new_img_path .'?'. mt_rand() .'" width="120" height="72" alt="pic" /></div>
<div> <input type="hidden" name="'. $this->cap_sid_key .'" value="'. $this->new_cap_sid .'" />
<input type="hidden" name="'. $this->cap_sid_key .'" value="'. $this->new_cap_sid .'" /> <input type="text" name="'. $this->new_code_key .'" value="" size="25" class="bold" />
<input type="text" name="'. $this->new_code_key .'" value="" size="25" class="bold" />
</div>
'; ';
} }

View file

@ -171,7 +171,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
if ($row = DB()->fetch_row($sql)) if ($row = DB()->fetch_row($sql))
{ {
$last_msg = DB()->escape($last_msg); $last_msg = DB()->escape($row['post_text']);
if ($last_msg == $post_message) if ($last_msg == $post_message)
{ {

View file

@ -9,7 +9,7 @@ if (!defined('BB_ROOT')) die(basename(__FILE__));
if (!defined('BB_SCRIPT')) define('BB_SCRIPT', 'undefined'); if (!defined('BB_SCRIPT')) define('BB_SCRIPT', 'undefined');
// Exit if board is disabled via ON/OFF trigger // Exit if board is disabled via ON/OFF trigger
if (!defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE')) if (!defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !IS_ADMIN)
{ {
if (file_exists(BB_DISABLED)) if (file_exists(BB_DISABLED))
{ {
@ -524,10 +524,6 @@ define('SQL_LAYER', 'mysql');
$bb_cfg = array_merge(bb_get_config(BB_CONFIG), $bb_cfg); $bb_cfg = array_merge(bb_get_config(BB_CONFIG), $bb_cfg);
$bb_cfg['cookie_name'] = $bb_cfg['cookie_prefix'];
$bb_cfg['board_dateformat'] = $bb_cfg['default_dateformat'];
$bb_cfg['board_lang'] = $bb_cfg['default_lang'];
$user = new user_common(); $user = new user_common();
$userdata =& $user->data; $userdata =& $user->data;
@ -576,7 +572,13 @@ if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('I
// Update cron_last_check // Update cron_last_check
bb_update_config(array('cron_last_check' => (time() + 10))); bb_update_config(array('cron_last_check' => (time() + 10)));
require(CFG_DIR .'cron_cfg.php'); define('CRON_LOG_ENABLED', true); // global ON/OFF
define('CRON_FORCE_LOG', false); // always log regardless of job settings
define('CRON_DIR', INC_DIR .'cron/');
define('CRON_JOB_DIR', CRON_DIR .'jobs/');
define('CRON_LOG_DIR', 'cron/'); // inside LOG_DIR
define('CRON_LOG_FILE', 'cron'); // without ext
bb_log(date('H:i:s - ') . getmypid() .' -x-- DB-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check'); bb_log(date('H:i:s - ') . getmypid() .' -x-- DB-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check');

View file

@ -86,7 +86,7 @@ switch ($mode)
'user_password' => '', 'user_password' => '',
'user_email' => '', 'user_email' => '',
'user_timezone' => $bb_cfg['board_timezone'], 'user_timezone' => $bb_cfg['board_timezone'],
'user_lang' => $bb_cfg['board_lang'], 'user_lang' => $bb_cfg['default_lang'],
'user_opt' => 0, 'user_opt' => 0,
); );
break; break;

View file

@ -54,7 +54,7 @@ ajax.callback.user_register = function(data){
<!-- IF CAPTCHA_HTML --> <!-- IF CAPTCHA_HTML -->
<tr> <tr>
<td>{L_CONFIRM_CODE}:</td> <td>{L_CONFIRM_CODE}:</td>
<td>{CAPTCHA_HTML}</td> <td><span id="refresh_captcha">{CAPTCHA_HTML}</span> <img src="/images/pic_loading.gif" title="{L_UPDATE}" onclick="ajax.exec({ action: 'user_register', mode: 'refresh_captcha'}); return false;"></td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF EDIT_PROFILE --> <!-- IF EDIT_PROFILE -->

View file

@ -497,7 +497,7 @@ if ($allowed_forums)
{ {
$curr_set[${"{$name}_key"}] = ${"{$name}_val"}; $curr_set[${"{$name}_key"}] = ${"{$name}_val"};
} }
$curr_set_sql = $db->escape(serialize($curr_set)); $curr_set_sql = DB()->escape(serialize($curr_set));
// Text search // Text search
$search_match_topics_csv = ''; $search_match_topics_csv = '';