mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
266ae182f0
|
@ -210,6 +210,7 @@
|
||||||
- fix php error setting mandatory workflow when uploading documents via webdav
|
- fix php error setting mandatory workflow when uploading documents via webdav
|
||||||
- typeahead search for folders can search in subfolders
|
- typeahead search for folders can search in subfolders
|
||||||
- new theme based on bootstrap 4, including many improvements on small displays
|
- new theme based on bootstrap 4, including many improvements on small displays
|
||||||
|
- propperly check for translation of html email body (Closes: #510)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.22
|
Changes in version 5.1.22
|
||||||
|
|
|
@ -40,9 +40,11 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
||||||
protected $cmd;
|
protected $cmd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Run a shell command
|
||||||
|
*
|
||||||
* @param $cmd
|
* @param $cmd
|
||||||
* @param int $timeout
|
* @param int $timeout
|
||||||
* @return string
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
||||||
|
@ -54,7 +56,11 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
||||||
$pipes = array();
|
$pipes = array();
|
||||||
|
|
||||||
$timeout += time();
|
$timeout += time();
|
||||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
// Putting an 'exec' before the command will not fork the command
|
||||||
|
// and therefore not create any child process. proc_terminate will
|
||||||
|
// then reliably terminate the cmd and not just shell. See notes of
|
||||||
|
// https://www.php.net/manual/de/function.proc-terminate.php
|
||||||
|
$process = proc_open('exec '.$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);
|
||||||
}
|
}
|
||||||
|
@ -79,11 +85,15 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
||||||
$timeleft = $timeout - time();
|
$timeleft = $timeout - time();
|
||||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||||
|
|
||||||
|
fclose($pipes[0]);
|
||||||
|
fclose($pipes[1]);
|
||||||
|
fclose($pipes[2]);
|
||||||
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);
|
||||||
} else {
|
} else {
|
||||||
return array('stdout'=>$output, 'stderr'=>$error);
|
$return_value = proc_close($process);
|
||||||
|
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2020-12-12</date>
|
<date>2021-05-10</date>
|
||||||
<time>08:55:43</time>
|
<time>08:55:43</time>
|
||||||
<version>
|
<version>
|
||||||
<release>1.1.16</release>
|
<release>1.1.17</release>
|
||||||
<api>1.1.16</api>
|
<api>1.1.17</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
- add indexing of folders
|
- close pipes in execWithTimeout(), also return exit code of command
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
@ -352,5 +352,21 @@ Index users with at least read access on the document
|
||||||
and SeedDMS_Lucene_Indexer::open()
|
and SeedDMS_Lucene_Indexer::open()
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
|
<release>
|
||||||
|
<date>2020-12-12</date>
|
||||||
|
<time>08:55:43</time>
|
||||||
|
<version>
|
||||||
|
<release>1.1.16</release>
|
||||||
|
<api>1.1.16</api>
|
||||||
|
</version>
|
||||||
|
<stability>
|
||||||
|
<release>stable</release>
|
||||||
|
<api>stable</api>
|
||||||
|
</stability>
|
||||||
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
|
<notes>
|
||||||
|
- add indexing of folders
|
||||||
|
</notes>
|
||||||
|
</release>
|
||||||
</changelog>
|
</changelog>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
@ -71,6 +71,14 @@ class SeedDMS_Preview_Base {
|
||||||
$this->xsendfile = $xsendfile;
|
$this->xsendfile = $xsendfile;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run a shell command
|
||||||
|
*
|
||||||
|
* @param $cmd
|
||||||
|
* @param int $timeout
|
||||||
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
static function execWithTimeout($cmd, $timeout=5) { /* {{{ */
|
static function execWithTimeout($cmd, $timeout=5) { /* {{{ */
|
||||||
$descriptorspec = array(
|
$descriptorspec = array(
|
||||||
0 => array("pipe", "r"),
|
0 => array("pipe", "r"),
|
||||||
|
@ -109,11 +117,15 @@ class SeedDMS_Preview_Base {
|
||||||
$timeleft = $timeout - time();
|
$timeleft = $timeout - time();
|
||||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||||
|
|
||||||
|
fclose($pipes[0]);
|
||||||
|
fclose($pipes[1]);
|
||||||
|
fclose($pipes[2]);
|
||||||
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);
|
||||||
} else {
|
} else {
|
||||||
return array('stdout'=>$output, 'stderr'=>$error);
|
$return_value = proc_close($process);
|
||||||
|
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
$new = false;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<date>2020-12-23</date>
|
<date>2020-12-23</date>
|
||||||
<time>09:49:39</time>
|
<time>09:49:39</time>
|
||||||
<version>
|
<version>
|
||||||
<release>1.3.2</release>
|
<release>1.3.3</release>
|
||||||
<api>1.3.1</api>
|
<api>1.3.3</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -23,8 +23,9 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
set header Content-Length
|
- close pipes in execWithTimeout(), also return exit code of command
|
||||||
update package description
|
- createPreview() has optional parameter by referenz to return true if a
|
||||||
|
preview image was actually created
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
@ -453,5 +454,22 @@ add new methode getPreviewFile()
|
||||||
add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview()
|
add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview()
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
|
<release>
|
||||||
|
<date>2020-12-23</date>
|
||||||
|
<time>09:49:39</time>
|
||||||
|
<version>
|
||||||
|
<release>1.3.2</release>
|
||||||
|
<api>1.3.1</api>
|
||||||
|
</version>
|
||||||
|
<stability>
|
||||||
|
<release>stable</release>
|
||||||
|
<api>stable</api>
|
||||||
|
</stability>
|
||||||
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
|
<notes>
|
||||||
|
set header Content-Length
|
||||||
|
update package description
|
||||||
|
</notes>
|
||||||
|
</release>
|
||||||
</changelog>
|
</changelog>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
@ -44,6 +44,14 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
||||||
*/
|
*/
|
||||||
protected $cmd;
|
protected $cmd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run a shell command
|
||||||
|
*
|
||||||
|
* @param $cmd
|
||||||
|
* @param int $timeout
|
||||||
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
||||||
$descriptorspec = array(
|
$descriptorspec = array(
|
||||||
0 => array("pipe", "r"),
|
0 => array("pipe", "r"),
|
||||||
|
@ -53,7 +61,11 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
||||||
$pipes = array();
|
$pipes = array();
|
||||||
|
|
||||||
$timeout += time();
|
$timeout += time();
|
||||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
// Putting an 'exec' before the command will not fork the command
|
||||||
|
// and therefore not create any child process. proc_terminate will
|
||||||
|
// then reliably terminate the cmd and not just shell. See notes of
|
||||||
|
// https://www.php.net/manual/de/function.proc-terminate.php
|
||||||
|
$process = proc_open('exec '.$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);
|
||||||
}
|
}
|
||||||
|
@ -78,11 +90,15 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
||||||
$timeleft = $timeout - time();
|
$timeleft = $timeout - time();
|
||||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||||
|
|
||||||
|
fclose($pipes[0]);
|
||||||
|
fclose($pipes[1]);
|
||||||
|
fclose($pipes[2]);
|
||||||
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);
|
||||||
} else {
|
} else {
|
||||||
return array('stdout'=>$output, 'stderr'=>$error);
|
$return_value = proc_close($process);
|
||||||
|
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2021-04-19</date>
|
<date>2021-05-10</date>
|
||||||
<time>08:57:44</time>
|
<time>08:57:44</time>
|
||||||
<version>
|
<version>
|
||||||
<release>1.0.16</release>
|
<release>1.0.16</release>
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
|
- close pipes in execWithTimeout(), also return exit code of command
|
||||||
- add support for fts5 (make it the default)
|
- add support for fts5 (make it the default)
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
|
|
|
@ -133,7 +133,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
||||||
}
|
}
|
||||||
|
|
||||||
$bodyhtml = '';
|
$bodyhtml = '';
|
||||||
if(isset($params['__body_html__']) || getMLText($messagekey.'_html')) {
|
if(isset($params['__body_html__']) || getMLText($messagekey.'_html', $params, "", $lang)) {
|
||||||
if(!isset($params['__skip_header__']) || !$params['__skip_header__']) {
|
if(!isset($params['__skip_header__']) || !$params['__skip_header__']) {
|
||||||
if(!isset($params['__header_html__']))
|
if(!isset($params['__header_html__']))
|
||||||
$bodyhtml .= getMLText("email_header_html", $params, "", $lang)."\r\n\r\n";
|
$bodyhtml .= getMLText("email_header_html", $params, "", $lang)."\r\n\r\n";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user