* @ingroup Media
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
/**
* Handler for DjVu images
# Use a subshell (brackets) to aggregate stderr from both pipeline commands
# before redirecting it to the overall stdout. This works in both Linux and Windows XP.
- $cmd = '(' . wfEscapeShellArg(
+ $cmd = '(' . Shell::escape(
$wgDjvuRenderer,
"-format=ppm",
"-page={$page}",
if ( $wgDjvuPostProcessor ) {
$cmd .= " | {$wgDjvuPostProcessor}";
}
- $cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1';
+ $cmd .= ' > ' . Shell::escape( $dstPath ) . ') 2>&1';
wfDebug( __METHOD__ . ": $cmd\n" );
$retval = '';
$err = wfShellExec( $cmd, $retval );
* @param File|FSFile $image
* @param string $path
* @return DjVuImage
+ * @suppress PhanUndeclaredProperty Custom property
*/
function getDjVuImage( $image, $path ) {
if ( !$image ) {
* @param File $image
* @param bool $gettext DOCUMENT (Default: false)
* @return bool|SimpleXMLElement
+ * @suppress PhanUndeclaredProperty Custom property
*/
public function getMetaTree( $image, $gettext = false ) {
if ( $gettext && isset( $image->djvuTextTree ) ) {