mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Add include wifi_functions getWifiInterface()
This commit is contained in:
parent
a1940ae8f2
commit
a6a92235f9
4 changed files with 10 additions and 15 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
require_once 'includes/status_messages.php';
|
||||
require_once 'includes/wifi_functions.php';
|
||||
require_once 'includes/hostapd.php';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -13,6 +12,7 @@ function DisplayWPAConfig()
|
|||
$status = new StatusMessages();
|
||||
$networks = [];
|
||||
|
||||
getWifiInterface();
|
||||
knownWifiStations($networks);
|
||||
|
||||
if (isset($_POST['connect'])) {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
|
||||
require_once 'config.php';
|
||||
require_once 'hostapd.php';
|
||||
require_once 'includes/config.php';
|
||||
require_once 'includes/wifi_functions.php';
|
||||
|
||||
/**
|
||||
* Show dashboard page.
|
||||
*/
|
||||
function DisplayDashboard(&$extraFooterScripts)
|
||||
{
|
||||
|
||||
getWifiInterface();
|
||||
$status = new StatusMessages();
|
||||
// Need this check interface name for proper shell execution.
|
||||
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['client_iface'])) {
|
||||
|
|
|
@ -2,16 +2,9 @@
|
|||
|
||||
require_once 'includes/status_messages.php';
|
||||
require_once 'app/lib/system.php';
|
||||
require_once 'config.php';
|
||||
require_once 'includes/wifi_functions.php';
|
||||
|
||||
if (empty($_SESSION['client_iface'])) {
|
||||
$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;
|
||||
}
|
||||
}
|
||||
getWifiInterface();
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
require_once 'includes/status_messages.php';
|
||||
require_once 'includes/hostapd.php';
|
||||
require_once 'config.php';
|
||||
require_once 'includes/config.php';
|
||||
require_once 'includes/wifi_functions.php';
|
||||
|
||||
getWifiInterface();
|
||||
|
||||
/**
|
||||
* Manage OpenVPN configuration
|
||||
|
|
Loading…
Reference in a new issue