mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-11 17:51:02 +00:00
stockage de la vue et du tri en session
This commit is contained in:
parent
643e3037e6
commit
139769aa24
8 changed files with 99 additions and 88 deletions
40
process.php
40
process.php
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* poche, a read it later open source system
|
||||
*
|
||||
* @category poche
|
||||
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||
* @copyright 2013
|
||||
* @license http://www.wtfpl.net/ see COPYING file
|
||||
*/
|
||||
|
||||
include dirname(__FILE__).'/inc/config.php';
|
||||
$db = new db(DB_PATH);
|
||||
|
||||
$action = (isset ($_GET['action'])) ? htmlentities($_GET['action']) : '';
|
||||
$id = (isset ($_GET['id'])) ? htmlentities($_GET['id']) : '';
|
||||
$token = (isset ($_GET['token'])) ? $_GET['token'] : '';
|
||||
|
||||
if (verif_token($token)) {
|
||||
switch ($action)
|
||||
{
|
||||
case 'toggle_fav' :
|
||||
$sql_action = "UPDATE entries SET is_fav=~is_fav WHERE id=?";
|
||||
$params_action = array($id);
|
||||
break;
|
||||
case 'toggle_archive' :
|
||||
$sql_action = "UPDATE entries SET is_read=~is_read WHERE id=?";
|
||||
$params_action = array($id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
# action query
|
||||
if (isset($sql_action))
|
||||
{
|
||||
$query = $db->getHandle()->prepare($sql_action);
|
||||
$query->execute($params_action);
|
||||
}
|
||||
}
|
||||
else die('CSRF problem');
|
Loading…
Add table
Add a link
Reference in a new issue