Created
February 7, 2012 21:47
-
-
Save mirzu/1762286 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// how the session variable is used in the system module. | |
if (isset($_SESSION['ignore_slave_server'])) { | |
if ($_SESSION['ignore_slave_server'] >= REQUEST_TIME) { | |
Database::ignoreTarget('default', 'slave'); | |
} | |
else { | |
unset($_SESSION['ignore_slave_server']); | |
} | |
} | |
// how it'used in the database class. | |
if (!empty(self::$ignoreTargets[$key][$target]) || !isset(self::$databaseInfo[$key][$target])) { | |
$target = 'default'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment