Commit c7ef8620 authored by Florian Schaal's avatar Florian Schaal
Browse files

clean up servers select list when adding firewall record (Fixes: #4088)

parent 3fb1aecc
......@@ -50,6 +50,21 @@ $app->uses('tpl,tform,tform_actions');
class page_action extends tform_actions {
function onShowEnd() {
global $app;
if($this->id ==0) { //* new record
$server_list = $app->db->queryAllRecords("SELECT server_id, server_name FROM server WHERE server_id NOT IN (SELECT server_id FROM firewall) ORDER BY server_name");
if(is_array($server_list)) {
foreach( $server_list as $server) $server_select .= "<option value='$server[server_id]' >$server[server_name]</option>\r\n";
$app->tpl->setVar('server_id', $server_select);
function onBeforeUpdate() {
global $app, $conf;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment