mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
67474d1d88
|
@ -34,6 +34,7 @@
|
|||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.27
|
||||
--------------------------------------------------------------------------------
|
||||
- check for minimum number of attribute values for each attribute type
|
||||
- fix selection of imported folder in ImportFS
|
||||
- file from drop folder can be removed after successful upload
|
||||
- remove preview images when document or document content is removed (Closes #262)
|
||||
|
|
|
@ -84,6 +84,8 @@ foreach($attributes as $attrdefid=>$attribute) {
|
|||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
} elseif($attrdef->getMinValues() > 0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,10 +109,11 @@ foreach($attributes_version as $attrdefid=>$attribute) {
|
|||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
} elseif($attrdef->getMinValues() > 0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$reqversion = (int)$_POST["reqversion"];
|
||||
if ($reqversion<1) $reqversion=1;
|
||||
|
||||
|
|
|
@ -67,7 +67,15 @@ if($attributes) {
|
|||
if($attribute) {
|
||||
if($attrdef->getRegex()) {
|
||||
if(!preg_match($attrdef->getRegex(), $attribute)) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $document->getName())),getMLText("attr_no_regex_match"));
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_no_regex_match"));
|
||||
}
|
||||
if(is_array($attribute)) {
|
||||
if($attrdef->getMinValues() > count($attribute)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
if($attrdef->getMaxValues() && $attrdef->getMaxValues() < count($attribute)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isset($oldattributes[$attrdefid]) || $attribute != $oldattributes[$attrdefid]->getValue()) {
|
||||
|
@ -99,6 +107,8 @@ if($attributes) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} elseif($attrdef->getMinValues() > 0) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName())));
|
||||
} elseif(isset($oldattributes[$attrdefid])) {
|
||||
if(!$version->removeAttribute($dms->getAttributeDefinition($attrdefid)))
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("error_occured"));
|
||||
|
|
|
@ -221,6 +221,8 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
} elseif($attrdef->getMinValues() > 0) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName())));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1136,6 +1136,7 @@ $('#acceptkeywords').click(function(ev) {
|
|||
break;
|
||||
default:
|
||||
if($valueset = $attrdef->getValueSetAsArray()) {
|
||||
echo "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"\" />";
|
||||
echo "<select name=\"".$fieldname."[".$attrdef->getId()."]";
|
||||
if($attrdef->getMultipleValues()) {
|
||||
echo "[]\" multiple";
|
||||
|
|
Loading…
Reference in New Issue
Block a user