aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Database.class.php7
-rw-r--r--inc/poche/Poche.class.php2
2 files changed, 9 insertions, 0 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index cd5a9a31..84916b83 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -184,6 +184,13 @@ class Database {
184 return $entries; 184 return $entries;
185 } 185 }
186 186
187 public function updateContent($id, $content, $user_id) {
188 $sql_action = 'UPDATE entries SET content = ? WHERE id=? AND user_id=?';
189 $params_action = array($content, $id, $user_id);
190 $query = $this->executeQuery($sql_action, $params_action);
191 return $query;
192 }
193
187 public function add($url, $title, $content, $user_id) { 194 public function add($url, $title, $content, $user_id) {
188 $sql_action = 'INSERT INTO entries ( url, title, content, user_id ) VALUES (?, ?, ?, ?)'; 195 $sql_action = 'INSERT INTO entries ( url, title, content, user_id ) VALUES (?, ?, ?, ?)';
189 $params_action = array($url, $title, $content, $user_id); 196 $params_action = array($url, $title, $content, $user_id);
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 90bea1fe..2af49acd 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -126,6 +126,8 @@ class Poche
126 $last_id = $this->store->getLastId($sequence); 126 $last_id = $this->store->getLastId($sequence);
127 if (DOWNLOAD_PICTURES) { 127 if (DOWNLOAD_PICTURES) {
128 $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id); 128 $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id);
129 Tools::logm('updating content article');
130 $this->store->updateContent($last_id, $content, $this->user->getId());
129 } 131 }
130 if (!$import) { 132 if (!$import) {
131 $this->messages->add('s', _('the link has been added successfully')); 133 $this->messages->add('s', _('the link has been added successfully'));