Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F581535
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, 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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment