git.shiar.nl
/
sc2-widget
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
describe omitted ladders from previous season
[sc2-widget]
/
widget.php
diff --git
a/widget.php
b/widget.php
index d1b3b88b960c9e262245ad523552a680ebf24169..c99611140d654aca1a66b0add7a697e63d0c7a9b 100644
(file)
--- a/
widget.php
+++ b/
widget.php
@@
-17,9
+17,9
@@
function error($message, $status = 500)
exit;
}
exit;
}
-$request = trim($_SERVER['PATH_INFO'], '/');
+$request = trim($_
GET['clan'] ?? $_
SERVER['PATH_INFO'], '/');
$target = "data/$request.json";
$target = "data/$request.json";
-$last = file_exists($target) ?
filemtime($target)
: 0;
+$last = file_exists($target) ?
lstat($target)['mtime']
: 0;
if ($last < time() - 3600) {
$recipe = NULL;
if ($last < time() - 3600) {
$recipe = NULL;