1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

Fixed #53 - on ne passait pas d'id pour la création du répertoire d'images lors de l'import pocket

This commit is contained in:
nicosomb 2013-04-18 08:25:15 +02:00
parent f0fc50119b
commit cb1348bc5c
2 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,12 @@ else {
{ {
$a = $li->find('a'); $a = $li->find('a');
$url = $a[0]->href; $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 (?, ?, ?, ?)'; $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)';
$params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read); $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read);
try try

View File

@ -240,6 +240,7 @@ function action_to_do($action, $id, $url, $token)
if ($url == '') if ($url == '')
continue; continue;
# FIXME corriger cette génération d'ID
$req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC"); $req = $db->getHandle()->query("SELECT id FROM entries ORDER BY id DESC");
$id = $req->fetchColumn()+1; $id = $req->fetchColumn()+1;