mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
		
						commit
						99682a11d1
					
				|  | @ -149,6 +149,8 @@ | |||
| - update last access time only once a minute | ||||
| - run action 'css' in view if it exists, move css code for timeline | ||||
| - show role of users in user list and substitute user list | ||||
| - mysql sql_mode=only_full_group_by can be set without causing errors when | ||||
|   creating a temporary table | ||||
| 
 | ||||
| -------------------------------------------------------------------------------- | ||||
|                      Changes in version 4.3.34 | ||||
|  |  | |||
|  | @ -258,6 +258,13 @@ class SeedDMS_Core_Attribute { /* {{{ */ | |||
| 	 */ | ||||
| 	function getValidationError() { return $this->_validation_error; } | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Set validation error | ||||
| 	 * | ||||
| 	 * @param integer error code | ||||
| 	 */ | ||||
| 	function setValidationError($error) { $this->_validation_error = $error; } | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Get definition of attribute | ||||
| 	 * | ||||
|  | @ -916,6 +923,15 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */ | |||
| 	 * @return boolean true if validation succeds, otherwise false | ||||
| 	 */ | ||||
| 	function validate($attrvalue) { /* {{{ */ | ||||
| 		/* Check if 'onAttributeValidate' callback is set */ | ||||
| 		if(isset($this->_dms->callbacks['onAttributeValidate'])) { | ||||
| 			foreach($this->_dms->callbacks['onAttributeValidate'] as $callback) { | ||||
| 				$ret = call_user_func($callback[0], $callback[1], $this); | ||||
| 				if(is_bool($ret)) | ||||
| 					return $ret; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if($this->getMultipleValues()) { | ||||
| 			if(is_string($attrvalue)) { | ||||
| 				$sep = $attrvalue[0]; | ||||
|  |  | |||
|  | @ -391,24 +391,24 @@ class SeedDMS_Core_DatabaseAccess { | |||
| 						"SELECT `tblDocumentReviewLog`.`reviewID`, ". | ||||
| 						"MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentReviewLog` ". | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 				break; | ||||
| 				case 'pgsql': | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (`reviewID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`reviewID`));". | ||||
| 						"INSERT INTO `ttreviewid` SELECT `tblDocumentReviewLog`.`reviewID`, ". | ||||
| 						"MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentReviewLog` ". | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` ";//.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 				break; | ||||
| 				default: | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ". | ||||
| 						"SELECT `tblDocumentReviewLog`.`reviewID`, ". | ||||
| 						"MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentReviewLog` ". | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentReviewLog`.`reviewID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 			} | ||||
| 			if (!$this->_ttreviewid) { | ||||
| 				if (!$this->getResult($queryStr)) | ||||
|  | @ -432,24 +432,24 @@ class SeedDMS_Core_DatabaseAccess { | |||
| 						"SELECT `tblDocumentApproveLog`.`approveID`, ". | ||||
| 						"MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentApproveLog` ". | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 					break; | ||||
| 				case 'pgsql': | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (`approveID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`approveID`));". | ||||
| 						"INSERT INTO `ttapproveid` SELECT `tblDocumentApproveLog`.`approveID`, ". | ||||
| 						"MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentApproveLog` ". | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 					break; | ||||
| 				default: | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ". | ||||
| 						"SELECT `tblDocumentApproveLog`.`approveID`, ". | ||||
| 						"MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentApproveLog` ". | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentApproveLog`.`approveID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 			} | ||||
| 			if (!$this->_ttapproveid) { | ||||
| 				if (!$this->getResult($queryStr)) | ||||
|  | @ -473,24 +473,24 @@ class SeedDMS_Core_DatabaseAccess { | |||
| 						"SELECT `tblDocumentStatusLog`.`statusID` AS `statusID`, ". | ||||
| 						"MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentStatusLog` ". | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 					break; | ||||
| 				case 'pgsql': | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (`statusID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`statusID`));". | ||||
| 						"INSERT INTO `ttstatid` SELECT `tblDocumentStatusLog`.`statusID`, ". | ||||
| 						"MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentStatusLog` ". | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 					break; | ||||
| 				default: | ||||
| 					$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ". | ||||
| 						"SELECT `tblDocumentStatusLog`.`statusID`, ". | ||||
| 						"MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". | ||||
| 						"FROM `tblDocumentStatusLog` ". | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` ". | ||||
| 						"ORDER BY `maxLogID`"; | ||||
| 						"GROUP BY `tblDocumentStatusLog`.`statusID` "; //.
 | ||||
| //						"ORDER BY `maxLogID`";
 | ||||
| 			} | ||||
| 			if (!$this->_ttstatid) { | ||||
| 				if (!$this->getResult($queryStr)) | ||||
|  |  | |||
|  | @ -1201,6 +1201,7 @@ SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document | |||
|    </stability> | ||||
|    <license uri="http://opensource.org/licenses/gpl-license">GPL License</license> | ||||
|    <notes> | ||||
| do not sort some temporary tables anymore, because it causes an error in mysql if sql_mode=only_full_group_by is set | ||||
|    </notes> | ||||
|   </release> | ||||
|   <release> | ||||
|  | @ -1432,6 +1433,7 @@ if the owner tries to access them | |||
| - Add SeedDMS_Core_DMS::getDocumentList() | ||||
| - Limit number of duplicate files to 1000 | ||||
| - Add hook on(Pre|Post)RemoveContent | ||||
| - Add hook onAttributeValidate | ||||
| 	 </notes> | ||||
|   </release> | ||||
|   <release> | ||||
|  |  | |||
|  | @ -285,8 +285,8 @@ default: | |||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if(isset($_POST["attributes"]) && $_POST["attributes"]) { | ||||
| 		$attributes = $_POST["attributes"]; | ||||
| 	if(isset($_POST["attributes_version"]) && $_POST["attributes_version"]) { | ||||
| 		$attributes = $_POST["attributes_version"]; | ||||
| 		foreach($attributes as $attrdefid=>$attribute) { | ||||
| 			$attrdef = $dms->getAttributeDefinition($attrdefid); | ||||
| 			if($attribute) { | ||||
|  |  | |||
|  | @ -295,7 +295,7 @@ console.log(element); | |||
| ?>
 | ||||
|     <tr> | ||||
| 	    <td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
 | ||||
| 			<td><?php $this->printAttributeEditField($attrdef, '') ?>
 | ||||
| 			<td><?php $this->printAttributeEditField($attrdef, '', 'attributes_version') ?>
 | ||||
| <?php | ||||
| 			if($latestContent->getAttributeValue($attrdef)) { | ||||
| 				switch($attrdef->getType()) { | ||||
|  | @ -303,10 +303,10 @@ console.log(element); | |||
| 				case SeedDMS_Core_AttributeDefinition::type_date: | ||||
| 				case SeedDMS_Core_AttributeDefinition::type_int: | ||||
| 				case SeedDMS_Core_AttributeDefinition::type_float: | ||||
| 					$this->printInputPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); | ||||
| 					$this->printInputPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); | ||||
| 					break; | ||||
| 				case SeedDMS_Core_AttributeDefinition::type_boolean: | ||||
| 					$this->printCheckboxPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); | ||||
| 					$this->printCheckboxPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); | ||||
| 					break; | ||||
| 				} | ||||
| //				print_r($latestContent->getAttributeValue($attrdef));
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann