diff --git a/upload/config.php b/upload/config.php
index 249babac6..abb06ea72 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'] = '13-01-2014';
-$bb_cfg['tp_release_state'] = 'R556';
+$bb_cfg['tp_release_date'] = '15-01-2014';
+$bb_cfg['tp_release_state'] = 'R557';
// Database
$charset = 'utf8';
@@ -390,7 +390,7 @@ if (DEBUG)
}
else
{
- error_reporting(E_ALL); # E_ALL & ~E_NOTICE
+ error_reporting(E_ALL); # E_ALL & ~E_NOTICE
ini_set('display_errors', 0);
ini_set('log_errors', 1);
}
@@ -408,7 +408,7 @@ define('CRON_ALLOWED', TRIGGERS_DIR .'cron_allowed');
define('CRON_RUNNING', TRIGGERS_DIR .'cron_running');
// Subforums
-$bb_cfg['sf_on_first_page_only'] = true;
+$bb_cfg['sf_on_first_page_only'] = true;
// Forums
$bb_cfg['allowed_topics_per_page'] = array(50, 100, 150, 200, 250, 300);
@@ -439,19 +439,19 @@ $bb_cfg['max_post_length'] = 120000; // bytes
$bb_cfg['use_ajax_posts'] = true;
// Search
-$bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx
-$bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1';
-$bb_cfg['sphinx_topic_titles_port'] = 3312;
-$bb_cfg['sphinx_config_path'] = realpath("../install/sphinx/sphinx.conf");
-$bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies
-$bb_cfg['disable_search_for_guest'] = true;
-$bb_cfg['allow_search_in_bool_mode'] = true;
-$bb_cfg['max_search_words_per_post'] = 200;
-$bb_cfg['search_min_word_len'] = 3;
-$bb_cfg['search_max_word_len'] = 35;
-$bb_cfg['limit_max_search_results'] = false;
-$bb_cfg['tidy_post'] = true;
-$bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt';
+$bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx
+$bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1';
+$bb_cfg['sphinx_topic_titles_port'] = 3312;
+$bb_cfg['sphinx_config_path'] = realpath("../install/sphinx/sphinx.conf");
+$bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies
+$bb_cfg['disable_search_for_guest'] = true;
+$bb_cfg['allow_search_in_bool_mode'] = true;
+$bb_cfg['max_search_words_per_post'] = 200;
+$bb_cfg['search_min_word_len'] = 3;
+$bb_cfg['search_max_word_len'] = 35;
+$bb_cfg['limit_max_search_results'] = false;
+$bb_cfg['tidy_post'] = true;
+$bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt';
// Posting
$bb_cfg['prevent_multiposting'] = true; // replace "reply" with "edit last msg" if user (not admin or mod) is last topic poster
diff --git a/upload/includes/functions_admin.php b/upload/includes/functions_admin.php
index db6b94cd5..8507356f4 100644
--- a/upload/includes/functions_admin.php
+++ b/upload/includes/functions_admin.php
@@ -182,7 +182,7 @@ function sync ($type, $id)
function topic_delete ($mode_or_topic_id, $forum_id = null, $prune_time = 0, $prune_all = false)
{
- global $lang, $bb_cfg, $log_action;
+ global $lang, $log_action;
$prune = ($mode_or_topic_id === 'prune');
@@ -519,7 +519,7 @@ function topic_move ($topic_id, $to_forum_id, $from_forum_id = null, $leave_shad
function post_delete ($mode_or_post_id, $user_id = null, $exclude_first = true)
{
- global $bb_cfg, $log_action;
+ global $log_action;
$del_user_posts = ($mode_or_post_id === 'user'); // Delete all user posts
diff --git a/upload/includes/functions_admin_cron.php b/upload/includes/functions_admin_cron.php
index 9c5834267..4d31ded3c 100644
--- a/upload/includes/functions_admin_cron.php
+++ b/upload/includes/functions_admin_cron.php
@@ -1,8 +1,7 @@
$bb_cfg['max_smilies'])
+ if ($count_smilies > $bb_cfg['max_smilies'])
{
$to_many_smilies = sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']);
$error_msg .= (!empty($error_msg)) ? '
'. $to_many_smilies : $to_many_smilies;
}
- }
+ }
if (IS_GUEST && !CAPTCHA()->verify_code())
{
@@ -215,12 +214,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
{
$edited_sql .= ", post_time = $current_time ";
//lpt
- $result = DB()->sql_query("
- UPDATE ". BB_TOPICS ." SET
- topic_last_post_time = $current_time
- WHERE topic_id = $topic_id
- LIMIT 1
- ");
+ DB()->sql_query("UPDATE ". BB_TOPICS ." SET topic_last_post_time = $current_time WHERE topic_id = $topic_id LIMIT 1");
}
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '". USER_IP ."')" : "UPDATE " . BB_POSTS . " SET post_username = '$post_username'" . $edited_sql . " WHERE post_id = $post_id";
@@ -346,7 +340,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
meta_refresh("viewtopic.php?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id;
$message = $lang['STORED'] . '
' . sprintf($lang['CLICK_VIEW_MESSAGE'], '', '') . '
' . sprintf($lang['CLICK_RETURN_FORUM'], '', '');
- return $mode;
+ return $mode;
}
//
diff --git a/upload/includes/functions_report_admin.php b/upload/includes/functions_report_admin.php
index db978f88d..9244ec214 100644
--- a/upload/includes/functions_report_admin.php
+++ b/upload/includes/functions_report_admin.php
@@ -75,7 +75,7 @@ function report_modules_inactive($mode = 'all', $module = null)
$dir = @opendir(INC_DIR .'report_hack');
$modules = array();
- $i = 0;
+
while ($file = @readdir($dir))
{
if (!preg_match('#(.*)\.' . phpbb_preg_quote('php', '#') . '$#', $file, $matches))
@@ -96,7 +96,7 @@ function report_modules_inactive($mode = 'all', $module = null)
// Include language file
$lang = array();
- $lang_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/report_hack/lang_$module_name.php";
+ $lang_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/report_hack/lang_$module_name.php";
if (file_exists($lang_file))
{
include($lang_file);
diff --git a/upload/includes/functions_torrent.php b/upload/includes/functions_torrent.php
index c23e46341..d0e73756b 100644
--- a/upload/includes/functions_torrent.php
+++ b/upload/includes/functions_torrent.php
@@ -152,7 +152,6 @@ function delete_torrent ($attach_id, $mode = '')
message_die(GENERAL_ERROR, $lang['TOR_NOT_FOUND']);
}
- $post_id = $torrent['post_id'];
$topic_id = $torrent['topic_id'];
$forum_id = $torrent['forum_id'];
$poster_id = $torrent['poster_id'];
@@ -162,7 +161,7 @@ function delete_torrent ($attach_id, $mode = '')
message_die(GENERAL_ERROR, $lang['NOT_TORRENT']);
}
- torrent_auth_check($forum_id, $torrent['poster_id']);
+ torrent_auth_check($forum_id, $poster_id);
tracker_unregister($attach_id);
delete_attachment(0, $attach_id);
@@ -198,7 +197,7 @@ function change_tor_status ($attach_id, $new_tor_status)
// Set gold/silver type for torrent
function change_tor_type ($attach_id, $tor_status_gold)
{
- global $topic_id, $lang, $bb_cfg;
+ global $topic_id, $lang;
if (!$torrent = get_torrent_info($attach_id))
{
diff --git a/upload/includes/sessions.php b/upload/includes/sessions.php
index 4466c45c4..111a7a178 100644
--- a/upload/includes/sessions.php
+++ b/upload/includes/sessions.php
@@ -585,10 +585,7 @@ class user_common
$this->data['user_lang'] = $bb_cfg['default_lang'];
$this->data['user_timezone'] = $bb_cfg['board_timezone'];
- if (!defined('LANG_DIR'))
- {
- define('LANG_DIR', DEFAULT_LANG_DIR);
- }
+ if (!defined('LANG_DIR')) define('LANG_DIR', DEFAULT_LANG_DIR);
require(LANG_DIR .'lang_main.php');
diff --git a/upload/includes/smtp.php b/upload/includes/smtp.php
index 19c575408..c4be8eef7 100644
--- a/upload/includes/smtp.php
+++ b/upload/includes/smtp.php
@@ -120,9 +120,6 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
fputs($socket, "MAIL FROM: <" . $bb_cfg['board_email'] . ">\r\n");
server_parse($socket, "250", __LINE__);
- // Specify each user to send to and build to header.
- $to_header = '';
-
// Add an additional bit of error checking to the To field.
$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php
index b0fcfe5eb..73ab707c9 100644
--- a/upload/includes/ucp/usercp_register.php
+++ b/upload/includes/ucp/usercp_register.php
@@ -838,7 +838,7 @@ if ($submit && !$errors)
if ($bb_cfg['require_activation'] == USER_ACTIVATION_ADMIN)
{
- $sql = "SELECT user_email, user_lang, usr_opt FROM ". BB_USERS ." WHERE user_level = " . ADMIN;
+ $sql = "SELECT user_email, user_lang, user_opt FROM ". BB_USERS ." WHERE user_level = " . ADMIN;
if (!($result = DB()->sql_query($sql)))
{