diff options
author | nicosomb <nicolas@loeuillet.org> | 2013-04-15 09:11:48 +0200 |
---|---|---|
committer | nicosomb <nicolas@loeuillet.org> | 2013-04-15 09:11:48 +0200 |
commit | 3e188a7c8de484a57c05126072f76860c7746b39 (patch) | |
tree | d32a165453aebffae313684efa97b8dfc42ab414 | |
parent | 3c8d80aec5f5ba15910014bb4dcb48e948041ec9 (diff) | |
download | wallabag-3e188a7c8de484a57c05126072f76860c7746b39.tar.gz wallabag-3e188a7c8de484a57c05126072f76860c7746b39.tar.zst wallabag-3e188a7c8de484a57c05126072f76860c7746b39.zip |
suppression doublon du code pour la requĂȘte
-rwxr-xr-x | index.php | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -25,16 +25,8 @@ switch ($action) | |||
25 | 25 | ||
26 | $parametres_url = prepare_url($url); | 26 | $parametres_url = prepare_url($url); |
27 | 27 | ||
28 | try | 28 | $sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'; |
29 | { | 29 | $params_action = array($url, $parametres_url['title'], $parametres_url['content']); |
30 | # insert query | ||
31 | $query = $db->getHandle()->prepare('INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'); | ||
32 | $query->execute(array($url, $parametres_url['title'], $parametres_url['content'])); | ||
33 | } | ||
34 | catch (Exception $e) | ||
35 | { | ||
36 | error_log('insert query error : '.$e->getMessage()); | ||
37 | } | ||
38 | 30 | ||
39 | break; | 31 | break; |
40 | case 'delete': | 32 | case 'delete': |