diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 06:11:00 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 20:45:40 +0300 |
commit | c0dc531ebefd8912819f3b6c8bda1fed3c7e750c (patch) | |
tree | 2c75aa9df182260aef09faf4befd81a4c2b9c5e2 /htdocs/sass.php | |
parent | 48d688cdf7f9eae1bf11b8a6f0e5b98687c604cb (diff) |
make it simple, but not simpler
Diffstat (limited to 'htdocs/sass.php')
-rw-r--r-- | htdocs/sass.php | 5 |
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'); |