mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
remove some empty lines
This commit is contained in:
parent
82ca6f8302
commit
a1ca5991d8
|
@ -64,13 +64,13 @@ class SeedDMS_Preview_Base {
|
||||||
2 => array("pipe", "w")
|
2 => array("pipe", "w")
|
||||||
);
|
);
|
||||||
$pipes = array();
|
$pipes = array();
|
||||||
|
|
||||||
$timeout += time();
|
$timeout += time();
|
||||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
$process = proc_open($cmd, $descriptorspec, $pipes);
|
||||||
if (!is_resource($process)) {
|
if (!is_resource($process)) {
|
||||||
throw new Exception("proc_open failed on: " . $cmd);
|
throw new Exception("proc_open failed on: " . $cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
$timeleft = $timeout - time();
|
$timeleft = $timeout - time();
|
||||||
$read = array($pipes[1]);
|
$read = array($pipes[1]);
|
||||||
|
@ -78,13 +78,13 @@ class SeedDMS_Preview_Base {
|
||||||
$exeptions = NULL;
|
$exeptions = NULL;
|
||||||
do {
|
do {
|
||||||
stream_select($read, $write, $exeptions, $timeleft, 200000);
|
stream_select($read, $write, $exeptions, $timeleft, 200000);
|
||||||
|
|
||||||
if (!empty($read)) {
|
if (!empty($read)) {
|
||||||
$output .= fread($pipes[1], 8192);
|
$output .= fread($pipes[1], 8192);
|
||||||
}
|
}
|
||||||
$timeleft = $timeout - time();
|
$timeleft = $timeout - time();
|
||||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||||
|
|
||||||
if ($timeleft <= 0) {
|
if ($timeleft <= 0) {
|
||||||
proc_terminate($process);
|
proc_terminate($process);
|
||||||
throw new Exception("command timeout on: " . $cmd);
|
throw new Exception("command timeout on: " . $cmd);
|
||||||
|
@ -109,7 +109,7 @@ class SeedDMS_Preview_Base {
|
||||||
/**
|
/**
|
||||||
* Check if converter for a given mimetype is set
|
* Check if converter for a given mimetype is set
|
||||||
*
|
*
|
||||||
* @param string $mimetype
|
* @param string $mimetype
|
||||||
* @return boolean true if converter exists, otherwise false
|
* @return boolean true if converter exists, otherwise false
|
||||||
*/
|
*/
|
||||||
function hasConverter($mimetype) { /* {{{ */
|
function hasConverter($mimetype) { /* {{{ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user