mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
get up to date
This commit is contained in:
parent
824f8c45ed
commit
a1b31d93b6
40
inc/poche/Routing.class.php
Normal file → Executable file
40
inc/poche/Routing.class.php
Normal file → Executable file
@ -98,9 +98,17 @@ class Routing
|
|||||||
private function _launchAction()
|
private function _launchAction()
|
||||||
{
|
{
|
||||||
if (isset($_GET['login'])) {
|
if (isset($_GET['login'])) {
|
||||||
// hello you
|
// hello to you
|
||||||
$this->wallabag->login($this->referer);
|
$this->wallabag->login($this->referer);
|
||||||
} elseif (isset($_GET['logout'])) {
|
} elseif (isset($_GET['feed']) && isset($_GET['user_id'])) {
|
||||||
|
$tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
|
||||||
|
$this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//allowed ONLY to logged in user
|
||||||
|
if (\Session::isLogged() === true)
|
||||||
|
{
|
||||||
|
if (isset($_GET['logout'])) {
|
||||||
// see you soon !
|
// see you soon !
|
||||||
$this->wallabag->logout();
|
$this->wallabag->logout();
|
||||||
} elseif (isset($_GET['config'])) {
|
} elseif (isset($_GET['config'])) {
|
||||||
@ -111,26 +119,11 @@ class Routing
|
|||||||
} elseif (isset($_GET['deluser'])) {
|
} elseif (isset($_GET['deluser'])) {
|
||||||
$this->wallabag->deleteUser($_POST['password4deletinguser']);
|
$this->wallabag->deleteUser($_POST['password4deletinguser']);
|
||||||
} elseif (isset($_GET['epub'])) {
|
} elseif (isset($_GET['epub'])) {
|
||||||
$epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['value']);
|
$epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['id'], $_GET['value']);
|
||||||
$epub->prepareData();
|
$epub->run();
|
||||||
$epub->produceEpub();
|
|
||||||
} elseif (isset($_GET['mobi'])) {
|
|
||||||
$mobi = new WallabagMobi($this->wallabag, $_GET['method'], $_GET['value']);
|
|
||||||
$mobi->prepareData();
|
|
||||||
$mobi->produceMobi();
|
|
||||||
} elseif (isset($_GET['send2kindle'])) {
|
|
||||||
$mobi = new WallabagMobi($this->wallabag, $_GET['method'], $_GET['value']);
|
|
||||||
$mobi->prepareData();
|
|
||||||
$mobi->produceMobi(TRUE);
|
|
||||||
} elseif (isset($_GET['pdf'])) {
|
|
||||||
$pdf = new WallabagPDF($this->wallabag, $_GET['method'], $_GET['value']);
|
|
||||||
$pdf->prepareData();
|
|
||||||
$pdf->producePDF();
|
|
||||||
} elseif (isset($_GET['import'])) {
|
} elseif (isset($_GET['import'])) {
|
||||||
$import = $this->wallabag->import();
|
$import = $this->wallabag->import();
|
||||||
$tplVars = array_merge($this->vars, $import);
|
$tplVars = array_merge($this->vars, $import);
|
||||||
} elseif (isset($_GET['download'])) {
|
|
||||||
Tools::downloadDb();
|
|
||||||
} elseif (isset($_GET['empty-cache'])) {
|
} elseif (isset($_GET['empty-cache'])) {
|
||||||
Tools::emptyCache();
|
Tools::emptyCache();
|
||||||
} elseif (isset($_GET['export'])) {
|
} elseif (isset($_GET['export'])) {
|
||||||
@ -141,20 +134,15 @@ class Routing
|
|||||||
$this->wallabag->language->updateLanguage($_POST['language']);
|
$this->wallabag->language->updateLanguage($_POST['language']);
|
||||||
} elseif (isset($_GET['uploadfile'])) {
|
} elseif (isset($_GET['uploadfile'])) {
|
||||||
$this->wallabag->uploadFile();
|
$this->wallabag->uploadFile();
|
||||||
} elseif (isset($_GET['feed'])) {
|
} elseif (isset($_GET['feed']) && isset($_GET['action']) && $_GET['action'] == 'generate') {
|
||||||
if (isset($_GET['action']) && $_GET['action'] == 'generate') {
|
|
||||||
$this->wallabag->updateToken();
|
$this->wallabag->updateToken();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
|
|
||||||
$this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
|
elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
|
||||||
$plainUrl = new Url(base64_encode($_GET['plainurl']));
|
$plainUrl = new Url(base64_encode($_GET['plainurl']));
|
||||||
$this->wallabag->action('add', $plainUrl);
|
$this->wallabag->action('add', $plainUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function _render($file, $vars)
|
public function _render($file, $vars)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user