Index: trunk/extensions/PasswordReset/OBSOLETE |
— | — | @@ -1,4 +0,0 @@ |
2 | | -This extension is obsolete as of r46769, its functionality has been implemented |
3 | | -in core. Related right: 'reset-passwords'. |
4 | | - |
5 | | -In the future this extension may be removed from trunk. |
Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -794,9 +794,8 @@ |
795 | 795 | |
796 | 796 | // Spaces |
797 | 797 | $matches = array(); |
798 | | - if ( preg_match( '/\s+/u', $code, $matches, PREG_OFFSET_CAPTURE, $offset ) && |
799 | | - $matches[0][1] == $offset ) { |
800 | | - $offset += strlen($matches[0][0]); |
| 798 | + if ( preg_match( '/\s+/uA', $code, $matches, 0, $offset ) ) { |
| 799 | + $offset += strlen($matches[0]); |
801 | 800 | } |
802 | 801 | |
803 | 802 | if( $offset >= strlen($code) ) return array( '', AFPToken::TNone, $code, $offset ); |
— | — | @@ -825,7 +824,8 @@ |
826 | 825 | if( $code[$offset] == '"' || $code[$offset] == "'" ) { |
827 | 826 | $type = $code[$offset]; |
828 | 827 | $offset++; |
829 | | - while( $offset < strlen($code) ) { |
| 828 | + $strLen = $len = strlen($code); |
| 829 | + while( $offset < $strLen ) { |
830 | 830 | |
831 | 831 | if( $code[$offset] == $type ) { |
832 | 832 | $offset++; |
— | — | @@ -839,16 +839,22 @@ |
840 | 840 | $tok .= substr( $code, $offset, $addLength ); |
841 | 841 | $offset += $addLength; |
842 | 842 | } elseif( $code[$offset] == '\\' ) { |
843 | | - if( $code[$offset + 1] == '\\' ) |
| 843 | + switch( $code[$offset + 1] ) { |
| 844 | + case '\\': |
844 | 845 | $tok .= '\\'; |
845 | | - elseif( $code[$offset + 1] == $type ) |
| 846 | + break; |
| 847 | + case $type: |
846 | 848 | $tok .= $type; |
847 | | - elseif( $code[$offset + 1] == 'n' ) |
| 849 | + break; |
| 850 | + case 'n'; |
848 | 851 | $tok .= "\n"; |
849 | | - elseif( $code[$offset + 1] == 'r' ) |
| 852 | + break; |
| 853 | + case 'r': |
850 | 854 | $tok .= "\r"; |
851 | | - elseif( $code[$offset + 1] == 't' ) |
| 855 | + break; |
| 856 | + case 't': |
852 | 857 | $tok .= "\t"; |
| 858 | + break; |
853 | 859 | elseif( $code[$offset + 1] == 'x' ) { |
854 | 860 | $chr = substr( $code, $offset + 2, 2 ); |
855 | 861 | |
— | — | @@ -882,15 +888,15 @@ |
883 | 889 | |
884 | 890 | foreach( self::$mOps as $op ) |
885 | 891 | $quoted_operators[] = preg_quote( $op, '/' ); |
886 | | - $operator_regex = '/('.implode('|', $quoted_operators).')/'; |
| 892 | + $operator_regex = '/('.implode('|', $quoted_operators).')/A'; |
887 | 893 | } |
888 | 894 | |
889 | 895 | $matches = array(); |
890 | 896 | |
891 | | - preg_match( $operator_regex, $code, $matches, PREG_OFFSET_CAPTURE, $offset ); |
| 897 | + preg_match( $operator_regex, $code, $matches, 0, $offset ); |
892 | 898 | |
893 | | - if( count( $matches ) && $matches[0][1] == $offset ) { |
894 | | - $tok = $matches[0][0]; |
| 899 | + if( count( $matches ) ) { |
| 900 | + $tok = $matches[0]; |
895 | 901 | $offset += strlen( $tok ); |
896 | 902 | return array( $tok, AFPToken::TOp, $code, $offset ); |
897 | 903 | } |
— | — | @@ -907,14 +913,14 @@ |
908 | 914 | 10 => '[0-9.]', |
909 | 915 | ); |
910 | 916 | $baseClass = '['.implode('', array_keys($bases)).']'; |
911 | | - $radixRegex = "/([0-9A-Fa-f]*(?:\.\d*)?)($baseClass)?/u"; |
| 917 | + $radixRegex = "/([0-9A-Fa-f]*(?:\.\d*)?)($baseClass)?/Au"; |
912 | 918 | $matches = array(); |
913 | 919 | |
914 | | - preg_match( $radixRegex, $code, $matches, PREG_OFFSET_CAPTURE, $offset ); |
| 920 | + preg_match( $radixRegex, $code, $matches, 0, $offset ); |
915 | 921 | |
916 | | - if ( count( $matches ) && $matches[0][1] == $offset ) { |
917 | | - $input = $matches[1][0]; |
918 | | - $baseChar = @$matches[2][0]; |
| 922 | + if ( count( $matches ) ) { |
| 923 | + $input = $matches[1]; |
| 924 | + $baseChar = @$matches[2]; |
919 | 925 | $num = null; |
920 | 926 | |
921 | 927 | // Sometimes the base char gets mixed in with the rest of it because |
— | — | @@ -961,12 +967,11 @@ |
962 | 968 | // The rest are considered IDs |
963 | 969 | |
964 | 970 | // Regex match > PHP |
965 | | - $idSymbolRegex = '/[0-9A-Za-z_]+/'; |
| 971 | + $idSymbolRegex = '/[0-9A-Za-z_]+/A'; |
966 | 972 | $matches = array(); |
967 | | - preg_match( $idSymbolRegex, $code, $matches, PREG_OFFSET_CAPTURE, $offset ); |
968 | 973 | |
969 | | - if ( $matches[0][1] == $offset ) { |
970 | | - $tok = $matches[0][0]; |
| 974 | + if ( preg_match( $idSymbolRegex, $code, $matches, 0, $offset ) ) { |
| 975 | + $tok = $matches[0]; |
971 | 976 | |
972 | 977 | $type = in_array( $tok, self::$mKeywords ) |
973 | 978 | ? AFPToken::TKeyword |
— | — | @@ -1201,4 +1206,4 @@ |
1202 | 1207 | return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string); |
1203 | 1208 | } // end |
1204 | 1209 | |
1205 | | -} // end if |
\ No newline at end of file |
| 1210 | +} // end if |