Фикс прав на удаление постов аяксом (спасибо Phoenix); фикс ошибок из-за пустых системных заголовков; пара мелочей, вроде нового логотипа. Движок переводится в стадию RC - начинается подготовка к релизу, в частности отлов всех багов, которые на данный момент в статусе критичных + исправление мелких недочетов. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@581 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-02-03 21:54:36 +00:00
commit a111c66e94
11 changed files with 74 additions and 60 deletions

View file

@ -50,7 +50,7 @@ if (!defined('WORD_LIST_OBTAINED'))
switch($this->request['type'])
{
case 'delete';
if ($post['post_id'] != $post['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $is_auth['auth_delete'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600*3 > TIMENOW)))
if ($post['post_id'] != $post['topic_first_post_id'] && $is_auth['auth_delete'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600*3 > TIMENOW)))
{
if (empty($this->request['confirmed']))
{
@ -62,14 +62,14 @@ switch($this->request['type'])
}
else
{
$this->ajax_die(sprintf($lang['DELETE_OWN_POSTS'], strip_tags($is_auth['auth_delete_type'])));
$this->ajax_die(sprintf($lang['SORRY_AUTH_DELETE'], strip_tags($is_auth['auth_delete_type'])));
}
break;
case 'reply';
if (bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
$this->ajax_die(strip_tags($lang['RULES_REPLY_CANNOT']));
}
elseif(!$is_auth['auth_reply'])
{
@ -113,6 +113,10 @@ switch($this->request['type'])
case 'edit':
case 'editor':
if (bf($userdata['user_opt'], 'user_opt', 'allow_post_edit'))
{
$this->ajax_die($lang['POST_EDIT_CANNOT']);
}
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'])
{
$this->ajax_die($lang['EDIT_OWN_POSTS']);
@ -224,7 +228,7 @@ switch($this->request['type'])
if (bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
$this->ajax_die(strip_tags($lang['RULES_REPLY_CANNOT']));
}
elseif (!$is_auth['auth_reply'])
{

View file

@ -104,7 +104,7 @@ class torrent
}
array_deep($f['path'], 'clean_tor_dirname');
$length = isset($f['length']) ? $f['length'] : 0;
$length = isset($f['length']) ? (int) $f['length'] : 0;
$subdir_count = count($f['path']) - 1;
if ($subdir_count > 0)
@ -145,7 +145,7 @@ class torrent
{
$this->multiple = false;
$name = isset($info['name']) ? clean_tor_dirname($info['name']) : '';
$length = isset($info['length']) ? $info['length'] : 0;
$length = isset($info['length']) ? (int) $info['length'] : 0;
$this->files_ary['/'][] = $this->build_file_item($name, $length);
natsort($this->files_ary['/']);

View file

@ -1,10 +1,15 @@
<?php
if (isset($_REQUEST['GLOBALS'])) die();
ignore_user_abort(true);
define('TIMESTART', utime());
define('TIMENOW', time());
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) die();
if (empty($_SERVER['REMOTE_ADDR'])) $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
if (empty($_SERVER['HTTP_USER_AGENT'])) $_SERVER['HTTP_USER_AGENT'] = '';
if (empty($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = '';
if (empty($_SERVER['SERVER_NAME'])) $_SERVER['SERVER_NAME'] = '';
if (!defined('BB_ROOT')) define('BB_ROOT', './');
if (!defined('IN_FORUM') && !defined('IN_TRACKER')) define('IN_FORUM', true);

View file

@ -54,9 +54,9 @@ $domain_name = 'torrentpier.me'; // Enter here your primary d
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.6 (unstable)';
$bb_cfg['tp_version'] = '2.6 (RC)';
$bb_cfg['tp_release_date'] = '02-02-2014';
$bb_cfg['tp_release_state'] = 'R580';
$bb_cfg['tp_release_state'] = 'R581';
// Database
$charset = 'utf8';
@ -245,7 +245,10 @@ $bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
// Language
setlocale(LC_ALL, 'ru_RU.UTF-8');
setlocale(LC_NUMERIC, 'C');
$bb_cfg['charset'] = 'utf8';
$bb_cfg['auto_language'] = true;
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $bb_cfg['auto_language'])
{
if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) == 'ru')

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -177,7 +177,6 @@ define('TOPIC_WATCH_UN_NOTIFIED', 0);
define('POST_NORMAL', 0);
define('POST_STICKY', 1);
define('POST_ANNOUNCE', 2);
define('POST_GLOBAL_ANNOUNCE', 3);
// Search types
define('SEARCH_TYPE_POST', 0);

View file

@ -3193,3 +3193,5 @@ $lang['ACCOUNT_STATUS'] = 'Account Status';
$lang['SORT_OPTIONS'] = 'Sort options:';
$lang['LAST_VISIT'] = 'Last Visit';
$lang['DAY'] = 'Day';
$lang['POST_EDIT_CANNOT'] = 'Sorry, but you cannot edit posts';

View file

@ -1827,8 +1827,8 @@ $lang['USER_LEVELS_UPDATED'] = 'Уровни и права пользовате
// Synchronize
$lang['SYNCHRONIZE'] = 'Синхронизировать';
$lang['TOPICS_DATA_SYNCHRONIZED'] = 'Темы синхронизированы';
$lang['USER_POSTS_COUNT'] = 'Количество сообщений пользователей.';
$lang['USER POSTS COUNT SYNCHRONIZED'] = 'Количество сообщений пользователей синхронизированы.';
$lang['USER_POSTS_COUNT'] = 'Количество сообщений пользователей';
$lang['USER POSTS COUNT SYNCHRONIZED'] = 'Количество сообщений пользователей синхронизированы';
// Online Userlist
$lang['SHOW_ONLINE_USERLIST'] = 'Показать список пользователей онлайн';
@ -3219,3 +3219,5 @@ $lang['ACCOUNT_STATUS'] = 'Статус учётной записи';
$lang['SORT_OPTIONS'] = 'Поля сортировки:';
$lang['LAST_VISIT'] = 'Последнее посещение';
$lang['DAY'] = 'День';
$lang['POST_EDIT_CANNOT'] = 'Извините, вы не можете редактировать сообщения';

View file

@ -1117,7 +1117,7 @@ else if ( $submit || $refresh || $mode != '' )
'NAME_FROM' => $userdata['username'],
'MSG_SUBJECT' => html_entity_decode($privmsg_subject),
'SITENAME' => $bb_cfg['sitename'],
'U_INBOX' => make_url(PM_URL ."?folder=inbox$pm&mode=read&p=". $privmsg_sent_id),
'U_INBOX' => make_url(PM_URL . "?folder=inbox&mode=read&p=". $privmsg_sent_id),
));
$emailer->send();

View file

@ -84,21 +84,21 @@ ajax.callback.manage_user = function(data) {
<td>
<a href="#" id="datastore" onclick="ajax.manage_user('clear_datastore'); return false;">{L_DATASTORE}</a>,&nbsp;
<a href="#" id="cache" onclick="ajax.manage_user('clear_cache'); return false;">{L_ALL_CACHE}</a>,&nbsp;
<a href="#" id="template_cache" onclick="ajax.manage_user('clear_template_cache'); return false;">{L_TEMPLATES}</a>&nbsp;
<a href="#" id="template_cache" onclick="ajax.manage_user('clear_template_cache'); return false;">{L_TEMPLATES}</a>
</td>
</tr>
<tr>
<td><b>{L_UPDATE}:</b></td>
<td>
<a href="{U_UPDATE_USER_LEVEL}">{L_USER_LEVELS}</a>,&nbsp;
<!-- IF $bb_cfg['search_engine_type'] == "sphinx" --><a href="#" id="indexer" onclick="ajax.manage_user('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF -->
<a href="{U_UPDATE_USER_LEVEL}">{L_USER_LEVELS}</a>
<!-- IF $bb_cfg['search_engine_type'] == "sphinx" -->,&nbsp;<a href="#" id="indexer" onclick="ajax.manage_user('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF -->
</td>
</tr>
<tr>
<td><b>{L_SYNCHRONIZE}:</b></td>
<td>
<a href="{U_SYNC_TOPICS}">{L_TOPICS}</a>,&nbsp;
<a href="{U_SYNC_USER_POSTS}">{L_USER_POSTS_COUNT}</a>&nbsp;
<a href="{U_SYNC_USER_POSTS}">{L_USER_POSTS_COUNT}</a>
</td>
</tr>
<tr>

View file

@ -129,7 +129,6 @@ function initExternalLinks(context)
var context = context || 'body';
if (ExternalLinks_InNewWindow) {
$("a.postLink:not([href*='"+ window.location.hostname +"/'])", context).attr({ target: '_blank' });
//$("a.postLink:not([@href*='"+ window.location.hostname +"/'])", context).replaceWith('<span style="color: red;">{L_LINKS_ARE_FORBIDDEN}</span>');
}
}
function fixPostImage($img)
@ -228,7 +227,7 @@ function escHTML (txt)
}
<!-- IF USE_TABLESORTER -->
$(document).ready(function() {
$('.tablesorter').tablesorter(); // {debug: true}
$('.tablesorter').tablesorter();
});
<!-- ENDIF -->
@ -431,7 +430,7 @@ if (top != self) {
<div id="logo">
<!--<h1>{SITENAME}</h1>
<h6>{SITE_DESCRIPTION}</h6> -->
<a href="{U_INDEX}"><img src="images/logo/logo.png" alt="{SITENAME}" /></a>
<a href="{U_INDEX}"><img src="images/logo/logo_me.png" alt="{SITENAME}" /></a>
</div>
<!--/logo-->