Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2015-12-09 18:04:12 +01:00
commit 9c0fe92998
5 changed files with 15 additions and 7 deletions

View File

@ -2,6 +2,7 @@
Changes in version 4.3.23 Changes in version 4.3.23
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- send notification if document is delete to those users watching the folder - send notification if document is delete to those users watching the folder
- fix editing of customer attributes of type checkbox
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.22 Changes in version 4.3.22

View File

@ -1985,7 +1985,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
(strlen($userIDs) == 0 ? "" : " OR (`tblUsers`.`id` IN (". $userIDs ."))"). (strlen($userIDs) == 0 ? "" : " OR (`tblUsers`.`id` IN (". $userIDs ."))").
") ORDER BY `login`"; ") ORDER BY `login`";
} }
/* If default access is equal or greate then read, $userIDs and /* If default access is equal or greater then M_READ, $userIDs and
* $groupIDs contains a list of user without read access * $groupIDs contains a list of user without read access
*/ */
else { else {
@ -1995,16 +1995,22 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
"WHERE `tblGroupMembers`.`groupID` NOT IN (". $groupIDs .")". "WHERE `tblGroupMembers`.`groupID` NOT IN (". $groupIDs .")".
"AND `tblUsers`.`role` != ".SeedDMS_Core_User::role_guest." ". "AND `tblUsers`.`role` != ".SeedDMS_Core_User::role_guest." ".
(strlen($userIDs) == 0 ? "" : " AND (`tblUsers`.`id` NOT IN (". $userIDs ."))")." UNION "; (strlen($userIDs) == 0 ? "" : " AND (`tblUsers`.`id` NOT IN (". $userIDs ."))")." UNION ";
} else {
$queryStr .=
"SELECT `tblUsers`.* FROM `tblUsers` ".
"WHERE `tblUsers`.`role` != ".SeedDMS_Core_User::role_guest." ".
(strlen($userIDs) == 0 ? "" : " AND (`tblUsers`.`id` NOT IN (". $userIDs ."))")." UNION ";
} }
$queryStr .= $queryStr .=
"SELECT `tblUsers`.* FROM `tblUsers` ". "SELECT `tblUsers`.* FROM `tblUsers` ".
"WHERE (`tblUsers`.`id` = ". $this->_ownerID . ") ". "WHERE (`tblUsers`.`id` = ". $this->_ownerID . ") ".
"OR (`tblUsers`.`role` = ".SeedDMS_Core_User::role_admin.") ". "OR (`tblUsers`.`role` = ".SeedDMS_Core_User::role_admin.") ".
"UNION ". // "UNION ".
"SELECT `tblUsers`.* FROM `tblUsers` ". // "SELECT `tblUsers`.* FROM `tblUsers` ".
"WHERE `tblUsers`.`role` != ".SeedDMS_Core_User::role_guest." ". // "WHERE `tblUsers`.`role` != ".SeedDMS_Core_User::role_guest." ".
(strlen($userIDs) == 0 ? "" : " AND (`tblUsers`.`id` NOT IN (". $userIDs ."))"). // (strlen($userIDs) == 0 ? "" : " AND (`tblUsers`.`id` NOT IN (". $userIDs ."))").
" ORDER BY `login`"; " ORDER BY `login`";
echo $queryStr;
} }
$resArr = $db->getResultArray($queryStr); $resArr = $db->getResultArray($queryStr);
if (!is_bool($resArr)) { if (!is_bool($resArr)) {

View File

@ -124,7 +124,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
$mimetype = $version->getMimeType(); $mimetype = $version->getMimeType();
if(isset($_convcmd[$mimetype])) { if(isset($_convcmd[$mimetype])) {
$cmd = sprintf($_convcmd[$mimetype], $path); $cmd = sprintf($_convcmd[$mimetype], $path);
$content = self::execWithTimeout($cmd); $content = self::execWithTimeout($cmd, $timeout);
/* /*
$fp = popen($cmd, 'r'); $fp = popen($cmd, 'r');
if($fp) { if($fp) {

View File

@ -129,7 +129,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
$mimetype = $version->getMimeType(); $mimetype = $version->getMimeType();
if(isset($_convcmd[$mimetype])) { if(isset($_convcmd[$mimetype])) {
$cmd = sprintf($_convcmd[$mimetype], $path); $cmd = sprintf($_convcmd[$mimetype], $path);
$content = self::execWithTimeout($cmd); $content = self::execWithTimeout($cmd, $timeout);
if($content) { if($content) {
$this->addField('content', $content, 'unstored'); $this->addField('content', $content, 'unstored');
} }

View File

@ -1055,6 +1055,7 @@ function folderSelected<?php echo $form ?>(id, name) {
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes') { /* {{{ */ function printAttributeEditField($attrdef, $attribute, $fieldname='attributes') { /* {{{ */
switch($attrdef->getType()) { switch($attrdef->getType()) {
case SeedDMS_Core_AttributeDefinition::type_boolean: case SeedDMS_Core_AttributeDefinition::type_boolean:
echo "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"0\" />";
echo "<input type=\"checkbox\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".(($attribute && $attribute->getValue()) ? 'checked' : '')." />"; echo "<input type=\"checkbox\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".(($attribute && $attribute->getValue()) ? 'checked' : '')." />";
break; break;
case SeedDMS_Core_AttributeDefinition::type_date: case SeedDMS_Core_AttributeDefinition::type_date: