mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Исправления мелочей, унификация гида по стилю
This commit is contained in:
parent
9caec2b29a
commit
5b692ed179
5 changed files with 11 additions and 13 deletions
6
dl.php
6
dl.php
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
define('BB_SCRIPT', 'dl');
|
||||
define('NO_GZIP', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
require_once __DIR__ . '/common.php';
|
||||
|
||||
$di = \TorrentPier\Di::getInstance();
|
||||
|
||||
|
@ -47,8 +46,9 @@ if (IS_GUEST && !bb_captcha('check')) {
|
|||
]);
|
||||
|
||||
$response = \Symfony\Component\HttpFoundation\Response::create();
|
||||
|
||||
$response->setContent($content);
|
||||
|
||||
$response->prepare($di->request);
|
||||
$response->send();
|
||||
}
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ function send_torrent_with_passkey ($t_data)
|
|||
}
|
||||
else if (isset($bb_cfg['tor_frozen'][$row['tor_status']]))
|
||||
{
|
||||
if (!$t_data['is_am']) bb_die("Раздача имеет статус: <b>{$lang['tor_status'][$row['tor_status']]}</b><br /><br />Скачивание запрещено"); //TODO: перевести
|
||||
if (!$t_data['is_am']) bb_die("Раздача имеет статус: <b>{$lang['TOR_STATUS_NAME'][$row['tor_status']]}</b><br /><br />Скачивание запрещено"); //TODO: перевести
|
||||
}
|
||||
|
||||
$passkey_val = '';
|
||||
|
|
|
@ -35,7 +35,7 @@ $tor_reged = (bool) $t_data['tracker_status'];
|
|||
$locked = ($t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED);
|
||||
$tor_auth = ($bt_user_id != GUEST_UID && (($bt_user_id == $poster_id && !$locked) || $is_auth['auth_mod'] || IS_CP_HOLDER));
|
||||
|
||||
if ($tor_auth && $t_data['allow_reg_tracker'] && !$tor_reged && !IS_CP_HOLDER && $post_id == $t_data['topic_first_post_id'])
|
||||
if ($tor_auth && $t_data['allow_reg_tracker'] && !$tor_reged && !IS_CP_HOLDER)
|
||||
{
|
||||
$tr_reg_link = '<a class="txtb" href="#" onclick="ajax.exec({ action: \'change_torrent\', t : '. $topic_id .', type: \'reg\'}); return false;">'. $lang['BT_REG_ON_TRACKER'] .'</a>';
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ else
|
|||
if ($tor_reged && !$tor_info)
|
||||
{
|
||||
DB()->query("UPDATE ". BB_TOPICS ." SET tracker_status = 0 WHERE topic_id = $topic_id LIMIT 1");
|
||||
bb_die('Torrent status fixed'); // TODO: локализация
|
||||
bb_die('Torrent status fixed'); // TODO: перевести
|
||||
}
|
||||
|
||||
if ($tor_reged)
|
||||
|
|
|
@ -439,7 +439,7 @@ elseif ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
}
|
||||
else
|
||||
{
|
||||
$return_to_edit_link = '<a href="'. POSTING_URL .'?mode=editpost&p='. $post_id .'">Вернуться к редактированию сообщения</a>'; //TODO: локализация
|
||||
$return_to_edit_link = '<a href="'. POSTING_URL .'?mode=editpost&p='. $post_id .'">Вернуться к редактированию сообщения</a>'; //TODO: перевести
|
||||
$return_message = '
|
||||
<span class="warnColor1">'. join('<br />', $upload->errors) ."</span>
|
||||
<br /><br />
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
|
||||
$t = microtime(true);
|
||||
define('BB_SCRIPT', 'styleguide');
|
||||
define('IN_LOGIN', true);
|
||||
define('BB_ROOT', './');
|
||||
require_once __DIR__ . '/common.php';
|
||||
|
||||
|
@ -11,11 +9,11 @@ $user->session_start();
|
|||
$di = \TorrentPier\Di::getInstance();
|
||||
|
||||
$content = $di->view->make('styleguide', [
|
||||
'name' => $di->request->get('name', $user->data['username'])
|
||||
'name' => $di->request->get('name', $user->data['username'])
|
||||
]);
|
||||
|
||||
/** @var \Symfony\Component\HttpFoundation\Response $response */
|
||||
$response = $di->response;
|
||||
|
||||
$response = \Symfony\Component\HttpFoundation\Response::create();
|
||||
$response->setContent($content);
|
||||
|
||||
$response->prepare($di->request);
|
||||
$response->send();
|
Loading…
Add table
Add a link
Reference in a new issue