mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Add helper to know if we currently are in "debug" mode
Can be used to enable more features / debugging tools throughout the application.
This commit is contained in:
@@ -2119,6 +2119,18 @@ class utils
|
||||
return ITOP_REVISION === 'svn';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if debug is enabled in the current environment.
|
||||
* Currently just checking if the "debug=true" parameter is in the URL, but could be more complex.
|
||||
*
|
||||
* @return bool
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public static function IsDebugEnabled()
|
||||
{
|
||||
return utils::ReadParam('debug') === 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://php.net/manual/en/function.finfo-file.php
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user