Updated JSON to MIT

Cleaned up sanity.php
Cleaning up random bugs and cretura
This commit is contained in:
Michał Gdula 2022-11-06 16:31:22 +00:00
parent 5da0da06fd
commit c9b81414b0
10 changed files with 251 additions and 242 deletions

View file

@ -0,0 +1,32 @@
<?php
if (defined('ROOT') && $_SESSION['id'] == 1) {
$files = array(
'usr/images',
'usr/images/pfp',
'usr/images/previews',
'usr/images/thumbnails',
'usr/conf/conf.json',
'usr/conf/msg.json',
'usr/conf.default.json'
);
foreach ($files as $file) {
if (!is_writable(__DIR__."/../../../$file")) {
$results[] = array(
'type'=>'critical',
'message'=>"$file is not writable",
'fix'=>'manual'
);
}
}
foreach ($files as $file) {
if (!fileperms(__DIR__."/../../../$file")) {
$results[] = array(
'type'=>'critical',
'message'=>"PHP does not have permitions for $file",
'fix'=>'manual'
);
}
}
}