Skip to content

Commit 7affc13

Browse files
authored
Update moduleutil.php: Add "TODO" comment
Plus delete a duplicate line.
1 parent ff3131c commit 7affc13

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

html/includes/moduleutil.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,17 @@ private function readModules() {
316316
public function postModules() {
317317
$config = $_POST['config'];
318318
$configData = $_POST['configData'];
319-
$configFileName = ALLSKY_MODULES . '/' . 'postprocessing_' . strtolower($config) . '.json';
320-
321319
$configFileName = ALLSKY_MODULES . '/' . 'postprocessing_' . strtolower($config) . '.json';
322320
$rawConfigData = file_get_contents($configFileName);
323321
$oldModules = json_decode($rawConfigData);
324322

325323
$result = file_put_contents($configFileName, $configData);
326324
$this->changeOwner($configFileName);
327325
$backupFilename = $configFileName . '-last';
326+
# TODO: fix these errors:
327+
# copy(/home/pi/allsky/config/modules/postprocessing_day.json-last) Failed to open stream: Permission denied
328+
# copy(/home/pi/allsky/config/modules/postprocessing_periodic.json-last) Failed to open stream: Permission denied
329+
# Not sure if the error is with the FILE (it would have to be unreadable) or with config/modules/ directory not being writable by lighttpd.
328330
copy($configFileName, $backupFilename);
329331
$this->changeOwner($backupFilename);
330332
if ($result !== false) {

0 commit comments

Comments
 (0)