Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
db5ce2cb8f
|
@ -233,22 +233,10 @@ function truncate($body, $url, $max_lines = false, $max_chars = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function bidi_cleanup($str) {
|
function bidi_cleanup($str) {
|
||||||
# Removes all embedded RTL and LTR unicode formatting blocks in a string so that
|
// Removes all embedded RTL and LTR unicode formatting blocks in a string so that
|
||||||
# it can be used inside another without controlling its direction.
|
// it can be used inside another without controlling its direction.
|
||||||
# More info: http://www.iamcal.com/understanding-bidirectional-text/
|
|
||||||
#
|
|
||||||
# LRE - U+202A - 0xE2 0x80 0xAA
|
|
||||||
# RLE - U+202B - 0xE2 0x80 0xAB
|
|
||||||
# LRO - U+202D - 0xE2 0x80 0xAD
|
|
||||||
# RLO - U+202E - 0xE2 0x80 0xAE
|
|
||||||
#
|
|
||||||
# PDF - U+202C - 0xE2 0x80 0xAC
|
|
||||||
#
|
|
||||||
$explicits = '\xE2\x80\xAA|\xE2\x80\xAB|\xE2\x80\xAD|\xE2\x80\xAE';
|
|
||||||
$pdf = '\xE2\x80\xAC';
|
|
||||||
|
|
||||||
$str = preg_replace("!(?<explicits>$explicits)|(?<pdf>$pdf)!", '', $str);
|
return "<bdi>$str</bdi>";
|
||||||
return $str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function secure_link_confirm($text, $title, $confirm_message, $href) {
|
function secure_link_confirm($text, $title, $confirm_message, $href) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Installation/upgrade file
|
// Installation/upgrade file
|
||||||
define('VERSION', 'v0.9.6-dev-12 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.10</a>');
|
define('VERSION', 'v0.9.6-dev-12 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.11-gold</a>');
|
||||||
|
|
||||||
require 'inc/functions.php';
|
require 'inc/functions.php';
|
||||||
|
|
||||||
|
@ -376,6 +376,7 @@ if (file_exists($config['has_installed'])) {
|
||||||
$board['uri'])) or error(db_error());
|
$board['uri'])) or error(db_error());
|
||||||
}
|
}
|
||||||
case 'v0.9.6-dev-12':
|
case 'v0.9.6-dev-12':
|
||||||
|
case 'v0.9.6-dev-12 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.10</a>':
|
||||||
case false:
|
case false:
|
||||||
// Update version number
|
// Update version number
|
||||||
file_write($config['has_installed'], VERSION);
|
file_write($config['has_installed'], VERSION);
|
||||||
|
@ -548,7 +549,7 @@ if ($step == 0) {
|
||||||
array(
|
array(
|
||||||
'category' => 'Misc',
|
'category' => 'Misc',
|
||||||
'name' => 'Tinyboard installed using git',
|
'name' => 'Tinyboard installed using git',
|
||||||
'result' => is_dir('.git.'),
|
'result' => is_dir('.git'),
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'message' => 'Tinyboard is still beta software and it\'s not going to come out of beta any time soon. As there are often many months between releases yet changes and bug fixes are very frequent, it\'s recommended to use the git repository to maintain your Tinyboard installation. Using git makes upgrading much easier.'
|
'message' => 'Tinyboard is still beta software and it\'s not going to come out of beta any time soon. As there are often many months between releases yet changes and bug fixes are very frequent, it\'s recommended to use the git repository to maintain your Tinyboard installation. Using git makes upgrading much easier.'
|
||||||
)
|
)
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
{% if config.show_filename and post.filename %}
|
{% if config.show_filename and post.filename %}
|
||||||
,
|
,
|
||||||
{% if post.filename|length > config.max_filename_display %}
|
{% if post.filename|length > config.max_filename_display %}
|
||||||
<span class="postfilename" title="{{ post.filename|e|bidi_cleanup }}">{{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }}</span>
|
<span class="postfilename" title="{{ post.filename|e }}">{{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="postfilename">{{ post.filename|e|bidi_cleanup }}</span>
|
<span class="postfilename">{{ post.filename|e|bidi_cleanup }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
{% if config.show_filename and post.filename %}
|
{% if config.show_filename and post.filename %}
|
||||||
,
|
,
|
||||||
{% if post.filename|length > config.max_filename_display %}
|
{% if post.filename|length > config.max_filename_display %}
|
||||||
<span class="postfilename" title="{{ post.filename|e|bidi_cleanup }}">{{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }}</span>
|
<span class="postfilename" title="{{ post.filename|e }}">{{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="postfilename">{{ post.filename|e|bidi_cleanup }}</span>
|
<span class="postfilename">{{ post.filename|e|bidi_cleanup }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue