From 08956edf565dea5fd6d236bfa692a27506b38628 Mon Sep 17 00:00:00 2001 From: Daniel Saunders Date: Mon, 25 Jan 2021 19:28:12 -0500 Subject: [PATCH] Cherry-picked several commits from https://github.com/vichan-devel/vichan/ --- inc/functions.php | 2 +- js/webm-settings.js | 4 ++-- templates/post/name.html | 4 ++-- templates/themes/ukko/theme.php | 4 ++-- templates/thread.html | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 3cc04583..206ae39b 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -911,7 +911,7 @@ function checkBan($board = false) { } foreach ($ips as $ip) { - $bans = Bans::find($_SERVER['REMOTE_ADDR'], $board, $config['show_modname']); + $bans = Bans::find($ip, $board, $config['show_modname']); foreach ($bans as &$ban) { if ($ban['expires'] && $ban['expires'] < time()) { diff --git a/js/webm-settings.js b/js/webm-settings.js index bd3c6f0f..19fb66ce 100644 --- a/js/webm-settings.js +++ b/js/webm-settings.js @@ -68,7 +68,7 @@ function refreshSettings() { } } -function setupControl(control) { +function setUpControl(control) { if (control.addEventListener) control.addEventListener("change", function(e) { if (control.type == "checkbox") { changeSetting(control.name, control.checked); @@ -81,7 +81,7 @@ function setupControl(control) { refreshSettings(); var settingsItems = settingsMenu.getElementsByTagName("input"); for (var i = 0; i < settingsItems.length; i++) { - setupControl(settingsItems[i]); + setUpControl(settingsItems[i]); } if (settingsMenu.addEventListener && !window.Options) { diff --git a/templates/post/name.html b/templates/post/name.html index e7f85f8b..fda086a5 100644 --- a/templates/post/name.html +++ b/templates/post/name.html @@ -3,9 +3,9 @@ {# start email #} {% endif %} - {{ post.name|bidi_cleanup }} + {{ post.name|bidi_cleanup }} {% if post.trip|length > 0 %} - {{ post.trip }} + {{ post.trip }} {% endif %} {% if post.email|length > 0 and (config.hide_sage!=true or post.email!='sage') and config.hide_email!=true %} {# end email #} diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index 01a98741..c02ed118 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -24,8 +24,8 @@ $overflow = array(); $board = array( 'url' => $this->settings['uri'], - 'name' => $this->settings['title'], - 'title' => sprintf($this->settings['subtitle'], $this->settings['thread_limit']) + 'title' => $this->settings['title'], + 'subtitle' => sprintf($this->settings['subtitle'], $this->settings['thread_limit']) ); $query = ''; diff --git a/templates/thread.html b/templates/thread.html index 2fdcbc5f..24d75b89 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -19,7 +19,7 @@ {% if thread.files.0.thumb %}{% endif %} - + {{ board.url }} - {{ meta_subject }}