Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
9ec81780
Commit
9ec81780
authored
Nov 21, 2017
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1728815: Not include the logoxs column in sql query until it exists"
parents
cdc11013
35d46f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
htdocs/lib/user.php
htdocs/lib/user.php
+9
-1
No files found.
htdocs/lib/user.php
View file @
9ec81780
...
...
@@ -1787,8 +1787,16 @@ function load_user_institutions($userid) {
throw
new
InvalidArgumentException
(
"couldn't load institutions, no user id specified"
);
}
$userid
=
(
int
)
$userid
;
require_once
(
'ddl.php'
);
$table
=
new
XMLDBTable
(
'institution'
);
$field
=
new
XMLDBField
(
'logoxs'
);
$logoxs
=
field_exists
(
$table
,
$field
)
?
',i.logoxs'
:
''
;
if
(
$userid
!==
0
&&
$institutions
=
get_records_sql_assoc
(
'
SELECT u.institution,'
.
db_format_tsfield
(
'ctime'
)
.
','
.
db_format_tsfield
(
'u.expiry'
,
'membership_expiry'
)
.
',u.studentid,u.staff,u.admin,i.displayname,i.theme,i.registerallowed, i.showonlineusers,i.allowinstitutionpublicviews, i.logo, i.logoxs, i.style, i.licensemandatory, i.licensedefault, i.dropdownmenu, i.skins, i.suspended
SELECT u.institution, '
.
db_format_tsfield
(
'ctime'
)
.
','
.
db_format_tsfield
(
'u.expiry'
,
'membership_expiry'
)
.
',
u.studentid, u.staff, u.admin, i.displayname, i.theme, i.registerallowed, i.showonlineusers,
i.allowinstitutionpublicviews, i.logo'
.
$logoxs
.
', i.style, i.licensemandatory, i.licensedefault,
i.dropdownmenu, i.skins, i.suspended
FROM {usr_institution} u INNER JOIN {institution} i ON u.institution = i.name
WHERE u.usr = ? ORDER BY i.priority DESC'
,
array
(
$userid
)))
{
return
$institutions
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment