Update version + cleaning up

This commit is contained in:
danpros 2024-06-02 19:08:31 +07:00
commit 5226e9c01c
33 changed files with 56 additions and 38 deletions

View file

@ -1,3 +1,3 @@
{
"tag_name": "v2.9.8"
"tag_name": "v2.9.9"
}

View file

@ -1,6 +1,6 @@
<?php
define('HTMLY', true);
define('HTMLY_VERSION', 'v2.9.8');
define('HTMLY_VERSION', 'v2.9.9');
$config_file = 'config/config.ini';
require 'system/vendor/autoload.php';
require 'system/htmly.php';

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -312,5 +312,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -303,5 +303,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -303,5 +303,5 @@ mfa_config = "Autenticazione Multi Fattore (MFA)"
set_mfa_globally = "Imposta lo stato della MFA"
explain_mfa = "Una volta abilitata, la MFA è facoltativa per tutti gli utenti. Se disattivata, nessun utente può usarla ed il relativo campo nella pagina di connessione viene nascosto."
set_version_publicly = "Visibilità della versione"
explain_version = "Per impostazione predefinita la versione di HTMLy è visibile a tutti nel codice sorgente, alcuni bot e malintenzionati possono usare questa informazione per scopi illeciti perciò alcuni amministratori preferirebbero nasconderla."
explain_version = "Per impostazione predefinita la versione di HTMLy è visibile a tutti nel codice sorgente, alcuni amministratori preferirebbero nasconderla."
focus_mode = "Cambia visuale"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -302,5 +302,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -302,5 +302,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -313,5 +313,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -301,5 +301,5 @@ mfa_config = "Multi Factor Authentication (MFA)"
set_mfa_globally = "Set the status of MFA"
explain_mfa = "When enabled, MFA is optional for all users. When disabled, no users can use it and it hides the field on the login page."
set_version_publicly = "Version Visibility"
explain_version = "By default the version of HTMLy is visible publicly in the source code, some bots and bad actors can use this information for bad reasons so some admins may prefer to hide this."
explain_version = "By default the version of HTMLy is visible publicly in the source code, some admins may prefer to hide this."
focus_mode = "Toggle Focus"

View file

@ -1,6 +1,13 @@
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<h2><?php echo i18n('General_Settings')?></h2>
<br>
<?php
if (config('show.version') == 'false') {
if(file_exists('cache/installedVersion.json')) {
unlink('cache/installedVersion.json');
}
}
?>
<?php if (!extension_loaded('intl')) { ?>
<div class="callout callout-info">
<h5><i class="fa fa-info"></i> Note:</h5>
@ -157,7 +164,7 @@ Please install and enable the INTL extension to format the date format to your l
</label>
</div>
</div>
<small><em><?php echo i18n('explain_version');?></em></small>
<small><em><?php echo i18n('explain_version');?></em></small>
</div>
</div>
<hr />

View file

@ -54,5 +54,10 @@ if (empty($updater->getNewestInfo())) {
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
echo '</div>';
echo '<p><a class="btn btn-primary" target="_blank" href="' . $info['html_url'] . '">Read on Github</a></p>';
if (config('show.version') == 'false') {
if(file_exists('cache/installedVersion.json')) {
unlink('cache/installedVersion.json');
}
}
}
}

View file

@ -5,4 +5,9 @@
if (file_exists('install.php')) {
unlink('install.php');
}
?>
if (config('show.version') == 'false') {
if(file_exists('cache/installedVersion.json')) {
unlink('cache/installedVersion.json');
}
}
?>

View file

@ -2969,7 +2969,7 @@ function sitemap_post_path($posts, $page = 1, $perpage = 0)
if (empty($posts)) {
$posts = get_blog_posts();
}
krsort($posts);
$tmp = array();
@ -3119,7 +3119,7 @@ function generate_sitemap($str)
if ($str == 'post.xml') {
$map .= '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
$totalPosts = array();
$totalPosts = get_blog_posts();
@ -3443,20 +3443,21 @@ function head_contents()
{
$output = '';
$wmt_id = config('google.wmt.id');
$version = 'HTMLy ' . constant('HTMLY_VERSION');
if (config('show.version') !== 'false') {
$version = 'HTMLy ' . constant('HTMLY_VERSION');
} else {
$version = 'HTMLy';
}
$favicon = config('favicon.image');
if (empty($favicon)) {
$favicon = '<link rel="icon" type="image/png" href="' . site_url() . 'favicon.png" />' . "\n";
} else {
$favicon = '<link rel="icon" type="image/'. pathinfo($favicon, PATHINFO_EXTENSION) .'" href="' . $favicon . '" />' . "\n";
}
$output .= '<meta charset="utf-8" />' . "\n";
$output .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' . "\n";
$output .= '<meta name="viewport" content="width=device-width, initial-scale=1" />' . "\n";
if (config('show.version') == 'true') {
$output .= '<meta name="generator" content="' . $version . '" />' . "\n";
}
$output .= '<meta name="generator" content="' . $version . '" />' . "\n";
$output .= $favicon;
$output .= '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />' . "\n";
$output .= '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />' . "\n";