mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Merge pull request #484 from laf/issue-483
Updated the way debug=yes in url works to make it visually more appealing
This commit is contained in:
		@@ -22,10 +22,14 @@ Usage
 | 
			
		||||
 * Used by the other _query functions.
 | 
			
		||||
 * */
 | 
			
		||||
function dbQuery($sql, $parameters = array()) {
 | 
			
		||||
	global $fullSql, $debug;
 | 
			
		||||
	global $fullSql, $debug, $sql_debug;
 | 
			
		||||
	$fullSql = dbMakeQuery($sql, $parameters);
 | 
			
		||||
        if($debug) { 
 | 
			
		||||
          print Console_Color::convert("\nSQL[%y".$fullSql."%n] ");
 | 
			
		||||
          if(php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
 | 
			
		||||
            print Console_Color::convert("\nSQL[%y".$fullSql."%n] ");
 | 
			
		||||
          } else {
 | 
			
		||||
            $sql_debug[] = $fullSql;
 | 
			
		||||
          }
 | 
			
		||||
          #echo("\nSQL[".$fullSql."] "); 
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user