aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 19:36:44 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 19:36:44 +0200
commitfbdc22f75a896363d6c0f1a5b1d84adf8209fb88 (patch)
treeecdaacfc355f45d77a89bd46d70c5e06aae017e6 /app/Models/EntryDAO.php
parenta7064dc700f1a41129511866cb2fb36c522c0d6c (diff)
parente042e4ad2595263a84a6fe1056913ec431b9814a (diff)
Merge branch 'FreshRSS/dev' into defered-insertion
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 39c00f01c..61ec48d08 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -187,13 +187,13 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
}
if ($this->addEntryPrepared && $this->addEntryPrepared->execute()) {
- return $this->bd->lastInsertId();
+ return true;
} else {
$info = $this->addEntryPrepared == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $this->addEntryPrepared->errorInfo();
if ($this->autoUpdateDb($info)) {
$this->addEntryPrepared = null;
return $this->addEntry($valuesTmp);
- } elseif ((int)($info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries
+ } elseif ((int)((int)$info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries
Minz_Log::error('SQL error addEntry: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2]
. ' while adding entry in feed ' . $valuesTmp['id_feed'] . ' with title: ' . $valuesTmp['title']);
}
@@ -264,7 +264,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
if ($this->updateEntryPrepared && $this->updateEntryPrepared->execute()) {
- return $this->bd->lastInsertId();
+ return true;
} else {
$info = $this->updateEntryPrepared == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $this->updateEntryPrepared->errorInfo();
if ($this->autoUpdateDb($info)) {