mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Merge pull request #1427 from RaspAP/fix/log-dhcp-checkboxes
Fix: log DHCP requests + DNS queries checkbox states
This commit is contained in:
		@@ -47,6 +47,8 @@ function DisplayDHCPConfig()
 | 
			
		||||
    $ap_iface = $_SESSION['ap_interface'];
 | 
			
		||||
    $serviceStatus = $dnsmasq_state ? "up" : "down";
 | 
			
		||||
    exec('cat '. RASPI_DNSMASQ_PREFIX.'raspap.conf', $return);
 | 
			
		||||
    $log_dhcp = (preg_grep('/log-dhcp/', $return));
 | 
			
		||||
    $log_queries = (preg_grep('/log-queries/', $return));
 | 
			
		||||
    $conf = ParseConfig($return);
 | 
			
		||||
    exec('cat '. RASPI_DNSMASQ_PREFIX.$ap_iface.'.conf', $return);
 | 
			
		||||
    $conf = array_merge(ParseConfig($return));
 | 
			
		||||
@@ -55,6 +57,9 @@ function DisplayDHCPConfig()
 | 
			
		||||
    exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
 | 
			
		||||
    exec('cat ' . RASPI_DNSMASQ_LEASES, $leases);
 | 
			
		||||
 | 
			
		||||
    count($log_dhcp) > 0 ? $conf['log-dhcp'] = true : false ;
 | 
			
		||||
    count($log_queries) > 0 ? $conf['log-queries'] = true : false ;
 | 
			
		||||
 | 
			
		||||
    echo renderTemplate(
 | 
			
		||||
        "dhcp", compact(
 | 
			
		||||
            "status",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user