-# Aaaaaaand action !
-$view = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'home';
-$full_head = (isset ($_REQUEST['full_head'])) ? htmlentities($_REQUEST['full_head']) : 'yes';
-$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
-$_SESSION['sort'] = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id';
-$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
-
-$url = new Url((isset ($_GET['url'])) ? $_GET['url'] : '');
-
-$tpl_vars = array(
- 'referer' => $referer,
- 'view' => $view,
- 'poche_url' => Tools::getPocheUrl(),
- 'demo' => MODE_DEMO,
- 'title' => _('poche, a read it later open source system'),
- 'token' => Session::getToken(),
- 'notices' => $notices,
-);
+elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
+ $plain_url = new Url(base64_encode($_GET['plainurl']));
+ $poche->action('add', $plain_url);
+}