} } /** * Disable current view reroute to slave SQL * * @return void */ static function disableSlave() { if (!self::$slavestate) { return; } self::$slavestate = false; self::rerouteStdDS(); } /** * Actual rerouting from std datasource to readonly slave datasource * * @return void */ static function rerouteStdDS() { foreach (CStoredObject::$spec as $_spec) { if ($_spec->dsn === "std") { $_spec->init(); } } } } CView::$params = new stdClass();