]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - process.php
3 * poche, a read it later open source system
6 * @author Nicolas LÅ“uillet <nicolas@loeuillet.org>
8 * @license http://www.wtfpl.net/ see COPYING file
11 include dirname(__FILE__
).'/inc/config.php';
12 $db = new db(DB_PATH
);
14 $action = (isset ($_GET['action'])) ? htmlentities($_GET['action']) : '';
15 $id = (isset ($_GET['id'])) ? htmlentities($_GET['id']) : '';
16 $token = (isset ($_GET['token'])) ? $_GET['token'] : '';
18 if (verif_token($token)) {
22 $sql_action = "UPDATE entries SET is_fav=~is_fav WHERE id=?";
23 $params_action = array($id);
25 case 'toggle_archive' :
26 $sql_action = "UPDATE entries SET is_read=~is_read WHERE id=?";
27 $params_action = array($id);
34 if (isset($sql_action))
36 $query = $db->getHandle()->prepare($sql_action);
37 $query->execute($params_action);
40 else die('CSRF problem');