mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 05:13:54 -07:00
r561
Фикс критичного бага с обновлением времени сообщений из r506 (спасибо PheRum); фикс ненулевого числа сообщений у гостя в пустой базе; фикс вывода блока с новостями трекера, в случае если они отключены (спасибо greencell); удаление пустых строк в конце всех .php-файлов; пара мелочей на будущие релизы. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@561 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
a48ea08a1f
commit
8bec4dc91f
83 changed files with 441 additions and 455 deletions
|
@ -1434,7 +1434,7 @@ CREATE TABLE IF NOT EXISTS `bb_users` (
|
|||
-- Дамп данных таблицы `bb_users`
|
||||
--
|
||||
|
||||
INSERT INTO `bb_users` VALUES (-1, 0, 'Guest', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||
INSERT INTO `bb_users` VALUES (-1, 0, 'Guest', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||
INSERT INTO `bb_users` VALUES (2, 1, 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 0, 0, '0', 0, '0', 1, 1, 4.00, '', 0, 0, 0, 304, 1, '', 1, 0, 0, 0, 'admin@admin.com', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||
INSERT INTO `bb_users` VALUES (-746, 0, 'bot', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 144, 0, 'bot.gif', 1, 0, 0, 0, 'bot@bot.bot', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
|
||||
|
||||
|
|
|
@ -193,4 +193,5 @@ else
|
|||
'S_ACTION' => "admin_topic_templates.php",
|
||||
));
|
||||
}
|
||||
|
||||
print_page('admin_topic_templates.tpl', 'admin');
|
|
@ -15,10 +15,12 @@ if (IS_GUEST)
|
|||
{
|
||||
redirect("login.php?redirect=admin/index.php");
|
||||
}
|
||||
|
||||
if (!IS_ADMIN)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['NOT_ADMIN']);
|
||||
}
|
||||
|
||||
if (!$userdata['session_admin'])
|
||||
{
|
||||
$redirect = url_arg($_SERVER['REQUEST_URI'], 'admin', 1);
|
||||
|
|
|
@ -245,4 +245,5 @@ $template->assign_vars(array(
|
|||
);
|
||||
|
||||
$template->pparse('body');
|
||||
|
||||
xs_exit();
|
|
@ -112,4 +112,5 @@ $template->assign_vars(array(
|
|||
|
||||
$template->set_filenames(array('body' => XS_TPL_PATH . 'config.tpl'));
|
||||
$template->pparse('body');
|
||||
|
||||
xs_exit();
|
|
@ -69,4 +69,5 @@ $template->assign_vars(array(
|
|||
));
|
||||
|
||||
$template->pparse('body');
|
||||
|
||||
xs_exit();
|
|
@ -35,4 +35,5 @@ $template->assign_vars(array(
|
|||
|
||||
$template->set_filenames(array('body' => XS_TPL_PATH . 'index.tpl'));
|
||||
$template->pparse('body');
|
||||
|
||||
xs_exit();
|
|
@ -23,6 +23,7 @@ $tor = DB()->fetch_row("
|
|||
WHERE tor.attach_id = $attach_id
|
||||
LIMIT 1
|
||||
");
|
||||
|
||||
if (!$tor) $this->ajax_die($lang['TORRENT_FAILED']);
|
||||
|
||||
switch($mode)
|
||||
|
@ -80,10 +81,10 @@ switch($mode)
|
|||
{
|
||||
$subject = sprintf($lang['TOR_MOD_TITLE'], $tor['topic_title']);
|
||||
$message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $tor['topic_id']), $bb_cfg['tor_icons'][$new_status] .' '.$lang['TOR_STATUS_NAME'][$new_status]);
|
||||
|
||||
if ($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment;
|
||||
|
||||
send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']);
|
||||
|
||||
cache_rm_user_sessions($tor['poster_id']);
|
||||
}
|
||||
}
|
||||
|
@ -93,12 +94,11 @@ switch($mode)
|
|||
if (!$bb_cfg['tor_comment']) $this->ajax_die($lang['MODULE_OFF']);
|
||||
|
||||
$subject = sprintf($lang['TOR_AUTH_TITLE'], $tor['topic_title']);
|
||||
|
||||
$message = sprintf($lang['TOR_AUTH_MSG'], get_username($tor['checked_user_id']), make_url(TOPIC_URL . $tor['topic_id']), $tor['topic_title']);
|
||||
|
||||
if($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment;
|
||||
|
||||
send_pm($tor['checked_user_id'], $subject, $message, $userdata['user_id']);
|
||||
|
||||
cache_rm_user_sessions($tor['checked_user_id']);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@ switch($mode)
|
|||
$html .= ($moderators) ? join(', ', $moderators) : $lang['NONE'];
|
||||
unset($moderators, $mod);
|
||||
$datastore->rm('moderators');
|
||||
|
||||
break;
|
||||
|
||||
case 'change_tz':
|
||||
|
|
|
@ -93,6 +93,7 @@ switch($mode)
|
|||
|
||||
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
|
||||
break;
|
||||
|
||||
case "indexer":
|
||||
exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result);
|
||||
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
|
||||
|
|
|
@ -21,6 +21,7 @@ switch($mode)
|
|||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $err .'</span>';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'check_email':
|
||||
$email = (string) $this->request['email'];
|
||||
|
||||
|
@ -33,6 +34,7 @@ switch($mode)
|
|||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $err .'</span>';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'check_pass':
|
||||
$pass = (string) $this->request['pass'];
|
||||
$pass_confirm = (string) $this->request['pass_confirm'];
|
||||
|
@ -64,6 +66,7 @@ switch($mode)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'refresh_captcha';
|
||||
$html = CAPTCHA()->get_html();
|
||||
break;
|
||||
|
|
|
@ -10,10 +10,7 @@ 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");
|
||||
$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'];
|
||||
|
||||
|
@ -173,4 +170,3 @@ function clean_tor_dirname ($dirname)
|
|||
}
|
||||
|
||||
$this->response['html'] = $tor_filelist;
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -4,4 +4,3 @@
|
|||
$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
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ class bb_error_handler
|
|||
|
||||
$errHandler = new bb_error_handler;
|
||||
set_error_handler(array(&$errHandler, 'bb_error_handler'));
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
@ -371,7 +371,3 @@ class profiler_dbg extends profiler
|
|||
return ($a['time'] > $b['time']) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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)));
|
||||
}
|
|
@ -2815,7 +2815,8 @@ function profile_url($data)
|
|||
return $profile;
|
||||
}
|
||||
|
||||
function seo_link_header($str){
|
||||
function seo_link_header ($str)
|
||||
{
|
||||
/**
|
||||
* Функция обработки url. Сверяет url с переданным выражением.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
$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)
|
||||
";
|
||||
}
|
||||
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 : "") . "
|
||||
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") ? "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 = ($mode != "editpost") ? $sql_insert : $sql_update;
|
||||
|
||||
if (!DB()->sql_query($sql))
|
||||
{
|
||||
|
|
|
@ -580,8 +580,7 @@ $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');
|
||||
|
|
|
@ -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(
|
||||
|
@ -79,4 +80,3 @@ if ($edit_tpl_mode)
|
|||
}
|
||||
|
||||
print_page('posting_tpl.tpl');
|
||||
|
||||
|
|
|
@ -18,4 +18,5 @@ $lang['TPL']['GUIDE'] = array(
|
|||
'audio' => 330984,
|
||||
'torrent' => 330985,
|
||||
);
|
||||
|
||||
$lang['TPL']['GUIDE'] = array();
|
|
@ -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'];
|
||||
|
|
|
@ -50,4 +50,3 @@
|
|||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
|
||||
|
|
|
@ -21,4 +21,3 @@
|
|||
</fieldset>
|
||||
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
|
||||
</div><!--/infobox-wrap-->
|
||||
|
||||
|
|
|
@ -138,4 +138,3 @@ echo '</body></html>';
|
|||
DB()->query("DROP TEMPORARY TABLE ". TMP_TRACKER_TABLE);
|
||||
|
||||
bb_exit();
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
|
||||
<!-- IF INCLUDE_BBCODE_JS -->
|
||||
<script type="text/javascript" src="{SITE_URL}misc/js/bbcode.js?v={$bb_cfg['js_ver']}"></script>
|
||||
<script type="text/javascript">
|
||||
window.BB = {};
|
||||
window.encURL = encodeURIComponent;
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var postImg_MaxWidth = screen.width - {POST_IMG_WIDTH_DECR_JS};
|
||||
var postImgAligned_MaxWidth = Math.round(screen.width/3);
|
||||
|
@ -577,8 +581,6 @@ important_info
|
|||
|
||||
<!--/menus-->
|
||||
|
||||
|
||||
|
||||
<!--page_content-->
|
||||
<div id="page_content">
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
|
||||
|
@ -613,8 +615,8 @@ important_info
|
|||
<div id="latest_news">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<!-- IF SHOW_LATEST_NEWS -->
|
||||
<td width="50%">
|
||||
<h3>{L_LATEST_NEWS}</h3>
|
||||
<table cellpadding="0">
|
||||
<!-- BEGIN news -->
|
||||
|
@ -626,8 +628,8 @@ important_info
|
|||
</tr>
|
||||
<!-- END news -->
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF SHOW_NETWORK_NEWS -->
|
||||
<td width="50%">
|
||||
|
@ -648,8 +650,11 @@ important_info
|
|||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- IF AD_BLOCK_200 --><div id="ad-200">{AD_BLOCK_200}</div><!--/ad-200--><!-- ELSEIF AD_BLOCK_100 --><div id="ad-100">{AD_BLOCK_100}</div><!--/ad-100--><!-- ENDIF / AD_BLOCK_100 -->
|
||||
<!-- IF AD_BLOCK_200 -->
|
||||
<div id="ad-200">{AD_BLOCK_200}</div><!--/ad-200-->
|
||||
<!-- ELSEIF AD_BLOCK_100 -->
|
||||
<div id="ad-100">{AD_BLOCK_100}</div><!--/ad-100-->
|
||||
<!-- ENDIF / AD_BLOCK_100 -->
|
||||
|
||||
<!--=======================-->
|
||||
<!-- ENDIF / COMMON_HEADER -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue