}
function getInfo() {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$file = fopen( $this->mFilename, 'rb' );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $file === false ) {
wfDebug( __METHOD__ . ": missing or failed file read\n" );
wfDebug( __METHOD__ . ": not a DjVu file\n" );
} elseif ( $subtype == 'DJVU' ) {
// Single-page document
- $info = $this->getPageInfo( $file, $formLength );
+ $info = $this->getPageInfo( $file );
} elseif ( $subtype == 'DJVM' ) {
// Multi-page document
$info = $this->getMultiPageInfo( $file, $formLength );
if ( $subtype == 'DJVU' ) {
wfDebug( __METHOD__ . ": found first subpage\n" );
- return $this->getPageInfo( $file, $length );
+ return $this->getPageInfo( $file );
}
$this->skipChunk( $file, $length - 4 );
} else {
return false;
}
- private function getPageInfo( $file, $formLength ) {
+ private function getPageInfo( $file ) {
list( $chunk, $length ) = $this->readChunk( $file );
if ( $chunk != 'INFO' ) {
wfDebug( __METHOD__ . ": expected INFO chunk, got '$chunk'\n" );
function pageTextCallback( $matches ) {
# Get rid of invalid UTF-8, strip control characters
- $val = htmlspecialchars( UtfNormal::cleanUp( stripcslashes( $matches[1] ) ) );
+ $val = htmlspecialchars( UtfNormal\Validator::cleanUp( stripcslashes( $matches[1] ) ) );
$val = str_replace( array( "\n", '�' ), array( ' ', '' ), $val );
return '<PAGE value="' . $val . '" />';
}
$xml .= Xml::tags(
'OBJECT',
array(
- #'data' => '',
- #'type' => 'image/x.djvu',
+ # 'data' => '',
+ # 'type' => 'image/x.djvu',
'height' => $m[2],
'width' => $m[1],
- #'usemap' => '',
+ # 'usemap' => '',
),
"\n" .
Xml::element( 'PARAM', array( 'name' => 'DPI', 'value' => $m[3] ) ) . "\n" .