diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-28 13:35:09 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-28 13:35:09 -0800 |
commit | d00ce3854932820cbdb906404d248800c400cbca (patch) | |
tree | 2dafb5ce3d749cebf286d614ad438c466b9252d1 /index.php | |
parent | d773ed8193ee63db360386507e0511d1742b2dd1 (diff) | |
parent | 513f8be07a22d722b86509e570bee46d028066f2 (diff) |
Merge commit 'origin/master' 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; |