Skip to content

Commit 1efd413

Browse files
committed
!410 - Added correct version information to apptype
1 parent e184e90 commit 1efd413

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

apps/Core/Components/Appstypes/AppstypesComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function updateAction()
7272
return;
7373
}
7474

75-
$this->appsTypes->updateAppsType($this->postData());
75+
$this->appsTypes->updateAppType($this->postData());
7676

7777
$this->addResponse(
7878
$this->apps->packagesData->responseMessage,

system/Base/Providers/AppsServiceProvider/Types.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,19 @@ public function getAppTypeByType($app_type)
4747
* notification_allowed_methods(email, sms)//Example
4848
* @notification_allowed_methods(email, sms)
4949
*/
50-
public function updateAppsType(array $data)
50+
public function updateAppType(array $data)
5151
{
5252
$appType = $this->getAppTypeById($data['id']);
5353

54-
$appType['name'] = $data['name'];
55-
$appType['description'] = $data['description'];
54+
if (isset($data['name'])) {
55+
$appType['name'] = $data['name'];
56+
}
57+
if (isset($data['description'])) {
58+
$appType['description'] = $data['description'];
59+
}
60+
if (isset($data['version'])) {
61+
$appType['version'] = $data['version'];
62+
}
5663

5764
if ($this->update($appType)) {
5865
$this->addResponse('Updated ' . $appType['name'] . ' app type');
@@ -61,7 +68,7 @@ public function updateAppsType(array $data)
6168
}
6269
}
6370

64-
public function removeAppsType(array $data)
71+
public function removeAppType(array $data)
6572
{
6673
$appType = $this->getAppTypeById($data['id']);
6774

0 commit comments

Comments
 (0)