diff options
author | Zach Copley <zach@status.net> | 2010-01-29 01:53:11 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-29 01:53:11 +0000 |
commit | 292ac40cae211d209899d1e13148483585483330 (patch) | |
tree | f4eea2e9b4ef41901aa41c6b800ef35e417b812c /index.php | |
parent | 48a1a5a2dcaf026d92caf0656d44f324cd1bbf0c (diff) | |
parent | d13d73c5630244963f0c3bd9db68dd6c6451821a (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -152,6 +152,16 @@ function checkMirror($action_obj, $args) static $alwaysRW = array('session', 'remember_me'); + // We ensure that these tables always are used + // on the master DB + + $config['db']['database_rw'] = $config['db']['database']; + $config['db']['ini_rw'] = INSTALLDIR.'/classes/statusnet.ini'; + + foreach ($alwaysRW as $table) { + $config['db']['table_'.$table] = 'rw'; + } + if (common_config('db', 'mirror') && $action_obj->isReadOnly($args)) { if (is_array(common_config('db', 'mirror'))) { // "load balancing", ha ha @@ -162,16 +172,6 @@ function checkMirror($action_obj, $args) $mirror = common_config('db', 'mirror'); } - // We ensure that these tables always are used - // on the master DB - - $config['db']['database_rw'] = $config['db']['database']; - $config['db']['ini_rw'] = INSTALLDIR.'/classes/statusnet.ini'; - - foreach ($alwaysRW as $table) { - $config['db']['table_'.$table] = 'rw'; - } - // everyone else uses the mirror $config['db']['database'] = $mirror; |