MediaWiki REL1_32
DjVuSupport.php
Go to the documentation of this file.
1<?php
2
27
31 public function __construct() {
33
34 $wgDjvuRenderer = $wgDjvuRenderer ?: '/usr/bin/ddjvu';
35 $wgDjvuDump = $wgDjvuDump ?: '/usr/bin/djvudump';
36 $wgDjvuToXML = $wgDjvuToXML ?: '/usr/bin/djvutoxml';
37 $wgDjvuTxt = $wgDjvuTxt ?: '/usr/bin/djvutxt';
38
39 if ( !in_array( 'djvu', $wgFileExtensions ) ) {
40 $wgFileExtensions[] = 'djvu';
41 }
42 }
43
49 public function isEnabled() {
51
52 return is_executable( $wgDjvuRenderer )
53 && is_executable( $wgDjvuDump )
54 && is_executable( $wgDjvuToXML )
55 && is_executable( $wgDjvuTxt );
56 }
57}
$wgFileExtensions
This is the list of preferred extensions for uploading files.
$wgDjvuRenderer
Path of the ddjvu DJVU renderer Enable this and $wgDjvuDump to enable djvu rendering example: $wgDjvu...
$wgDjvuToXML
Path of the djvutoxml executable This works like djvudump except much, much slower as of version 3....
$wgDjvuTxt
Path of the djvutxt DJVU text extraction utility Enable this and $wgDjvuDump to enable text layer ext...
$wgDjvuDump
Path of the djvudump executable Enable this and $wgDjvuRenderer to enable djvu rendering example: $wg...
Initialize and detect the DjVu files support.
isEnabled()
Returns true if the DjVu tools are usable.
__construct()
Initialises DjVu tools global with default values.