mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove useless global calls and add docblocks
This commit is contained in:
@ -12,6 +12,12 @@
|
||||
* @copyright (C) 2013 LibreNMS Group
|
||||
*/
|
||||
|
||||
/**
|
||||
* Compare $t with the value of $vars[$v], if that exists
|
||||
* @param string $v Name of the var to test
|
||||
* @param string $t Value to compare $vars[$v] to
|
||||
* @return boolean true, if values are the same, false if $vars[$v] is unset or values differ
|
||||
*/
|
||||
function var_eq($v, $t) {
|
||||
global $vars;
|
||||
if (isset($vars[$v]) && $vars[$v] == $t) {
|
||||
@ -21,6 +27,11 @@ function var_eq($v, $t) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of $vars[$v], if it exists
|
||||
* @param string $v Name of the var to get
|
||||
* @return string|boolean The value of $vars[$v] if it exists, false if it does not exist
|
||||
*/
|
||||
function var_get($v) {
|
||||
global $vars;
|
||||
if (isset($vars[$v])) {
|
||||
|
Reference in New Issue
Block a user