v 1.4.2
- Extended status cache time from 10 to 60 seconds. Query should be less spammy now. - Fixed "It is not safe to rely on the system's timezone settings" exception - Removed lang property from html tag
This commit is contained in:
parent
3aa1852694
commit
23994df00c
|
@ -1,7 +1,9 @@
|
|||
config/config.php
|
||||
prototypes/
|
||||
admin/
|
||||
cache/localhost
|
||||
|
||||
cache/
|
||||
!/cache/.htaccess
|
||||
|
||||
# PhpStorm
|
||||
.idea/
|
||||
|
|
|
@ -11,7 +11,7 @@ date_default_timezone_set($config["general"]["timezone"]);
|
|||
$cacheutils = new CacheUtils('serverstatus');
|
||||
|
||||
if($cacheutils->isExpired()) {
|
||||
$cacheutils->setValue(getResult(), 10);
|
||||
$cacheutils->setValue(getResult(), 60);
|
||||
}
|
||||
|
||||
die ($cacheutils->getValue());
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
require_once __DIR__ . "/../lib/phpfastcache/src/autoload.php";
|
||||
require_once __DIR__ . "/../config/config.php";
|
||||
|
||||
use phpFastCache\CacheManager;
|
||||
use phpFastCache\Util\Languages;
|
||||
|
@ -11,10 +12,14 @@ class CacheUtils {
|
|||
private $key;
|
||||
|
||||
function __construct($key) {
|
||||
|
||||
if(!is_string($key))
|
||||
throw new InvalidArgumentException("Key must be a string");
|
||||
|
||||
global $config;
|
||||
if(isset($config["general"]["timezone"])) {
|
||||
date_default_timezone_set($config["general"]["timezone"]);
|
||||
}
|
||||
|
||||
$this->cacheInstance = CacheManager::getInstance('Files', ["path" => __DIR__ . '/../cache']);
|
||||
Languages::setEncoding();
|
||||
$this->cacheItem = $this->cacheInstance->getItem($key);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<ul class="list-inline">
|
||||
<li> <!-- Please respect the amount of work we've put for free into this project and leave the authors in the footer. Thank you. -->
|
||||
<p>
|
||||
<a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.4.1 — © <a href="https://wruczek.tech">Wruczek</a> 2016 - 2017
|
||||
<a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.4.2 — © <a href="https://wruczek.tech">Wruczek</a> 2016 - 2017
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -8,7 +8,7 @@ require_once __DIR__ . "/../include/adminlist.php";
|
|||
$htalink = $config["general"]["enablehta"] ? "" : ".php";
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -89,7 +89,7 @@ function showError($title, $text) { ?>
|
|||
<?php echo $text; ?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
© <a href="https://wruczek.tech">Wruczek</a> 2016 - 2017 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.4.1 | MIT License
|
||||
© <a href="https://wruczek.tech">Wruczek</a> 2016 - 2017 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.4.2 | MIT License
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue