mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-26 01:34:09 -04:00
Improve the graphics toolkit detection code so that properly
identifies situations where its restricted by open_basedir. We now track more informatoin about the toolkit including the version and any errors we encountered while doing the detection so that we can provide more info downstream. This makes graphics::detect_toolkits() a little heavier, but that's ok because it should not be called very often. In the process, refactor the controller and view hierarchy so that it's a little more straightforward in the code. Fixes ticket #616.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->imagemagick ? " gInstalledToolkit" : " gUnavailable" ?>">
|
||||
<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>">
|
||||
<h3> <?= t("ImageMagick") ?> </h3>
|
||||
<img class="logo" width="114" height="118" src="<?= url::file("modules/gallery/images/imagemagick.jpg"); ?>" alt="<? t("Visit the ImageMagick project site") ?>" />
|
||||
<p>
|
||||
<?= t("ImageMagick is a standalone graphics program available on most Linux systems. Please refer to the <a href=\"%url\">ImageMagick website</a> for more information.",
|
||||
array("url" => "http://www.imagemagick.org")) ?>
|
||||
</p>
|
||||
<? if ($tk->imagemagick): ?>
|
||||
<? if ($tk->installed): ?>
|
||||
<p class="gSuccess">
|
||||
<?= t("ImageMagick is available in %path", array("path" => $tk->imagemagick)) ?>
|
||||
<?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?>
|
||||
</p>
|
||||
<p>
|
||||
<a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a>
|
||||
</p>
|
||||
<? else: ?>
|
||||
<p class="gInfo">
|
||||
<?= t("ImageMagick is not available on your system.") ?>
|
||||
<? elseif ($tk->error): ?>
|
||||
<p class="gWarning">
|
||||
<?= $tk->error ?>
|
||||
</p>
|
||||
<? endif ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user