Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
0ed26d12
Commit
0ed26d12
authored
Nov 11, 2010
by
Petr Skoda
Browse files
MDL-25150 new debugusers setting
parent
740952e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
0ed26d12
...
...
@@ -359,6 +359,11 @@ $CFG->admin = 'admin';
// $CFG->debug = 38911; // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS!
// $CFG->debugdisplay = true; // NOT FOR PRODUCTION SERVERS!
//
// You can specify a comma separated list of user ids that that always see
// debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay
// for these users only.
// $CFG->debugusers = '2';
//
// Prevent theme caching
// $CFG->themerev = -1; // NOT FOR PRODUCTION SERVERS!
//
...
...
lib/weblib.php
View file @
0ed26d12
...
...
@@ -2843,9 +2843,15 @@ function get_docs_url($path) {
* @return bool
*/
function
debugging
(
$message
=
''
,
$level
=
DEBUG_NORMAL
,
$backtrace
=
null
)
{
global
$CFG
,
$UNITTEST
;
global
$CFG
,
$USER
,
$UNITTEST
;
if
(
empty
(
$CFG
->
debug
)
||
$CFG
->
debug
<
$level
)
{
$forcedebug
=
false
;
if
(
!
empty
(
$CFG
->
debugusers
))
{
$debugusers
=
explode
(
','
,
$CFG
->
debugusers
);
$forcedebug
=
in_array
(
$USER
->
id
,
$debugusers
);
}
if
(
!
$forcedebug
and
(
empty
(
$CFG
->
debug
)
||
$CFG
->
debug
<
$level
))
{
return
false
;
}
...
...
@@ -2871,7 +2877,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
// we send the info to error log instead
error_log
(
'Debugging: '
.
$message
.
$from
);
}
else
if
(
$CFG
->
debugdisplay
)
{
}
else
if
(
$forcedebug
or
$CFG
->
debugdisplay
)
{
if
(
!
defined
(
'DEBUGGING_PRINTED'
))
{
define
(
'DEBUGGING_PRINTED'
,
1
);
// indicates we have printed something
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment