mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
commands for creating previews can be set
This commit is contained in:
parent
1d8743fd7f
commit
1d21c18aa3
|
@ -194,12 +194,24 @@ if ($action == "saveSettings")
|
|||
$settings->_maxExecutionTime = intval($_POST["maxExecutionTime"]);
|
||||
$settings->_cmdTimeout = (intval($_POST["cmdTimeout"]) > 0) ?intval($_POST["cmdTimeout"]) : 1;
|
||||
|
||||
// SETTINGS - ADVANCED - INDEX CMD
|
||||
$settings->_converters['fulltext'] = $_POST["converters"];
|
||||
$newmimetype = preg_replace('#[^A-Za-z0-9_/+.*-]+#', '', $_POST["converters_newmimetype"]);
|
||||
if($newmimetype && trim($_POST["converters_newcmd"])) {
|
||||
$settings->_converters['fulltext'][$newmimetype] = trim($_POST["converters_newcmd"]);
|
||||
}
|
||||
// SETTINGS - ADVANCED - INDEX CMD
|
||||
if(isset($_POST["converters"]["fulltext"]))
|
||||
$settings->_converters['fulltext'] = $_POST["converters"]["fulltext"];
|
||||
else
|
||||
$settings->_converters['fulltext'] = $_POST["converters"];
|
||||
$newmimetype = preg_replace('#[^A-Za-z0-9_/+.*-]+#', '', $settings->_converters["fulltext"]["newmimetype"]);
|
||||
if($newmimetype && trim($settings->_converters['fulltext']['newcmd']))
|
||||
$settings->_converters['fulltext'][$newmimetype] = trim($settings->_converters['fulltext']['newcmd']);
|
||||
unset($settings->_converters['fulltext']['newmimetype']);
|
||||
unset($settings->_converters['fulltext']['newcmd']);
|
||||
|
||||
if(isset($_POST["converters"]["preview"]))
|
||||
$settings->_converters['preview'] = $_POST["converters"]["preview"];
|
||||
$newmimetype = preg_replace('#[^A-Za-z0-9_/+.*-]+#', '', $settings->_converters["preview"]["newmimetype"]);
|
||||
if($newmimetype && trim($settings->_converters['preview']['newcmd']))
|
||||
$settings->_converters['preview'][$newmimetype] = trim($settings->_converters['preview']['newcmd']);
|
||||
unset($settings->_converters['preview']['newmimetype']);
|
||||
unset($settings->_converters['preview']['newcmd']);
|
||||
|
||||
// SETTINGS - EXTENSIONS
|
||||
$settings->_extensions = isset($_POST["extensions"]) ? $_POST["extensions"] : array();
|
||||
|
|
|
@ -740,20 +740,37 @@ if(!is_writeable($settings->_configFilePath)) {
|
|||
?>
|
||||
<tr title="<?php echo $mimetype;?>">
|
||||
<td><?php echo $mimetype;?>:</td>
|
||||
<td><?php $this->showTextField("converters[".$mimetype."]", htmlspecialchars($cmd)); ?></td>
|
||||
<td><?php $this->showTextField("converters[fulltext][".$mimetype."]", htmlspecialchars($cmd)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr title="">
|
||||
<td><?php $this->showTextField("converters_newmimetype", "", '', getMLText('mimetype')); ?></td>
|
||||
<td><?php $this->showTextField("converters_newcmd", "", '', getMLText('command')); ?></td>
|
||||
<td><?php $this->showTextField("converters[fulltext][newmimetype]", "", '', getMLText('converter_new_mimetype')); ?>:</td>
|
||||
<td><?php $this->showTextField("converters[fulltext][newcmd]", "", "", getMLText('converter_new_cmd')); ?></td>
|
||||
</tr>
|
||||
<tr ><td><b> <?php printMLText("preview_converters");?></b></td> </tr>
|
||||
<?php
|
||||
if(isset($settings->_converters['preview'])) {
|
||||
foreach($settings->_converters['preview'] as $mimetype=>$cmd) {
|
||||
?>
|
||||
<tr title="<?php echo $mimetype;?>">
|
||||
<td><?php echo $mimetype;?>:</td>
|
||||
<td><?php $this->showTextField("converters[preview][".$mimetype."]", htmlspecialchars($cmd)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr title="">
|
||||
<td><?php $this->showTextField("converters[preview][newmimetype]", "", '', getMLText('mimetype')); ?>:</td>
|
||||
<td><?php $this->showTextField("converters[preview][newcmd]", "", '', getMLText('command')); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $this->contentContainerEnd(); ?>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane <?php if($currenttab == 'extensions') echo 'active'; ?>" id="extensions">
|
||||
<div class="tab-pane <?php if($currenttab == 'extensions') echo 'active'; ?>" id="extensions">
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<table class="table-condensed">
|
||||
<!--
|
||||
|
@ -762,7 +779,7 @@ if(!is_writeable($settings->_configFilePath)) {
|
|||
<?php
|
||||
foreach($GLOBALS['EXT_CONF'] as $extname=>$extconf) {
|
||||
?>
|
||||
<tr><td><a name="<?php echo $extname;?>"></a><b><?php echo $extconf['title'];?></b></td></tr>
|
||||
<tr><td><a name="<?php echo $extname;?>"></a><b><?php echo $extconf['title'];?></b></td></tr>
|
||||
<?php
|
||||
foreach($extconf['config'] as $confkey=>$conf) {
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user