change
if ($entry = get_records_sql(' SELECT concept, definition, format '.
' FROM '.$CFG->prefix.'glossary_entries'.
' WHERE glossaryid = '.$this->config->glossary.
' AND approved = 1 '.
'ORDER BY timemodified '.$SORT, $limitfrom, $limitnum)) {
to
if ($entry = get_records_sql(' SELECT concept, definition, format '.
' FROM '.$CFG->prefix.'glossary_entries'.
' WHERE glossaryid = '.$this->config->glossary.
' AND approved = 1 '.
'ORDER BY concept '.$SORT, $limitfrom, $limitnum)) {