summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormoshe weitzman2010-01-18 04:35:43 (GMT)
committer moshe weitzman2010-01-18 04:35:43 (GMT)
commit78c98224c9bc2911dd23c97259c79af9cc0a1743 (patch)
treecd588cfebb37fbcb10b102a063a00b6682263c3d
parentde0da612ccfcc76627f0fe599d64842f13894b34 (diff)
remove cli detection in favor of drupal_is_cli
-rw-r--r--devel.module11
1 files changed, 1 insertions, 10 deletions
diff --git a/devel.module b/devel.module
index b742d86..152acfd 100644
--- a/devel.module
+++ b/devel.module
@@ -423,7 +423,7 @@ function devel_silent() {
// isset($_GET['q']) is needed on IIS when calling the front page. q is not set.
// Don't interfere with private files/images.
return
- devel_verify_cli() ||
+ drupal_is_cli() ||
strpos($_SERVER['HTTP_USER_AGENT'], 'ApacheBench') !== FALSE ||
!empty($_REQUEST['XDEBUG_PROFILE']) ||
isset($GLOBALS['devel_shutdown']) ||
@@ -756,15 +756,6 @@ function devel_shutdown() {
register_shutdown_function('devel_shutdown_real');
}
-// Borrowed from drush.
-function devel_verify_cli() {
- if (php_sapi_name() == 'cgi') {
- return (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
- }
-
- return (php_sapi_name() == 'cli');
-}
-
function devel_page_alter($page) {
if (variable_get('devel_page_alter', FALSE) && user_access('access devel information')) {
dpm($page, 'page');