]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - process.php
Merge branch 'master' of github.com:inthepoche/poche
[github/wallabag/wallabag.git] / process.php
index ef258308914f685237c341d167de8b3ae869f714..14686885849f37fdc59d7ad14b0bfa7053eb8860 100644 (file)
@@ -3,36 +3,14 @@
  * poche, a read it later open source system
  *
  * @category   poche
- * @author     Nicolas LÅ“uillet <nicolas@loeuillet.org>
+ * @author     Nicolas LÅ“uillet <support@inthepoche.com>
  * @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'])) ? htmlspecialchars($_GET['action']) : '';
-$id     = (isset ($_GET['id'])) ? htmlspecialchars($_GET['id']) : '';
-
-
-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);
-}
-?>
\ No newline at end of file
+$entries = display_view($view);
+$tpl->assign('token', $_SESSION['token_poche']);
+$tpl->assign('entries', $entries);
+$tpl->draw('entries');
\ No newline at end of file