mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
restore 2516 dbFacile.php, apparently the code layout changes breaking something somewhere?
git-svn-id: http://www.observium.org/svn/observer/trunk@2525 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+1
-1
@@ -161,7 +161,7 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
|||||||
$maptool = 'dot';
|
$maptool = 'dot';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($where == '') { $maptool = 'neato -Gpack'; }
|
if ($where == '') { $maptool = 'sfdp -Gpack -Gcharset=latin1 -Gsize=200,200'; }
|
||||||
|
|
||||||
$img = shell_exec("echo \"".addslashes($map)."\" | $maptool -T".$_GET['format']."");
|
$img = shell_exec("echo \"".addslashes($map)."\" | $maptool -T".$_GET['format']."");
|
||||||
if ($_GET['format'] == "png")
|
if ($_GET['format'] == "png")
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ Usage
|
|||||||
* */
|
* */
|
||||||
function dbQuery($sql, $parameters = array()) {
|
function dbQuery($sql, $parameters = array()) {
|
||||||
global $fullSql, $debug;
|
global $fullSql, $debug;
|
||||||
|
|
||||||
$fullSql = dbMakeQuery($sql, $parameters);
|
$fullSql = dbMakeQuery($sql, $parameters);
|
||||||
if($debug) { echo(" SQL[".$fullSql."] "); }
|
if($debug) { echo(" SQL[".$fullSql."] "); }
|
||||||
/*
|
/*
|
||||||
@@ -54,9 +53,7 @@ function dbQuery($sql, $parameters = array()) {
|
|||||||
* */
|
* */
|
||||||
function dbInsert($data, $table) {
|
function dbInsert($data, $table) {
|
||||||
global $fullSql;
|
global $fullSql;
|
||||||
|
|
||||||
global $db_stats;
|
global $db_stats;
|
||||||
|
|
||||||
// the following block swaps the parameters if they were given in the wrong order.
|
// the following block swaps the parameters if they were given in the wrong order.
|
||||||
// it allows the method to work for those that would rather it (or expect it to)
|
// it allows the method to work for those that would rather it (or expect it to)
|
||||||
// follow closer with SQL convention:
|
// follow closer with SQL convention:
|
||||||
@@ -101,9 +98,7 @@ function dbInsert($data, $table) {
|
|||||||
* */
|
* */
|
||||||
function dbUpdate($data, $table, $where = null, $parameters = array()) {
|
function dbUpdate($data, $table, $where = null, $parameters = array()) {
|
||||||
global $fullSql;
|
global $fullSql;
|
||||||
|
|
||||||
global $db_stats;
|
global $db_stats;
|
||||||
|
|
||||||
// the following block swaps the parameters if they were given in the wrong order.
|
// the following block swaps the parameters if they were given in the wrong order.
|
||||||
// it allows the method to work for those that would rather it (or expect it to)
|
// it allows the method to work for those that would rather it (or expect it to)
|
||||||
// follow closer with SQL convention:
|
// follow closer with SQL convention:
|
||||||
@@ -233,7 +228,6 @@ function dbFetchRow($sql = null, $parameters = array()) {
|
|||||||
* */
|
* */
|
||||||
function dbFetchCell($sql, $parameters = array()) {
|
function dbFetchCell($sql, $parameters = array()) {
|
||||||
global $db_stats;
|
global $db_stats;
|
||||||
|
|
||||||
$time_start = microtime(true);
|
$time_start = microtime(true);
|
||||||
$row = dbFetchRow($sql, $parameters);
|
$row = dbFetchRow($sql, $parameters);
|
||||||
if($row) {
|
if($row) {
|
||||||
@@ -253,7 +247,6 @@ function dbFetchCell($sql, $parameters = array()) {
|
|||||||
* */
|
* */
|
||||||
function dbFetchColumn($sql, $parameters = array()) {
|
function dbFetchColumn($sql, $parameters = array()) {
|
||||||
global $db_stats;
|
global $db_stats;
|
||||||
|
|
||||||
$time_start = microtime(true);
|
$time_start = microtime(true);
|
||||||
$cells = array();
|
$cells = array();
|
||||||
foreach(dbFetch($sql, $parameters) as $row) {
|
foreach(dbFetch($sql, $parameters) as $row) {
|
||||||
|
|||||||
Regular → Executable
Reference in New Issue
Block a user