From: Michael Rasmussen Date: Wed, 16 Jul 2014 00:38:29 +0000 (+0200) Subject: Fix some more bugs in switch X-Git-Url: http://git.datanom.net/omvzfs.git/commitdiff_plain/5ff626ba7c8db2bd124cc64d49a8f31117d1f26c Fix some more bugs in switch --- 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: