mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
path and copy adjustments
This commit is contained in:
@@ -15,7 +15,7 @@ class Pota
|
||||
$json = [];
|
||||
$ref = strtoupper($query);
|
||||
|
||||
$file = 'assets/json/pota.txt';
|
||||
$file = 'updates/pota.txt';
|
||||
|
||||
if (is_readable($file)) {
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
@@ -29,6 +29,13 @@ class Pota
|
||||
$json[] = ["name" => $value];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$src = 'assets/ressources/pota.txt';
|
||||
if (copy($src, $file)) {
|
||||
$this->get($query);
|
||||
} else {
|
||||
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||
}
|
||||
}
|
||||
|
||||
return $json;
|
||||
|
||||
@@ -15,7 +15,7 @@ class Sota
|
||||
$json = [];
|
||||
$ref = strtoupper($query);
|
||||
|
||||
$file = 'assets/json/sota.txt';
|
||||
$file = 'updates/sota.txt';
|
||||
|
||||
if (is_readable($file)) {
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
@@ -29,6 +29,13 @@ class Sota
|
||||
$json[] = ["name" => $value];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$src = 'assets/ressources/sota.txt';
|
||||
if (copy($src, $file)) {
|
||||
$this->get($query);
|
||||
} else {
|
||||
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||
}
|
||||
}
|
||||
|
||||
return $json;
|
||||
|
||||
@@ -15,7 +15,7 @@ class Wwff
|
||||
$json = [];
|
||||
$ref = strtoupper($query);
|
||||
|
||||
$file = 'assets/json/wwff.txt';
|
||||
$file = 'updates/wwff.txt';
|
||||
|
||||
if (is_readable($file)) {
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
@@ -29,6 +29,13 @@ class Wwff
|
||||
$json[] = ["name" => $value];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$src = 'assets/ressources/wwff.txt';
|
||||
if (copy($src, $file)) {
|
||||
$this->get($query);
|
||||
} else {
|
||||
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||
}
|
||||
}
|
||||
|
||||
return $json;
|
||||
|
||||
Reference in New Issue
Block a user