--- a/busui/owa/modules/base/sitesDelete.php +++ b/busui/owa/modules/base/sitesDelete.php @@ -1,1 +1,56 @@ - + + * @copyright Copyright © 2006 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.0.0 + */ + +class owa_sitesDeleteController extends owa_adminController { + + function __construct($params) { + parent::__construct($params); + $this->setRequiredCapability('edit_sites'); + $this->setNonceRequired(); + } + + function action() { + + $site = owa_coreAPI::entityFactory('base.site'); + $site->delete($this->params['siteId'], 'site_id'); + + $data['view_method'] = 'redirect'; + $data['do'] = 'base.sites'; + $data['status_code'] = 3204; + + return $data; + } + +} + + +?>