mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Solved bug 985. Now "show" will work with aliases and with concepts
with and without aliases. Changed the cuery to a left join to be able to process entries without aliases. This type of operation should be changed to boolean queries sometime in MySQL 4!! Test it!! http://moodle.org/bugs/bug.php?op=show&bugid=985
This commit is contained in:
parent
2a2525257f
commit
465e3ae35d
1 changed files with 4 additions and 5 deletions
|
@ -170,9 +170,8 @@
|
|||
|
||||
case 'term':
|
||||
$printpivot = 0;
|
||||
$sqlfrom .= ", {$CFG->prefix}glossary_alias ga";
|
||||
$where = "AND ge.id = ga.entryid AND
|
||||
(ge.concept = '$hook' OR ga.alias = '$hook' )
|
||||
$sqlfrom .= " left join {$CFG->prefix}glossary_alias ga on ge.id = ga.entryid ";
|
||||
$where = "AND (ge.concept = '$hook' OR ga.alias = '$hook' )
|
||||
";
|
||||
break;
|
||||
|
||||
|
@ -211,6 +210,7 @@
|
|||
break;
|
||||
}
|
||||
$count = count_records_sql("select count(*) $sqlfrom $sqlwhere");
|
||||
|
||||
$sqllimit = '';
|
||||
|
||||
if ( $offset >= 0 ) {
|
||||
|
@ -225,5 +225,4 @@
|
|||
}
|
||||
|
||||
$allentries = get_records_sql("$sqlselect $sqlfrom $sqlwhere $sqlorderby $sqllimit");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue