mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
b701313e0e
Summary: Groups setup issues into Important, PHP, MySQL, and Base for easier parsing on initial installations. Test Plan: Test my internal server and various issues. {F289699} Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7207 Differential Revision: https://secure.phabricator.com/D11726
27 lines
906 B
PHP
27 lines
906 B
PHP
<?php
|
|
|
|
final class PhabricatorImagemagickSetupCheck extends PhabricatorSetupCheck {
|
|
|
|
public function getDefaultGroup() {
|
|
return self::GROUP_OTHER;
|
|
}
|
|
|
|
protected function executeChecks() {
|
|
$imagemagick = PhabricatorEnv::getEnvConfig('files.enable-imagemagick');
|
|
if ($imagemagick) {
|
|
if (!Filesystem::binaryExists('convert')) {
|
|
$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)
|
|
->addRelatedPhabricatorConfig('files.enable-imagemagick')
|
|
->addPhabricatorConfig('environment.append-paths');
|
|
}
|
|
}
|
|
}
|
|
}
|