]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - index.php
fix for #738
[github/wallabag/wallabag.git] / index.php
index deb13d7aa52b8f31e7161095ce8d623d65284db2..afacdddc00e28ba07303e99fd409d9a0dd103637 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -8,10 +8,15 @@
  * @license    http://www.wtfpl.net/ see COPYING file
  */
 
-define ('POCHE', '1.6.1');
+define ('POCHE', '1.7.0');
 require 'check_setup.php';
 require_once 'inc/poche/global.inc.php';
 
+# Set error reporting level
+if (defined('ERROR_REPORTING')) {
+       error_reporting(ERROR_REPORTING);
+}
+
 # Start session
 Session::$sessionName = 'poche';
 Session::init();
@@ -66,6 +71,12 @@ if (isset($_GET['login'])) {
 } elseif (isset($_GET['config'])) {
     # Update password
     $poche->updatePassword();
+} elseif (isset($_GET['newuser'])) {
+    $poche->createNewUser();
+} elseif (isset($_GET['deluser'])) {
+    $poche->deleteUser();
+} elseif (isset($_GET['epub'])) {
+    $poche->createEpub();
 } elseif (isset($_GET['import'])) {
     $import = $poche->import();
     $tpl_vars = array_merge($tpl_vars, $import);
@@ -87,7 +98,7 @@ if (isset($_GET['login'])) {
     }
     else {
         $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
-        $poche->generateFeeds($_GET['token'], $_GET['user_id'], $tag_id, $_GET['type']);
+        $poche->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
     }
 }