mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
WIP: txpower feature
This commit is contained in:
@@ -152,15 +152,16 @@ function getDefaultNetValue($svc,$iface,$key)
|
||||
* Returns default options for the specified service
|
||||
*
|
||||
* @param string $svc
|
||||
* @param string $key
|
||||
* @return object $json
|
||||
*/
|
||||
function getDefaultNetOpts($svc)
|
||||
function getDefaultNetOpts($svc,$key)
|
||||
{
|
||||
$json = json_decode(file_get_contents(RASPI_CONFIG_NETWORK), true);
|
||||
if ($json === null) {
|
||||
return false;
|
||||
} else {
|
||||
return $json[$svc]['options'];
|
||||
return $json[$svc][$key];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,4 +775,4 @@ function preg_only_match($pat,$haystack) {
|
||||
function qr_encode($str)
|
||||
{
|
||||
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user