Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Aubry <matt@piwik.org>2014-05-22 04:02:42 +0400
committerMatthieu Aubry <matt@piwik.org>2014-05-22 04:02:42 +0400
commita5af4608891c6ee253fc1daa8ff5e22daf28ac49 (patch)
tree591ebc96d6d29a24b0ae25a82aa2386d50d8de39 /core/Tracker.php
parent5af8e0b6859ea184f2c1f9f0add90c4320935231 (diff)
Move beginTransaction
Diffstat (limited to 'core/Tracker.php')
-rw-r--r--core/Tracker.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Tracker.php b/core/Tracker.php
index e1e8d15a44..ad186238f2 100644
--- a/core/Tracker.php
+++ b/core/Tracker.php
@@ -233,19 +233,19 @@ class Tracker
}
$this->initOutputBuffer();
- self::getDatabase()->beginTransaction();
if (!empty($this->requests)) {
+ self::getDatabase()->beginTransaction();
try {
foreach ($this->requests as $params) {
$isAuthenticated = $this->trackRequest($params, $tokenAuth);
}
$this->runScheduledTasksIfAllowed($isAuthenticated);
- self::getDatabase()->commit();
+ self::getDatabase()->commit();
} catch(DbException $e) {
- Common::printDebug($e->getMessage());
- self::getDatabase()->rollback();
+ Common::printDebug($e->getMessage());
+ self::getDatabase()->rollback();
}
} else {