mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-11-27 17:50:47 +00:00
Centralise configuration of Shellbox /bin/sh location
Use $wgShellboxShell, introduced for this purpose in If41a2baada2e4e2462518c1f437af458feb29632. Change-Id: Ic35598f26a868624a8b2e37ab064a6c0c27e392f
This commit is contained in:
parent
5387c2f968
commit
1e1e7ef135
|
@ -9,7 +9,7 @@
|
||||||
"license-name": "GPL-2.0-or-later",
|
"license-name": "GPL-2.0-or-later",
|
||||||
"type": "media",
|
"type": "media",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.41"
|
"MediaWiki": ">= 1.42"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"PdfOutputExtension": {
|
"PdfOutputExtension": {
|
||||||
|
@ -32,9 +32,6 @@
|
||||||
},
|
},
|
||||||
"PdfInfo": {
|
"PdfInfo": {
|
||||||
"value": "/usr/bin/pdfinfo"
|
"value": "/usr/bin/pdfinfo"
|
||||||
},
|
|
||||||
"PdfHandlerShell": {
|
|
||||||
"value": "/bin/sh"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"MessagesDirs": {
|
"MessagesDirs": {
|
||||||
|
|
|
@ -104,7 +104,7 @@ class PdfImage {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function retrieveMetaData(): array {
|
public function retrieveMetaData(): array {
|
||||||
global $wgPdfInfo, $wgPdftoText, $wgPdfHandlerShell;
|
global $wgPdfInfo, $wgPdftoText, $wgShellboxShell;
|
||||||
|
|
||||||
$command = MediaWikiServices::getInstance()->getShellCommandFactory()
|
$command = MediaWikiServices::getInstance()->getShellCommandFactory()
|
||||||
->createBoxed( 'pdfhandler' )
|
->createBoxed( 'pdfhandler' )
|
||||||
|
@ -113,7 +113,7 @@ class PdfImage {
|
||||||
->routeName( 'pdfhandler-metadata' );
|
->routeName( 'pdfhandler-metadata' );
|
||||||
|
|
||||||
$result = $command
|
$result = $command
|
||||||
->params( $wgPdfHandlerShell, 'scripts/retrieveMetaData.sh' )
|
->params( $wgShellboxShell, 'scripts/retrieveMetaData.sh' )
|
||||||
->inputFileFromFile(
|
->inputFileFromFile(
|
||||||
'scripts/retrieveMetaData.sh',
|
'scripts/retrieveMetaData.sh',
|
||||||
__DIR__ . '/../scripts/retrieveMetaData.sh' )
|
__DIR__ . '/../scripts/retrieveMetaData.sh' )
|
||||||
|
|
Loading…
Reference in a new issue