Commit 4db51ad9 authored by Henning Leutz's avatar Henning Leutz 🥋

feat: it is now possible to specify in the media settings which image library is used

parent b5866929
......@@ -10,6 +10,30 @@
</thead>
<tbody>
<tr>
<td>
<label class="field-container">
<span class="field-container-item">
{locale
group="quiqqer/quiqqer"
var="projects.project.settings.panel.mediaSettings.imageLibrary"
}
</span>
<select type="checkbox" name="media_image_library" class="field-container-field">
<option value="">
{locale
group="quiqqer/quiqqer"
var="projects.project.settings.panel.mediaSettings.imageLibrary.auto"
}
</option>
<option value="imagick">Image Magick</option>
<option value="gd">GD Lib</option>
</select>
</label>
</td>
</tr>
<tr>
<td>
<label class="field-container">
......
......@@ -212,7 +212,20 @@ class Media extends QUI\QDOM
*/
public function getImageManager()
{
if (class_exists('Imagick')) {
$Project = $this->getProject();
$library = $Project->getConfig('media_image_library');
switch ($library) {
case '':
case 'imagick':
case 'gd':
break;
default:
$library = '';
}
if (class_exists('Imagick') && ($library === '' || $library === 'imagick')) {
return new ImageManager(['driver' => 'imagick']);
}
......
......@@ -193,6 +193,12 @@
<locale name="projects.project.settings.panel.favicon">
<de><![CDATA[Favicon]]></de>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.imageLibrary">
<de><![CDATA[Verwendete Bildbibliothek]]></de>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.imageLibrary.auto">
<de><![CDATA[QUIQQER bestimmt welche Bibliothek verwendet wird.]]></de>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.createCacheOnSave">
<de><![CDATA[Bildercache on the Fly erstellen.]]></de>
</locale>
......
......@@ -193,6 +193,12 @@
<locale name="projects.project.settings.panel.favicon">
<en><![CDATA[Favicon]]></en>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.imageLibrary">
<en><![CDATA[Used image library]]></en>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.imageLibrary.auto">
<en><![CDATA[QUIQQER determines which library is used.]]></en>
</locale>
<locale name="projects.project.settings.panel.mediaSettings.createCacheOnSave">
<en><![CDATA[Create image cache on the fly.]]></en>
</locale>
......@@ -5241,7 +5247,8 @@
]]></de>
</locale>
<locale name="templates.mail.body.footer.text" html="true">
<de><![CDATA[<p style="padding: 0; margin: 0;">&copy; [year]<br/>Visit <a href="https://www.quiqqer.com">QUIQQER</a> website</p>]]></de>
<de>
<![CDATA[<p style="padding: 0; margin: 0;">&copy; [year]<br/>Visit <a href="https://www.quiqqer.com">QUIQQER</a> website</p>]]></de>
</locale>
<locale name="templates.mail.body.footer.social" html="true">
<de><![CDATA[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment