Skip to content
GitLab
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
bc1073ab
Commit
bc1073ab
authored
Sep 10, 2009
by
Richard Mansfield
Browse files
Fix mysql syntax in tag searches
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
3e94c902
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
bc1073ab
...
...
@@ -2049,7 +2049,7 @@ function get_my_tags($limit=null, $cloud=true, $sort='freq') {
}
$tagrecords
=
get_records_sql_array
(
"
SELECT
t.tag, COUNT(t.tag)
t.tag, COUNT(t.tag)
AS count
FROM (
(SELECT at.tag, a.id, 'artefact' AS type
FROM
{
artefact_tag
}
at JOIN
{
artefact
}
a ON a.id = at.artefact
...
...
htdocs/search/internal/lib.php
View file @
bc1073ab
...
...
@@ -885,7 +885,7 @@ class PluginSearchInternal extends PluginSearch {
if
(
$count
=
count_records_sql
(
'SELECT COUNT(*) '
.
$from
,
$values
,
$offset
,
$limit
))
{
$result
->
count
=
$count
;
$sort
=
$sort
==
'date'
?
'ctime DESC'
:
'title ASC'
;
if
(
$data
=
get_records_sql_assoc
(
"SELECT type || ':' || id AS tid, * "
.
$from
.
' ORDER BY '
.
$sort
,
$values
,
$offset
,
$limit
))
{
if
(
$data
=
get_records_sql_assoc
(
"SELECT type || ':' || id AS tid,
p.
* "
.
$from
.
' ORDER BY '
.
$sort
,
$values
,
$offset
,
$limit
))
{
if
(
$returntags
)
{
$ids
=
array
(
'view'
=>
array
(),
'artefact'
=>
array
());
foreach
(
$data
as
&
$d
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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