]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/config.php
README, CREDITS & chmod
[github/wallabag/wallabag.git] / inc / config.php
index 4c1978b545153e9a7e063ebc1285d0b2cbfff418..a7904def07d304065518af692bf4d910dd94ea2e 100644 (file)
@@ -7,7 +7,13 @@
  * @copyright  2013
  * @license    http://www.wtfpl.net/ see COPYING file
  */
+
+if (!is_dir('db/')) {
+    @mkdir('db/',0705);
+}
+
 define ('DB_PATH', 'sqlite:./db/poche.sqlite');
+define ('ABS_PATH', 'assets/');
 
 include 'db.php';
 include 'functions.php';
@@ -35,8 +41,8 @@ if (!isset($_SESSION['token_poche'])) {
 }
 
 # Traitement des paramètres et déclenchement des actions
+$view               = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'index';
 $action             = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
-$_SESSION['view']   = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
 $_SESSION['sort']   = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id';
 $id                 = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
 $url                = (isset ($_GET['url'])) ? $_GET['url'] : '';
@@ -44,4 +50,4 @@ $token              = (isset ($_REQUEST['token'])) ? $_REQUEST['token'] : '';
 
 if ($action != '') {
     action_to_do($action, $id, $url, $token);
-}
\ No newline at end of file
+}