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');
$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

View file

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