diff options
| author | Simon Rettberg | 2016-04-28 21:31:15 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-04-28 21:31:15 +0200 |
| commit | 95db8e184b378534db0ac08d14ae8500ee5090c3 (patch) | |
| tree | f39cee8160ef4266e49dbe04d3e8fe6400ce2133 /modules/internetaccess/module.inc.php | |
| parent | Merge branch 'master' into modularization (diff) | |
| download | slx-admin-95db8e184b378534db0ac08d14ae8500ee5090c3.tar.gz slx-admin-95db8e184b378534db0ac08d14ae8500ee5090c3.tar.xz slx-admin-95db8e184b378534db0ac08d14ae8500ee5090c3.zip | |
Implemented new menu, added logic for defining dependencies, move translation files around
Diffstat (limited to 'modules/internetaccess/module.inc.php')
| -rw-r--r-- | modules/internetaccess/module.inc.php | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/modules/internetaccess/module.inc.php b/modules/internetaccess/module.inc.php deleted file mode 100644 index b949be26..00000000 --- a/modules/internetaccess/module.inc.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -class Page_InternetAccess extends Page -{ - - protected function doPreprocess() - { - User::load(); - if (!User::hasPermission('superadmin')) { - Message::addError('no-permission'); - Util::redirect('?do=Main'); - } - if (isset($_POST['PROXY_CONF'])) { - $data = array(); - foreach (array('PROXY_CONF', 'PROXY_ADDR', 'PROXY_PORT', 'PROXY_USERNAME', 'PROXY_PASSWORD') as $key) { - $data[$key] = Request::post($key, ''); - } - if (!FileUtil::arrayToFile(CONFIG_PROXY_CONF, $data)) { - Message::addError('error-write', CONFIG_PROXY_CONF); - Util::redirect(); - } else { - Message::addSuccess('settings-updated'); - Taskmanager::release(Taskmanager::submit('ReloadProxy')); - $taskids = array(); - Trigger::stopDaemons(NULL, $taskids); - $taskids = array(); - Trigger::startDaemons(NULL, $taskids); - Session::set('ia-restart', $taskids); - Util::redirect('?do=InternetAccess&show=update'); - } - } - } - - protected function doRender() - { - if (Request::any('show') === 'update') { - $taskids = Session::get('ia-restart'); - if (is_array($taskids)) { - Render::addTemplate('restart', $taskids); - } else { - Message::addError('invalid-action', 'Restart'); - } - } - $data = FileUtil::fileToArray(CONFIG_PROXY_CONF); - if (!isset($data['PROXY_CONF'])) - $data['PROXY_CONF'] = 'AUTO'; - $data['selected_' . $data['PROXY_CONF']] = 'selected'; - Render::addTemplate('_page', $data); - } - -} |
