From 5ff626ba7c8db2bd124cc64d49a8f31117d1f26c Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Wed, 16 Jul 2014 02:38:29 +0200 Subject: [PATCH] Fix some more bugs in switch --- gui/rpc/zfs.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/rpc/zfs.inc b/gui/rpc/zfs.inc index 6fe448d..48c7ef4 100644 --- a/gui/rpc/zfs.inc +++ b/gui/rpc/zfs.inc @@ -97,7 +97,8 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { $objects = array(); $name = $params['name']; switch ($params['type']) { - case "Filesystem" || "Clone": + case "Filesystem": + case "Clone": $tmp = new OMVModuleZFSDataset($name); break; case "Snapshot": @@ -126,7 +127,8 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { $this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR)); $objects = array(); switch ($params['type']) { - case "Filesystem" || "Clone": + case "Filesystem": + case "Clone": $tmp = new OMVModuleZFSDataset($params['name']); break; case "Snapshot": @@ -159,7 +161,8 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { $bgOutputFilename = $this->createBgProcOutput(); $this->updateBgProcStatus($bgStatusFilename, "outputfilename", $bgOutputFilename); switch ($params['type']) { - case "Filesystem" || "Clone": + case "Filesystem": + case "Clone": $tmp = new OMVModuleZFSDataset($params['name']); break; case "Snapshot": @@ -230,7 +233,8 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { // Prepare the configuration object. Use the name of the shared // folder as the relative directory name of the share. switch ($params['type']) { - case "Filesystem" || "Clone": + case "Filesystem": + case "Clone": $tmp = new OMVModuleZFSDataset($name); break; default: -- 2.39.2