From 95db8e184b378534db0ac08d14ae8500ee5090c3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 28 Apr 2016 21:31:15 +0200 Subject: Implemented new menu, added logic for defining dependencies, move translation files around --- modules/webinterface/module.inc.php | 85 ------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 modules/webinterface/module.inc.php (limited to 'modules/webinterface/module.inc.php') diff --git a/modules/webinterface/module.inc.php b/modules/webinterface/module.inc.php deleted file mode 100644 index c301dec9..00000000 --- a/modules/webinterface/module.inc.php +++ /dev/null @@ -1,85 +0,0 @@ -actionConfigureHttps(); - break; - case 'password': - $this->actionShowHidePassword(); - break; - } - } - - private function actionConfigureHttps() - { - $task = false; - switch (Request::post('mode')) { - case 'off': - $task = $this->setHttpsOff(); - break; - case 'random': - $task = $this->setHttpsRandomCert(); - break; - case 'custom': - $task = $this->setHttpsCustomCert(); - break; - } - if (isset($task['id'])) { - Session::set('https-id', $task['id']); - Util::redirect('?do=WebInterface&show=httpsupdate'); - } - } - - private function actionShowHidePassword() - { - Property::setPasswordFieldType(Request::post('mode') === 'show' ? 'text' : 'password'); - Util::redirect('?do=WebInterface'); - } - - protected function doRender() - { - Render::setTitle(Dictionary::translate('lang_titleWebinterface')); - if (Request::get('show') === 'httpsupdate') { - Render::addTemplate('httpd-restart', array('taskid' => Session::get('https-id'))); - } - Render::addTemplate('https', array('httpsEnabled' => file_exists('/etc/lighttpd/server.pem'))); - $data = array(); - if (Property::getPasswordFieldType() === 'text') - $data['selected_show'] = 'checked'; - else - $data['selected_hide'] = 'checked'; - Render::addTemplate('passwords', $data); - } - - private function setHttpsOff() - { - return Taskmanager::submit('LighttpdHttps', array()); - } - - private function setHttpsRandomCert() - { - return Taskmanager::submit('LighttpdHttps', array( - 'proxyip' => Property::getServerIp() - )); - } - - private function setHttpsCustomCert() - { - return Taskmanager::submit('LighttpdHttps', array( - 'importcert' => Request::post('certificate', 'bla'), - 'importkey' => Request::post('privatekey', 'bla'), - 'importchain' => Request::post('cachain', '') - )); - } - -} -- cgit v1.2.3-55-g7522