diff --git a/framework/api/router.class.php b/framework/api/router.class.php index 12eeda6543..f6dbf4464c 100644 --- a/framework/api/router.class.php +++ b/framework/api/router.class.php @@ -325,9 +325,6 @@ class api extends router else { $_GET[$moduleName.'ID'] = $pathItems[1]; - - /* Set default params and post data to delete.*/ - if($this->action == 'delete') $_GET['confirm'] = 'yes'; } } else @@ -342,6 +339,13 @@ class api extends router $this->setModuleName($moduleName); $this->setMethodName($methodName); $this->setControlFile(); + + /* Set default params and post data to delete.*/ + if($this->action == 'delete') + { + $defaultParams = $this->getDefaultParams(); + if(isset($defaultParams['confirm'])) $_GET['confirm'] = 'yes'; + } } /**