summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-11 09:50:33 -0400
committerczaks <marcin@6irc.net>2013-08-11 09:50:33 -0400
commitfa9bf536c356a49bf5d182a52f3ab47ea0c1b227 (patch)
tree12b45d039c0688d03f1066a32c38f594385ed47f
parentebac98e207290d5beddb0af6c8b259e15e9da361 (diff)
parent0de3ead32a42c5d5c1640765beb7147ea991ae1d (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: inc/config.php inc/display.php inc/mod/pages.php js/catalog-link.js post.php templates/banned.html
-rw-r--r--inc/config.php10
-rw-r--r--inc/display.php3
-rw-r--r--inc/mod/pages.php3
-rw-r--r--js/catalog-link.js2
-rw-r--r--post.php33
-rw-r--r--stylesheets/ferus.css4
-rw-r--r--templates/banned.html4
7 files changed, 29 insertions, 30 deletions
diff --git a/inc/config.php b/inc/config.php
index 440ce9aa..a46b953a 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -624,7 +624,7 @@
// Oh, and add jQuery in additional_javascript.
$config['attention_bar'] = false;
- // Allow html in board subtitle. This is useful for placing icons and links.
+ // Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
$config['allow_subtitle_html'] = false;
/*
@@ -718,6 +718,9 @@
// array('status' => 'http://status.example.org/')
// );
+ // Whether or not to put brackets around the whole board list
+ $config['boardlist_wrap_bracket'] = false;
+
// Board categories. Only used in the "Categories" theme.
// $config['categories'] = array(
// 'Group Name' => array('a', 'b', 'c'),
@@ -744,8 +747,9 @@
// 'bottom' => '',
// );
- // Optional message to display on ban pages. For example, you could include a link to email an admin or join an IRC channel to be unbanned.
- $config['ban_page_message'] = '';
+ // Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
+ // a link to an email address or IRC chat room to appeal the ban.
+ $config['ban_page_extra'] = '';
/*
* ====================
diff --git a/inc/display.php b/inc/display.php
index 241f81e3..0fdf1fff 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -46,6 +46,9 @@ function createBoardlist($mod=false) {
if (!isset($config['boards'])) return array('top'=>'','bottom'=>'');
$body = doBoardListPart($config['boards'], $mod?'?/':$config['root']);
+
+ if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
+ $body = '[' . $body . ']';
$body = trim($body);
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 9c26e0c4..b087f6db 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1148,9 +1148,8 @@ function mod_move($originBoard, $postID) {
if ($post['has_file']) {
// copy image
$clone($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
- if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
+ if (!in_array($post['thumb'], array('spoiler', 'deleted')))
$clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
- }
}
// go back to the original board to fetch replies
diff --git a/js/catalog-link.js b/js/catalog-link.js
index a8b8a0a8..cc55eb52 100644
--- a/js/catalog-link.js
+++ b/js/catalog-link.js
@@ -3,7 +3,7 @@
function catalog() {
var board = $("input[name='board']");
-if (board.length>0) {
+if (board) {
var catalog_url = 'catalog.html';
var pages = document.getElementsByClassName('pages')[0];
var bottom = document.getElementsByClassName('boardlist bottom')[0]
diff --git a/post.php b/post.php
index 98709d97..4c34b806 100644
--- a/post.php
+++ b/post.php
@@ -117,26 +117,19 @@ if (isset($_POST['delete'])) {
$query->execute() or error(db_error($query));
$thread = $query->fetchColumn();
-
- // If they are not reporting a reply, report the OP.
- if (!$thread) {
- $thread = $id;
- }
-
- if ($thread) {
- if ($config['syslog'])
- _syslog(LOG_INFO, 'Reported post: ' .
- '/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') .
- ' for "' . $reason . '"'
- );
- $query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
- $query->bindValue(':time', time(), PDO::PARAM_INT);
- $query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
- $query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
- $query->bindValue(':post', $id, PDO::PARAM_INT);
- $query->bindValue(':reason', $reason, PDO::PARAM_STR);
- $query->execute() or error(db_error($query));
- }
+
+ if ($config['syslog'])
+ _syslog(LOG_INFO, 'Reported post: ' .
+ '/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') .
+ ' for "' . $reason . '"'
+ );
+ $query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
+ $query->bindValue(':time', time(), PDO::PARAM_INT);
+ $query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
+ $query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
+ $query->bindValue(':post', $id, PDO::PARAM_INT);
+ $query->bindValue(':reason', $reason, PDO::PARAM_STR);
+ $query->execute() or error(db_error($query));
}
$is_mod = isset($_POST['mod']) && $_POST['mod'];
diff --git a/stylesheets/ferus.css b/stylesheets/ferus.css
index 5dbf11ed..f84d86ca 100644
--- a/stylesheets/ferus.css
+++ b/stylesheets/ferus.css
@@ -36,7 +36,7 @@ a.post_no:hover {
}
div.post.reply {
background: #0E0E0E;
- border: #414141 2px solid;
+ border: #414141 2px solid !important;
}
.de-pview {
background: rgba(14, 14, 14, 0.84) !important;
@@ -147,4 +147,4 @@ div.ban h2 {
table.modlog tr th {
background: #00FF00;
color: #AAAAAA;
-} \ No newline at end of file
+}
diff --git a/templates/banned.html b/templates/banned.html
index 401c36e5..a4498cf5 100644
--- a/templates/banned.html
+++ b/templates/banned.html
@@ -77,8 +77,8 @@
</p>
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
- {% if config.ban_page_message %}
- <p>{{ config.ban_page_message }}</p>
+ {% if config.ban_page_extra %}
+ <p>{{ config.ban_page_extra }}</p>
{% endif %}
</div>
{% endfilter %}