mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 21:03:54 -07:00
Little fixes (#1272)
This commit is contained in:
parent
250b07f3c3
commit
cf8fd449f7
3 changed files with 7 additions and 2 deletions
|
@ -168,7 +168,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) {
|
||||||
|
|
||||||
if (!empty($_POST['username'])) {
|
if (!empty($_POST['username'])) {
|
||||||
$this_userdata = get_userdata($_POST['username'], true);
|
$this_userdata = get_userdata($_POST['username'], true);
|
||||||
$user_id = $this_userdata['user_id'];
|
$user_id = $this_userdata ? $this_userdata['user_id'] : false;
|
||||||
} else {
|
} else {
|
||||||
$this_userdata = get_userdata($user_id);
|
$this_userdata = get_userdata($user_id);
|
||||||
}
|
}
|
||||||
|
|
5
dl.php
5
dl.php
|
@ -41,6 +41,9 @@ function send_file_to_browser($attachment, $upload_dir)
|
||||||
if (!str_contains($attachment['mimetype'], 'image')) {
|
if (!str_contains($attachment['mimetype'], 'image')) {
|
||||||
$attachment['mimetype'] = 'application/octet-stream';
|
$attachment['mimetype'] = 'application/octet-stream';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
header('Cache-Control: public, max-age=3600');
|
||||||
|
}
|
||||||
|
|
||||||
//bt
|
//bt
|
||||||
if (!(isset($_GET['original']) && !IS_USER)) {
|
if (!(isset($_GET['original']) && !IS_USER)) {
|
||||||
|
@ -150,7 +153,7 @@ if (!$authorised) {
|
||||||
$datastore->rm('cat_forums');
|
$datastore->rm('cat_forums');
|
||||||
|
|
||||||
// Check tor status
|
// Check tor status
|
||||||
if (!IS_AM) {
|
if (!IS_AM && str_contains($attachment['mimetype'], 'bittorrent')) {
|
||||||
$sql = 'SELECT tor_status, poster_id FROM ' . BB_BT_TORRENTS . ' WHERE attach_id = ' . (int)$attachment['attach_id'];
|
$sql = 'SELECT tor_status, poster_id FROM ' . BB_BT_TORRENTS . ' WHERE attach_id = ' . (int)$attachment['attach_id'];
|
||||||
|
|
||||||
if (!($result = DB()->sql_query($sql))) {
|
if (!($result = DB()->sql_query($sql))) {
|
||||||
|
|
|
@ -93,6 +93,8 @@ echo <<<EOF
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.1, maximum-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=0.1, maximum-scale=1.0" />
|
||||||
<meta name="robots" content="index" />
|
<meta name="robots" content="index" />
|
||||||
<meta name="description" content="File listing for topic - $topic_id | {$data['name']} ({$data['size']})" />
|
<meta name="description" content="File listing for topic - $topic_id | {$data['name']} ({$data['size']})" />
|
||||||
|
<meta property="og:description" content="File listing for topic - $topic_id | {$data['name']} ({$data['size']})" />
|
||||||
|
<meta property="og:site_name" content="{$bb_cfg['sitename']}" />
|
||||||
<meta name="generator" content="TorrentPier" />
|
<meta name="generator" content="TorrentPier" />
|
||||||
<meta name="version" content="{$bb_cfg['tp_version']}" />
|
<meta name="version" content="{$bb_cfg['tp_version']}" />
|
||||||
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue