mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-06 21:13:00 -04:00
FE+DOCS: review fixes
This commit is contained in:
1 parent
e663368698
commit
27aa36620e
3 files changed
+15
-6
No files matched your search
@@ -28,7 +28,14 @@ function getConfigLine($pattern, $config_lines) {
|
||||
|
||||
function getConfigValue($pattern, $config_lines, $delimiter = "'") {
|
||||
$line = preg_grep($pattern, $config_lines);
|
||||
return !empty($line) ? explode($delimiter, array_values($line)[0])[1] : '';
|
||||
if (empty($line)) {
|
||||
return '';
|
||||
}
|
||||
// encode_python_string() (front/php/server/util.php) doubles backslashes
|
||||
// before writing to app.conf so they round-trip through the Python-style
|
||||
// single-quoted literal unchanged - undo that here, or a password/token
|
||||
// containing a literal backslash never compares equal to what was saved.
|
||||
return str_replace('\\\\', '\\', explode($delimiter, array_values($line)[0])[1]);
|
||||
}
|
||||
|
||||
function redirect($url) {
|
||||
|
||||
Reference in new issue
Block a user