aboutsummaryrefslogtreecommitdiffhomepage
path: root/import.php
diff options
context:
space:
mode:
Diffstat (limited to 'import.php')
-rw-r--r--import.php20
1 files changed, 1 insertions, 19 deletions
diff --git a/import.php b/import.php
index 497e32fb..9b42071b 100644
--- a/import.php
+++ b/import.php
@@ -29,26 +29,8 @@ else {
29 $a = $li->find('a'); 29 $a = $li->find('a');
30 $url = $a[0]->href; 30 $url = $a[0]->href;
31 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 32
36 $parametres_url = prepare_url($url, $id); 33 action_to_do('add', $url, $token);
37 $sql_action = 'INSERT INTO entries ( url, title, content, is_read ) VALUES (?, ?, ?, ?)';
38 $params_action = array($url, $parametres_url['title'], $parametres_url['content'], $read);
39 try
40 {
41 # action query
42 if (isset($sql_action))
43 {
44 $query = $db->getHandle()->prepare($sql_action);
45 $query->execute($params_action);
46 }
47 }
48 catch (Exception $e)
49 {
50 logm('error during pocket import : ' . $e->getMessage());
51 }
52 } 34 }
53 # Pocket génère un fichier HTML avec deux <ul> 35 # Pocket génère un fichier HTML avec deux <ul>
54 # Le premier concerne les éléments non lus 36 # Le premier concerne les éléments non lus