diff --git a/upload/ajax/posts.php b/upload/ajax/posts.php index 381845a7d..0772fa535 100644 --- a/upload/ajax/posts.php +++ b/upload/ajax/posts.php @@ -93,6 +93,7 @@ switch($this->request['type']) case 'view_message': $message = (string) $this->request['message']; if(!trim($message)) $this->ajax_die($lang['EMPTY_MESSAGE']); + $message = htmlCHR($message); $this->response['message_html'] = bbcode2html($message); $this->response['res_id'] = @$this->request['res_id']; diff --git a/upload/common.php b/upload/common.php index 65cf2dd14..246f363c0 100644 --- a/upload/common.php +++ b/upload/common.php @@ -367,7 +367,7 @@ class cache_memcache extends cache_common $this->cur_query = null; } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { if (!$this->connected) $this->connect(); @@ -380,7 +380,7 @@ class cache_memcache extends cache_common return ($this->connected) ? $this->memcache->get($name) : false; } - function set ($name, $value, $ttl = 0) + function set ($name, $value, $ttl = 0, $prefix = '') { if (!$this->connected) $this->connect(); @@ -393,7 +393,7 @@ class cache_memcache extends cache_common return ($this->connected) ? $this->memcache->set($name, $value, false, $ttl) : false; } - function rm ($name) + function rm ($name, $prefix = '') { if (!$this->connected) $this->connect(); @@ -701,7 +701,7 @@ class cache_redis extends cache_common $this->cur_query = null; } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { if (!$this->connected) $this->connect(); @@ -714,7 +714,7 @@ class cache_redis extends cache_common return ($this->connected) ? unserialize($this->redis->get($name)) : false; } - function set ($name, $value, $ttl = 0) + function set ($name, $value, $ttl = 0, $prefix = '') { if (!$this->connected) $this->connect(); @@ -740,7 +740,7 @@ class cache_redis extends cache_common } } - function rm ($name) + function rm ($name, $prefix = '') { if (!$this->connected) $this->connect(); @@ -773,7 +773,7 @@ class cache_eaccelerator extends cache_common $this->dbg_enabled = sql_dbg_enabled(); } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { $this->cur_query = "cache->get('$name')"; $this->debug('start'); @@ -784,7 +784,7 @@ class cache_eaccelerator extends cache_common return eaccelerator_get($name); } - function set ($name, $value, $ttl = 0) + function set ($name, $value, $ttl = 0, $prefix = '') { $this->cur_query = "cache->set('$name')"; $this->debug('start'); @@ -795,7 +795,7 @@ class cache_eaccelerator extends cache_common return eaccelerator_put($name, $value, $ttl); } - function rm ($name) + function rm ($name, $prefix = '') { $this->cur_query = "cache->rm('$name')"; $this->debug('start'); @@ -826,7 +826,7 @@ class cache_apc extends cache_common $this->dbg_enabled = sql_dbg_enabled(); } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { $this->cur_query = "cache->get('$name')"; $this->debug('start'); @@ -837,7 +837,7 @@ class cache_apc extends cache_common return apc_fetch($name); } - function set ($name, $value, $ttl = 0) + function set ($name, $value, $ttl = 0, $prefix = '') { $this->cur_query = "cache->set('$name')"; $this->debug('start'); @@ -848,7 +848,7 @@ class cache_apc extends cache_common return apc_store($name, $value, $ttl); } - function rm ($name) + function rm ($name, $prefix = '') { $this->cur_query = "cache->rm('$name')"; $this->debug('start'); @@ -879,7 +879,7 @@ class cache_xcache extends cache_common $this->dbg_enabled = sql_dbg_enabled(); } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { $this->cur_query = "cache->get('$name')"; $this->debug('start'); @@ -890,7 +890,7 @@ class cache_xcache extends cache_common return xcache_get($name); } - function set ($name, $value, $ttl = 0) + function set ($name, $value, $ttl = 0, $prefix = '') { $this->cur_query = "cache->set('$name')"; $this->debug('start'); @@ -901,7 +901,7 @@ class cache_xcache extends cache_common return xcache_set($name, $value, $ttl); } - function rm ($name) + function rm ($name, $prefix = '') { $this->cur_query = "cache->rm('$name')"; $this->debug('start'); @@ -930,7 +930,7 @@ class cache_file extends cache_common $this->dbg_enabled = sql_dbg_enabled(); } - function get ($name) + function get ($name, $get_miss_key_callback = '', $prefix = '', $ttl = 0) { $filename = $this->dir . clean_filename($name) . '.php'; @@ -948,7 +948,7 @@ class cache_file extends cache_common return (!empty($filecache['value'])) ? $filecache['value'] : false; } - function set ($name, $value, $ttl = 86400) + function set ($name, $value, $ttl = 86400, $prefix = '') { if (!function_exists('var_export')) { @@ -977,7 +977,7 @@ class cache_file extends cache_common return (bool) file_write($filecache, $filename, false, true, true); } - function rm ($name) + function rm ($name, $prefix = '') { $filename = $this->dir . clean_filename($name) . '.php'; if (file_exists($filename)) diff --git a/upload/config.php b/upload/config.php index 8da11cce2..ffe3eaf79 100644 --- a/upload/config.php +++ b/upload/config.php @@ -52,8 +52,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array(); // Increase number of revision after update $bb_cfg['tp_version'] = '2.4 (beta)'; -$bb_cfg['tp_release_state'] = 'R385'; -$bb_cfg['tp_release_date'] = '12-03-2012'; +$bb_cfg['tp_release_state'] = 'R386'; +$bb_cfg['tp_release_date'] = '15-03-2012'; // Database $charset = 'utf8'; diff --git a/upload/includes/bbcode.php b/upload/includes/bbcode.php index 98d4a7857..b428d19cb 100644 --- a/upload/includes/bbcode.php +++ b/upload/includes/bbcode.php @@ -785,6 +785,13 @@ function bbcode2html ($text) { $bbcode = new bbcode(); } + $orig_word = array(); + $replacement_word = array(); + obtain_word_list($orig_word, $replacement_word); + if ( count($orig_word) ) + { + $text = preg_replace($orig_word, $replacement_word, $text); + } return $bbcode->bbcode2html($text); } diff --git a/upload/language/lang_russian/lang_admin.php b/upload/language/lang_russian/lang_admin.php index 492bf119f..d70ca3580 100644 --- a/upload/language/lang_russian/lang_admin.php +++ b/upload/language/lang_russian/lang_admin.php @@ -673,4 +673,4 @@ $lang['SEED_BONUS_ADD'] = '

Добавление сид бонуса

$lang['SEED_BONUS_RELEASE'] = 'до N-числа релизов'; $lang['SEED_BONUS_POINTS'] = 'бонусов в час'; $lang['SEED_BONUS_TOR_SIZE'] = '

Минимальный размер раздачи, за который будут начисляться бонусы

Если хотите начислять бонусы за все раздачи, оставьте поле пустым.
'; -$lang['SEED_BONUS_USER_REGDATA'] = '

Минимальный стаж пользователя на трекере, после которого будут начисляться бонусы

Если хотите начислять бонусы всем пользователям, оставте поле пустым.
'; +$lang['SEED_BONUS_USER_REGDATA'] = '

Минимальный стаж пользователя на трекере, после которого будут начисляться бонусы

Если хотите начислять бонусы всем пользователям, оставьте поле пустым.
'; diff --git a/upload/report.php b/upload/report.php index 499c0bd51..e267d41bf 100644 --- a/upload/report.php +++ b/upload/report.php @@ -110,7 +110,7 @@ if (isset($report_module)) // if (empty($errors)) { - $report_desc = DB()->escape($report_desc); + $report_desc = str_replace("\'", "'", $report_desc); $report_title = clean_title($report_title); report_insert($report_module->id, $report_subject_id, $report_reason, $report_title, $report_desc, false); diff --git a/upload/tracker.php b/upload/tracker.php index bac150490..5ce685b0c 100644 --- a/upload/tracker.php +++ b/upload/tracker.php @@ -877,7 +877,7 @@ $template->assign_vars(array( 'POSTER_NAME_NAME' => $poster_name_key, 'POSTER_NAME_VAL' => htmlCHR($poster_name_val), 'TITLE_MATCH_NAME' => $title_match_key, - 'TITLE_MATCH_VAL' => $title_match_val, + 'TITLE_MATCH_VAL' => htmlCHR($title_match_val), 'AJAX_TOPICS' => $user->opt_js['tr_t_ax'], 'SHOW_TIME_TOPICS' => $user->opt_js['tr_t_t'],