1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/config/check/PhabricatorSetupCheckImagemagick.php

26 lines
844 B
PHP
Raw Normal View History

<?php
final class PhabricatorSetupCheckImagemagick extends PhabricatorSetupCheck {
protected function executeChecks() {
$imagemagick = PhabricatorEnv::getEnvConfig('files.enable-imagemagick');
if ($imagemagick) {
list($err) = exec_manual('which convert');
if ($err) {
$message = pht(
'You have enabled Imagemagick in your config, but the \'convert\''.
' binary is not in the webserver\'s $PATH. Disable imagemagick'.
' or make it available to the webserver.');
$this->newIssue('files.enable-imagemagick')
->setName(pht(
"'convert' binary not found or Imagemagick is not installed."))
->setMessage($message)
->addPhabricatorConfig('files.enable-imagemagick')
->addPhabricatorConfig('environment.append-paths');
}
}
}
}