LSsearch : make purgeParams() and purgeCache() methods static

This commit is contained in:
Benjamin Renard 2019-03-12 12:50:58 +01:00
parent 887b054328
commit a577417b69

View file

@ -106,7 +106,7 @@ class LSsearch {
} }
} }
else { else {
$this -> purgeParams(); $this -> purgeParams($LSobject);
$this -> loadDefaultParameters(); $this -> loadDefaultParameters();
} }
@ -192,10 +192,7 @@ class LSsearch {
* *
* @retval void * @retval void
*/ */
public function purgeParams($LSobject=NULL) { public static function purgeParams($LSobject) {
if (is_null($LSobject)) {
$LSobject = $this -> LSobject;
}
unset($_SESSION['LSsession']['LSsearch'][$LSobject]['params']); unset($_SESSION['LSsession']['LSsearch'][$LSobject]['params']);
} }
@ -204,9 +201,7 @@ class LSsearch {
* *
* @retval void * @retval void
*/ */
public function purgeCache($LSobject=NULL) { public static function purgeCache($LSobject) {
if (is_null($LSobject))
$LSobject = $this -> LSobject;
unset($_SESSION['LSsession']['LSsearch'][$LSobject]); unset($_SESSION['LSsession']['LSsearch'][$LSobject]);
} }