Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25243467
WithExecutablesPathsFix.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
941 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
Thu, Apr 9, 01:51 (22 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3603726
Default Alt Text
WithExecutablesPathsFix.php (941 B)
Attached To
Mode
rSAASMW SaaS MediaWiki
Attached
Detach File
Event Timeline
Log In to Comment