Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6cfeeed4
Commit
6cfeeed4
authored
Sep 16, 2008
by
Richard Mansfield
Browse files
Only count portfolio views in view owner search
parent
8839e27c
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/view.php
View file @
6cfeeed4
...
...
@@ -1680,7 +1680,7 @@ class View {
CASE WHEN u.preferredname IS NULL OR u.preferredname = '' THEN u.firstname || ' ' || u.lastname
ELSE u.preferredname END AS display,
CAST (u.id AS TEXT), COUNT(v.id)
FROM
{
usr
}
u INNER JOIN
{
view
}
v ON (v.owner = u.id)
FROM
{
usr
}
u INNER JOIN
{
view
}
v ON (v.owner = u.id
AND v.type = 'portfolio'
)
WHERE u.deleted = 0
$tsql
GROUP BY ownertype, display, u.id
UNION
...
...
@@ -1698,7 +1698,7 @@ class View {
$data
=
get_records_sql_array
(
"SELECT * FROM (
$sql
) q
$qsql
"
,
$ph
,
$offset
,
$limit
);
foreach
(
$data
as
&
$r
)
{
if
(
$r
->
type
==
'institution'
&&
$r
->
id
==
'mahara'
)
{
if
(
$r
->
owner
type
==
'institution'
&&
$r
->
id
==
'mahara'
)
{
$r
->
display
=
get_config
(
'sitename'
);
}
}
...
...
Write
Preview
Supports
Markdown
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