mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
fix unused code
This commit is contained in:
@@ -59,10 +59,20 @@ function dbQuery($sql, $parameters=array()) {
|
||||
}//end dbQuery()
|
||||
|
||||
|
||||
/*
|
||||
* Aquire a lock on a string
|
||||
* */
|
||||
function dbGetLock($data, $timeout = 0) {
|
||||
$sql = 'SELECT GET_LOCK(\'' . $data . '\',' . $timeout . ')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check a lock on a string
|
||||
* */
|
||||
function dbCheckLock($data, $timeout = 0) {
|
||||
function dbCheckLock($data) {
|
||||
$sql = 'SELECT IS_FREE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
@@ -72,12 +82,12 @@ function dbCheckLock($data, $timeout = 0) {
|
||||
/*
|
||||
* Release a lock on a string
|
||||
* */
|
||||
function dbReleaseLock($data, $timeout = 0) {
|
||||
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
function dbReleaseLock($data) {
|
||||
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Passed an array and a table name, it attempts to insert the data into the table.
|
||||
|
||||
@@ -59,10 +59,20 @@ function dbQuery($sql, $parameters=array()) {
|
||||
}//end dbQuery()
|
||||
|
||||
|
||||
/*
|
||||
* Aquire a lock on a string
|
||||
* */
|
||||
function dbGetLock($data, $timeout = 0) {
|
||||
$sql = 'SELECT GET_LOCK(\'' . $data . '\',' . $timeout . ')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check a lock on a string
|
||||
* */
|
||||
function dbCheckLock($data, $timeout = 0) {
|
||||
function dbCheckLock($data) {
|
||||
$sql = 'SELECT IS_FREE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
@@ -72,13 +82,12 @@ function dbCheckLock($data, $timeout = 0) {
|
||||
/*
|
||||
* Release a lock on a string
|
||||
* */
|
||||
function dbReleaseLock($data, $timeout = 0) {
|
||||
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
function dbReleaseLock($data) {
|
||||
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
|
||||
$result = dbFetchCell($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Passed an array and a table name, it attempts to insert the data into the table.
|
||||
* Check for boolean false to determine whether insert failed
|
||||
|
||||
Reference in New Issue
Block a user