return $out;
}
-function setupRW()
+function checkMirror($action_obj, $args)
{
global $config;
foreach ($alwaysRW as $table) {
$config['db']['table_'.$table] = 'rw';
}
-}
-function checkMirror($action_obj, $args)
-{
if (common_config('db', 'mirror') && $action_obj->isReadOnly($args)) {
if (is_array(common_config('db', 'mirror'))) {
// "load balancing", ha ha
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handleError');
- // Make sure RW database is setup
-
- setupRW();
-
// XXX: we need a little more structure in this script
- // get and cache current user (may hit RW!)
+ // get and cache current user
$user = common_current_user();