Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -622,7 +622,7 @@ |
623 | 623 | $wgRequest->response()->setcookie( 'mfsecure', '1', 0, '' ); |
624 | 624 | } else { |
625 | 625 | $mfSecure = $wgRequest->getCookie( 'mfsecure', '' ); |
626 | | - if ( !empty( $mfSecure ) && $mfSecure == '1' ) { |
| 626 | + if ( $mfSecure && $mfSecure == '1' ) { |
627 | 627 | $wgRequest->response()->setcookie( 'mfsecure', '', 0, '' ); |
628 | 628 | } |
629 | 629 | } |
— | — | @@ -729,7 +729,7 @@ |
730 | 730 | private function sendXDeviceVaryHeader() { |
731 | 731 | global $wgOut, $wgRequest; |
732 | 732 | wfProfileIn( __METHOD__ ); |
733 | | - if ( !empty( $_SERVER['HTTP_X_DEVICE'] ) ) { |
| 733 | + if ( isset( $_SERVER['HTTP_X_DEVICE'] ) ) { |
734 | 734 | $wgRequest->response()->header( 'X-Device: ' . $_SERVER['HTTP_X_DEVICE'] ); |
735 | 735 | $wgOut->addVaryHeader( 'X-Device' ); |
736 | 736 | } |
— | — | @@ -741,11 +741,11 @@ |
742 | 742 | private function sendApplicationVersionVaryHeader() { |
743 | 743 | global $wgOut, $wgRequest; |
744 | 744 | wfProfileIn( __METHOD__ ); |
745 | | - if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) ) { |
| 745 | + if ( isset( $_SERVER['HTTP_APPLICATION_VERSION'] ) ) { |
746 | 746 | $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_APPLICATION_VERSION'] ); |
747 | 747 | $wgOut->addVaryHeader( 'Application_Version' ); |
748 | 748 | } else { |
749 | | - if ( !empty( $_SERVER['HTTP_X_DEVICE'] ) ) { |
| 749 | + if ( isset( $_SERVER['HTTP_X_DEVICE'] ) ) { |
750 | 750 | if ( stripos( $_SERVER['HTTP_X_DEVICE'], 'iphone' ) !== false || |
751 | 751 | stripos( $_SERVER['HTTP_X_DEVICE'], 'android' ) !== false ) { |
752 | 752 | $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_X_DEVICE'] ); |