mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-30 22:59:28 +02:00
check radius client if radius_enable
This commit is contained in:
parent
88a3e2d205
commit
90cfc3e6d9
2 changed files with 10 additions and 2 deletions
|
@ -15,7 +15,15 @@ class Radius
|
||||||
public static function getClient()
|
public static function getClient()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
return (empty($config['radius_client'])) ? shell_exec('which radclient') : $config['radius_client'];
|
if(empty($config['radius_client'])){
|
||||||
|
if(function_exists("shell_exec")){
|
||||||
|
shell_exec('which radclient');
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$config['radius_client'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTableNas()
|
public static function getTableNas()
|
||||||
|
|
|
@ -23,7 +23,7 @@ switch ($action) {
|
||||||
$logo = 'system/uploads/logo.default.png';
|
$logo = 'system/uploads/logo.default.png';
|
||||||
}
|
}
|
||||||
$ui->assign('logo', $logo);
|
$ui->assign('logo', $logo);
|
||||||
if (empty($_c['radius_client'])) {
|
if ( $_c['radius_enable'] && empty($_c['radius_client'])) {
|
||||||
try {
|
try {
|
||||||
$_c['radius_client'] = Radius::getClient();
|
$_c['radius_client'] = Radius::getClient();
|
||||||
$ui->assign('_c', $_c);
|
$ui->assign('_c', $_c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue