Commit 159ce917 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Fix view access SQL

parent f53e1fd9
......@@ -1176,7 +1176,7 @@ function get_views($users, $userlooking=null, $limit=5) {
WHERE
v.owner IN (' . join(',',array_map('db_quote', array_keys($users))) . ')
AND ( v.startdate IS NULL OR v.startdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate > ? )
',
array( $dbnow, $dbnow )
)
......@@ -1204,7 +1204,7 @@ function get_views($users, $userlooking=null, $limit=5) {
WHERE
v.owner IN (' . join(',',array_map('db_quote', array_keys($users))) . ')
AND ( v.startdate IS NULL OR v.startdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate > ? )
',
array($userlooking, $dbnow, $dbnow)
)
......@@ -1233,7 +1233,7 @@ function get_views($users, $userlooking=null, $limit=5) {
WHERE
v.owner IN (' . join(',',array_map('db_quote', array_keys($users))) . ')
AND ( v.startdate IS NULL OR v.startdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate > ? )
',
array($userlooking, $dbnow, $dbnow)
)
......@@ -1262,7 +1262,7 @@ function get_views($users, $userlooking=null, $limit=5) {
WHERE
v.owner IN (' . join(',',array_map('db_quote', array_keys($users))) . ')
AND ( v.startdate IS NULL OR v.startdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate < ? )
AND ( v.stopdate IS NULL OR v.stopdate > ? )
',
array($userlooking, $dbnow, $dbnow)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment