X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=7b775c41609868000250babef09c7e1cd77006ca;hb=10ab20d8e21b2fa3f4d8e86909a7cb4d0d9a84d2;hp=353df873fb14c7f8ce1b53e8d2f64ee9a0b8cb00;hpb=ed06f040776d5e2f38b938005ebc2b09ddd41bd4;p=github%2Fwallabag%2Fwallabag.git diff --git a/index.php b/index.php index 353df873..7b775c41 100644 --- 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'; }