forked from wallabag/wallabag
Fixed #13 - tri par date / tri par titre
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user