Merge branch 'develop' into seeddms-5.1.x

This commit is contained in:
Uwe Steinmann 2016-04-07 08:38:27 +02:00
commit 8722b87727
8 changed files with 55 additions and 31 deletions

View File

@ -31,6 +31,7 @@
- take out last empty line from view/bootstrap/class.Search.php which causes a
header to be send to early (Closes: #252, #254)
- regular users with sufficient access rights may remove documents via webdav
- fix error in utils/indexer.php when new documents were indexed
--------------------------------------------------------------------------------
Changes in version 4.3.25

View File

@ -93,7 +93,9 @@ class SeedDMS_Preview_Previewer {
do {
$timeleft = $timeout - time();
$read = array($pipes[1]);
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, 200000);
$write = NULL;
$exeptions = NULL;
stream_select($read, $write, $exeptions, $timeleft, 200000);
if (!empty($read)) {
$output .= fread($pipes[1], 8192);

View File

@ -11,11 +11,11 @@
<email>uwe@steinmann.cx</email>
<active>yes</active>
</lead>
<date>2016-03-29</date>
<time>08:07:14</time>
<date>2016-04-05</date>
<time>15:17:11</time>
<version>
<release>1.1.7</release>
<api>1.1.7</api>
<release>1.1.8</release>
<api>1.1.8</api>
</version>
<stability>
<release>stable</release>
@ -23,12 +23,16 @@
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
<<<<<<< HEAD
- Converters to create preview images are no longer fixed. Those which has been hardcoded before remain the predefined converters, but they can also be changed.
- command for creating the preview will be called with a given timeout
add method getFilesize()
timeout for external commands can be passed to contructor of SeedDMS_Preview_Previewer
check if object passed to createPreview(), hasPreview() is not null
set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0
=======
pass variables to stream_select (required by php7)
>>>>>>> seeddms-5.0.x
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">
@ -185,5 +189,21 @@ timeout for external commands can be passed to contructor of SeedDMS_Preview_Pre
check if object passed to createPreview(), hasPreview() is not null
</notes>
</release>
<release>
<date>2016-03-29</date>
<time>08:07:14</time>
<version>
<release>1.1.7</release>
<api>1.1.7</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0
</notes>
</release>
</changelog>
</package>

View File

@ -98,7 +98,7 @@ $notifier = new SeedDMS_NotificationService();
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
if(method_exists($notificationObj, 'preAddService')) {
$notificationObj->postAddService($dms, $settings, $notifier);
$notificationObj->preAddService($notifier);
}
}
}
@ -110,7 +110,7 @@ if($settings->_enableEmail) {
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
if(method_exists($notificationObj, 'postAddService')) {
$notificationObj->postAddService($dms, $settings, $notifier);
$notificationObj->postAddService($notifier);
}
}
}

View File

@ -69,21 +69,13 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
* @return false or -1 in case of error, otherwise true
*/
function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */
global $settings;
if ($recipient->isDisabled() || $recipient->getEmail()=="") return 0;
if(!is_object($recipient) && strcasecmp(get_class($recipient), "SeedDMS_Core_User")) {
if(!is_object($recipient) || strcasecmp(get_class($recipient), $this->_dms->getClassname('user'))) {
return -1;
}
if (is_object($sender) && !strcasecmp(get_class($sender), "SeedDMS_Core_User")) {
$from = $sender->getFullName() ." <". $sender->getEmail() .">";
} elseif(is_string($sender) && trim($sender) != "") {
$from = $sender;
} else
return -1;
if(is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) {
if(is_object($sender) && !strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) {
$from = $sender->getFullName() ." <". $sender->getEmail() .">";
} elseif(is_string($sender) && trim($sender) != "") {
$from = $sender;
@ -129,8 +121,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
} /* }}} */
function toGroup($sender, $groupRecipient, $subject, $message, $params=array()) { /* {{{ */
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
(!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "SeedDMS_Core_Group"))) {
if ((!is_object($sender) && strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) ||
(!is_object($groupRecipient) || strcasecmp(get_class($groupRecipient), $this->_dms->getClassname('group')))) {
return -1;
}
@ -142,7 +134,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
} /* }}} */
function toList($sender, $recipients, $subject, $message, $params=array()) { /* {{{ */
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
if ((!is_object($sender) && strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) ||
(!is_array($recipients) && count($recipients)==0)) {
return -1;
}

View File

@ -2,7 +2,7 @@
// MyDMS. Document Management System
// Copyright (C) 2002-2005 Markus Westphal
// Copyright (C) 2006-2008 Malcolm Cowe
// Copyright (C) 2010 Matteo Lucarelli
// Copyright (C) 2010 Matteo Lucarelli
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by

View File

@ -98,13 +98,12 @@ function tree($dms, $index, $indexconf, $folder, $indent='') { /* {{{ */
if($created >= $content->getDate()) {
echo " (Document unchanged)\n";
} else {
if($index->delete($hit->id)) {
try {
$index->addDocument(new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, false, $settings->_cmdTimeout));
echo " (Document updated)\n";
} catch(Exception $e) {
echo " (Timeout)\n";
}
$index->delete($hit->id);
try {
$index->addDocument(new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, false, $settings->_cmdTimeout));
echo " (Document updated)\n";
} catch(Exception $e) {
echo " (Timeout)\n";
}
}
}

View File

@ -330,9 +330,19 @@ $(document).ready(function () {
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".($this->params['session']->getSu() ? getMLText("switched_to") : getMLText("signed_in_as"))." '".htmlspecialchars($this->params['user']->getFullName())."' <i class=\"icon-caret-down\"></i></a>\n";
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
if (!$this->params['user']->isGuest()) {
echo " <li><a href=\"../out/out.MyDocuments.php?inProcess=1\">".getMLText("my_documents")."</a></li>\n";
echo " <li><a href=\"../out/out.MyAccount.php\">".getMLText("my_account")."</a></li>\n";
echo " <li><a href=\"../out/out.TransmittalMgr.php\">".getMLText("my_transmittals")."</a></li>\n";
$menuitems = array();
$menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents');
$menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account');
$menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals');
$hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap');
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'userMenuItems')) {
$menuitems = $hookObj->userMenuItems($this, $menuitems);
}
}
foreach($menuitems as $menuitem) {
echo "<li><a href=\"".$menuitem['link']."\">".getMLText($menuitem['label'])."</a></li>";
}
echo " <li class=\"divider\"></li>\n";
}
$showdivider = false;