Index: trunk/extensions/Poem/Poem.php |
— | — | @@ -34,6 +34,13 @@ |
35 | 35 | return true; |
36 | 36 | } |
37 | 37 | |
| 38 | +/** |
| 39 | + * @param $in |
| 40 | + * @param array $param |
| 41 | + * @param $parser Parser |
| 42 | + * @param bool $frame |
| 43 | + * @return string |
| 44 | + */ |
38 | 45 | function PoemExtension( $in, $param=array(), $parser=null, $frame=false ) { |
39 | 46 | |
40 | 47 | /* using newlines in the text will cause the parser to add <p> tags, |
Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -74,6 +74,7 @@ |
75 | 75 | $talkTag = $wgRequest->getBool( 'usettag' ) ? |
76 | 76 | trim( $wgRequest->getVal( 'talktag' ) ) : ''; |
77 | 77 | |
| 78 | + $m = array(); |
78 | 79 | # An IPv4? An IPv6? CIDR included? |
79 | 80 | if ( IP::isIPAddress( $user ) ) { |
80 | 81 | $ip = IP::sanitizeIP( $user ); |
— | — | @@ -1145,6 +1146,7 @@ |
1146 | 1147 | protected function getIpConds( $db, $ip, $xfor = false ) { |
1147 | 1148 | $type = ( $xfor ) ? 'xff' : 'ip'; |
1148 | 1149 | // IPv4 CIDR, 16-32 bits |
| 1150 | + $matches = array(); |
1149 | 1151 | if ( preg_match( '#^(\d+\.\d+\.\d+\.\d+)/(\d+)$#', $ip, $matches ) ) { |
1150 | 1152 | if ( $matches[2] < 16 || $matches[2] > 32 ) { |
1151 | 1153 | return false; // invalid |
Index: trunk/extensions/ActiveAbstract/AbstractFilter.php |
— | — | @@ -182,6 +182,8 @@ |
183 | 183 | $sentence = ".*?$end+"; |
184 | 184 | $firsttwo = "/^($sentence$sentence)/u"; |
185 | 185 | |
| 186 | + $matches = array(); |
| 187 | + |
186 | 188 | if ( preg_match( $firsttwo, $text, $matches ) ) { |
187 | 189 | return $matches[1]; |
188 | 190 | } else { |
Index: trunk/extensions/ScanSet/ScanSet_body.php |
— | — | @@ -186,6 +186,7 @@ |
187 | 187 | |
188 | 188 | $volumes = array(); |
189 | 189 | while ( ( $file = readdir( $dir ) ) !== false ) { |
| 190 | + $m = array(); |
190 | 191 | if ( preg_match( '/^VOL([0-9]+) (.*)$/', $file, $m ) ) { |
191 | 192 | $volumes[$m[1]] = $m[2]; |
192 | 193 | // Is this the current volume? Use strcmp to enforce leading zeros |
— | — | @@ -226,6 +227,7 @@ |
227 | 228 | $passedCurrent = false; |
228 | 229 | for ( $i = 0; $i < count( $lines ); $i++) { |
229 | 230 | $line = $lines[$i]; |
| 231 | + $m = array(); |
230 | 232 | if ( !preg_match( '/^(\w+)\.(\w+),(.*)$/', trim( $line ), $m ) ) { |
231 | 233 | $this->doError( 'index_file_error', $i + 1 ); |
232 | 234 | return false; |
Index: trunk/extensions/SimpleAntiSpam/SimpleAntiSpam.php |
— | — | @@ -32,6 +32,10 @@ |
33 | 33 | } |
34 | 34 | |
35 | 35 | //check for the field and if it isn't empty, negate the save |
| 36 | +/** |
| 37 | + * @param $editpage EditPage |
| 38 | + * @return bool |
| 39 | + */ |
36 | 40 | function efSimpleAntiSpamCheck( $editpage ) { |
37 | 41 | global $wgRequest, $wgUser; |
38 | 42 | $spam = $wgRequest->getText( 'wpAntispam' ); |
— | — | @@ -43,7 +47,7 @@ |
44 | 48 | '" submitted bogus field "' . |
45 | 49 | $spam . |
46 | 50 | '"' ); |
47 | | - $editpage->spamPage(); |
| 51 | + $editpage->spamPageWithContent(); |
48 | 52 | return false; |
49 | 53 | } |
50 | 54 | return true; |
Index: trunk/extensions/PdfHandler/PdfHandler.image.php |
— | — | @@ -85,6 +85,7 @@ |
86 | 86 | " -enc UTF-8 " . # Report metadata as UTF-8 text... |
87 | 87 | " -l 9999999 " . # Report page sizes for all pages |
88 | 88 | wfEscapeShellArg( $this->mFilename ); |
| 89 | + $retval = ''; |
89 | 90 | $dump = wfShellExec( $cmd, $retval ); |
90 | 91 | $data = $this->convertDumpToArray( $dump ); |
91 | 92 | wfProfileOut( 'pdfinfo' ); |
— | — | @@ -97,6 +98,7 @@ |
98 | 99 | wfProfileIn( 'pdftotext' ); |
99 | 100 | $cmd = wfEscapeShellArg( $wgPdftoText ) . ' '. wfEscapeShellArg( $this->mFilename ) . ' - '; |
100 | 101 | wfDebug( __METHOD__.": $cmd\n" ); |
| 102 | + $retval = ''; |
101 | 103 | $txt = wfShellExec( $cmd, $retval ); |
102 | 104 | wfProfileOut( 'pdftotext' ); |
103 | 105 | if( $retval == 0 ) { |
— | — | @@ -126,6 +128,7 @@ |
127 | 129 | if( count( $bits ) > 1 ) { |
128 | 130 | $key = trim( $bits[0] ); |
129 | 131 | $value = trim( $bits[1] ); |
| 132 | + $matches = array(); |
130 | 133 | if( preg_match( '/^Page +(\d+) size$/', $key, $matches ) ) { |
131 | 134 | $data['pages'][$matches[1]]['Page size'] = $value; |
132 | 135 | } else { |
Index: trunk/extensions/PdfHandler/PdfHandler_body.php |
— | — | @@ -129,6 +129,7 @@ |
130 | 130 | |
131 | 131 | wfProfileIn( 'PdfHandler' ); |
132 | 132 | wfDebug( __METHOD__ . ": $cmd\n" ); |
| 133 | + $retval = ''; |
133 | 134 | $err = wfShellExec( $cmd, $retval ); |
134 | 135 | wfProfileOut( 'PdfHandler' ); |
135 | 136 | |