From ce600b2829d2afc84af55dbe19b1df2fafebbd00 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Fri, 17 Apr 2015 12:57:23 +0300 Subject: [PATCH] fix SolusVM getTemplates() --- src/bb-modules/Servicesolusvm/Service.php | 11 +++++++++-- .../html_client/mod_servicesolusvm_order_form.phtml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/bb-modules/Servicesolusvm/Service.php b/src/bb-modules/Servicesolusvm/Service.php index 2db1a7d2c..2593fde9f 100644 --- a/src/bb-modules/Servicesolusvm/Service.php +++ b/src/bb-modules/Servicesolusvm/Service.php @@ -578,8 +578,15 @@ class Service implements InjectionAwareInterface public function getTemplates($type) { $templates = $this->_getApi()->listtemplates($type); - $list = explode(',', $templates['templates']); - $res = array(); + $list = explode(',', $templates['templates']); + if($type == 'kvm' && isset($templates['templateskvm'])) { + $list = explode(',', $templates['templateskvm']); + } + if($type == 'xen hvm' && isset($templates['templateshvm'])) { + $list = explode(',', $templates['templateshvm']); + } + + $res = array(); foreach ($list as $p) { $res[$p] = $p; } diff --git a/src/bb-modules/Servicesolusvm/html_client/mod_servicesolusvm_order_form.phtml b/src/bb-modules/Servicesolusvm/html_client/mod_servicesolusvm_order_form.phtml index fe4b17d13..ccd933ddd 100644 --- a/src/bb-modules/Servicesolusvm/html_client/mod_servicesolusvm_order_form.phtml +++ b/src/bb-modules/Servicesolusvm/html_client/mod_servicesolusvm_order_form.phtml @@ -29,7 +29,7 @@