diff options
Diffstat (limited to 'phpBB/phpbb/db/driver/driver.php')
| -rw-r--r-- | phpBB/phpbb/db/driver/driver.php | 28 | 
1 files changed, 27 insertions, 1 deletions
| diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index a36ce8c0d7..93f0a749e5 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -76,6 +76,16 @@ abstract class driver implements driver_interface  	const SUBQUERY_BUILD = 5;  	/** +	* @var bool +	*/ +	protected $debug_load_time = false; + +	/** +	* @var bool +	*/ +	protected $debug_sql_explain = false; + +	/**  	* Constructor  	*/  	function __construct() @@ -98,6 +108,22 @@ abstract class driver implements driver_interface  	/**  	* {@inheritdoc}  	*/ +	public function set_debug_load_time($value) +	{ +		$this->debug_load_time = $value; +	} + +	/** +	* {@inheritdoc} +	*/ +	public function set_debug_sql_explain($value) +	{ +		$this->debug_sql_explain = $value; +	} + +	/** +	* {@inheritdoc} +	*/  	public function get_sql_layer()  	{  		return $this->sql_layer; @@ -955,7 +981,7 @@ abstract class driver implements driver_interface  			// Show complete SQL error and path to administrators only  			// Additionally show complete error on installation or if extended debug mode is enabled  			// The DEBUG constant is for development only! -			if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG')) +			if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || $this->debug_sql_explain)  			{  				$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';  			} | 
