aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-18 08:25:15 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-18 08:25:15 +0200
commitcb1348bc5c514e98595ccc3b050054ce14ca8e8f (patch)
treed104b8b3414d3fb33efef5d8754f4598f4887baf
parentf0fc50119b29135c29be4528c67077e1005915be (diff)
downloadwallabag-cb1348bc5c514e98595ccc3b050054ce14ca8e8f.tar.gz
wallabag-cb1348bc5c514e98595ccc3b050054ce14ca8e8f.tar.zst
wallabag-cb1348bc5c514e98595ccc3b050054ce14ca8e8f.zip
Fixed #53 - on ne passait pas d'id pour la création du répertoire d'images lors de l'import pocket
-rw-r--r--import.php7
-rw-r--r--inc/functions.php1
2 files changed, 7 insertions, 1 deletions
diff --git a/import.php b/import.php
index 97072437..497e32fb 100644
--- a/import.php
+++ b/import.php
@@ -28,7 +28,12 @@ else {
28 { 28 {
29 $a = $li->find('a'); 29 $a = $li->find('a');
30 $url = $a[0]->href; 30 $url = $a[0]->href;
31 $parametres_url = prepare_url($url); 31
32 # FIXME corriger cette génération d'ID
33 $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC");
34 $id = $req->fetchColumn()+1;
35
36 $parametres_url = prepare_url($url, $id);
32 $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)'; 37 $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)';
33 $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read); 38 $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read);
34 try 39 try
diff --git a/inc/functions.php b/inc/functions.php
index a6109ef7..b7c7baff 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -240,6 +240,7 @@ function action_to_do($action, $id, $url, $token)
240 if ($url == '') 240 if ($url == '')
241 continue; 241 continue;
242 242
243 # FIXME corriger cette génération d'ID
243 $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC"); 244 $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC");
244 $id = $req->fetchColumn()+1; 245 $id = $req->fetchColumn()+1;
245 246