Commit 0dc059b9 authored by Nigel McNie's avatar Nigel McNie
Browse files

[#3000] quote a string value in a query for 8.3 compliance. Chris Bandy and...

[#3000] quote a string value in a query for 8.3 compliance. Chris Bandy and Piers Harding, patch doctored by me for readability.
parent 86e15cd1
...@@ -353,7 +353,7 @@ function get_service_providers($instance) { ...@@ -353,7 +353,7 @@ function get_service_providers($instance) {
return $cache[$instance]; return $cache[$instance];
} }
$query = ' $query = "
SELECT SELECT
h.name, h.name,
a.ssolandurl, a.ssolandurl,
...@@ -366,20 +366,20 @@ function get_service_providers($instance) { ...@@ -366,20 +366,20 @@ function get_service_providers($instance) {
{host} h, {host} h,
{application} a {application} a
WHERE WHERE
((aic.value = 1 AND ((aic.value = '1' AND
aic.field = \'theyautocreateusers\' ) OR aic.field = 'theyautocreateusers' ) OR
(aic.value = ? AND (aic.value = ? AND
aic.field = \'parent\')) AND aic.field = 'parent')) AND
aic.instance = aic2.instance AND aic.instance = aic2.instance AND
aic2.field = \'wwwroot\' AND aic2.field = 'wwwroot' AND
aic2.value = h.wwwroot AND aic2.value = h.wwwroot AND
aic.instance = aic3.instance AND aic.instance = aic3.instance AND
aic3.field = \'wessoout\' AND aic3.field = 'wessoout' AND
aic3.value = \'1\' AND aic3.value = '1' AND
a.name = h.appname'; a.name = h.appname";
try { try {
$results = get_records_sql_assoc($query, array('value' => $instance)); $results = get_records_sql_assoc($query, array('value' => $instance));
} catch (SQLException $e) { } catch (SQLException $e) {
......
Supports Markdown
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