Index: protected_node.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/protected_node/protected_node.module,v retrieving revision 1.8 diff -u -p -r1.8 protected_node.module --- protected_node.module 14 Apr 2008 20:53:32 -0000 1.8 +++ protected_node.module 21 Aug 2008 23:22:58 -0000 @@ -148,6 +148,7 @@ function protected_node_nodeapi(&$node, $node->content = array(); } } + cache_clear_all(NULL, 'cache_page'); } } } @@ -185,7 +186,7 @@ function protected_node_file_download($f { global $user; - $db_file = db_result(db_query('SELECT n.nid FROM {files} f, {protected_nodes} pn, {node} n WHERE pn.nid = f.nid AND f.nid = n.nid AND f.filename = \'%s\'', $file)); + $db_file = db_result(db_query('SELECT u.nid FROM {files} f, {protected_nodes} pn, {upload} u WHERE pn.nid = u.nid AND f.fid = u.fid AND f.filename = \'%s\'', $file)); if(db_error() || $db_file === FALSE || $user->uid == $db_file || $_SESSION['_protected_node']['passwords'][$db_file] ) { return array(); } else {