Commit 6901d16a authored by Robert Lyon's avatar Robert Lyon

Fixing sql queries post adodb upgrade (Bug #1401324)

We can't pass anything other than an array or null to
get_recordset_sql()

Change-Id: I62717401d3f4960f0e5a5fc76bf8156b0853b9fc
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent b17d372e
......@@ -1387,7 +1387,7 @@ class OpenSslRepo {
$this->keypair = array();
$records = null;
if ($records = get_records_select_menu('config', "field IN ('openssl_keypair', 'openssl_keypair_expires')", 'field', 'field, value')) {
if ($records = get_records_select_menu('config', "field IN ('openssl_keypair', 'openssl_keypair_expires')", null, 'field, value')) {
list($this->keypair['certificate'], $this->keypair['keypair_PEM']) = explode('@@@@@@@@', $records['openssl_keypair']);
$this->keypair['expires'] = $records['openssl_keypair_expires'];
if (empty($regenerate) && $this->keypair['expires'] > time()) {
......
......@@ -724,7 +724,7 @@ function service_users_edit_form() {
),
);
$dbusers = get_records_sql_array('SELECT eu.id as id, eu.userid as userid, eu.wssigenc AS wssigenc, eu.externalserviceid as externalserviceid, eu.institution as institution, u.username as username, es.name as name, es.enabled as enabled FROM {external_services_users} AS eu LEFT JOIN {usr} AS u ON eu.userid = u.id LEFT JOIN {external_services} AS es ON eu.externalserviceid = es.id ORDER BY eu.id', false);
$dbusers = get_records_sql_array('SELECT eu.id as id, eu.userid as userid, eu.wssigenc AS wssigenc, eu.externalserviceid as externalserviceid, eu.institution as institution, u.username as username, es.name as name, es.enabled as enabled FROM {external_services_users} AS eu LEFT JOIN {usr} AS u ON eu.userid = u.id LEFT JOIN {external_services} AS es ON eu.externalserviceid = es.id ORDER BY eu.id', array());
if (!empty($dbusers)) {
foreach ($dbusers as $user) {
$dbinstitution = get_record('institution', 'name', $user->institution);
......
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