Skip to content
Snippets Groups Projects
Commit a62fb5a5 authored by shammash's avatar shammash Committed by agata
Browse files

fix backends configuration parsing

parent 853a5719
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,11 @@ function noblogs_load_backends($db_config_file, $hashptr) { ...@@ -10,10 +10,11 @@ function noblogs_load_backends($db_config_file, $hashptr) {
die("Database backends not configured!"); die("Database backends not configured!");
} }
while (($line = fgets($fp, 1024)) !== false) { while (($line = fgets($fp, 1024)) !== false) {
if ($line[0] == '#') { $wline = rtrim($line);
if ($wline == "" || $wline[0] == '#') {
continue; continue;
} }
$line_parts = explode(" ", rtrim($line)); $line_parts = explode(" ", $wline);
$server_id = $line_parts[0]; $server_id = $line_parts[0];
$dataset = "backend_" . $server_id; $dataset = "backend_" . $server_id;
$backend_url = $line_parts[2]; $backend_url = $line_parts[2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment