aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-18 21:22:41 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-18 21:22:41 +0100
commit53ae58e1a1bf097b8eb1af3a532ebf25630f96ec (patch)
treefac0e192127289fc1d7701471973ebf9572239b5 /inc/poche/Database.class.php
parent792097fb6a6507201ec41f90201ad05ad8c38870 (diff)
parent970cfb11661e20027ef4c6b3912dfe2dbafb8c0b (diff)
downloadwallabag-53ae58e1a1bf097b8eb1af3a532ebf25630f96ec.tar.gz
wallabag-53ae58e1a1bf097b8eb1af3a532ebf25630f96ec.tar.zst
wallabag-53ae58e1a1bf097b8eb1af3a532ebf25630f96ec.zip
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r--inc/poche/Database.class.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 9f553fa1..58583bf5 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -241,6 +241,22 @@ class Database {
241 return isset($entry[0]) ? $entry[0] : null; 241 return isset($entry[0]) ? $entry[0] : null;
242 } 242 }
243 243
244 public function retrieveOneByURL($url, $user_id) {
245 $entry = NULL;
246 $sql = "SELECT * FROM entries WHERE url=? AND user_id=?";
247 $params = array($url, $user_id);
248 $query = $this->executeQuery($sql, $params);
249 $entry = $query->fetchAll();
250
251 return isset($entry[0]) ? $entry[0] : null;
252 }
253
254 public function reassignTags($old_entry_id, $new_entry_id) {
255 $sql = "UPDATE tags_entries SET entry_id=? WHERE entry_id=?";
256 $params = array($new_entry_id, $old_entry_id);
257 $query = $this->executeQuery($sql, $params);
258 }
259
244 public function getEntriesByView($view, $user_id, $limit = '') { 260 public function getEntriesByView($view, $user_id, $limit = '') {
245 switch ($_SESSION['sort']) 261 switch ($_SESSION['sort'])
246 { 262 {