From b093fd5e5a691b2b6f074bab39b91489a7a88cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Wed, 1 Aug 2012 08:30:28 +0200 Subject: [PATCH] MDL-34368 fix another validuntil condition --- webservice/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webservice/lib.php b/webservice/lib.php index afba3a4e61..5a14d57585 100644 --- a/webservice/lib.php +++ b/webservice/lib.php @@ -1612,7 +1612,7 @@ protected function load_function_info() { FROM {external_services} s JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 1 AND sf.functionname = :name2) JOIN {external_services_users} su ON (su.externalserviceid = s.id AND su.userid = :userid) - WHERE s.enabled = 1 AND su.validuntil IS NULL OR su.validuntil < :now $wscond2"; + WHERE s.enabled = 1 AND (su.validuntil IS NULL OR su.validuntil < :now) $wscond2"; $params = array_merge($params, array('userid'=>$USER->id, 'name1'=>$function->name, 'name2'=>$function->name, 'now'=>time())); $rs = $DB->get_recordset_sql($sql, $params);