aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/Session.class.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-10-08 19:26:26 +0200
committertcit <tcit@tcit.fr>2014-10-08 19:26:26 +0200
commit8327f1c371ad1d930bf9c9a13e443f2aa29ecfe3 (patch)
treeea559def90e546716f3d6016fe8f06f333249ef6 /inc/3rdparty/Session.class.php
parentd05f5eeb1dfd989e76f6040b220fe52738284841 (diff)
parent73c833780c37278a319fd3bfff172eede1a040bd (diff)
downloadwallabag-8327f1c371ad1d930bf9c9a13e443f2aa29ecfe3.tar.gz
wallabag-8327f1c371ad1d930bf9c9a13e443f2aa29ecfe3.tar.zst
wallabag-8327f1c371ad1d930bf9c9a13e443f2aa29ecfe3.zip
Merge branch 'dev' into data-for-mysql
Diffstat (limited to 'inc/3rdparty/Session.class.php')
-rw-r--r--inc/3rdparty/Session.class.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/inc/3rdparty/Session.class.php b/inc/3rdparty/Session.class.php
index 59dfbe67..b56e4c54 100644
--- a/inc/3rdparty/Session.class.php
+++ b/inc/3rdparty/Session.class.php
@@ -309,4 +309,38 @@ class Session
309 309
310 return true; // User is not banned. 310 return true; // User is not banned.
311 } 311 }
312
313
314 /**
315 * Tells if a param exists in session
316 *
317 * @param $name name of the param to test
318 * @return bool
319 */
320 public static function isInSession($name)
321 {
322 return (isset($_SESSION[$name]) ? : FALSE);
323 }
324
325 /**
326 * Returns param in session
327 *
328 * @param $name name of the param to return
329 * @return mixed param or null
330 */
331 public static function getParam($name)
332 {
333 return (self::isInSession($name) ? $_SESSION[$name] : NULL);
334 }
335
336 /**
337 * Store value in session
338 *
339 * @param $name name of the variable to store
340 * @param $value value to store
341 */
342 public static function setParam($name, $value)
343 {
344 $_SESSION[$name] = $value;
345 }
312} 346}