From 81500319084173b0fd4e5533d741161f962eaa91 Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Wed, 16 Jul 2014 02:25:18 +0200 Subject: [PATCH] Fix bug in switch --- gui/rpc/zfs.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/rpc/zfs.inc b/gui/rpc/zfs.inc index bdf8c44..6fe448d 100644 --- a/gui/rpc/zfs.inc +++ b/gui/rpc/zfs.inc @@ -70,7 +70,8 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { public function deleteObject($params, $context) { $this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR)); switch ($params['type']) { - case "Filesystem" || "Clone": + case "Filesystem": + case "Clone": $name = $params['name']; $tmp = new OMVModuleZFSDataset($name); $tmp->destroy(); @@ -137,7 +138,7 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { default: throw new OMVModuleZFSException("Illegal type provided: " . $params['type']); break; - } + } foreach ($params['properties'] as $property) { $objects[$property['property']] = $property['value']; } @@ -239,7 +240,7 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { $uuid = OMVUtil::uuid(); $pathName = $tmp->getMountPoint(); - $subdirs = preg_split('/\//',$pathName); + $subdirs = preg_split('/\//',$pathName); $reldirpath = $subdirs[count($subdirs)-1]; $object = array( "uuid" => $uuid, @@ -307,7 +308,7 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { } // Register the RPC service. -$rpcServiceMgr = &OMVRpcServiceMgr::getInstance(); // Get the "root" instance for the Services +$rpcServiceMgr = &OMVRpcServiceMgr::getInstance(); // Get the "root" instance for the Services $rpcServiceMgr->registerService(new OMVRpcServiceZFS()); // Register a new instance of the RPC service described above ?> -- 2.39.2