* @license http://www.wtfpl.net/ see COPYING file
*/
-define ('POCHE', '1.2.0');
+define ('POCHE', '1.3.0');
require_once 'inc/poche/global.inc.php';
session_start();
$poche->generateToken();
}
else {
- $poche->generateFeeds($_GET['token'], $_GET['user_id'], $_GET['type']);
+ $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
+ $poche->generateFeeds($_GET['token'], $_GET['user_id'], $tag_id, $_GET['type']);
}
}
$tpl_file = Tools::getTplFile('login');
$tpl_vars['http_auth'] = 1;
}
+} elseif(isset($_SERVER['REMOTE_USER'])) {
+ if($poche->store->userExists($_SERVER['REMOTE_USER'])) {
+ $poche->login($referer);
+ } else {
+ $poche->messages->add('e', _('login failed: user doesn\'t exist'));
+ Tools::logm('user doesn\'t exist');
+ $tpl_file = Tools::getTplFile('login');
+ $tpl_vars['http_auth'] = 1;
+ }
} else {
$tpl_file = Tools::getTplFile('login');
$tpl_vars['http_auth'] = 0;