From d025adab6d75eff46b18555bc3eb9971c5c0c348 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 25 Oct 2018 09:13:07 -0400 Subject: [PATCH] Need to load Config Categories in options save --- web/includes/actions.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/includes/actions.php b/web/includes/actions.php index a8db2c936..675e35d67 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -831,6 +831,22 @@ if ( canEdit('System') ) { return; } if ( $action == 'options' && isset($_REQUEST['tab']) ) { + $config = array(); + $configCat = array(); + $configCats = array(); + + $result = $dbConn->query('SELECT * FROM Config ORDER BY Id ASC'); + if ( !$result ) + echo mysql_error(); + while( $row = dbFetchNext($result) ) { + $config[$row['Name']] = $row; + if ( !($configCat = &$configCats[$row['Category']]) ) { + $configCats[$row['Category']] = array(); + $configCat = &$configCats[$row['Category']]; + } + $configCat[$row['Name']] = $row; + } + $configCat = $configCats[$_REQUEST['tab']]; $changed = false; foreach ( $configCat as $name=>$value ) {