* @return bool
*/
function validateParam( $name, $value ) {
- if ( $name === 'page' && trim( $value ) !== (string) intval( $value ) ) {
+ if ( $name === 'page' && trim( $value ) !== (string)intval( $value ) ) {
// Extra junk on the end of page, probably actually a caption
// e.g. [[File:Foo.djvu|thumb|Page 3 of the document shows foo]]
return false;
$cmd .= " | {$wgDjvuPostProcessor}";
}
$cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1';
- wfProfileIn( 'ddjvu' );
wfDebug( __METHOD__ . ": $cmd\n" );
$retval = '';
$err = wfShellExec( $cmd, $retval );
- wfProfileOut( 'ddjvu' );
$removed = $this->removeBadFile( $dstPath, $retval );
if ( $retval != 0 || $removed ) {
*
* @param File $file The DjVu file in question
* @return string XML metadata as a string.
+ * @throws MWException
*/
private function getUnserializedMetadata( File $file ) {
$metadata = $file->getMetadata();
return false;
}
- wfProfileIn( __METHOD__ );
wfSuppressWarnings();
try {
wfDebug( "Bogus multipage XML metadata on '{$image->getName()}'\n" );
}
wfRestoreWarnings();
- wfProfileOut( __METHOD__ );
if ( $gettext ) {
return $image->djvuTextTree;
} else {