1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Add include wifi_functions getWifiInterface()

This commit is contained in:
billz 2020-06-07 17:17:16 +01:00
parent a1940ae8f2
commit a6a92235f9
4 changed files with 10 additions and 15 deletions

View File

@ -2,7 +2,6 @@
require_once 'includes/status_messages.php'; require_once 'includes/status_messages.php';
require_once 'includes/wifi_functions.php'; require_once 'includes/wifi_functions.php';
require_once 'includes/hostapd.php';
/** /**
* *
@ -13,6 +12,7 @@ function DisplayWPAConfig()
$status = new StatusMessages(); $status = new StatusMessages();
$networks = []; $networks = [];
getWifiInterface();
knownWifiStations($networks); knownWifiStations($networks);
if (isset($_POST['connect'])) { if (isset($_POST['connect'])) {

View File

@ -1,14 +1,14 @@
<?php <?php
require_once 'config.php'; require_once 'includes/config.php';
require_once 'hostapd.php'; require_once 'includes/wifi_functions.php';
/** /**
* Show dashboard page. * Show dashboard page.
*/ */
function DisplayDashboard(&$extraFooterScripts) function DisplayDashboard(&$extraFooterScripts)
{ {
getWifiInterface();
$status = new StatusMessages(); $status = new StatusMessages();
// Need this check interface name for proper shell execution. // Need this check interface name for proper shell execution.
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['client_iface'])) { if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['client_iface'])) {

View File

@ -2,16 +2,9 @@
require_once 'includes/status_messages.php'; require_once 'includes/status_messages.php';
require_once 'app/lib/system.php'; require_once 'app/lib/system.php';
require_once 'config.php'; require_once 'includes/wifi_functions.php';
if (empty($_SESSION['client_iface'])) { getWifiInterface();
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
if (isset($arrHostapdConf['WifiInterface'])) {
$_SESSION['client_iface'] = $arrHostapdConf['WifiInterface'];
} else { // fallback to default
$_SESSSION['client_iface'] = RASPI_WIFI_CLIENT_INTERFACE;
}
}
/** /**
* *

View File

@ -1,8 +1,10 @@
<?php <?php
require_once 'includes/status_messages.php'; require_once 'includes/status_messages.php';
require_once 'includes/hostapd.php'; require_once 'includes/config.php';
require_once 'config.php'; require_once 'includes/wifi_functions.php';
getWifiInterface();
/** /**
* Manage OpenVPN configuration * Manage OpenVPN configuration