Centralise configuration of Shellbox /bin/sh location

Use $wgShellboxShell, introduced for this purpose in
If41a2baada2e4e2462518c1f437af458feb29632.

Change-Id: Ic35598f26a868624a8b2e37ab064a6c0c27e392f
This commit is contained in:
Tim Starling 2024-01-19 11:36:17 +11:00
parent 5387c2f968
commit 1e1e7ef135
2 changed files with 3 additions and 6 deletions

View file

@ -9,7 +9,7 @@
"license-name": "GPL-2.0-or-later",
"type": "media",
"requires": {
"MediaWiki": ">= 1.41"
"MediaWiki": ">= 1.42"
},
"config": {
"PdfOutputExtension": {
@ -32,9 +32,6 @@
},
"PdfInfo": {
"value": "/usr/bin/pdfinfo"
},
"PdfHandlerShell": {
"value": "/bin/sh"
}
},
"MessagesDirs": {

View file

@ -104,7 +104,7 @@ class PdfImage {
* @return array
*/
public function retrieveMetaData(): array {
global $wgPdfInfo, $wgPdftoText, $wgPdfHandlerShell;
global $wgPdfInfo, $wgPdftoText, $wgShellboxShell;
$command = MediaWikiServices::getInstance()->getShellCommandFactory()
->createBoxed( 'pdfhandler' )
@ -113,7 +113,7 @@ class PdfImage {
->routeName( 'pdfhandler-metadata' );
$result = $command
->params( $wgPdfHandlerShell, 'scripts/retrieveMetaData.sh' )
->params( $wgShellboxShell, 'scripts/retrieveMetaData.sh' )
->inputFileFromFile(
'scripts/retrieveMetaData.sh',
__DIR__ . '/../scripts/retrieveMetaData.sh' )