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
info
mahara-museum
Commits
30230392
Commit
30230392
authored
Jan 07, 2008
by
Nigel McNie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly quote the "group" field as MySQL thinks that it's a keyword. Fixes #1796.
parent
eed4bd45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
htdocs/search/internal/lib.php
htdocs/search/internal/lib.php
+6
-6
No files found.
htdocs/search/internal/lib.php
View file @
30230392
...
...
@@ -410,11 +410,11 @@ class PluginSearchInternal extends PluginSearch {
)"
;
$values
=
array
(
$query_string
,
$query_string
);
if
(
!
$all
)
{
$sql
.
=
"
AND (
$sql
.
=
'
AND (
owner = ? OR id IN (
SELECT group FROM
{
group_member
}
WHERE member = ?
SELECT
"
group
"
FROM {group_member} WHERE member = ?
)
)
"
;
)
'
;
$values
[]
=
$USER
->
get
(
'id'
);
$values
[]
=
$USER
->
get
(
'id'
);
}
...
...
@@ -430,12 +430,12 @@ class PluginSearchInternal extends PluginSearch {
OR description LIKE '%' || ? || '%'
)"
;
if
(
!
$all
)
{
$sql
.
=
"
AND (
$sql
.
=
'
AND (
owner = ? OR id IN (
SELECT group FROM
{
group_member
}
WHERE member = ?
SELECT
"
group
"
FROM {group_member} WHERE member = ?
)
)
"
;
'
;
}
$count
=
get_field_sql
(
$sql
,
$values
);
...
...
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