@@ -217,28 +217,28 @@ switch($this->request['type'])
break;
case 'add':
- if (!isset($this->request['topic_id']))
+ if (!isset($this->request['topic_id']))
{
$this->ajax_die('empty topic_id');
}
- if(bf($userdata['user_opt'], 'user_opt', 'allow_post'))
+ if (bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
}
- else if(!$is_auth['auth_reply'])
+ elseif (!$is_auth['auth_reply'])
{
$this->ajax_die(sprintf($lang['SORRY_AUTH_REPLY'], strip_tags($is_auth['auth_reply_type'])));
}
- if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
+ if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
- $this->ajax_die($lang['TOPIC_LOCKED']);
+ $this->ajax_die($lang['TOPIC_LOCKED']);
}
- $message = (string) $this->request['message'];
+ $message = (string) $this->request['message'];
$message = prepare_message($message);
- // Flood control
+ // Flood control
$where_sql = (IS_GUEST) ? "p.poster_ip = '". USER_IP ."'" : "p.poster_id = {$userdata['user_id']}";
$sql = "SELECT MAX(p.post_time) AS last_post_time FROM ". BB_POSTS ." p WHERE $where_sql";
@@ -276,33 +276,33 @@ switch($this->request['type'])
}
}
- if($bb_cfg['max_smilies'])
- {
+ if ($bb_cfg['max_smilies'])
+ {
$count_smilies = substr_count(bbcode2html($message), '
;
- if($count_smilies > $bb_cfg['max_smilies'])
+ if ($count_smilies > $bb_cfg['max_smilies'])
{
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
}
- }
+ }
DB()->sql_query()
sql_nextid();
+ $post_id = DB()->sql_nextid();
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '". DB()->escape($message) ."')");
- update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
+ update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
$s_message = str_replace('\n', "\n", $message);
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
add_search_words($post_id, stripslashes($s_message), stripslashes($s_topic_title));
- update_post_html(array(
+ update_post_html(array(
'post_id' => $post_id,
'post_text' => $message,
));
$this->response['redirect'] = make_url(POST_URL . $post_id .'#'. $post_id);
- break;
+ break;
default:
$this->ajax_die('empty type');
- break;
-}
+ break;
+}
\ No newline at end of file
diff --git a/upload/ajax/topic_tpl.php b/upload/ajax/topic_tpl.php
index 5b9a0e65c..e5524cc75 100644
--- a/upload/ajax/topic_tpl.php
+++ b/upload/ajax/topic_tpl.php
@@ -169,4 +169,4 @@ if ($sql_error)
// выход
$this->response['mode'] = $mode;
-$this->response['timestamp'] = TIMENOW;
+$this->response['timestamp'] = TIMENOW;
\ No newline at end of file
diff --git a/upload/ajax/user_register.php b/upload/ajax/user_register.php
index b7dbed8d9..3120da2bd 100644
--- a/upload/ajax/user_register.php
+++ b/upload/ajax/user_register.php
@@ -20,7 +20,8 @@ switch($mode)
{
$html = '
'. $err .'';
}
- break;
+ break;
+
case 'check_email':
$email = (string) $this->request['email'];
@@ -32,7 +33,8 @@ switch($mode)
{
$html = '
'. $err .'';
}
- break;
+ break;
+
case 'check_pass':
$pass = (string) $this->request['pass'];
$pass_confirm = (string) $this->request['pass_confirm'];
@@ -42,7 +44,7 @@ switch($mode)
}
else
{
- if ($pass != $pass_confirm)
+ if ($pass != $pass_confirm)
{
$html = '
'. $lang['CHOOSE_PASS_ERR'] .'';
}
@@ -60,12 +62,13 @@ switch($mode)
{
$text = (IS_GUEST) ? $lang['CHOOSE_PASS_REG_OK'] : $lang['CHOOSE_PASS_OK'];
$html = '
'. $text .'';
- }
+ }
}
}
break;
+
case 'refresh_captcha';
- $html = CAPTCHA()->get_html();
+ $html = CAPTCHA()->get_html();
break;
}
diff --git a/upload/ajax/view_profile.php b/upload/ajax/view_profile.php
index 373827f97..5fbfe40fb 100644
--- a/upload/ajax/view_profile.php
+++ b/upload/ajax/view_profile.php
@@ -9,10 +9,10 @@ $mode = (string) $this->request['mode'];
switch ($mode)
{
case 'active_torrents':
- $user_id = (int) $this->request['user_id'];
- if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
+ $user_id = (int) $this->request['user_id'];
+ if (!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
$user_info = get_userdata($user_id);
- if(!bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
+ if (!bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
$excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW);
$not_auth_forums_sql = ($excluded_forums_csv) ? "
diff --git a/upload/ajax/view_torrent.php b/upload/ajax/view_torrent.php
index b81d7b5db..426445279 100644
--- a/upload/ajax/view_torrent.php
+++ b/upload/ajax/view_torrent.php
@@ -10,11 +10,8 @@ if (!isset($this->request['attach_id']))
}
$attach_id = (int) $this->request['attach_id'];
-$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename
- FROM ". BB_ATTACHMENTS_DESC ." at
- WHERE at.attach_id = $attach_id
- LIMIT 1");
-if(!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
+$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB_ATTACHMENTS_DESC ." at WHERE at.attach_id = $attach_id LIMIT 1");
+if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
if (($file_contents = @file_get_contents($filename)) === false)
@@ -34,7 +31,7 @@ $tor_filelist = build_tor_filelist($file_contents);
function build_tor_filelist ($file_contents)
{
- global $lang;
+ global $lang;
if (!$tor = bdecode($file_contents))
{
@@ -172,5 +169,4 @@ function clean_tor_dirname ($dirname)
return str_replace(array('[', ']', '<', '>', "'"), array('[', ']', '<', '>', '''), $dirname);
}
-$this->response['html'] = $tor_filelist;
-
+$this->response['html'] = $tor_filelist;
\ No newline at end of file
diff --git a/upload/bt/includes/init_tr.php b/upload/bt/includes/init_tr.php
index 50c093a8f..5c4276809 100644
--- a/upload/bt/includes/init_tr.php
+++ b/upload/bt/includes/init_tr.php
@@ -489,4 +489,4 @@ class sql_db
$msg[] = '';
bb_log($msg, 'sql_error_tr');
}
-}
+}
\ No newline at end of file
diff --git a/upload/config.php b/upload/config.php
index 2f4263829..9ce68bfdf 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.5 (unstable)';
-$bb_cfg['tp_release_date'] = '17-01-2014';
-$bb_cfg['tp_release_state'] = 'R560';
+$bb_cfg['tp_release_date'] = '19-01-2014';
+$bb_cfg['tp_release_state'] = 'R561';
// Database
$charset = 'utf8';
diff --git a/upload/develop/benchmark/timer.php b/upload/develop/benchmark/timer.php
index 70dedd20b..bf5576a37 100644
--- a/upload/develop/benchmark/timer.php
+++ b/upload/develop/benchmark/timer.php
@@ -354,4 +354,4 @@ class Benchmark_Timer {
$microtime = explode(' ', microtime());
return $microtime[1] . substr($microtime[0], 1);
}
-}
+}
\ No newline at end of file
diff --git a/upload/develop/dbg_config.php b/upload/develop/dbg_config.php
index ef3be8899..66c2960c6 100644
--- a/upload/develop/dbg_config.php
+++ b/upload/develop/dbg_config.php
@@ -3,5 +3,4 @@
// Open file in Editor
$bb_cfg['dbg']['interpreter'] = 'cmd.exe /c START';
$bb_cfg['dbg']['editor_path'] = 'D:\Programs\TextPad\TextPad.exe';
-$bb_cfg['dbg']['editor_args'] = '%s(%s)'; // %s - file_to_open path, %s - line number
-
+$bb_cfg['dbg']['editor_args'] = '%s(%s)'; // %s - file_to_open path, %s - line number
\ No newline at end of file
diff --git a/upload/develop/error_handler.php b/upload/develop/error_handler.php
index e25fd5033..7ef78c873 100644
--- a/upload/develop/error_handler.php
+++ b/upload/develop/error_handler.php
@@ -103,5 +103,4 @@ class bb_error_handler
}
$errHandler = new bb_error_handler;
-set_error_handler(array(&$errHandler, 'bb_error_handler'));
-
+set_error_handler(array(&$errHandler, 'bb_error_handler'));
\ No newline at end of file
diff --git a/upload/develop/functions_debug.php b/upload/develop/functions_debug.php
index 89f04b22b..b127a6a27 100644
--- a/upload/develop/functions_debug.php
+++ b/upload/develop/functions_debug.php
@@ -99,4 +99,4 @@ function showSource ($file, $line, $prev = 10, $next = 10, $add_view_full_link =
echo '
View Full Source';
}
return ob_get_clean();
-}
+}
\ No newline at end of file
diff --git a/upload/develop/init_debug.php b/upload/develop/init_debug.php
index 56c55c9d9..bbfac4d57 100644
--- a/upload/develop/init_debug.php
+++ b/upload/develop/init_debug.php
@@ -38,4 +38,4 @@ function prepend_debug_info ($contents)
return $contents;
}
-ob_start('prepend_debug_info');
+ob_start('prepend_debug_info');
\ No newline at end of file
diff --git a/upload/develop/profiler/profiler.css b/upload/develop/profiler/profiler.css
index cb690d1a4..492f98783 100644
--- a/upload/develop/profiler/profiler.css
+++ b/upload/develop/profiler/profiler.css
@@ -116,4 +116,4 @@ font {
font-size: 12px;
background: #FBFBFB;
font-family: Courier, monospace;
-}
+}
\ No newline at end of file
diff --git a/upload/develop/profiler/profiler.php b/upload/develop/profiler/profiler.php
index a594399c1..050553706 100644
--- a/upload/develop/profiler/profiler.php
+++ b/upload/develop/profiler/profiler.php
@@ -32,4 +32,4 @@ class profiler
trigger_error("Unsupported profiler extension: $extension_name", E_USER_ERROR);
}
}
-}
+}
\ No newline at end of file
diff --git a/upload/develop/profiler/profiler_dbg.php b/upload/develop/profiler/profiler_dbg.php
index 898051eb0..1db4f508e 100644
--- a/upload/develop/profiler/profiler_dbg.php
+++ b/upload/develop/profiler/profiler_dbg.php
@@ -156,7 +156,7 @@ class profiler_dbg extends profiler
var $min_time = 0;
var $total_time = 0;
- // $min_time - ( %)
+ // $min_time - минимальное время выполнения для вывода в подробной построковой информации (в секундах или %)
//
function print_profile_data ($min_time = 0)
{
@@ -370,8 +370,4 @@ class profiler_dbg extends profiler
if ($a['time'] == $b['time']) return 0;
return ($a['time'] > $b['time']) ? -1 : 1;
}
-}
-
-
-
-
+}
\ No newline at end of file
diff --git a/upload/includes/captcha/captcha.php b/upload/includes/captcha/captcha.php
index db4296db2..59b11ec11 100644
--- a/upload/includes/captcha/captcha.php
+++ b/upload/includes/captcha/captcha.php
@@ -397,4 +397,4 @@ class captcha_kcaptcha extends captcha_common
return $this->keystring;
}
-}
+}
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/bb_maintenance.php b/upload/includes/cron/jobs/bb_maintenance.php
index cee9fa4f6..9936447b6 100644
--- a/upload/includes/cron/jobs/bb_maintenance.php
+++ b/upload/includes/cron/jobs/bb_maintenance.php
@@ -258,4 +258,4 @@ DB()->query("
if ($posts_days = intval($bb_cfg['posts_cache_days_keep']))
{
DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_html_time < DATE_SUB(NOW(), INTERVAL $posts_days DAY)");
-}
+}
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/cache_gc.php b/upload/includes/cron/jobs/cache_gc.php
index 55737f71a..8e8c16e82 100644
--- a/upload/includes/cron/jobs/cache_gc.php
+++ b/upload/includes/cron/jobs/cache_gc.php
@@ -17,4 +17,4 @@ foreach ($gc_cache as $cache_name)
$changes = CACHE($cache_name)->gc();
$cron_runtime_log .= date('Y-m-d H:i:s') ." -- tr -- $changes rows deleted\n";
}
-}
+}
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/db_backup.php b/upload/includes/cron/jobs/db_backup.php
index d9abb1da4..3efbfa8c2 100644
--- a/upload/includes/cron/jobs/db_backup.php
+++ b/upload/includes/cron/jobs/db_backup.php
@@ -34,4 +34,4 @@ if ($exec_return_status && !$bb_cfg['emailer_disabled'] && $bb_cfg['tech_admin_e
sleep(10);
-DB()->expect_slow_query(16*60, 100);
+DB()->expect_slow_query(16*60, 100);
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/prune_inactive_users.php b/upload/includes/cron/jobs/prune_inactive_users.php
index e134aaf26..bbf9b1964 100644
--- a/upload/includes/cron/jobs/prune_inactive_users.php
+++ b/upload/includes/cron/jobs/prune_inactive_users.php
@@ -63,4 +63,4 @@ while (true)
sleep(3);
}
-unset($prune_users, $not_activated_users, $not_active_users);
+unset($prune_users, $not_activated_users, $not_active_users);
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php b/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php
index d38e2b3a1..d81f834e8 100644
--- a/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php
+++ b/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php
@@ -207,4 +207,4 @@ if($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['see
}
DB()->query("DROP TEMPORARY TABLE IF EXISTS tmp_bonus");
-}
+}
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/tr_complete_count.php b/upload/includes/cron/jobs/tr_complete_count.php
index 8a816b8f3..fee5ff427 100644
--- a/upload/includes/cron/jobs/tr_complete_count.php
+++ b/upload/includes/cron/jobs/tr_complete_count.php
@@ -27,4 +27,4 @@ DB()->query("
");
// Drop tmp table
-DB()->query("DROP TEMPORARY TABLE tmp_complete_count");
+DB()->query("DROP TEMPORARY TABLE tmp_complete_count");
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/tr_maintenance.php b/upload/includes/cron/jobs/tr_maintenance.php
index 33093c7aa..b51fa8359 100644
--- a/upload/includes/cron/jobs/tr_maintenance.php
+++ b/upload/includes/cron/jobs/tr_maintenance.php
@@ -53,4 +53,4 @@ if ($dead_tor_sql && $attach_sql)
DELETE FROM ". BB_BT_TORRENTS ."
WHERE topic_id IN($dead_tor_sql)
");
-}
+}
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/tr_make_snapshot.php b/upload/includes/cron/jobs/tr_make_snapshot.php
index 43cecde1f..c70156a6f 100644
--- a/upload/includes/cron/jobs/tr_make_snapshot.php
+++ b/upload/includes/cron/jobs/tr_make_snapshot.php
@@ -164,4 +164,4 @@ if ($bb_cfg['torhelp_enabled'])
DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_TORHELP .", ". OLD_BB_BT_TORHELP);
}
-DB()->expect_slow_query(10);
+DB()->expect_slow_query(10);
\ No newline at end of file
diff --git a/upload/includes/cron/jobs/tr_update_seeder_last_seen.php b/upload/includes/cron/jobs/tr_update_seeder_last_seen.php
index 75025a25b..d9f868d9e 100644
--- a/upload/includes/cron/jobs/tr_update_seeder_last_seen.php
+++ b/upload/includes/cron/jobs/tr_update_seeder_last_seen.php
@@ -12,4 +12,4 @@ DB()->query("
tor.topic_id = b.topic_id
");
-DB()->query("TRUNCATE TABLE ". BUF_LAST_SEEDER);
+DB()->query("TRUNCATE TABLE ". BUF_LAST_SEEDER);
\ No newline at end of file
diff --git a/upload/includes/datastore/build_attach_extensions.php b/upload/includes/datastore/build_attach_extensions.php
index ee543eb8b..5317d9585 100644
--- a/upload/includes/datastore/build_attach_extensions.php
+++ b/upload/includes/datastore/build_attach_extensions.php
@@ -14,4 +14,4 @@ $extensions = DB()->fetch_rowset("
AND g.allow_group = 1
");
-$this->store('attach_extensions', $extensions);
+$this->store('attach_extensions', $extensions);
\ No newline at end of file
diff --git a/upload/includes/datastore/build_cat_forums.php b/upload/includes/datastore/build_cat_forums.php
index ed5097991..263f45ea2 100644
--- a/upload/includes/datastore/build_cat_forums.php
+++ b/upload/includes/datastore/build_cat_forums.php
@@ -24,14 +24,14 @@ $data = array(
// Store only these fields from BB_FORUMS in $data['f']
$forum_store_fields = array_flip(array_keys($bf['forum_perm']));
$forum_store_fields += array_flip(array(
- 'forum_id',
- 'cat_id',
- 'forum_name',
- 'forum_desc',
- 'forum_status',
- 'forum_posts',
- 'forum_topics',
- 'forum_parent',
+ 'forum_id',
+ 'cat_id',
+ 'forum_name',
+ 'forum_desc',
+ 'forum_status',
+ 'forum_posts',
+ 'forum_topics',
+ 'forum_parent',
));
// Categories
@@ -73,7 +73,7 @@ foreach (DB()->fetch_rowset($sql) as $row)
$not_auth['user_read'][] = $fid;
}
- $data['forum'][$fid] = $row;
+ $data['forum'][$fid] = $row;
// Store forums data
if ($parent_id = $row['forum_parent'])
@@ -136,7 +136,7 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
SELECT topic_id, topic_time, topic_title, forum_id
FROM ". BB_TOPICS ."
WHERE forum_id IN ($news_forum_ids)
- AND topic_moved_id = 0
+ AND topic_moved_id = 0
ORDER BY topic_time DESC
LIMIT $news_count
");
@@ -149,18 +149,18 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
//
if ($bb_cfg['show_network_news'] AND $net_forum_ids = $bb_cfg['network_news_forum_id'])
{
- $net_count = max($bb_cfg['network_news_count'], 1);
+ $net_count = max($bb_cfg['network_news_count'], 1);
- $data = DB()->fetch_rowset("
- SELECT topic_id, topic_time, topic_title, forum_id
- FROM ". BB_TOPICS ."
- WHERE forum_id IN ($net_forum_ids)
- AND topic_moved_id = 0
- ORDER BY topic_time DESC
- LIMIT $net_count
- ");
+ $data = DB()->fetch_rowset("
+ SELECT topic_id, topic_time, topic_title, forum_id
+ FROM ". BB_TOPICS ."
+ WHERE forum_id IN ($net_forum_ids)
+ AND topic_moved_id = 0
+ ORDER BY topic_time DESC
+ LIMIT $net_count
+ ");
- $this->store('network_news', $data);
+ $this->store('network_news', $data);
}
//
@@ -174,8 +174,8 @@ if ($bb_cfg['show_ads'])
SELECT *
FROM ". BB_ADS ."
WHERE ad_status = 1
- AND ad_start_time < NOW()
- AND DATE_ADD(ad_start_time, INTERVAL ad_active_days DAY) > NOW()
+ AND ad_start_time < NOW()
+ AND DATE_ADD(ad_start_time, INTERVAL ad_active_days DAY) > NOW()
");
foreach ($active_ads as $ad)
@@ -187,9 +187,9 @@ if ($bb_cfg['show_ads'])
$ad_block_assignment[$block_id][] = $ad['ad_id'];
}
}
-
$ad_html[$ad['ad_id']] = $ad['ad_html'];
}
+
$this->store('ads', $ad_html);
bb_update_config(array('active_ads' => serialize($ad_block_assignment)));
-}
+}
\ No newline at end of file
diff --git a/upload/includes/datastore/build_ranks.php b/upload/includes/datastore/build_ranks.php
index 9e5dd40ac..e428b3a11 100644
--- a/upload/includes/datastore/build_ranks.php
+++ b/upload/includes/datastore/build_ranks.php
@@ -11,4 +11,4 @@ foreach (DB()->fetch_rowset($sql) as $row)
$ranks[$row['rank_id']] = $row;
}
-$this->store('ranks', $ranks);
+$this->store('ranks', $ranks);
\ No newline at end of file
diff --git a/upload/includes/datastore/build_smilies.php b/upload/includes/datastore/build_smilies.php
index f7c52f63e..0bc49996a 100644
--- a/upload/includes/datastore/build_smilies.php
+++ b/upload/includes/datastore/build_smilies.php
@@ -13,7 +13,7 @@ foreach ($rowset as $smile)
{
$smilies['orig'][] = '#(?<=^|\W)'. preg_quote($smile['code'], '#') .'(?=$|\W)#';
$smilies['repl'][] = '
!['. $smile['emoticon'] .']('. $bb_cfg['smilies_path'] .'/'. $smile['smile_url'] .')
';
- $smilies['smile'][] = $smile;
+ $smilies['smile'][] = $smile;
}
-$this->store('smile_replacements', $smilies);
+$this->store('smile_replacements', $smilies);
\ No newline at end of file
diff --git a/upload/includes/functions.php b/upload/includes/functions.php
index 0c5d6df4a..87fcf76ec 100644
--- a/upload/includes/functions.php
+++ b/upload/includes/functions.php
@@ -2745,26 +2745,26 @@ function get_path_from_id ($id, $ext_id, $base_path, $first_div, $sec_div)
return ($base_path ? "$base_path/" : '') . ($id % $sec_div) .'/'. $id . ($ext ? ".$ext" : '');
}
-function send_pm($user_id, $subject, $message, $poster_id = BOT_UID)
+function send_pm ($user_id, $subject, $message, $poster_id = BOT_UID)
{
global $userdata;
$subject = DB()->escape($subject);
$message = DB()->escape($message);
- if($poster_id == BOT_UID)
- {
- $poster_ip = '7f000001';
- }
- else if($row = DB()->fetch_row("SELECT user_reg_ip FROM ". BB_USERS ." WHERE user_id = $poster_id"))
- {
- $poster_ip = $row['user_reg_ip'];
- }
- else
- {
- $poster_id = $userdata['user_id'];
- $poster_ip = USER_IP;
- }
+ if ($poster_id == BOT_UID)
+ {
+ $poster_ip = '7f000001';
+ }
+ elseif ($row = DB()->fetch_row("SELECT user_reg_ip FROM ". BB_USERS ." WHERE user_id = $poster_id"))
+ {
+ $poster_ip = $row['user_reg_ip'];
+ }
+ else
+ {
+ $poster_id = $userdata['user_id'];
+ $poster_ip = USER_IP;
+ }
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$poster_id}, $user_id, ". TIMENOW .", '$poster_ip')");
@@ -2780,7 +2780,7 @@ function send_pm($user_id, $subject, $message, $poster_id = BOT_UID)
WHERE user_id = $user_id");
}
-function profile_url($data)
+function profile_url ($data)
{
global $bb_cfg, $lang, $datastore;
@@ -2792,22 +2792,22 @@ function profile_url($data)
$user_rank = !empty($data['user_rank']) ? $data['user_rank'] : 0;
- if(isset($ranks[$user_rank]))
+ if (isset($ranks[$user_rank]))
{
$title = $ranks[$user_rank]['rank_title'];
$style = $ranks[$user_rank]['rank_style'];
}
- if(empty($title)) $title = $lang['USER'];
- if(empty($style)) $style = 'colorUser';
+ if (empty($title)) $title = $lang['USER'];
+ if (empty($style)) $style = 'colorUser';
- if(!$bb_cfg['color_nick']) $style = '';
+ if (!$bb_cfg['color_nick']) $style = '';
$username = !empty($data['username']) ? $data['username'] : $lang['GUEST'];
$user_id = (!empty($data['user_id']) && $username != $lang['GUEST']) ? $data['user_id'] : GUEST_UID;
$profile = '
'. $username .'';
- if(!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username)
+ if (!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username)
{
$profile = '
'. $profile .'';
}
@@ -2815,7 +2815,8 @@ function profile_url($data)
return $profile;
}
-function seo_link_header($str){
+function seo_link_header ($str)
+{
/**
* Функция обработки url. Сверяет url с переданным выражением.
*/
diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php
index 6da94a84e..debce337e 100644
--- a/upload/includes/functions_post.php
+++ b/upload/includes/functions_post.php
@@ -159,41 +159,26 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$topic_dl_type = (isset($_POST['topic_dl_type']) && ($post_info['allow_reg_tracker'] || $is_auth['auth_mod'])) ? TOPIC_DL_TYPE_DL : TOPIC_DL_TYPE_NORMAL;
- if (($mode == 'editpost' && $post_data['first_post']))
- {
- $sql_update = "
- UPDATE
- ". BB_POSTS ." p,
- ". BB_TOPICS ." t
- SET
- p.post_time = ". TIMENOW .",
- t.topic_title = '$post_subject',
- t.topic_type = $topic_type,
- t.topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
- t.topic_vote = " . $topic_vote : "") . ",
- t.topic_last_post_time = ". TIMENOW .",
- t.topic_time = ". TIMENOW ."
- WHERE
- t.topic_id = $topic_id
- AND t.topic_first_post_id = p.post_id
- ";
- }
- else
- {
- $sql_update = "
- UPDATE
- " . BB_TOPICS . "
- SET
- topic_title = '$post_subject',
- topic_type = $topic_type,
- topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
- topic_vote = " . $topic_vote : "") . "
- WHERE
- topic_id = $topic_id
- ";
- }
+ $sql_insert = "
+ INSERT INTO
+ " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote)
+ VALUES
+ ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)
+ ";
- $sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)" : $sql_update;
+ $sql_update = "
+ UPDATE
+ " . BB_TOPICS . "
+ SET
+ topic_title = '$post_subject',
+ topic_type = $topic_type,
+ topic_dl_type = $topic_dl_type
+ ". ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = ". $topic_vote : "") ."
+ WHERE
+ topic_id = $topic_id
+ ";
+
+ $sql = ($mode != "editpost") ? $sql_insert : $sql_update;
if (!DB()->sql_query($sql))
{
diff --git a/upload/includes/functions_selects.php b/upload/includes/functions_selects.php
index 7a3f957ab..1109aea6a 100644
--- a/upload/includes/functions_selects.php
+++ b/upload/includes/functions_selects.php
@@ -5,7 +5,7 @@ if (!defined('BB_ROOT')) die(basename(__FILE__));
//
// Pick a language, any language
//
-function language_select($default, $select_name = "language", $dirname="language")
+function language_select ($default, $select_name = "language", $dirname="language")
{
global $bb_cfg;
if(!$default) $default = $bb_cfg['default_lang'];
@@ -43,7 +43,7 @@ function language_select($default, $select_name = "language", $dirname="language
//
// Pick a timezone
//
-function tz_select($default, $select_name = 'timezone')
+function tz_select ($default, $select_name = 'timezone')
{
global $sys_timezone, $lang;
@@ -66,7 +66,7 @@ function tz_select($default, $select_name = 'timezone')
//
// Templates
//
-function templates_select($default_style, $select_name = 'tpl_name')
+function templates_select ($default_style, $select_name = 'tpl_name')
{
global $bb_cfg;
diff --git a/upload/includes/functions_validate.php b/upload/includes/functions_validate.php
index 05dfe74d9..9696cbf73 100644
--- a/upload/includes/functions_validate.php
+++ b/upload/includes/functions_validate.php
@@ -111,4 +111,4 @@ function validate_email ($email, $check_ban_and_taken = true)
}
return false;
-}
+}
\ No newline at end of file
diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php
index 873ee4bee..c0adabd3f 100644
--- a/upload/includes/init_bb.php
+++ b/upload/includes/init_bb.php
@@ -580,9 +580,8 @@ $dl_status_css = array(
DL_STATUS_CANCEL => 'dlCancel',
);
-
-// Show 'Board is disabled' message if needed.
+// Show 'Board is disabled' message if needed
if ($bb_cfg['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN'))
{
message_die(GENERAL_MESSAGE, 'BOARD_DISABLE');
-}
+}
\ No newline at end of file
diff --git a/upload/includes/online_userlist.php b/upload/includes/online_userlist.php
index 56ad2303c..9453194ed 100644
--- a/upload/includes/online_userlist.php
+++ b/upload/includes/online_userlist.php
@@ -150,4 +150,4 @@ $online['cnt'] = $online_short['cnt'] = <<set('online', $online, 45);
-CACHE('bb_cache')->set('online_short', $online_short, 45);
+CACHE('bb_cache')->set('online_short', $online_short, 45);
\ No newline at end of file
diff --git a/upload/includes/page_footer.php b/upload/includes/page_footer.php
index 87c707057..09235ff96 100644
--- a/upload/includes/page_footer.php
+++ b/upload/includes/page_footer.php
@@ -112,4 +112,4 @@ if (defined('REQUESTED_PAGE') && !defined('DISABLE_CACHING_OUTPUT'))
}
}
-bb_exit();
+bb_exit();
\ No newline at end of file
diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php
index ce3e2fb17..8a9e69bc9 100644
--- a/upload/includes/page_header.php
+++ b/upload/includes/page_header.php
@@ -352,7 +352,7 @@ $template->pparse('page_header');
define('PAGE_HEADER_SENT', true);
-if(!$bb_cfg['gzip_compress'])
+if (!$bb_cfg['gzip_compress'])
{
flush();
}
\ No newline at end of file
diff --git a/upload/includes/posting_tpl.php b/upload/includes/posting_tpl.php
index acdc881ac..8e7edf320 100644
--- a/upload/includes/posting_tpl.php
+++ b/upload/includes/posting_tpl.php
@@ -66,6 +66,7 @@ if ($edit_tpl_mode)
'NO_TPL_ASSIGNED' => !($f_data['forum_tpl_id']),
'TPL_SELECT' => get_select('forum_tpl', $f_data['forum_tpl_id']),
));
+
if ($tpl_data)
{
$template->assign_vars(array(
@@ -78,5 +79,4 @@ if ($edit_tpl_mode)
}
}
-print_page('posting_tpl.tpl');
-
+print_page('posting_tpl.tpl');
\ No newline at end of file
diff --git a/upload/includes/sphinxapi.php b/upload/includes/sphinxapi.php
index f5f4eab72..a25136f5a 100644
--- a/upload/includes/sphinxapi.php
+++ b/upload/includes/sphinxapi.php
@@ -1648,4 +1648,4 @@ class SphinxClient extends cache_common
//
// $Id: sphinxapi.php 2055 2009-11-06 23:09:58Z shodan $
-//
+//
\ No newline at end of file
diff --git a/upload/includes/topic_templates/video_guide.php b/upload/includes/topic_templates/video_guide.php
index cba236540..ed54ba8c4 100644
--- a/upload/includes/topic_templates/video_guide.php
+++ b/upload/includes/topic_templates/video_guide.php
@@ -18,4 +18,5 @@ $lang['TPL']['GUIDE'] = array(
'audio' => 330984,
'torrent' => 330985,
);
+
$lang['TPL']['GUIDE'] = array();
\ No newline at end of file
diff --git a/upload/includes/ucp/usercp_attachcp.php b/upload/includes/ucp/usercp_attachcp.php
index 2d937b23b..0e9aa9a51 100644
--- a/upload/includes/ucp/usercp_attachcp.php
+++ b/upload/includes/ucp/usercp_attachcp.php
@@ -315,4 +315,4 @@ if ($do_pagination && $total_rows > $bb_cfg['topics_per_page'])
generate_pagination(BB_ROOT ."profile.php?mode=attachcp&mode_a=$mode&order=$sort_order&" . POST_USERS_URL . '=' . $profiledata['user_id'] . '&sid=' . $userdata['session_id'], $total_rows, $bb_cfg['topics_per_page'], $start).' ';
}
-print_page('usercp_attachcp.tpl');
+print_page('usercp_attachcp.tpl');
\ No newline at end of file
diff --git a/upload/includes/ucp/usercp_bonus.php b/upload/includes/ucp/usercp_bonus.php
index e2bb3a106..b1e3fd290 100644
--- a/upload/includes/ucp/usercp_bonus.php
+++ b/upload/includes/ucp/usercp_bonus.php
@@ -24,18 +24,18 @@ if (isset($_POST['bonus_id']))
generate_passkey($user_id, true);
$btu = get_bt_userdata($user_id);
}
-
+
$upload = $upload_row[$id]*1024*1024*1024;
$points = $price_row[$id];
-
- if($userdata['user_points'] < $points)
+
+ if ($userdata['user_points'] < $points)
{
- meta_refresh('index.php', 5);
-
- $message = $lang['BONUS_NOT_SUCCES'] .'
'. $lang['BONUS_RETURN'] .''. $lang['RETURN_PROFILE'] .''. sprintf($lang['CLICK_RETURN_INDEX'], '
', '');
-
- bb_die($message);
- }
+ meta_refresh('index.php', 5);
+
+ $message = $lang['BONUS_NOT_SUCCES'] .'
'. $lang['BONUS_RETURN'] .''. $lang['RETURN_PROFILE'] .''. sprintf($lang['CLICK_RETURN_INDEX'], '
', '');
+
+ bb_die($message);
+ }
DB()->query("UPDATE ". BB_BT_USERS ." bu, ". BB_USERS ." u
SET
@@ -47,12 +47,12 @@ if (isset($_POST['bonus_id']))
");
cache_rm_user_sessions($user_id);
- meta_refresh(BONUS_URL, 5);
-
+ meta_refresh(BONUS_URL, 5);
+
$message = sprintf($lang['BONUS_SUCCES'], humn_size($upload_row[$id]*1024*1024*1024));
$message .= '
'. $lang['BONUS_RETURN'] .''. $lang['RETURN_PROFILE'] .''. sprintf($lang['CLICK_RETURN_INDEX'], '
', '');
-
- bb_die($message);
+
+ bb_die($message);
}
else
{
diff --git a/upload/includes/ucp/usercp_email.php b/upload/includes/ucp/usercp_email.php
index d882a1c51..7cdb3c3c7 100644
--- a/upload/includes/ucp/usercp_email.php
+++ b/upload/includes/ucp/usercp_email.php
@@ -22,9 +22,7 @@ if ( !$userdata['session_logged_in'] )
redirect("login.php?redirect=profile.php&mode=email&" . POST_USERS_URL . "=$user_id");
}
-$sql = "SELECT username, user_email, user_lang
- FROM " . BB_USERS . "
- WHERE user_id = $user_id";
+$sql = "SELECT username, user_email, user_lang FROM " . BB_USERS . " WHERE user_id = $user_id";
if ( $row = DB()->fetch_row($sql) )
{
$username = $row['username'];
diff --git a/upload/includes/ucp/usercp_sendpasswd.php b/upload/includes/ucp/usercp_sendpasswd.php
index c96c36a5e..3843b8323 100644
--- a/upload/includes/ucp/usercp_sendpasswd.php
+++ b/upload/includes/ucp/usercp_sendpasswd.php
@@ -88,4 +88,4 @@ $template->assign_vars(array(
'S_PROFILE_ACTION' => "profile.php?mode=sendpassword")
);
-print_page('usercp_sendpasswd.tpl');
+print_page('usercp_sendpasswd.tpl');
\ No newline at end of file
diff --git a/upload/index.php b/upload/index.php
index 37e5e00ab..e1ff5df75 100644
--- a/upload/index.php
+++ b/upload/index.php
@@ -433,4 +433,4 @@ if (IS_AM)
// Display page
define('SHOW_ONLINE', $show_online_users);
-print_page('index.tpl');
+print_page('index.tpl');
\ No newline at end of file
diff --git a/upload/language/lang_english/lang_admin.php b/upload/language/lang_english/lang_admin.php
index f9804da50..1a33dd9d9 100644
--- a/upload/language/lang_english/lang_admin.php
+++ b/upload/language/lang_english/lang_admin.php
@@ -660,4 +660,4 @@ $lang['SEED_BONUS_TOR_SIZE'] = '
Minimum distribution for which will be award
$lang['SEED_BONUS_USER_REGDATA'] = 'Minimum length of user tracker, after which will be awarded bonuses
If you want to accrue bonuses to all users, leave blank.
';
$lang['SEED_BONUS_WARNING'] = 'ATTENTION! Seed Bonuses should be in ascending order';
$lang['SEED_BONUS_EXCHANGE'] = 'Configuring Exchange Sid Bonuses';
-$lang['SEED_BONUS_ROPORTION'] = 'Proportion addition for an exchange of bonuses on GB';
+$lang['SEED_BONUS_ROPORTION'] = 'Proportion addition for an exchange of bonuses on GB';
\ No newline at end of file
diff --git a/upload/language/lang_english/lang_callseed.php b/upload/language/lang_english/lang_callseed.php
index 7234b8a31..4c5b2df99 100644
--- a/upload/language/lang_english/lang_callseed.php
+++ b/upload/language/lang_english/lang_callseed.php
@@ -13,4 +13,4 @@ $lang['CALLSEED_MSG_POPUP'] = 'Error of popup';
$lang['CALLSEED_MSG_TIME'] = 'Unable to set the last query';
$lang['CALLSEED_HAVE_SEED'] = 'Topic does not require help (Seeders: %d, Leechers: %d)';
-$lang['CALLSEED_RETURN'] = '
Back to the topic';
+$lang['CALLSEED_RETURN'] = '
Back to the topic';
\ No newline at end of file
diff --git a/upload/language/lang_russian/lang_admin.php b/upload/language/lang_russian/lang_admin.php
index 038eba97c..5dd5d2a93 100644
--- a/upload/language/lang_russian/lang_admin.php
+++ b/upload/language/lang_russian/lang_admin.php
@@ -657,4 +657,4 @@ $lang['SEED_BONUS_TOR_SIZE'] = 'Минимальный размер разд
$lang['SEED_BONUS_USER_REGDATA'] = 'Минимальный стаж пользователя на трекере, после которого будут начисляться бонусы
Если хотите начислять бонусы всем пользователям, оставьте поле пустым.
';
$lang['SEED_BONUS_WARNING'] = 'ВНИМАНИЕ! Сид Бонусы должны быть в порядке возрастания';
$lang['SEED_BONUS_EXCHANGE'] = 'Настройка обмена Сид Бонусов';
-$lang['SEED_BONUS_ROPORTION'] = 'Добавление пропорции для обмена бонусов на GB';
+$lang['SEED_BONUS_ROPORTION'] = 'Добавление пропорции для обмена бонусов на GB';
\ No newline at end of file
diff --git a/upload/language/lang_russian/lang_admin_cron.php b/upload/language/lang_russian/lang_admin_cron.php
index 97089c738..378a5b600 100644
--- a/upload/language/lang_russian/lang_admin_cron.php
+++ b/upload/language/lang_russian/lang_admin_cron.php
@@ -61,4 +61,4 @@ $lang['JOB_REMOVED'] = 'Задача была успешно удалена';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт '. @$_POST['cron_script'] .' уже существует!';
$lang['TITLE_DUPLICATE'] = 'Название задачи '. @$_POST['cron_title'] .' уже существует!';
$lang['CLICK_RETURN_JOBS_ADDED'] = '%sВернуться к добавлению задачи%s';
-$lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s';
+$lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s';
\ No newline at end of file
diff --git a/upload/language/lang_russian/lang_callseed.php b/upload/language/lang_russian/lang_callseed.php
index 19f667bc3..73cd5b3a8 100644
--- a/upload/language/lang_russian/lang_callseed.php
+++ b/upload/language/lang_russian/lang_callseed.php
@@ -13,4 +13,4 @@ $lang['CALLSEED_MSG_POPUP'] = 'Ошибка работы всплывающе
$lang['CALLSEED_MSG_TIME'] = 'Не удалось установить время последнего запроса';
$lang['CALLSEED_HAVE_SEED'] = 'Раздача не нуждается в помощи (Сидеров: %d, Личеров: %d)';
-$lang['CALLSEED_RETURN'] = '
Вернуться в тему';
+$lang['CALLSEED_RETURN'] = '
Вернуться в тему';
\ No newline at end of file
diff --git a/upload/language/lang_russian/lang_faq_attach.php b/upload/language/lang_russian/lang_faq_attach.php
index 3e6a35645..ad50773d6 100644
--- a/upload/language/lang_russian/lang_faq_attach.php
+++ b/upload/language/lang_russian/lang_faq_attach.php
@@ -28,4 +28,4 @@ $faq[] = array("Почему я не могу добавить вложение?
$faq[] = array("Я получил разрешение, почему я всё ещё не могу добавлять приложения?", "Размер файлов, разрешённые расширения и другие вещи зависят от администратора форума. Может быть модератор или администратор изменили ваши права, или запретили приложения в определённых форумах. Когда вы пытаетесь добавить файл, форум должен выдать подробное описание проблемы, почему приложения не работают. Если этого недостаточно, свяжитесь с модератором или администратором, чтобы решить проблему.");
$faq[] = array("Почему я не могу удалить вложение?", "В некоторых форумах удаление вложений разрешено только определённым пользователям или группам. Чтобы удалить вложение, необходимы права, которые могут дать только модератор или администратор форума, поэтому свяжитесь с ними.");
$faq[] = array("Почему я не могу просмотреть/скачать вложение?", "В некоторых форумах скачивание файлов может быть разрешено только определённым пользователям или группам. Чтобы скачать файлы, нужны определённые права, и только модератор и администратор могут их вам дать, так что свяжитесь с ними.");
-$faq[] = array("С кем мне надо связаться, чтобы сообщить о незаконных приложениях?", "Свяжитесь с администратором форума. Если вы не знаете, кто это, свяжитесь сначала с модераторами и спросите их, как связаться с администратором. Если вы не получите ответа, вам нужно будет связаться с владельцем домена (с помощью whois поиска), или, если сайт находится на бесплатном хостинге, вроде yahoo/tripod,, свяжитесь с администратором того сёрвера. Заметьте, что phpBB Group не принимает никакой ответственности за то, как или кто использует форум. Поэтому совершенно бесполезно контактировать phpBB Group с просьбами о прекращении какой бы то ни было нелегальной деятельности совершённой 3-ми лицами.");
+$faq[] = array("С кем мне надо связаться, чтобы сообщить о незаконных приложениях?", "Свяжитесь с администратором форума. Если вы не знаете, кто это, свяжитесь сначала с модераторами и спросите их, как связаться с администратором. Если вы не получите ответа, вам нужно будет связаться с владельцем домена (с помощью whois поиска), или, если сайт находится на бесплатном хостинге, вроде yahoo/tripod,, свяжитесь с администратором того сёрвера. Заметьте, что phpBB Group не принимает никакой ответственности за то, как или кто использует форум. Поэтому совершенно бесполезно контактировать phpBB Group с просьбами о прекращении какой бы то ни было нелегальной деятельности совершённой 3-ми лицами.");
\ No newline at end of file
diff --git a/upload/login.php b/upload/login.php
index 8a64d5236..e23b8725f 100644
--- a/upload/login.php
+++ b/upload/login.php
@@ -134,4 +134,4 @@ if (IS_GUEST || $mod_admin_login)
print_page('login.tpl');
}
-redirect($redirect_url);
+redirect($redirect_url);
\ No newline at end of file
diff --git a/upload/memberlist.php b/upload/memberlist.php
index dafc2ed8c..6509d1277 100644
--- a/upload/memberlist.php
+++ b/upload/memberlist.php
@@ -238,4 +238,4 @@ $template->assign_vars(array(
'PAGE_TITLE' => $lang['MEMBERLIST'],
));
-print_page('memberlist.tpl');
+print_page('memberlist.tpl');
\ No newline at end of file
diff --git a/upload/misc.php b/upload/misc.php
index 735f32987..2c2e827c0 100644
--- a/upload/misc.php
+++ b/upload/misc.php
@@ -141,4 +141,4 @@ elseif ($do == 'info')
else
{
message_die(GENERAL_ERROR, 'Invalid mode
'.mb_convert_case($lang['BACK'], MB_CASE_TITLE).'');
-}
+}
\ No newline at end of file
diff --git a/upload/misc/html/copyright_holders.html b/upload/misc/html/copyright_holders.html
index cf887b1f9..5ece2bb88 100644
--- a/upload/misc/html/copyright_holders.html
+++ b/upload/misc/html/copyright_holders.html
@@ -49,5 +49,4 @@