mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
cc341f6ed3
|
@ -228,6 +228,7 @@
|
||||||
- add hook additionalDocumentContentInfo
|
- add hook additionalDocumentContentInfo
|
||||||
- add restapi function 'statstotal'
|
- add restapi function 'statstotal'
|
||||||
- custom attributes of type 'date' regard the date format
|
- custom attributes of type 'date' regard the date format
|
||||||
|
- check extension dependency on shell commands
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.25
|
Changes in version 5.1.25
|
||||||
|
|
|
@ -445,6 +445,14 @@ class SeedDMS_Extension_Mgr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'cmd':
|
||||||
|
if(is_array($dval) && $dval) {
|
||||||
|
foreach($dval as $d) {
|
||||||
|
if(!commandExists($d))
|
||||||
|
$this->errmsgs[] = sprintf("Missing command '%s'", $d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$tmp = explode('-', $dval, 2);
|
$tmp = explode('-', $dval, 2);
|
||||||
if(isset($this->extconf[$dkey]['version'])) {
|
if(isset($this->extconf[$dkey]['version'])) {
|
||||||
|
|
|
@ -708,6 +708,37 @@ function formatComment($an) { /* {{{ */
|
||||||
return $t;
|
return $t;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determines if a command exists on the current environment
|
||||||
|
*
|
||||||
|
* @param string $command The command to check
|
||||||
|
* @return bool True if the command has been found ; otherwise, false.
|
||||||
|
*/
|
||||||
|
function commandExists ($command) {
|
||||||
|
$whereIsCommand = (PHP_OS == 'WINNT') ? 'where' : 'command -v';
|
||||||
|
|
||||||
|
$process = proc_open(
|
||||||
|
"$whereIsCommand $command",
|
||||||
|
array(
|
||||||
|
0 => array("pipe", "r"), //STDIN
|
||||||
|
1 => array("pipe", "w"), //STDOUT
|
||||||
|
2 => array("pipe", "w"), //STDERR
|
||||||
|
),
|
||||||
|
$pipes
|
||||||
|
);
|
||||||
|
if ($process !== false) {
|
||||||
|
$stdout = stream_get_contents($pipes[1]);
|
||||||
|
$stderr = stream_get_contents($pipes[2]);
|
||||||
|
fclose($pipes[1]);
|
||||||
|
fclose($pipes[2]);
|
||||||
|
proc_close($process);
|
||||||
|
|
||||||
|
return $stdout != '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a file from disk to the browser
|
* Send a file from disk to the browser
|
||||||
*
|
*
|
||||||
|
|
|
@ -65,6 +65,7 @@ if($view) {
|
||||||
$view->setParam('listtype', $listtype);
|
$view->setParam('listtype', $listtype);
|
||||||
$view->setParam('workflowmode', $settings->_workflowMode);
|
$view->setParam('workflowmode', $settings->_workflowMode);
|
||||||
$view->setParam('cachedir', $settings->_cacheDir);
|
$view->setParam('cachedir', $settings->_cacheDir);
|
||||||
|
$view->setParam('conversionmgr', $conversionmgr);
|
||||||
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
||||||
$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
|
$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
|
||||||
$view->setParam('timeout', $settings->_cmdTimeout);
|
$view->setParam('timeout', $settings->_cmdTimeout);
|
||||||
|
|
|
@ -125,8 +125,8 @@ $(document).ready( function() {
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$orderby = $this->params['orderby'];
|
$orderby = $this->params['orderby'];
|
||||||
$orderdir = $this->params['orderdir'];
|
$orderdir = $this->params['orderdir'];
|
||||||
$conversionmgr = $this->params['conversionmgr'];
|
|
||||||
$cachedir = $this->params['cachedir'];
|
$cachedir = $this->params['cachedir'];
|
||||||
|
$conversionmgr = $this->params['conversionmgr'];
|
||||||
$previewwidth = $this->params['previewWidthList'];
|
$previewwidth = $this->params['previewWidthList'];
|
||||||
$previewconverters = $this->params['previewConverters'];
|
$previewconverters = $this->params['previewConverters'];
|
||||||
$timeout = $this->params['timeout'];
|
$timeout = $this->params['timeout'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user