Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F8103447
DjVuSupport.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
846 B
Referenced Files
None
Subscribers
None
DjVuSupport.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment