mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r557
Фикс http://torrentpier.me/threads/23439/ + удаление некоторых неиспользуемых переменных раскиданных по коду. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@557 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
5cb2a7e274
commit
fdf8d769ab
9 changed files with 34 additions and 48 deletions
|
@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||||
$bb_cfg['tp_release_date'] = '13-01-2014';
|
$bb_cfg['tp_release_date'] = '15-01-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'R556';
|
$bb_cfg['tp_release_state'] = 'R557';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$charset = 'utf8';
|
$charset = 'utf8';
|
||||||
|
|
|
@ -182,7 +182,7 @@ function sync ($type, $id)
|
||||||
|
|
||||||
function topic_delete ($mode_or_topic_id, $forum_id = null, $prune_time = 0, $prune_all = false)
|
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');
|
$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)
|
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
|
$del_user_posts = ($mode_or_post_id === 'user'); // Delete all user posts
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function run_jobs($jobs) {
|
function run_jobs($jobs)
|
||||||
global $bb_cfg, $datastore;
|
{
|
||||||
|
|
||||||
define('IN_CRON', true);
|
define('IN_CRON', true);
|
||||||
|
|
||||||
$sql = "SELECT cron_script
|
$sql = "SELECT cron_script
|
||||||
|
|
|
@ -67,7 +67,6 @@ function prepare_post(&$mode, &$post_data, &$error_msg, &$username, &$subject, &
|
||||||
$temp_option_text[$option_id] = clean_title($option_text);
|
$temp_option_text[$option_id] = clean_title($option_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$option_text = $temp_option_text;
|
|
||||||
|
|
||||||
if (count($poll_options) < 2)
|
if (count($poll_options) < 2)
|
||||||
{
|
{
|
||||||
|
@ -215,12 +214,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
{
|
{
|
||||||
$edited_sql .= ", post_time = $current_time ";
|
$edited_sql .= ", post_time = $current_time ";
|
||||||
//lpt
|
//lpt
|
||||||
$result = DB()->sql_query("
|
DB()->sql_query("UPDATE ". BB_TOPICS ." SET topic_last_post_time = $current_time WHERE topic_id = $topic_id LIMIT 1");
|
||||||
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";
|
$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";
|
||||||
|
|
|
@ -75,7 +75,7 @@ function report_modules_inactive($mode = 'all', $module = null)
|
||||||
$dir = @opendir(INC_DIR .'report_hack');
|
$dir = @opendir(INC_DIR .'report_hack');
|
||||||
|
|
||||||
$modules = array();
|
$modules = array();
|
||||||
$i = 0;
|
|
||||||
while ($file = @readdir($dir))
|
while ($file = @readdir($dir))
|
||||||
{
|
{
|
||||||
if (!preg_match('#(.*)\.' . phpbb_preg_quote('php', '#') . '$#', $file, $matches))
|
if (!preg_match('#(.*)\.' . phpbb_preg_quote('php', '#') . '$#', $file, $matches))
|
||||||
|
|
|
@ -152,7 +152,6 @@ function delete_torrent ($attach_id, $mode = '')
|
||||||
message_die(GENERAL_ERROR, $lang['TOR_NOT_FOUND']);
|
message_die(GENERAL_ERROR, $lang['TOR_NOT_FOUND']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_id = $torrent['post_id'];
|
|
||||||
$topic_id = $torrent['topic_id'];
|
$topic_id = $torrent['topic_id'];
|
||||||
$forum_id = $torrent['forum_id'];
|
$forum_id = $torrent['forum_id'];
|
||||||
$poster_id = $torrent['poster_id'];
|
$poster_id = $torrent['poster_id'];
|
||||||
|
@ -162,7 +161,7 @@ function delete_torrent ($attach_id, $mode = '')
|
||||||
message_die(GENERAL_ERROR, $lang['NOT_TORRENT']);
|
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);
|
tracker_unregister($attach_id);
|
||||||
delete_attachment(0, $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
|
// Set gold/silver type for torrent
|
||||||
function change_tor_type ($attach_id, $tor_status_gold)
|
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))
|
if (!$torrent = get_torrent_info($attach_id))
|
||||||
{
|
{
|
||||||
|
|
|
@ -585,10 +585,7 @@ class user_common
|
||||||
$this->data['user_lang'] = $bb_cfg['default_lang'];
|
$this->data['user_lang'] = $bb_cfg['default_lang'];
|
||||||
$this->data['user_timezone'] = $bb_cfg['board_timezone'];
|
$this->data['user_timezone'] = $bb_cfg['board_timezone'];
|
||||||
|
|
||||||
if (!defined('LANG_DIR'))
|
if (!defined('LANG_DIR')) define('LANG_DIR', DEFAULT_LANG_DIR);
|
||||||
{
|
|
||||||
define('LANG_DIR', DEFAULT_LANG_DIR);
|
|
||||||
}
|
|
||||||
|
|
||||||
require(LANG_DIR .'lang_main.php');
|
require(LANG_DIR .'lang_main.php');
|
||||||
|
|
||||||
|
|
|
@ -120,9 +120,6 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
|
||||||
fputs($socket, "MAIL FROM: <" . $bb_cfg['board_email'] . ">\r\n");
|
fputs($socket, "MAIL FROM: <" . $bb_cfg['board_email'] . ">\r\n");
|
||||||
server_parse($socket, "250", __LINE__);
|
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.
|
// Add an additional bit of error checking to the To field.
|
||||||
$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
|
$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
|
||||||
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
|
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
|
||||||
|
|
|
@ -838,7 +838,7 @@ if ($submit && !$errors)
|
||||||
|
|
||||||
if ($bb_cfg['require_activation'] == USER_ACTIVATION_ADMIN)
|
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)))
|
if (!($result = DB()->sql_query($sql)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue