mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-24 22:25:09 +03:00
The backtick (`) operator is deprecated, use shell_exec() instead
This commit is contained in:
parent
c9f7d27551
commit
e1e94c815d
4 changed files with 9 additions and 9 deletions
|
|
@ -9,7 +9,7 @@ if (isset($options['plugins'])) {
|
|||
require(ROOT_DIR . '/build/plugins.php');
|
||||
}
|
||||
|
||||
$gulp = trim(`which gulp`);
|
||||
$gulp = trim(shell_exec('which gulp'));
|
||||
if (!$gulp) {
|
||||
exit('gulp not installed, run as root: npm install --global gulp-cli');
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ $options['aur'] = isset($options['aur']);
|
|||
|
||||
// Docker build
|
||||
$options['docker'] = isset($options['docker']);
|
||||
if ($options['docker'] && !($docker = trim(`which docker`))) {
|
||||
if ($options['docker'] && !($docker = trim(shell_exec('which docker')))) {
|
||||
exit('docker not found');
|
||||
}
|
||||
if ($options['docker'] && $options['aur']) {
|
||||
|
|
@ -60,7 +60,7 @@ if (!isset($options['skip-gulp'])) {
|
|||
|
||||
$cmddir = escapeshellcmd(ROOT_DIR) . '/snappymail/v/0.0.0/static';
|
||||
|
||||
if ($gzip = trim(`which gzip`)) {
|
||||
if ($gzip = trim(shell_exec('which gzip'))) {
|
||||
echo "\x1b[33;1m === Gzip *.js and *.css === \x1b[0m\n";
|
||||
passthru("{$gzip} -k --best {$cmddir}/js/*.js");
|
||||
passthru("{$gzip} -k --best {$cmddir}/js/min/*.js");
|
||||
|
|
@ -70,7 +70,7 @@ if (!isset($options['skip-gulp'])) {
|
|||
unlink(ROOT_DIR . '/snappymail/v/0.0.0/static/js/min/boot.min.js.gz');
|
||||
}
|
||||
|
||||
if ($brotli = trim(`which brotli`)) {
|
||||
if ($brotli = trim(shell_exec('which brotli'))) {
|
||||
echo "\x1b[33;1m === Brotli *.js and *.css === \x1b[0m\n";
|
||||
passthru("{$brotli} -k --best {$cmddir}/js/*.js");
|
||||
passthru("{$brotli} -k --best {$cmddir}/js/min/*.js");
|
||||
|
|
@ -188,7 +188,7 @@ file_put_contents("{$destPath}core.json", '{
|
|||
// Arch User Repository
|
||||
if ($options['aur']) {
|
||||
// extension_loaded('blake2')
|
||||
if (!function_exists('b2sum') && $b2sum = trim(`which b2sum`)) {
|
||||
if (!function_exists('b2sum') && $b2sum = trim(shell_exec('which b2sum'))) {
|
||||
function b2sum($file) {
|
||||
$file = escapeshellarg($file);
|
||||
exec("b2sum --binary {$file} 2>&1", $output, $exitcode);
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ abstract class Base
|
|||
public function agent()
|
||||
{
|
||||
// $home = \escapeshellarg($this->options['homedir']);
|
||||
// echo `gpg-agent --daemon --homedir $home 2>&1`;
|
||||
// echo \shell_exec('gpg-agent --daemon --homedir $home 2>&1');
|
||||
}
|
||||
|
||||
protected function getPassphrase($key)
|
||||
|
|
@ -487,7 +487,7 @@ abstract class Base
|
|||
|
||||
protected static function findBinary($name) : ?string
|
||||
{
|
||||
$binary = \function_exists('shell_exec') ? \trim((string) `which $name`) : '';
|
||||
$binary = \function_exists('shell_exec') ? \trim((string) \shell_exec('which $name')) : '';
|
||||
if ($binary && \RainLoop\Utils::inOpenBasedir($binary) && \is_executable($binary)) {
|
||||
return $binary;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class SMIME extends Base
|
|||
// How to use gpgme-json ?
|
||||
$this->binary = static::findBinary('gpgsm');
|
||||
|
||||
$info = \preg_replace('/\R +/', ' ', `$this->binary --version`);
|
||||
$info = \preg_replace('/\R +/', ' ', \shell_exec("{$this->binary} --version"));
|
||||
if (\preg_match('/gpgsm.+([0-9]+\\.[0-9]+\\.[0-9]+)/', $info, $match)) {
|
||||
$this->version = $match[1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class OpenSSL
|
|||
}
|
||||
$input = $tmp;
|
||||
}
|
||||
`openssl asn1parse -in $input->filename()`
|
||||
\shell_exec('openssl asn1parse -in $input->filename()');
|
||||
}
|
||||
*/
|
||||
public function decrypt(/*string|Temporary*/ $input) : ?string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue