]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - index.php
Fix missing lang in html tag of update pages
[github/wallabag/wallabag.git] / index.php
index 353df873fb14c7f8ce1b53e8d2f64ee9a0b8cb00..7b775c41609868000250babef09c7e1cd77006ca 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,6 +8,12 @@
  * @license    http://www.wtfpl.net/ see COPYING file
  */
 
+if (file_exists(__DIR__ . '/inc/poche/myconfig.inc.php')) {
+    require_once __DIR__ . '/inc/poche/myconfig.inc.php';
+}
+require_once './inc/poche/Tools.class.php';
+Tools::createMyConfig();
+
 include dirname(__FILE__).'/inc/poche/config.inc.php';
 
 # Parse GET & REFERER vars
@@ -32,11 +38,15 @@ elseif (isset($_GET['config'])) {
     $poche->updatePassword();
 }
 elseif (isset($_GET['import'])) {
-    $poche->import($_GET['from']);
+    $import = $poche->import($_GET['from']);
 }
 elseif (isset($_GET['export'])) {
     $poche->export();
 }
+elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
+    $plain_url = new Url(base64_encode($_GET['plainurl']));
+    $poche->action('add', $plain_url);
+}
 
 # vars to send to templates
 $tpl_vars = array(
@@ -53,7 +63,6 @@ if (Session::isLogged()) {
     $tpl_vars = array_merge($tpl_vars, $poche->displayView($view, $id));
 }
 else {
-    # login
     $tpl_file = 'login.twig';
 }