Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F10770547
WithExecutablesPathsFix.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
940 B
Referenced Files
None
Subscribers
None
WithExecutablesPathsFix.php
View Options
<?php
namespace
Nasqueron\SAAS\MediaWiki
;
trait
WithExecutablesPathsFix
{
/**
* Add settings to set binary paths for executables.
*
* By default MediaWiki hardcodes Linux-centric paths for binaries.
* Other OSes could store elsewhere binaries, like in /usr/local/bin
*
* @param array $settings
* @param string $path
*/
public
static
function
fixExecutablePaths
(
array
&
$settings
,
string
$path
)
{
foreach
(
self
::
getExecutables
()
as
$setting
=>
$executable
)
{
$settings
[
$setting
][
'default'
]
=
$path
.
'/'
.
$executable
;
}
}
private
static
function
getExecutables
():
array
{
return
[
"wgExiftool"
=>
"exiftool"
,
"wgExiv2Command"
=>
"exiv2"
,
"wgGitBin"
=>
"git"
,
"wgImageMagickConvertCommand"
=>
"convert"
,
"wgJpegTran"
=>
"jpegtran"
,
"wgPhpCli"
=>
"php"
,
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jul 28, 09:46 (1 d, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2838386
Default Alt Text
WithExecutablesPathsFix.php (940 B)
Attached To
Mode
rSAASMW SaaS MediaWiki
Attached
Detach File
Event Timeline
Log In to Comment