mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 21:41:23 +00:00
add new conf options when to consider ext. cmd has failed
This commit is contained in:
parent
0265eae5fd
commit
2ce38aa242
|
|
@ -323,6 +323,10 @@ class Settings { /* {{{ */
|
|||
var $_maxExecutionTime = null;
|
||||
// command timeout
|
||||
var $_cmdTimeout = 5;
|
||||
// command failure on stderr has content
|
||||
var $_cmdFailOnStderr = true;
|
||||
// command failure on return code != 0
|
||||
var $_cmdFailOnRetcode = false;
|
||||
// debug mode
|
||||
var $_enableDebugMode = false;
|
||||
// Preview image width in lists
|
||||
|
|
@ -863,6 +867,8 @@ class Settings { /* {{{ */
|
|||
$this->_maxExecutionTime = intval($tab["maxExecutionTime"]);
|
||||
else
|
||||
$this->_maxExecutionTime = ini_get("max_execution_time");
|
||||
$this->_cmdFailOnStderr = Settings::boolval($tab["cmdFailOnStderr"]);
|
||||
$this->_cmdFailOnRetcode = Settings::boolval($tab["cmdFailOnRetcode"]);
|
||||
$this->_enableDebugMode = Settings::boolval($tab["enableDebugMode"]);
|
||||
}
|
||||
|
||||
|
|
@ -1229,6 +1235,8 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "updateNotifyTime", $this->_updateNotifyTime);
|
||||
$this->setXMLAttributValue($node, "maxExecutionTime", $this->_maxExecutionTime);
|
||||
$this->setXMLAttributValue($node, "cmdTimeout", $this->_cmdTimeout);
|
||||
$this->setXMLAttributValue($node, "cmdFailOnStderr", $this->_cmdFailOnStderr);
|
||||
$this->setXMLAttributValue($node, "cmdFailOnRetcode", $this->_cmdFailOnRetcode);
|
||||
$this->setXMLAttributValue($node, "enableDebugMode", $this->_enableDebugMode);
|
||||
|
||||
/* Check if there is still a converters list with a target attribute */
|
||||
|
|
|
|||
|
|
@ -285,6 +285,8 @@ if ($action == "saveSettings")
|
|||
setIntValue("maxExecutionTime");
|
||||
if(isset($_POST['cmdTimeout']) && !in_array('cmdTimeout', $settings->_hiddenConfFields))
|
||||
$settings->_cmdTimeout = (intval($_POST["cmdTimeout"]) > 0) ?intval($_POST["cmdTimeout"]) : 5;
|
||||
setBoolValue("cmdFailOnStderr");
|
||||
setBoolValue("cmdFailOnRetcode");
|
||||
setBoolValue("enableDebugMode");
|
||||
|
||||
// SETTINGS - ADVANCED - INDEX CMD
|
||||
|
|
|
|||
|
|
@ -880,7 +880,8 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigText('settings_updateNotifyTime', 'updateNotifyTime'); ?>
|
||||
<?php $this->showConfigText('settings_maxExecutionTime', 'maxExecutionTime'); ?>
|
||||
<?php $this->showConfigText('settings_cmdTimeout', 'cmdTimeout'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_enableDebugMode', 'enableDebugMode'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_cmdFailOnStderr', 'cmdFailOnStderr'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_cmdFailOnRetcode', 'cmdFailOnRetcode'); ?>
|
||||
|
||||
<?php
|
||||
foreach(array('fulltext', 'preview', 'pdf') as $target) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user