Commit a291ec24 authored by Franco Fichtner's avatar Franco Fichtner

src: some baby steps with phpstorm inspection

parent 32f78562
......@@ -239,6 +239,8 @@ function index_users()
{
global $config;
$userindex = array();
if (is_array($config['system']['user'])) {
$i = 0;
foreach($config['system']['user'] as $userent) {
......@@ -247,7 +249,7 @@ function index_users()
}
}
return ($userindex);
return $userindex;
}
function &getUserEntry($name)
......@@ -283,6 +285,8 @@ function &getGroupEntry($name)
if (isset($groupindex[$name])) {
return $config['system']['group'][$groupindex[$name]];
}
return array();
}
function &getGroupEntryByGID($gid)
......@@ -360,7 +364,6 @@ function local_sync_accounts()
}
/* remove local groups to avoid gid conflicts */
$gids = array();
$fd = popen('/usr/sbin/pw groupshow -a', 'r');
if ($fd) {
while (!feof($fd)) {
......@@ -606,9 +609,9 @@ function local_group_del_user($user)
function local_group_set($group, $reset = false)
{
if (!isset($group['name']) || !isset($group['gid'])) {
// input data invalid
return false;
return;
}
$group_name = $group['name'];
$group_gid = $group['gid'];
$group_members = '';
......@@ -721,6 +724,8 @@ function auth_get_authserver($name)
}
}
}
return false;
}
function auth_get_authserver_list()
......
......@@ -279,7 +279,6 @@ function security_checks_disabled()
function cleanup_backups()
{
global $config;
$i = false;
if (isset($config['system']['backupcount']) && is_numeric($config['system']['backupcount']) && ($config['system']['backupcount'] >= 0)) {
$revisions = intval($config['system']['backupcount']);
......@@ -301,8 +300,6 @@ function cleanup_backups()
function make_config_revision_entry($desc = '')
{
global $config;
if (!empty($_SESSION['Username'])) {
$username = $_SESSION['Username'];
} else {
......
......@@ -196,7 +196,6 @@ function legacy_interface_stats($ifs=null)
/**
* detect interface capabilities using ifconfig -m
* @param $intf filter on interface name (empty for all)
* @return array list of interface specifics indexed by physical interface name
*/
function legacy_interfaces_details($intf = null)
......@@ -276,7 +275,7 @@ function legacy_interfaces_details($intf = null)
/**
* fetch interface details for one interface
* @param $intf interface name
* @param $intf string interface name
* @return array list of interface specifics
*/
function legacy_interface_details($intf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment