|
|
@@ -2,6 +2,18 @@
|
|
|
|
|
|
class DBG {
|
|
|
|
|
|
+ public static function isActive($mode = null) {
|
|
|
+ return true == V::get('_DBG_ON', false, $_SESSION);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function activate($mode = null) {// @used in User::auth()
|
|
|
+ $_SESSION['_DBG_ON'] = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function deactivate($mode = 'all') {
|
|
|
+ $_SESSION['_DBG_ON'] = false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param $reqKqy - key in $_REQUEST array (if true then always show)
|
|
|
* @param $reqValueExpr - expression to compare req value
|
|
|
@@ -18,6 +30,7 @@ class DBG {
|
|
|
* DBG::_(true, true, "fieldsConfig({$idTable})", $fieldsConfig, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
*/
|
|
|
public static function _($reqKey, $reqValueExpr, $label, $variable, $className, $functionName, $lineNumber, $borderColor = 'red') {
|
|
|
+ if (DBG::isActive()) return;
|
|
|
$showDBG = false;
|
|
|
$reqValue = (true === $reqKey || !$reqKey)? '' : V::get($reqKey, '', $_GET);
|
|
|
if (true === $reqKey) {
|