From f3e25d6df340179182ae5fafbfcd42d207b2cb89 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 21 Mar 2008 04:10:01 +0000 Subject: [PATCH] better Apache mod detection from andy. fixes #6278 git-svn-id: http://svn.automattic.com/wordpress/trunk@7441 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 5 ++--- wp-admin/includes/misc.php | 13 +------------ wp-includes/functions.php | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 77d3392d4a..e446e98ee3 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -779,10 +779,9 @@ function media_upload_form( $errors = null ) { $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php"; // If Mac and mod_security, no Flash. :( - if ( function_exists('apache_getenv') && false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && 'on' == strtolower(apache_getenv('MODSEC_ENABLE')) ) + $flash = true; + if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') ) $flash = false; - else - $flash = true; $post_id = intval($_REQUEST['post_id']); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 4ba73bef2a..e466303b77 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -1,18 +1,7 @@