diff --git a/module/action/lang/de.php b/module/action/lang/de.php index cadc771a32..17418cb670 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -47,6 +47,7 @@ $lang->action->comment = 'Kommentar'; $lang->action->actioncomment = 'Kommentar'; $lang->action->lastComment = 'Kommentar'; $lang->action->byQuery = 'Search'; +$lang->action->noLimit = 'No Limit'; $lang->action->trashAction = 'Recycle List'; $lang->action->undeleteAction = 'Reset Data'; @@ -347,14 +348,7 @@ $lang->action->desc->adjustmemory = '$date, resized to $newValue< $lang->action->desc->adjustcpu = '$date, resized to $newValue CPU by $actor.' . "\n"; $lang->action->desc->adjustvol = '$date, resized to $newValue GB disk space by $actor.' . "\n"; $lang->action->desc->adjustmemorychange = '$date, modify the memory from $oldValue to $newValue by $actor.' . "\n"; -if(empty($oldValue)) -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from unlimit to $newValue-core by $actor.' . "\n"; -} -else -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; -} +$lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; $lang->action->desc->adjustvolchange = '$date, modify this disk space from oldValueGB to newValueGB。' . "\n"; $lang->action->desc->enableldap = '$date, enabled by $actor of LDAP。' . "\n"; $lang->action->desc->disableldap = '$date, disabled by $actor of LDAP。' . "\n"; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index cd5c994806..bc5d4af4ea 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -47,6 +47,7 @@ $lang->action->comment = 'Comment'; $lang->action->actioncomment = 'Comment'; $lang->action->lastComment = 'Comment'; $lang->action->byQuery = 'Search'; +$lang->action->noLimit = 'No Limit'; $lang->action->trashAction = 'Recycle List'; $lang->action->undeleteAction = 'Reset Data'; @@ -347,14 +348,7 @@ $lang->action->desc->adjustmemory = '$date, resized to $newVa $lang->action->desc->adjustcpu = '$date, resized to $newValue CPU by $actor.' . "\n"; $lang->action->desc->adjustvol = '$date, resized to $newValue GB disk space by $actor.' . "\n"; $lang->action->desc->adjustmemorychange = '$date, modify the memory from $oldValue to $newValue by $actor.' . "\n"; -if(empty($oldValue)) -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from unlimit to $newValue-core by $actor.' . "\n"; -} -else -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; -} +$lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; $lang->action->desc->adjustvolchange = '$date, modify this disk space from oldValueGB to newValueGB。' . "\n"; $lang->action->desc->enableldap = '$date, enabled by $actor of LDAP。' . "\n"; $lang->action->desc->disableldap = '$date, disabled by $actor of LDAP。' . "\n"; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 9e71e04c6f..5fce10c0f7 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -47,6 +47,7 @@ $lang->action->comment = 'Commentaire'; $lang->action->actioncomment = 'Commentaire'; $lang->action->lastComment = 'Commentaire'; $lang->action->byQuery = 'Search'; +$lang->action->noLimit = 'No Limit'; $lang->action->trashAction = 'Recycle List'; $lang->action->undeleteAction = 'Reset Data'; @@ -347,14 +348,7 @@ $lang->action->desc->adjustmemory = '$date, resized to $newVa $lang->action->desc->adjustcpu = '$date, resized to $newValue CPU by $actor.' . "\n"; $lang->action->desc->adjustvol = '$date, resized to $newValue GB disk space by $actor.' . "\n"; $lang->action->desc->adjustmemorychange = '$date, modify the memory from $oldValue to $newValue by $actor.' . "\n"; -if(empty($oldValue)) -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from unlimit to $newValue-core by $actor.' . "\n"; -} -else -{ - $lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; -} +$lang->action->desc->adjustcpuchange = '$date, modify CPU from $oldValue-core to $newValue-core by $actor.' . "\n"; $lang->action->desc->adjustvolchange = '$date, modify this disk space from oldValueGB to newValueGB。' . "\n"; $lang->action->desc->enableldap = '$date, enabled by $actor of LDAP。' . "\n"; $lang->action->desc->disableldap = '$date, disabled by $actor of LDAP。' . "\n"; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 13bb508f14..6d33955720 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -47,6 +47,7 @@ $lang->action->comment = '备注'; $lang->action->actioncomment = '备注'; $lang->action->lastComment = '备注'; $lang->action->byQuery = '搜索'; +$lang->action->noLimit = '不限制'; $lang->action->trashAction = '回收站列表'; $lang->action->undeleteAction = '还原数据'; @@ -347,14 +348,7 @@ $lang->action->desc->adjustmemory = '$date, 由 $actoraction->desc->adjustcpu = '$date, 由 $actor 调整CPU到 $newValue 核。' . "\n"; $lang->action->desc->adjustvol = '$date, 由 $actor 调整磁盘空间到 $newValue GB。' . "\n"; $lang->action->desc->adjustmemorychange = '$date, 由 $actor 修改内存,从 $oldValue 修改为 $newValue。' . "\n"; -if(empty($oldValue)) -{ - $lang->action->desc->adjustcpuchange = '$date, 由 $actor 修改CPU,从 不限制 修改为 $newValue核。' . "\n"; -} -else -{ - $lang->action->desc->adjustcpuchange = '$date, 由 $actor 修改CPU,从 $oldValue核 修改为 $newValue核。' . "\n"; -} +$lang->action->desc->adjustcpuchange = '$date, 由 $actor 修改CPU,从 $oldValue核 修改为 $newValue核。' . "\n"; $lang->action->desc->adjustvolchange = '$date, 由 $actor 修改磁盘空间,从 $oldValueGB 修改为 $newValueGB。' . "\n"; $lang->action->desc->enableldap = '$date, 由 $actor 启用了LDAP。' . "\n"; $lang->action->desc->disableldap = '$date, 由 $actor 禁用了LDAP。' . "\n"; diff --git a/module/action/model.php b/module/action/model.php index 8fc53f82d0..73eaac6571 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -240,6 +240,13 @@ class actionModel extends model { $history->diff = str_replace(array("class='iframe'", '+'), array("data-size='{\"width\": 800, \"height\": 500}' data-toggle='modal'", '%2B'), $history->diff); } + + if(in_array($history->field, array('adjustmemory', 'adjustcpu', 'adjustvol', 'adjustmemorychange', 'adjustcpuchange', 'adjustvolchange'))) + { + if(empty($history->newValue) && empty($history->new)) $history->newValue = $this->lang->action->noLimit; + if(empty($history->oldValue) && empty($history->old)) $history->oldValue = $this->lang->action->noLimit; + } + $history->new = !empty($history->newValue) ? $history->newValue : $history->new; $history->old = !empty($history->oldValue) ? $history->oldValue : $history->old; $history = $this->file->replaceImgURL($history, 'old,new');