mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-15 01:29:17 +00:00
- attributes can be edited
This commit is contained in:
parent
2a63e2132f
commit
4e163c4a2b
|
@ -49,6 +49,7 @@ $sequence = $_POST["sequence"];
|
||||||
if (!is_numeric($sequence)) {
|
if (!is_numeric($sequence)) {
|
||||||
$sequence = "keep";
|
$sequence = "keep";
|
||||||
}
|
}
|
||||||
|
$attributes = $_POST["attributes"];
|
||||||
|
|
||||||
$wasupdated = false;
|
$wasupdated = false;
|
||||||
if(($oldname = $folder->getName()) != $name) {
|
if(($oldname = $folder->getName()) != $name) {
|
||||||
|
@ -102,6 +103,17 @@ if(($oldcomment = $folder->getComment()) != $comment) {
|
||||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured"));
|
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($attributes) {
|
||||||
|
$oldattributes = $folder->getAttributes();
|
||||||
|
foreach($attributes as $attrdefid=>$attribute) {
|
||||||
|
if(!isset($oldattributes[$attrdefid]) || $attribute != $oldattributes[$attrdefid]->getValue()) {
|
||||||
|
if(!$folder->setAttributeValue($dms->getAttributeDefinition($attrdefid), $attribute))
|
||||||
|
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(strcasecmp($sequence, "keep")) {
|
if(strcasecmp($sequence, "keep")) {
|
||||||
if($folder->setSequence($sequence)) {
|
if($folder->setSequence($sequence)) {
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user