Skip to content

Instantly share code, notes, and snippets.

@mirzu
Created February 7, 2012 21:47
Show Gist options
  • Save mirzu/1762286 to your computer and use it in GitHub Desktop.
Save mirzu/1762286 to your computer and use it in GitHub Desktop.
<?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