Commit f2047bce authored by Benoit Mortier's avatar Benoit Mortier

Fixes: #1045 Move reset handling before object creation, otherwise no new...

Fixes: #1045 Move reset handling before object creation, otherwise no new object is created, when _GET['reset'] is set to 1.
parent 940c0a9b
......@@ -35,6 +35,11 @@ if ( $cleanup ){
session::un_set('faiManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('faiManagement');
}
/* Create faiManagement object on demand */
if (!session::is_set('faiManagement')){
$faiManagement= new faiManagement ($config, $ui);
......@@ -43,11 +48,6 @@ if ( $cleanup ){
$faiManagement = session::get('faiManagement');
$display= $faiManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('faiManagement');
}
/* Show and save dialog */
session::set('faiManagement',$faiManagement);
}
......
......@@ -26,6 +26,11 @@ if ( $cleanup ){
session::un_set('faxreport');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('faxreport');
}
/* Create faxreport object on demand */
if (!session::is_set('faxreport')){
session::set('faxreport',new faxreport ($config, $ui));
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('blocklist');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('blocklist');
}
/* Create blocklist object on demand */
if (!session::is_set('blocklist')){
$blocklist= new blocklist ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$blocklist = session::get('blocklist');
$display= $blocklist->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('blocklist');
}
/* Show and save dialog */
session::set('blocklist',$blocklist);
}
......
......@@ -26,6 +26,11 @@ if ( $cleanup ){
session::un_set('fonreport');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('fonreport');
}
/* Create fonreport object on demand */
if (!session::is_set('fonreport')){
session::set('fonreport',new fonreport ($config, $ui));
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('phoneConferenceManagment');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('phoneConferenceManagment');
}
/* Create phoneConferenceManagment object on demand */
if (!session::is_set('phoneConferenceManagment')){
$phoneConferenceManagment= new phoneConferenceManagment ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$phoneConferenceManagment = session::get('phoneConferenceManagment');
$display= $phoneConferenceManagment->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('phoneConferenceManagment');
}
/* Show and save dialog */
session::set('phoneConferenceManagment',$phoneConferenceManagment);
}
......
......@@ -34,6 +34,11 @@ if ( $cleanup ){
session::un_set('goFonMacro');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('goFonMacro');
}
/* Create goFonMacro object on demand */
if (!session::is_set('goFonMacro')){
$goFonMacro= new goFonMacro ($config, $ui);
......@@ -42,11 +47,6 @@ if ( $cleanup ){
$goFonMacro = session::get('goFonMacro');
$display= $goFonMacro->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('goFonMacro');
}
/* Show and save dialog */
session::set('goFonMacro',$goFonMacro);
}
......
......@@ -32,6 +32,11 @@ if ( $cleanup ){
session::un_set('ldif');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('ldif');
}
/* Create phonelist object on demand */
if (!session::is_set('ldif')){
$ldif= new ldif ($config);
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('sudoManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('sudoManagement');
}
/* Create rolemanagement object on demand */
if (!session::is_set('sudoManagement')){
$sudoManagement= new sudoManagement ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$sudoManagement = session::get('sudoManagement');
$display= $sudoManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('sudoManagement');
}
/* Show and save dialog */
session::set('sudoManagement',$sudoManagement);
}
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('gotomasses');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('gotomasses');
}
/* Create gotomasses object on demand */
if (!session::is_set('gotomasses')){
$gotomasses= new gotomasses ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$gotomasses = session::get('gotomasses');
$display= $gotomasses->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('gotomasses');
}
/* Show and save dialog */
session::set('gotomasses',$gotomasses);
}
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('applicationManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('applicationManagement');
}
/* Create applicationmanagement object on demand */
if (!session::is_set('applicationManagement')){
$applicationManagement= new applicationManagement ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$applicationManagement = session::get('applicationManagement');
$display= $applicationManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('applicationManagement');
}
/* Show and save dialog */
session::set('applicationManagement',$applicationManagement);
}
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('deviceManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('deviceManagement');
}
/* Create devicemanagement object on demand */
if (!session::is_set('deviceManagement')){
$deviceManagement= new deviceManagement ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$deviceManagement = session::get('deviceManagement');
$display= $deviceManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('deviceManagement');
}
/* Show and save dialog */
session::set('deviceManagement',$deviceManagement);
}
......
......@@ -33,6 +33,11 @@ if ( $cleanup ){
session::un_set('mimetypeManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('mimetypeManagement');
}
/* Create mimetypemanagement object on demand */
if (!session::is_set('mimetypeManagement')){
$mimetypeManagement= new mimetypeManagement ($config, $ui);
......@@ -41,11 +46,6 @@ if ( $cleanup ){
$mimetypeManagement = session::get('mimetypeManagement');
$display= $mimetypeManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('mimetypeManagement');
}
/* Show and save dialog */
session::set('mimetypeManagement',$mimetypeManagement);
}
......
......@@ -36,6 +36,11 @@ if ( $cleanup ){
session::un_set('systemManagement');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('systemManagement');
}
/* Create systemManagement object on demand */
if (!session::is_set('systemManagement')){
$systemManagement= new systemManagement ($config, $ui);
......@@ -44,11 +49,6 @@ if ( $cleanup ){
$systemManagement = session::get('systemManagement');
$display= $systemManagement->execute();
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('systemManagement');
}
/* Show and save dialog */
session::set('systemManagement',$systemManagement);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment