summaryrefslogtreecommitdiffstats
path: root/common/contrib/cck/SA-CONTRIB-2017-038.patch
blob: e7a512eff46375991a297eeb40b4631783e719b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/modules/nodereference/nodereference.module b/modules/nodereference/nodereference.module
index 5969a4f..0170cf1 100644
--- a/modules/nodereference/nodereference.module
+++ b/modules/nodereference/nodereference.module
@@ -935,6 +935,10 @@ function _nodereference_potential_references_standard($field, $string = '', $mat
     return array();
   }
 
+  if (!user_access('administer nodes')) {
+    $where[] = 'n.status = 1';
+  }
+
   if ($string !== '') {
     $like = $GLOBALS["db_type"] == 'pgsql' ? "ILIKE" : "LIKE";
     $match_clauses = array(