[*] style
This commit is contained in:
1 parent
2b2fae626a
commit
30d612e52b
2 files changed
+7
-7
No files matched your search
+2
-1
@@ -23,6 +23,7 @@
|
||||
use Core\Models\User;
|
||||
|
||||
require_once __DIR__ . '/inc/header.php';
|
||||
global $USER;
|
||||
?>
|
||||
<div class="pageheader">
|
||||
<div class="media">
|
||||
@@ -93,7 +94,7 @@
|
||||
<td><?= date('d.m.Y H:i:s', $elUser['last_active']); ?></td>
|
||||
<td><?= $elUser['date_created'] ? date('d.m.Y H:i:s', strtotime($elUser['date_created'])) : '-'; ?></td>
|
||||
<td><?= $elUser['date_updated'] ? date('d.m.Y H:i:s', strtotime($elUser['date_updated'])) : '-'; ?></td>
|
||||
<td><a class="btn btn-primary" href="login.php?loginAs=<?= $elUser['id']; ?>">Войти</a></td>
|
||||
<td><?php if ($USER->isAdmin()) { ?><a class="btn btn-primary" href="login.php?loginAs=<?= $elUser['id']; ?>">Войти</a> <?php } ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -123,9 +123,9 @@
|
||||
|| self::getAge($name) > CACHE_TTL
|
||||
|| !file_exists(self::$cacheDir . md5($name) . '.tmp')) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,9 +169,9 @@
|
||||
self::$quantityWrite++;
|
||||
if (file_put_contents(self::$cacheDir . md5($name) . '.tmp', base64_encode(serialize($arValue)))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,7 +181,6 @@
|
||||
*/
|
||||
public static function flush(): bool
|
||||
{
|
||||
sendTelegram('Произведена очистка кэша' . PHP_EOL . 'IP: ' . SystemFunctions::getOS());
|
||||
$di = new \RecursiveDirectoryIterator(self::$cacheDir, \FilesystemIterator::SKIP_DOTS);
|
||||
$ri = new \RecursiveIteratorIterator($di, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
foreach ($ri as $file) {
|
||||
@@ -233,7 +232,7 @@
|
||||
{
|
||||
$return_size = 0;
|
||||
foreach (scandir(self::$cacheDir) as $file) {
|
||||
if ($file == '.' or $file == '..') {
|
||||
if ($file === '.' || $file === '..') {
|
||||
continue;
|
||||
}
|
||||
$return_size = $return_size + filesize(self::$cacheDir . $file);
|
||||
|
||||
Reference in new issue
Block a user