Permalink
Browse files

- Solving bug 995:

   Blank aliases caused the autolinking feature to mess the whole thing...
  • Loading branch information...
1 parent 2e855d5 commit 33cc423e3834f6f34caa79fda51be0a9fb8feea2 willcast committed Jan 25, 2004
Showing with 4 additions and 2 deletions.
  1. +3 −1 mod/glossary/dynalink.php
  2. +1 −1 mod/glossary/lib.php
@@ -78,7 +78,9 @@ function glossary_dynamic_link($courseid, $text) {
if ( $aliases = get_records("glossary_alias","entryid",$concept->id, "alias") ) {
foreach ($aliases as $alias) {
$currentalias = glossary_addslashes($replace,$alias->alias);
- $currentconcept .= "|" . trim($currentalias);
+ if ( trim( $currentalias ) != '' ) {
+ $currentconcept .= "|" . trim($currentalias);
+ }
}
}
}
View
@@ -515,7 +515,7 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode="",
$return = '';
if ( $aliases = get_records("glossary_alias","entryid",$entry->id) ) {
foreach ($aliases as $alias) {
- if ($alias->alias) {
+ if (trim($alias->alias)) {
if ($return == '') {
$return = '<select style="font-size:8pt">';
}

0 comments on commit 33cc423

Please sign in to comment.