diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 49f69611..50ae71e2 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -34,7 +34,7 @@ switch ($action) { $folders = []; $files = scandir('system/lan/'); foreach ($files as $file) { - if(is_dir('system/lan/'.$file) && !in_array($file,['.','..'])){ + if (is_dir('system/lan/' . $file) && !in_array($file, ['.', '..'])) { $folders[] = $file; } } @@ -424,6 +424,19 @@ switch ($action) { $d->save(); } + if ($radius_enable) { + try { + ORM::for_table('nasi', 'radius')->where('setting', 'tawkto')->find_one(); + } catch (Exception $e) { + $ui->assign("error_title", "RADIUS Error"); + $ui->assign("error_message", "Radius table not found.

" . + $e->getMessage() . + "

Download here or here and import it to database.

Check config.php for radius connection details"); + $ui->display('router-error.tpl'); + die(); + } + } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_enable')->find_one(); if ($d) { $d->value = $radius_enable;