aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/config.php2
-rwxr-xr-xinc/functions.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/config.php b/inc/config.php
index 4c1978b5..d468228d 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -35,8 +35,8 @@ if (!isset($_SESSION['token_poche'])) {
35} 35}
36 36
37# Traitement des paramètres et déclenchement des actions 37# Traitement des paramètres et déclenchement des actions
38$view = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'index';
38$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : ''; 39$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
39$_SESSION['view'] = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
40$_SESSION['sort'] = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id'; 40$_SESSION['sort'] = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id';
41$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : ''; 41$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
42$url = (isset ($_GET['url'])) ? $_GET['url'] : ''; 42$url = (isset ($_GET['url'])) ? $_GET['url'] : '';
diff --git a/inc/functions.php b/inc/functions.php
index a7430585..464410cb 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -182,7 +182,7 @@ function action_to_do($action, $id, $url, $token)
182/** 182/**
183 * Détermine quels liens afficher : home, fav ou archives 183 * Détermine quels liens afficher : home, fav ou archives
184 */ 184 */
185function display_view() 185function display_view($view)
186{ 186{
187 global $db; 187 global $db;
188 188
@@ -205,7 +205,7 @@ function display_view()
205 break; 205 break;
206 } 206 }
207 207
208 switch ($_SESSION['view']) 208 switch ($view)
209 { 209 {
210 case 'archive': 210 case 'archive':
211 $sql = "SELECT * FROM entries WHERE is_read=? " . $order; 211 $sql = "SELECT * FROM entries WHERE is_read=? " . $order;