Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
a4e7c8b9
Unverified
Commit
a4e7c8b9
authored
3 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(core) Remove unused debug functions causing codesniffer warnings
issue
#6167
parent
77d533f8
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
fusiondirectory-1.3.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/functions_debug.inc
+0
-112
include/functions_debug.inc
with
0 additions
and
112 deletions
+0
-112
include/functions_debug.inc
+
0
−
112
View file @
a4e7c8b9
...
@@ -17,16 +17,6 @@
...
@@ -17,16 +17,6 @@
* if mode is defined the function returns the output instead of
* if mode is defined the function returns the output instead of
* printing it to the browser
* printing it to the browser
*
*
* show_vars([int mode])
* use this function on the bottom of your script to see all
* superglobals and global variables in your script in a nice
* formated way
*
* show_vars() without parameter shows $_GET, $_POST, $_SESSION,
* $_FILES and all global variables you've defined in your script
*
* show_vars(1) shows $_SERVER and $_ENV in addition
*
* Happy debugging and feel free to email me your comments.
* Happy debugging and feel free to email me your comments.
*
*
* History: (starting with version 0.5.3 at 2003-02-24)
* History: (starting with version 0.5.3 at 2003-02-24)
...
@@ -36,15 +26,6 @@
...
@@ -36,15 +26,6 @@
* - pre() function now trims trailing tabs
* - pre() function now trims trailing tabs
----------------------------------------------------------------------*/
----------------------------------------------------------------------*/
// This file must be the first include on your page.
/* used for tracking of generation-time */
{
$MICROTIME_START
=
microtime
();
@
$GLOBALS_initial_count
=
count
(
$GLOBALS
);
}
/*!
/*!
* \file functions_debug.inc
* \file functions_debug.inc
* Source code for print_a class
* Source code for print_a class
...
@@ -252,96 +233,3 @@ function print_a($array, $return_mode = FALSE, $show_object_vars = FALSE, $expor
...
@@ -252,96 +233,3 @@ function print_a($array, $return_mode = FALSE, $show_object_vars = FALSE, $expor
return
TRUE
;
return
TRUE
;
}
}
}
}
function
_script_globals
()
{
global
$GLOBALS_initial_count
;
$varcount
=
0
;
foreach
(
$GLOBALS
as
$GLOBALS_current_key
=>
$GLOBALS_current_value
)
{
if
(
++
$varcount
>
$GLOBALS_initial_count
)
{
/* die wollen wir nicht! */
if
(
$GLOBALS_current_key
!=
'HTTP_SESSION_VARS'
&&
$GLOBALS_current_key
!=
'_SESSION'
)
{
$script_GLOBALS
[
$GLOBALS_current_key
]
=
$GLOBALS_current_value
;
}
}
}
unset
(
$script_GLOBALS
[
'GLOBALS_initial_count'
]);
return
$script_GLOBALS
;
}
/*!
* \brief Show the runtime
*/
function
show_runtime
()
{
$MICROTIME_END
=
microtime
();
$MICROTIME_START
=
explode
(
' '
,
$GLOBALS
[
'MICROTIME_START'
]);
$MICROTIME_END
=
explode
(
' '
,
$MICROTIME_END
);
$GENERATIONSEC
=
$MICROTIME_END
[
1
]
-
$MICROTIME_START
[
1
];
$GENERATIONMSEC
=
$MICROTIME_END
[
0
]
-
$MICROTIME_START
[
0
];
$GENERATIONTIME
=
substr
(
$GENERATIONSEC
+
$GENERATIONMSEC
,
0
,
8
);
return
'<span style="color:red;font-weight:normal;font-size:9px;">(runtime: '
.
$GENERATIONTIME
.
' sec)</span>'
;
}
/*!
* \brief function shows all superglobals and script defined global variables
* show_vars() without the first parameter shows all superglobals except $_ENV and $_SERVER
* show_vars(1) shows all
* show_vars(,1) shows object properties in addition
*/
function
show_vars
(
$show_all_vars
=
FALSE
,
$show_object_vars
=
FALSE
)
{
if
(
isset
(
$GLOBALS
[
'no_vars'
]))
{
return
;
}
$script_globals
=
_script_globals
();
print
'
<style type="text/css">
.vars-container {
font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif;
font-size: 8pt;
padding:5px;
}
.varsname {
font-weight:bold;
}
</style>
'
;
print
'<br />
<div style="border-style:dotted;border-width:1px;padding:2px;font-family:Verdana;font-size:10pt;font-weight:bold;">
DEBUG '
.
show_runtime
()
.
'
'
;
$vars_arr
[
'script_globals'
]
=
array
(
'global script variables'
,
'#7ACCC8'
);
$vars_arr
[
'_GET'
]
=
array
(
'$_GET'
,
'#7DA7D9'
);
$vars_arr
[
'_POST'
]
=
array
(
'$_POST'
,
'#F49AC1'
);
$vars_arr
[
'_FILES'
]
=
array
(
'$_POST FILES'
,
'#82CA9C'
);
$vars_arr
[
'_SESSION'
]
=
array
(
'$_SESSION'
,
'#FCDB26'
);
$vars_arr
[
'_COOKIE'
]
=
array
(
'$_COOKIE'
,
'#A67C52'
);
if
(
$show_all_vars
)
{
$vars_arr
[
'_SERVER'
]
=
array
(
'SERVER'
,
'#A186BE'
);
$vars_arr
[
'_ENV'
]
=
array
(
'ENV'
,
'#7ACCC8'
);
}
foreach
(
$vars_arr
as
$vars_name
=>
$vars_data
)
{
if
(
$vars_name
!=
'script_globals'
)
{
global
$$vars_name
;
}
if
(
$$vars_name
)
{
print
'<div class="vars-container" style="background-color:'
.
$vars_data
[
1
]
.
';"><span class="varsname">'
.
$vars_data
[
0
]
.
'</span><br />'
;
print_a
(
$$vars_name
,
FALSE
,
$show_object_vars
,
FALSE
);
print
'</div>'
;
}
}
print
'</div>'
;
}
?>
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets