Cherry-picked several commits from https://github.com/vichan-devel/vichan/

This commit is contained in:
Daniel Saunders 2021-01-25 19:28:12 -05:00
parent 8b9ab76cb9
commit 08956edf56
5 changed files with 8 additions and 8 deletions

View File

@ -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()) {

View File

@ -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) {

View File

@ -3,9 +3,9 @@
{# start email #}
<a class="email" href="mailto:{{ post.email }}">
{% endif %}
<span {% if capcode.name %}style="{{ capcode.name }}" {% endif %}class="name">{{ post.name|bidi_cleanup }}</span>
<span {% if capcode.name %}style="{{ capcode.name }}" {% endif %} class="name">{{ post.name|bidi_cleanup }}</span>
{% if post.trip|length > 0 %}
<span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span>
<span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %} class="trip">{{ post.trip }}</span>
{% endif %}
{% if post.email|length > 0 and (config.hide_sage!=true or post.email!='sage') and config.hide_email!=true %}
{# end email #}

View File

@ -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 = '';

View File

@ -19,7 +19,7 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ config.domain }}/{{ board.uri }}/{{ config.dir.res }}{{ thread.id }}.html" />
{% if thread.files.0.thumb %}<meta property="og:image" content="{{ config.domain }}/{{ board.uri }}/{{ config.dir.thumb }}{{ thread.files.0.thumb }}" />{% endif %}
<meta property="og:description" content="{{ thread.body_nomarkup|e }}" />
<meta property="og:description" content="{{ thread.body_nomarkup|remove_modifiers|e }}" />
<title>{{ board.url }} - {{ meta_subject }}</title>
</head>