Changeset 7441
- Timestamp:
- 03/21/2008 04:10:01 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r7407 r7441 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']); -
trunk/wp-admin/includes/misc.php
r6551 r7441 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 -
trunk/wp-includes/functions.php
r7440 r7441 1718 1718 return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); 1719 1719 } 1720 1721 /** 1722 * apache_mod_loaded() - Does the specified module exist in the apache config? 1723 * 1724 * @param string $mod e.g. mod_rewrite 1725 * @return bool 1726 */ 1727 function apache_mod_loaded($mod) { 1728 global $is_apache; 1729 1730 if ( !$is_apache ) 1731 return false; 1732 1733 if ( function_exists('apache_get_modules') ) { 1734 $mods = apache_get_modules(); 1735 if ( in_array($mod, $mods) ) 1736 return true; 1737 } else { 1738 ob_start(); 1739 phpinfo(8); 1740 $phpinfo = ob_get_clean(); 1741 if ( false !== strpos($phpinfo, $mod) ) 1742 return true; 1743 } 1744 return false; 1745 } 1746 1720 1747 ?>
Note: See TracChangeset
for help on using the changeset viewer.