Ticket #6278: 6278-1.diff
| File 6278-1.diff, 2.3 kB (added by andy, 6 months ago) |
|---|
-
wp-includes/functions.php
old new 1713 1713 $server_parts[1] = isset( $server_parts[1] )? $server_parts[1] : ''; 1714 1714 return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); 1715 1715 } 1716 1717 /** 1718 * apache_mod_loaded() - Does the specified module exist in the apache config? 1719 * 1720 * @param string $mod e.g. mod_rewrite 1721 * @return bool 1722 */ 1723 function apache_mod_loaded($mod) { 1724 global $is_apache; 1725 1726 if ( !$is_apache ) 1727 return false; 1728 1729 if ( function_exists('apache_get_modules') ) { 1730 $mods = apache_get_modules(); 1731 if ( in_array($mod, $mods) ) 1732 return true; 1733 } else { 1734 ob_start(); 1735 phpinfo(8); 1736 $phpinfo = ob_get_clean(); 1737 if ( false !== strpos($phpinfo, $mod) ) 1738 return true; 1739 } 1740 return false; 1741 } 1742 1716 1743 ?> -
wp-admin/includes/misc.php
old new 1 1 <?php 2 2 3 3 function got_mod_rewrite() { 4 global $is_apache; 5 6 // take 3 educated guesses as to whether or not mod_rewrite is available 7 if ( !$is_apache ) 8 return false; 9 10 if ( function_exists( 'apache_get_modules' ) ) { 11 if ( !in_array( 'mod_rewrite', apache_get_modules() ) ) 12 return false; 13 } 14 15 return true; 4 return apache_mod_loaded('mod_rewrite'); 16 5 } 17 6 18 7 // Returns an array of strings from a file (.htaccess ) from between BEGIN -
wp-admin/includes/media.php
old new 779 779 $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php"; 780 780 781 781 // If Mac and mod_security, no Flash. :( 782 if ( function_exists('apache_getenv') && false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && 'on' == strtolower(apache_getenv('MODSEC_ENABLE')) ) 782 $flash = true; 783 if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') ) 783 784 $flash = false; 784 else785 $flash = true;786 785 787 786 $post_id = intval($_REQUEST['post_id']); 788 787
