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, Mar 31, 15:04 (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e5/c3/806fc4aa3815444c92d1bbc878f3
Default Alt Text
DjVuSupport.php (846 B)

Event Timeline