aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'controllers')
-rw-r--r--controllers/archive.php3
-rw-r--r--controllers/meta.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/controllers/archive.php b/controllers/archive.php
index a3afb9f..8ef8dbf 100644
--- a/controllers/archive.php
+++ b/controllers/archive.php
@@ -10,6 +10,7 @@ use ValueError;
set_time_limit(300);
function on_post() {
+ global $ARCHIVES_DIR;
if (!array_key_exists('async', $_POST) || $_POST['async'] !== 'true') {
return;
}
@@ -19,7 +20,7 @@ function on_post() {
global $TOKEN;
$WEBSITE_CATEGORY = 'url';
- $DOWNLOADS_FOLDER = getenv('ARCHIVES_DIR');
+ $DOWNLOADS_FOLDER = $ARCHIVES_DIR;
$website_url = htmlspecialchars($_POST[$WEBSITE_CATEGORY]);
$uid = 1;
$authorized = false;
diff --git a/controllers/meta.php b/controllers/meta.php
index 46550d3..aa7a09b 100644
--- a/controllers/meta.php
+++ b/controllers/meta.php
@@ -1,5 +1,7 @@
<?php
+include_once __DIR__ . '/../constants.php';
+
function call_handler(string $name) {
if (function_exists($name)) {
call_user_func($name);