mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Fixed #13 - tri par date / tri par titre
This commit is contained in:
parent
139769aa24
commit
9fee2e7266
9 changed files with 42 additions and 13 deletions
|
@ -35,8 +35,8 @@ if (!isset($_SESSION['token_poche'])) {
|
|||
}
|
||||
|
||||
# Traitement des paramètres et déclenchement des actions
|
||||
$view = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'index';
|
||||
$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
|
||||
$_SESSION['view'] = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
|
||||
$_SESSION['sort'] = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id';
|
||||
$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
|
||||
$url = (isset ($_GET['url'])) ? $_GET['url'] : '';
|
||||
|
|
|
@ -182,7 +182,7 @@ function action_to_do($action, $id, $url, $token)
|
|||
/**
|
||||
* Détermine quels liens afficher : home, fav ou archives
|
||||
*/
|
||||
function display_view()
|
||||
function display_view($view)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -205,7 +205,7 @@ function display_view()
|
|||
break;
|
||||
}
|
||||
|
||||
switch ($_SESSION['view'])
|
||||
switch ($view)
|
||||
{
|
||||
case 'archive':
|
||||
$sql = "SELECT * FROM entries WHERE is_read=? " . $order;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue