aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-23 02:28:56 -0800
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-23 02:28:56 -0800
commit60fc4f4b1ab37fbfe9021f3fa1395d66a4424ed2 (patch)
tree515c4b9c8286ae363f77722c91acb878151dc386 /index.php
parentcbfd5a1019f47fadefd8490dae9f039ae894298d (diff)
parentda5fc42f615eeb45a702604970f94967507fb432 (diff)
downloadwallabag-1.3.0.tar.gz
wallabag-1.3.0.tar.zst
wallabag-1.3.0.zip
Merge pull request #363 from inthepoche/dev1.3.0
poche 1.3.0
Diffstat (limited to 'index.php')
-rw-r--r--index.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/index.php b/index.php
index ba146257..4e86fe11 100644
--- a/index.php
+++ b/index.php
@@ -8,7 +8,7 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11define ('POCHE', '1.2.0'); 11define ('POCHE', '1.3.0');
12require_once 'inc/poche/global.inc.php'; 12require_once 'inc/poche/global.inc.php';
13session_start(); 13session_start();
14 14
@@ -64,12 +64,22 @@ if (isset($_GET['login'])) {
64 $poche->updatePassword(); 64 $poche->updatePassword();
65} elseif (isset($_GET['import'])) { 65} elseif (isset($_GET['import'])) {
66 $import = $poche->import($_GET['from']); 66 $import = $poche->import($_GET['from']);
67} elseif (isset($_GET['download'])) {
68 Tools::download_db();;
67} elseif (isset($_GET['export'])) { 69} elseif (isset($_GET['export'])) {
68 $poche->export(); 70 $poche->export();
69} elseif (isset($_GET['updatetheme'])) { 71} elseif (isset($_GET['updatetheme'])) {
70 $poche->updateTheme(); 72 $poche->updateTheme();
71} elseif (isset($_GET['updatelanguage'])) { 73} elseif (isset($_GET['updatelanguage'])) {
72 $poche->updateLanguage(); 74 $poche->updateLanguage();
75} elseif (isset($_GET['feed'])) {
76 if (isset($_GET['action']) && $_GET['action'] == 'generate') {
77 $poche->generateToken();
78 }
79 else {
80 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
81 $poche->generateFeeds($_GET['token'], $_GET['user_id'], $tag_id, $_GET['type']);
82 }
73} 83}
74 84
75elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) { 85elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
@@ -90,6 +100,15 @@ if (Session::isLogged()) {
90 $tpl_file = Tools::getTplFile('login'); 100 $tpl_file = Tools::getTplFile('login');
91 $tpl_vars['http_auth'] = 1; 101 $tpl_vars['http_auth'] = 1;
92 } 102 }
103} elseif(isset($_SERVER['REMOTE_USER'])) {
104 if($poche->store->userExists($_SERVER['REMOTE_USER'])) {
105 $poche->login($referer);
106 } else {
107 $poche->messages->add('e', _('login failed: user doesn\'t exist'));
108 Tools::logm('user doesn\'t exist');
109 $tpl_file = Tools::getTplFile('login');
110 $tpl_vars['http_auth'] = 1;
111 }
93} else { 112} else {
94 $tpl_file = Tools::getTplFile('login'); 113 $tpl_file = Tools::getTplFile('login');
95 $tpl_vars['http_auth'] = 0; 114 $tpl_vars['http_auth'] = 0;