mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@230 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<?
|
||||
|
||||
include("common.php");
|
||||
|
||||
include("ipv6.php");
|
||||
|
||||
include("generic.php");
|
||||
include("ios.php");
|
||||
include("unix.php");
|
||||
@@ -14,11 +12,9 @@ include("graphing.php");
|
||||
include("print-functions.php");
|
||||
include("billing-functions.php");
|
||||
include("cisco-entities.php");
|
||||
|
||||
include("syslog.php");
|
||||
|
||||
function write_dev_attrib($device_id, $attrib_type, $attrib_value) {
|
||||
|
||||
$count_sql = "SELECT COUNT(*) FROM devices_attribs WHERE `device_id` = '" . $device_id . "' AND `attrib_type` = '$attrib_type'";
|
||||
if(mysql_result(mysql_query($count_sql),0)) {
|
||||
$update_sql = "UPDATE devices_attribs SET attrib_value = '$attrib_value' WHERE `device_id` = '$device_id' AND `attrib_type` = '$attrib_type'";
|
||||
@@ -28,10 +24,8 @@ function write_dev_attrib($device_id, $attrib_type, $attrib_value) {
|
||||
mysql_query($insert_sql);
|
||||
}
|
||||
return mysql_affected_rows();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function shorthost($hostname, $len=16) {
|
||||
|
||||
list ($first, $second, $third, $fourth, $fifth) = explode(".", $hostname);
|
||||
|
||||
Reference in New Issue
Block a user