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:
Tom Laermans
2011-09-20 15:59:51 +00:00
parent 43f3c547b7
commit 3558ea53a0
4 changed files with 231 additions and 238 deletions
+1 -1
View File
@@ -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")
-7
View File
@@ -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
View File