summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
commitb3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (patch)
tree76666150701f03205bfff77e7d034dfa724f8764 /index.php
parent399669b1fb955d2d8c18098a7b551184d534a94c (diff)
parente185c0395a6cd250ccd7c8e385c54830be73f937 (diff)
Merge branch '0.7.x' into 0.8.x
Conflicts: classes/Notice.php lib/action.php lib/router.php lib/twitter.php
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.php b/index.php
index dae1ae751..e83d08c13 100644
--- a/index.php
+++ b/index.php
@@ -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;
}