We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 745cdd20 authored by Evan Prodromou's avatar Evan Prodromou

fixup config errors

parent 4a41dbcd
......@@ -63,7 +63,7 @@ function handleError($error)
function main()
{
global $user, $action;
global $user, $action, $config;
if (!_have_config()) {
$msg = sprintf(_("No configuration file found. Try running ".
......@@ -131,11 +131,11 @@ function main()
if (common_config('db', 'mirror') && $action_obj->isReadOnly()) {
if (is_array(common_config('db', 'mirror'))) {
// "load balancing", ha ha
$k = array_rand($config['db']['mirror']);
$mirror = $config['db']['mirror'][$k];
$arr = common_config('db', 'mirror');
$k = array_rand($arr);
$mirror = $arr[$k];
} else {
$mirror = $config['db']['mirror'];
$mirror = common_config('db', 'mirror');
}
$config['db']['database'] = $mirror;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment