aboutsummaryrefslogtreecommitdiff
path: root/htdocs/sass.php
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/sass.php')
-rw-r--r--htdocs/sass.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/htdocs/sass.php b/htdocs/sass.php
index 186b706..ec1e185 100644
--- a/htdocs/sass.php
+++ b/htdocs/sass.php
@@ -1,7 +1,6 @@
<?php
require __DIR__.'/../init.php';
-global $config;
$name = $_REQUEST['name'] ?? '';
$theme = $_REQUEST['theme'] ?? '';
@@ -11,7 +10,7 @@ if ($theme != 'light' && $theme != 'dark') {
exit;
}
-if (!$config['is_dev'] || !$name || !file_exists($path = ROOT.'/htdocs/scss/entries/'.$name.'/'.$theme.'.scss')) {
+if (!is_dev() || !$name || !file_exists($path = APP_ROOT.'/htdocs/scss/entries/'.$name.'/'.$theme.'.scss')) {
// logError(__FILE__.': access denied');
http_response_code(403);
exit;
@@ -26,7 +25,7 @@ $descriptorspec = [
2 => ['pipe', 'w'], // stderr
];
-$process = proc_open($cmd, $descriptorspec, $pipes, ROOT);
+$process = proc_open($cmd, $descriptorspec, $pipes, APP_ROOT);
if (!is_resource($process)) {
http_response_code(500);
logError('could not open sassc process');