allow to destroy multiple exec_ids

This commit is contained in:
ralf 2023-09-22 11:56:03 +02:00
parent e3138fe886
commit 534e1b5d72

View File

@ -471,15 +471,18 @@ class Etemplate extends Etemplate\Widget\Template
/**
* Notify server that eT session/request is no longer needed, because user closed window
*
* @param string $_exec_id
* @param string|string[] $_exec_id
*/
static public function ajax_destroy_session($_exec_id)
{
//error_log(__METHOD__."('$_exec_id')");
if (($request = Etemplate\Request::read($_exec_id, false)))
foreach((array)$_exec_id as $exec_id)
{
$request->remove_if_not_modified();
unset($request);
//error_log(__METHOD__."('$_exec_id')");
if (($request = Etemplate\Request::read($exec_id, false)))
{
$request->remove_if_not_modified();
unset($request);
}
}
}