Page MenuHomeWickedGov Phorge

DjVuSupport.php
No OneTemporary

Size
846 B
Referenced Files
None
Subscribers
None

DjVuSupport.php

<?php
/**
* @license GPL-2.0-or-later
* @file
* @ingroup Testing
*/
/**
* Initialize and detect the DjVu files support
*/
class DjVuSupport {
/**
* Initialises DjVu tools global with default values
*/
public function __construct() {
global $wgDjvuRenderer, $wgDjvuDump, $wgFileExtensions, $wgDjvuTxt;
$wgDjvuRenderer = $wgDjvuRenderer ?: '/usr/bin/ddjvu';
$wgDjvuDump = $wgDjvuDump ?: '/usr/bin/djvudump';
$wgDjvuTxt = $wgDjvuTxt ?: '/usr/bin/djvutxt';
if ( !in_array( 'djvu', $wgFileExtensions ) ) {
$wgFileExtensions[] = 'djvu';
}
}
/**
* Returns true if the DjVu tools are usable
*
* @return bool
*/
public function isEnabled() {
global $wgDjvuRenderer, $wgDjvuDump, $wgDjvuTxt;
return is_executable( $wgDjvuRenderer )
&& is_executable( $wgDjvuDump )
&& is_executable( $wgDjvuTxt );
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Dec 8, 02:12 (1 d, 22 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3f/52/472604c6434a4ee95d804d3a69fc
Default Alt Text
DjVuSupport.php (846 B)

Event Timeline