Index: trunk/extensions/ExternalData/ED_Utils.php |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | ); |
195 | 195 | } else { |
196 | 196 | if ( ( $db_flags !== DBO_DEFAULT ) || ( $db_tableprefix !== '' ) ) { |
197 | | - print wfMsg( "externaldata-db-option-unsupported", '<code>$edgDBFlags</code>', '<code>$edgDBTablePrefix</code>' ); |
| 197 | + print wfMsg( "externaldata-db-option-unsupported", '<code>$edgDBFlags</code>', '<code>$edgDBTablePrefix</code>' ); |
198 | 198 | return; |
199 | 199 | } |
200 | 200 | |
— | — | @@ -262,11 +262,12 @@ |
263 | 263 | // if necessary - based on code at |
264 | 264 | // http://www.php.net/manual/en/function.mb-detect-encoding.php#102510 |
265 | 265 | $dbField = $row[$i]; |
266 | | - if ( mb_detect_encoding( $dbField, 'UTF-8', true ) == 'UTF-8' ) { |
267 | | - $new_row[$column_name] = $dbField; |
268 | | - } else { |
269 | | - $new_row[$column_name] = utf8_encode( $dbField ); |
270 | | - } |
| 266 | + if ( !function_exists( 'mb_detect_encoding' ) || |
| 267 | + mb_detect_encoding( $dbField, 'UTF-8', true ) == 'UTF-8' ) { |
| 268 | + $new_row[$column_name] = $dbField; |
| 269 | + } else { |
| 270 | + $new_row[$column_name] = utf8_encode( $dbField ); |
| 271 | + } |
271 | 272 | } |
272 | 273 | $rows[] = $new_row; |
273 | 274 | } |