Other piece of r16904. Limit variable string searching when possible. See #10187

git-svn-id: http://svn.automattic.com/wordpress/trunk@16905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-12-14 08:35:48 +00:00
parent 20e1171ae8
commit 99337166eb
1 changed files with 2 additions and 3 deletions

View File

@ -80,13 +80,12 @@ $is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos(
* Whether the server software is IIS or something else
* @global bool $is_IIS
*/
$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false);
$is_IIS = !$is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false);
/**
* Whether the server software is IIS 7.X
* @global bool $is_iis7
*/
$is_iis7 = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
$is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
?>