Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -659,6 +659,7 @@ |
660 | 660 | return false; |
661 | 661 | } |
662 | 662 | $this->setVar( '_CompiledDBs', $databases ); |
| 663 | + return true; |
663 | 664 | } |
664 | 665 | |
665 | 666 | /** |
— | — | @@ -680,6 +681,7 @@ |
681 | 682 | $this->showError( 'config-brokenlibxml' ); |
682 | 683 | return false; |
683 | 684 | } |
| 685 | + return true; |
684 | 686 | } |
685 | 687 | |
686 | 688 | /** |
— | — | @@ -694,6 +696,7 @@ |
695 | 697 | $this->showError( 'config-using531', phpversion() ); |
696 | 698 | return false; |
697 | 699 | } |
| 700 | + return true; |
698 | 701 | } |
699 | 702 | |
700 | 703 | /** |
— | — | @@ -705,6 +708,7 @@ |
706 | 709 | $this->showError( 'config-magic-quotes-runtime' ); |
707 | 710 | return false; |
708 | 711 | } |
| 712 | + return true; |
709 | 713 | } |
710 | 714 | |
711 | 715 | /** |
— | — | @@ -716,6 +720,7 @@ |
717 | 721 | $this->showError( 'config-magic-quotes-sybase' ); |
718 | 722 | return false; |
719 | 723 | } |
| 724 | + return true; |
720 | 725 | } |
721 | 726 | |
722 | 727 | /** |
— | — | @@ -727,6 +732,7 @@ |
728 | 733 | $this->showError( 'config-mbstring' ); |
729 | 734 | return false; |
730 | 735 | } |
| 736 | + return true; |
731 | 737 | } |
732 | 738 | |
733 | 739 | /** |
— | — | @@ -738,16 +744,19 @@ |
739 | 745 | $this->showError( 'config-ze1' ); |
740 | 746 | return false; |
741 | 747 | } |
| 748 | + return true; |
742 | 749 | } |
743 | 750 | |
744 | 751 | /** |
745 | 752 | * Environment check for safe_mode. |
| 753 | + * @return bool |
746 | 754 | */ |
747 | 755 | protected function envCheckSafeMode() { |
748 | 756 | if ( wfIniGetBool( 'safe_mode' ) ) { |
749 | 757 | $this->setVar( '_SafeMode', true ); |
750 | 758 | $this->showMessage( 'config-safe-mode' ); |
751 | 759 | } |
| 760 | + return true; |
752 | 761 | } |
753 | 762 | |
754 | 763 | /** |
— | — | @@ -759,6 +768,7 @@ |
760 | 769 | $this->showError( 'config-xml-bad' ); |
761 | 770 | return false; |
762 | 771 | } |
| 772 | + return true; |
763 | 773 | } |
764 | 774 | |
765 | 775 | /** |
— | — | @@ -777,6 +787,7 @@ |
778 | 788 | $this->showError( 'config-pcre-no-utf8' ); |
779 | 789 | return false; |
780 | 790 | } |
| 791 | + return true; |
781 | 792 | } |
782 | 793 | |
783 | 794 | /** |
— | — | @@ -801,9 +812,8 @@ |
802 | 813 | $this->showMessage( 'config-memory-raised', $limit, $newLimit ); |
803 | 814 | $this->setVar( '_RaiseMemory', true ); |
804 | 815 | } |
805 | | - } else { |
806 | | - return true; |
807 | 816 | } |
| 817 | + return true; |
808 | 818 | } |
809 | 819 | |
810 | 820 | /** |
— | — | @@ -829,15 +839,18 @@ |
830 | 840 | |
831 | 841 | /** |
832 | 842 | * Scare user to death if they have mod_security |
| 843 | + * @return bool |
833 | 844 | */ |
834 | 845 | protected function envCheckModSecurity() { |
835 | 846 | if ( self::apacheModulePresent( 'mod_security' ) ) { |
836 | 847 | $this->showMessage( 'config-mod-security' ); |
837 | 848 | } |
| 849 | + return true; |
838 | 850 | } |
839 | 851 | |
840 | 852 | /** |
841 | 853 | * Search for GNU diff3. |
| 854 | + * @return bool |
842 | 855 | */ |
843 | 856 | protected function envCheckDiff3() { |
844 | 857 | $names = array( "gdiff3", "diff3", "diff3.exe" ); |
— | — | @@ -851,6 +864,7 @@ |
852 | 865 | $this->setVar( 'wgDiff3', false ); |
853 | 866 | $this->showMessage( 'config-diff3-bad' ); |
854 | 867 | } |
| 868 | + return true; |
855 | 869 | } |
856 | 870 | |
857 | 871 | /** |
— | — | @@ -868,10 +882,11 @@ |
869 | 883 | return true; |
870 | 884 | } elseif ( function_exists( 'imagejpeg' ) ) { |
871 | 885 | $this->showMessage( 'config-gd' ); |
872 | | - return true; |
| 886 | + |
873 | 887 | } else { |
874 | 888 | $this->showMessage( 'config-no-scaling' ); |
875 | 889 | } |
| 890 | + return true; |
876 | 891 | } |
877 | 892 | |
878 | 893 | /** |
— | — | @@ -881,6 +896,7 @@ |
882 | 897 | $server = $this->envGetDefaultServer(); |
883 | 898 | $this->showMessage( 'config-using-server', $server ); |
884 | 899 | $this->setVar( 'wgServer', $server ); |
| 900 | + return true; |
885 | 901 | } |
886 | 902 | |
887 | 903 | /** |
— | — | @@ -913,6 +929,7 @@ |
914 | 930 | $ext = 'php'; |
915 | 931 | } |
916 | 932 | $this->setVar( 'wgScriptExtension', ".$ext" ); |
| 933 | + return true; |
917 | 934 | } |
918 | 935 | |
919 | 936 | /** |
— | — | @@ -1000,17 +1017,17 @@ |
1001 | 1018 | $url = $this->getVar( 'wgServer' ) . $this->getVar( 'wgScriptPath' ) . '/images/'; |
1002 | 1019 | $safe = !$this->dirIsExecutable( $dir, $url ); |
1003 | 1020 | |
1004 | | - if ( $safe ) { |
1005 | | - return true; |
1006 | | - } else { |
| 1021 | + if ( !$safe ) { |
1007 | 1022 | $this->showMessage( 'config-uploads-not-safe', $dir ); |
1008 | 1023 | } |
| 1024 | + return true; |
1009 | 1025 | } |
1010 | 1026 | |
1011 | 1027 | /** |
1012 | 1028 | * Checks if suhosin.get.max_value_length is set, and if so, sets |
1013 | 1029 | * $wgResourceLoaderMaxQueryLength to that value in the generated |
1014 | 1030 | * LocalSettings file |
| 1031 | + * @return bool |
1015 | 1032 | */ |
1016 | 1033 | protected function envCheckSuhosinMaxValueLength() { |
1017 | 1034 | $maxValueLength = ini_get( 'suhosin.get.max_value_length' ); |
— | — | @@ -1023,6 +1040,7 @@ |
1024 | 1041 | $maxValueLength = -1; |
1025 | 1042 | } |
1026 | 1043 | $this->setVar( 'wgResourceLoaderMaxQueryLength', $maxValueLength ); |
| 1044 | + return true; |
1027 | 1045 | } |
1028 | 1046 | |
1029 | 1047 | /** |
— | — | @@ -1095,11 +1113,15 @@ |
1096 | 1114 | } |
1097 | 1115 | } |
1098 | 1116 | |
| 1117 | + /** |
| 1118 | + * @return bool |
| 1119 | + */ |
1099 | 1120 | protected function envCheckCtype() { |
1100 | 1121 | if ( !function_exists( 'ctype_digit' ) ) { |
1101 | 1122 | $this->showError( 'config-ctype' ); |
1102 | 1123 | return false; |
1103 | 1124 | } |
| 1125 | + return true; |
1104 | 1126 | } |
1105 | 1127 | |
1106 | 1128 | /** |
— | — | @@ -1181,6 +1203,8 @@ |
1182 | 1204 | * Checks if scripts located in the given directory can be executed via the given URL. |
1183 | 1205 | * |
1184 | 1206 | * Used only by environment checks. |
| 1207 | + * @param $dir string |
| 1208 | + * @param $url string |
1185 | 1209 | * @return bool|int|string |
1186 | 1210 | */ |
1187 | 1211 | public function dirIsExecutable( $dir, $url ) { |