From cb1348bc5c514e98595ccc3b050054ce14ca8e8f Mon Sep 17 00:00:00 2001 From: nicosomb Date: Thu, 18 Apr 2013 08:25:15 +0200 Subject: =?UTF-8?q?Fixed=20#53=20-=20on=20ne=20passait=20pas=20d'id=20pour?= =?UTF-8?q?=20la=20cr=C3=A9ation=20du=20r=C3=A9pertoire=20d'images=20lors?= =?UTF-8?q?=20de=20l'import=20pocket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- import.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'import.php') diff --git a/import.php b/import.php index 97072437..497e32fb 100644 --- a/import.php +++ b/import.php @@ -28,7 +28,12 @@ else { { $a = $li->find('a'); $url = $a[0]->href; - $parametres_url = prepare_url($url); + + # FIXME corriger cette génération d'ID + $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC"); + $id = $req->fetchColumn()+1; + + $parametres_url = prepare_url($url, $id); $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)'; $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read); try -- cgit v1.2.3