diff --git a/module/api/control.php b/module/api/control.php index 0a60efb50a..4db1dceccf 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -414,8 +414,12 @@ class api extends control { $changes = $this->api->updateStruct($structID); if(dao::isError()) return $this->sendError(dao::getError()); - $actionID = $this->action->create('apistruct', $structID, 'Edited'); - $this->action->logHistory($actionID, $changes); + + if($changes) + { + $actionID = $this->action->create('apistruct', $structID, 'Edited'); + $this->action->logHistory($actionID, $changes); + } return $this->sendSuccess(array('locate' => helper::createLink('api', 'struct', "libID={$struct->lib}"))); } diff --git a/module/api/ui/createstruct.html.php b/module/api/ui/createstruct.html.php index 90a13c81fe..aa5a6af3c1 100644 --- a/module/api/ui/createstruct.html.php +++ b/module/api/ui/createstruct.html.php @@ -24,11 +24,8 @@ formPanel ( set::width('1/2'), set::label($lang->api->structName), - input - ( - set::name('name'), - set::required(true) - ) + set::name('name'), + set::required(true) ), formGroup (