summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-10 18:21:51 +0500
committerilotterytea <iltsu@alright.party>2025-12-10 18:21:51 +0500
commit0891b1fb605a0244a3f034ebdd528b4b57fa35f2 (patch)
tree3af3ebf6be1f641b0b1fde2ebc474846673d0a11
parent78ccc7e7db5fca5a1ff9bb63ef64b015f3afb1f3 (diff)
upd: removed INSTANCE_STATIC_FOLDER constant
-rw-r--r--.gitignore1
-rw-r--r--404.php2
-rw-r--r--README.md5
-rw-r--r--lib/config.php2
4 files changed, 1 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 6cd98bb..7ad4f76 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,4 @@
userdata/
*.db
config.json
-custom_static/
captcha/ \ No newline at end of file
diff --git a/404.php b/404.php
index 7741541..7d49c8b 100644
--- a/404.php
+++ b/404.php
@@ -31,7 +31,7 @@ $reason = str_safe($_GET["error_reason"] ?? "Not found", 200);
<section style="position: absolute; right: 6px; bottom: 6px;">
<img src="/static/img/404/<?php
- $files = scandir(INSTANCE_STATIC_FOLDER . "/img/404");
+ $files = scandir("{$_SERVER['DOCUMENT_ROOT']}/static/img/404");
array_splice($files, 0, 2);
echo $files[random_int(0, count($files) - 1)];
?>" alt=""></img>
diff --git a/README.md b/README.md
index ed1927e..95af72a 100644
--- a/README.md
+++ b/README.md
@@ -55,11 +55,6 @@ server {
root /www/tinyemotesinstance/public;
index index.php;
- location ~ ^/static/?(.*)$ {
- root /www/tinyemotesinstance/public;
- try_files /custom_static/$1 /static/$1 =404;
- }
-
location / {
try_files $uri $uri/ /index.php?$query_string;
}
diff --git a/lib/config.php b/lib/config.php
index fac6e02..c4fc5d8 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -111,7 +111,5 @@ $cfg['rating']['names'] = $n;
define('CONFIG', $cfg);
-define("INSTANCE_STATIC_FOLDER", "static"); // Static folder. Used only in /404.php.
-
// FOR DEVELOPERS
define("CLIENT_REQUIRES_JSON", isset($_SERVER["HTTP_ACCEPT"]) && $_SERVER["HTTP_ACCEPT"] == "application/json"); \ No newline at end of file