From 0a74aaf292e3034745130947eed91149bf3c277f Mon Sep 17 00:00:00 2001
From: Daniel Tixier <dgtixier@gmail.com>
Date: Mon, 24 Aug 2015 09:36:33 -0700
Subject: [PATCH] Handle sub-paths in general

---
 protected_node.module | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/protected_node.module b/protected_node.module
index d7f7a4e..58c9412 100644
--- a/protected_node.module
+++ b/protected_node.module
@@ -193,12 +193,9 @@ function protected_node_init() {
     elseif ($param2 == 'edit' || $param2 == 'delete') {
       $nid = protected_node_is_locked(arg(1), $param2);
     }
-    elseif (($param2 == 'done' && module_exists('webform')) || ($param2 == 'mid' && module_exists('nodesymlinks')) || ($param2 == 'register' && module_exists('registration'))) {
-      $nid = protected_node_is_locked(arg(1), 'view');
-    }
     else {
-      // Any access right?
-      $nid = protected_node_is_locked(arg(1));
+      // Any other sub-path
+      $nid = protected_node_is_locked(arg(1), 'view');
     }
     if ($nid === TRUE || $nid === -1) {
       drupal_access_denied();
--
1.9.5.msysgit.1
