mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
r581
Фикс прав на удаление постов аяксом (спасибо Phoenix); фикс ошибок из-за пустых системных заголовков; пара мелочей, вроде нового логотипа. Движок переводится в стадию RC - начинается подготовка к релизу, в частности отлов всех багов, которые на данный момент в статусе критичных + исправление мелких недочетов. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@581 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
43b028988d
commit
a111c66e94
11 changed files with 74 additions and 60 deletions
|
@ -50,7 +50,7 @@ if (!defined('WORD_LIST_OBTAINED'))
|
||||||
switch($this->request['type'])
|
switch($this->request['type'])
|
||||||
{
|
{
|
||||||
case 'delete';
|
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']))
|
if (empty($this->request['confirmed']))
|
||||||
{
|
{
|
||||||
|
@ -62,14 +62,14 @@ switch($this->request['type'])
|
||||||
}
|
}
|
||||||
else
|
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;
|
break;
|
||||||
|
|
||||||
case 'reply';
|
case 'reply';
|
||||||
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']);
|
$this->ajax_die(strip_tags($lang['RULES_REPLY_CANNOT']));
|
||||||
}
|
}
|
||||||
elseif(!$is_auth['auth_reply'])
|
elseif(!$is_auth['auth_reply'])
|
||||||
{
|
{
|
||||||
|
@ -113,6 +113,10 @@ switch($this->request['type'])
|
||||||
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
case 'editor':
|
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'])
|
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'])
|
||||||
{
|
{
|
||||||
$this->ajax_die($lang['EDIT_OWN_POSTS']);
|
$this->ajax_die($lang['EDIT_OWN_POSTS']);
|
||||||
|
@ -224,7 +228,7 @@ switch($this->request['type'])
|
||||||
|
|
||||||
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']);
|
$this->ajax_die(strip_tags($lang['RULES_REPLY_CANNOT']));
|
||||||
}
|
}
|
||||||
elseif (!$is_auth['auth_reply'])
|
elseif (!$is_auth['auth_reply'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,7 @@ class torrent
|
||||||
}
|
}
|
||||||
array_deep($f['path'], 'clean_tor_dirname');
|
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;
|
$subdir_count = count($f['path']) - 1;
|
||||||
|
|
||||||
if ($subdir_count > 0)
|
if ($subdir_count > 0)
|
||||||
|
@ -145,7 +145,7 @@ class torrent
|
||||||
{
|
{
|
||||||
$this->multiple = false;
|
$this->multiple = false;
|
||||||
$name = isset($info['name']) ? clean_tor_dirname($info['name']) : '';
|
$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);
|
$this->files_ary['/'][] = $this->build_file_item($name, $length);
|
||||||
natsort($this->files_ary['/']);
|
natsort($this->files_ary['/']);
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (isset($_REQUEST['GLOBALS'])) die();
|
||||||
|
|
||||||
ignore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
define('TIMESTART', utime());
|
define('TIMESTART', utime());
|
||||||
define('TIMENOW', time());
|
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('BB_ROOT')) define('BB_ROOT', './');
|
||||||
if (!defined('IN_FORUM') && !defined('IN_TRACKER')) define('IN_FORUM', true);
|
if (!defined('IN_FORUM') && !defined('IN_TRACKER')) define('IN_FORUM', true);
|
||||||
|
|
|
@ -54,9 +54,9 @@ $domain_name = 'torrentpier.me'; // Enter here your primary d
|
||||||
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
||||||
|
|
||||||
// Increase number of revision after update
|
// 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_date'] = '02-02-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'R580';
|
$bb_cfg['tp_release_state'] = 'R581';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$charset = 'utf8';
|
$charset = 'utf8';
|
||||||
|
@ -245,7 +245,10 @@ $bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
|
||||||
// Language
|
// Language
|
||||||
setlocale(LC_ALL, 'ru_RU.UTF-8');
|
setlocale(LC_ALL, 'ru_RU.UTF-8');
|
||||||
setlocale(LC_NUMERIC, 'C');
|
setlocale(LC_NUMERIC, 'C');
|
||||||
|
|
||||||
|
$bb_cfg['charset'] = 'utf8';
|
||||||
$bb_cfg['auto_language'] = true;
|
$bb_cfg['auto_language'] = true;
|
||||||
|
|
||||||
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $bb_cfg['auto_language'])
|
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $bb_cfg['auto_language'])
|
||||||
{
|
{
|
||||||
if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) == 'ru')
|
if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) == 'ru')
|
||||||
|
|
BIN
upload/images/logo/logo_me.png
Normal file
BIN
upload/images/logo/logo_me.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -177,7 +177,6 @@ define('TOPIC_WATCH_UN_NOTIFIED', 0);
|
||||||
define('POST_NORMAL', 0);
|
define('POST_NORMAL', 0);
|
||||||
define('POST_STICKY', 1);
|
define('POST_STICKY', 1);
|
||||||
define('POST_ANNOUNCE', 2);
|
define('POST_ANNOUNCE', 2);
|
||||||
define('POST_GLOBAL_ANNOUNCE', 3);
|
|
||||||
|
|
||||||
// Search types
|
// Search types
|
||||||
define('SEARCH_TYPE_POST', 0);
|
define('SEARCH_TYPE_POST', 0);
|
||||||
|
|
|
@ -3193,3 +3193,5 @@ $lang['ACCOUNT_STATUS'] = 'Account Status';
|
||||||
$lang['SORT_OPTIONS'] = 'Sort options:';
|
$lang['SORT_OPTIONS'] = 'Sort options:';
|
||||||
$lang['LAST_VISIT'] = 'Last Visit';
|
$lang['LAST_VISIT'] = 'Last Visit';
|
||||||
$lang['DAY'] = 'Day';
|
$lang['DAY'] = 'Day';
|
||||||
|
|
||||||
|
$lang['POST_EDIT_CANNOT'] = 'Sorry, but you cannot edit posts';
|
|
@ -1827,8 +1827,8 @@ $lang['USER_LEVELS_UPDATED'] = 'Уровни и права пользовате
|
||||||
// Synchronize
|
// Synchronize
|
||||||
$lang['SYNCHRONIZE'] = 'Синхронизировать';
|
$lang['SYNCHRONIZE'] = 'Синхронизировать';
|
||||||
$lang['TOPICS_DATA_SYNCHRONIZED'] = 'Темы синхронизированы';
|
$lang['TOPICS_DATA_SYNCHRONIZED'] = 'Темы синхронизированы';
|
||||||
$lang['USER_POSTS_COUNT'] = 'Количество сообщений пользователей.';
|
$lang['USER_POSTS_COUNT'] = 'Количество сообщений пользователей';
|
||||||
$lang['USER POSTS COUNT SYNCHRONIZED'] = 'Количество сообщений пользователей синхронизированы.';
|
$lang['USER POSTS COUNT SYNCHRONIZED'] = 'Количество сообщений пользователей синхронизированы';
|
||||||
|
|
||||||
// Online Userlist
|
// Online Userlist
|
||||||
$lang['SHOW_ONLINE_USERLIST'] = 'Показать список пользователей онлайн';
|
$lang['SHOW_ONLINE_USERLIST'] = 'Показать список пользователей онлайн';
|
||||||
|
@ -3219,3 +3219,5 @@ $lang['ACCOUNT_STATUS'] = 'Статус учётной записи';
|
||||||
$lang['SORT_OPTIONS'] = 'Поля сортировки:';
|
$lang['SORT_OPTIONS'] = 'Поля сортировки:';
|
||||||
$lang['LAST_VISIT'] = 'Последнее посещение';
|
$lang['LAST_VISIT'] = 'Последнее посещение';
|
||||||
$lang['DAY'] = 'День';
|
$lang['DAY'] = 'День';
|
||||||
|
|
||||||
|
$lang['POST_EDIT_CANNOT'] = 'Извините, вы не можете редактировать сообщения';
|
|
@ -1117,7 +1117,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
'NAME_FROM' => $userdata['username'],
|
'NAME_FROM' => $userdata['username'],
|
||||||
'MSG_SUBJECT' => html_entity_decode($privmsg_subject),
|
'MSG_SUBJECT' => html_entity_decode($privmsg_subject),
|
||||||
'SITENAME' => $bb_cfg['sitename'],
|
'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();
|
$emailer->send();
|
||||||
|
|
|
@ -84,21 +84,21 @@ ajax.callback.manage_user = function(data) {
|
||||||
<td>
|
<td>
|
||||||
<a href="#" id="datastore" onclick="ajax.manage_user('clear_datastore'); return false;">{L_DATASTORE}</a>,
|
<a href="#" id="datastore" onclick="ajax.manage_user('clear_datastore'); return false;">{L_DATASTORE}</a>,
|
||||||
<a href="#" id="cache" onclick="ajax.manage_user('clear_cache'); return false;">{L_ALL_CACHE}</a>,
|
<a href="#" id="cache" onclick="ajax.manage_user('clear_cache'); return false;">{L_ALL_CACHE}</a>,
|
||||||
<a href="#" id="template_cache" onclick="ajax.manage_user('clear_template_cache'); return false;">{L_TEMPLATES}</a>
|
<a href="#" id="template_cache" onclick="ajax.manage_user('clear_template_cache'); return false;">{L_TEMPLATES}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>{L_UPDATE}:</b></td>
|
<td><b>{L_UPDATE}:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{U_UPDATE_USER_LEVEL}">{L_USER_LEVELS}</a>,
|
<a href="{U_UPDATE_USER_LEVEL}">{L_USER_LEVELS}</a>
|
||||||
<!-- IF $bb_cfg['search_engine_type'] == "sphinx" --><a href="#" id="indexer" onclick="ajax.manage_user('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF -->
|
<!-- IF $bb_cfg['search_engine_type'] == "sphinx" -->, <a href="#" id="indexer" onclick="ajax.manage_user('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>{L_SYNCHRONIZE}:</b></td>
|
<td><b>{L_SYNCHRONIZE}:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{U_SYNC_TOPICS}">{L_TOPICS}</a>,
|
<a href="{U_SYNC_TOPICS}">{L_TOPICS}</a>,
|
||||||
<a href="{U_SYNC_USER_POSTS}">{L_USER_POSTS_COUNT}</a>
|
<a href="{U_SYNC_USER_POSTS}">{L_USER_POSTS_COUNT}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -129,7 +129,6 @@ function initExternalLinks(context)
|
||||||
var context = context || 'body';
|
var context = context || 'body';
|
||||||
if (ExternalLinks_InNewWindow) {
|
if (ExternalLinks_InNewWindow) {
|
||||||
$("a.postLink:not([href*='"+ window.location.hostname +"/'])", context).attr({ target: '_blank' });
|
$("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)
|
function fixPostImage($img)
|
||||||
|
@ -228,7 +227,7 @@ function escHTML (txt)
|
||||||
}
|
}
|
||||||
<!-- IF USE_TABLESORTER -->
|
<!-- IF USE_TABLESORTER -->
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.tablesorter').tablesorter(); // {debug: true}
|
$('.tablesorter').tablesorter();
|
||||||
});
|
});
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
@ -431,7 +430,7 @@ if (top != self) {
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<!--<h1>{SITENAME}</h1>
|
<!--<h1>{SITENAME}</h1>
|
||||||
<h6>{SITE_DESCRIPTION}</h6> -->
|
<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>
|
</div>
|
||||||
<!--/logo-->
|
<!--/logo-->
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue