Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/database.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/database.class.php')
-rw-r--r--bin/database.class.php20
1 files changed, 3 insertions, 17 deletions
diff --git a/bin/database.class.php b/bin/database.class.php
index c83e72c..a3cc442 100644
--- a/bin/database.class.php
+++ b/bin/database.class.php
@@ -93,20 +93,6 @@ class Database {
mysql_select_db($database, $this->write) or die("Could not select writable database {$database}");
}
- /**
- * Runs the query against the slave db, so you should only do reads here.
- */
- function read($q) {
- return $this->query($q);
- }
-
- /**
- * Runs the query against the master db, which is where we want our writes.
- */
- function write($q) {
- return $this->query($q, true);
- }
-
/**
* Performs query using read-only database by default
*
@@ -121,13 +107,13 @@ class Database {
return $result;
}
-
+
/**
* Sets the stats_updating config value to prevent the Stats Dashboard from
* showing inaccurate data while a script is running.
*/
function lockStats() {
- if ($this->write("UPDATE `config` SET `value`='1' WHERE `key`='stats_updating'"))
+ if ($this->query("UPDATE `config` SET `value`='1' WHERE `key`='stats_updating'", true))
return true;
else
return false;
@@ -138,7 +124,7 @@ class Database {
* again
*/
function unlockStats() {
- if ($this->write("UPDATE `config` SET `value`='0' WHERE `key`='stats_updating'"))
+ if ($this->query("UPDATE `config` SET `value`='0' WHERE `key`='stats_updating'", true))
return true;
else
return false;