| 1 |
<?php |
<?php |
| 2 |
// $Id: glossary.module,v 1.100.2.20.2.45 2008/06/14 01:01:51 nancyw Exp $ |
// $Id: glossary.module,v 1.100.2.20.2.46 2008/06/16 15:42:55 nancyw Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 6 |
* Glossary terms will be automatically marked with links to their descriptions. |
* Glossary terms will be automatically marked with links to their descriptions. |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
define ('GLOSSARY_VERSION', '$Id: glossary.module,v 1.100.2.20.2.45 2008/06/14 01:01:51 nancyw Exp $'); |
define ('GLOSSARY_VERSION', '$Id: glossary.module,v 1.100.2.20.2.46 2008/06/16 15:42:55 nancyw Exp $'); |
| 10 |
|
|
| 11 |
function glossary_help($path, $args = array()) { |
function glossary_help($path, $args = array()) { |
| 12 |
$output = ''; |
$output = ''; |
| 473 |
$ins_before = $ins_after = null; |
$ins_before = $ins_after = null; |
| 474 |
$term_class = variable_get('glossary_term_class', 'glossary-term'); |
$term_class = variable_get('glossary_term_class', 'glossary-term'); |
| 475 |
// Let's try to get Drupal to show non-Latin letters right. |
// Let's try to get Drupal to show non-Latin letters right. |
| 476 |
$linkto = htmlspecialchars_decode($linkto); |
$linkto = decode_entities($linkto); |
| 477 |
|
|
| 478 |
switch ($replace_mode) { |
switch ($replace_mode) { |
| 479 |
case 'superscript': |
case 'superscript': |
| 545 |
} |
} |
| 546 |
|
|
| 547 |
// Replace term and synonyms with the desired new HTML code. |
// Replace term and synonyms with the desired new HTML code. |
| 548 |
$terms_replace[] = array('synonyms' => $term->synonyms, 'ins_before' => htmlspecialchars_decode($ins_before), 'ins_after' => htmlspecialchars_decode($ins_after)); |
$terms_replace[] = array('synonyms' => $term->synonyms, 'ins_before' => decode_entities($ins_before), 'ins_after' => decode_entities($ins_after)); |
| 549 |
} |
} |
| 550 |
return _glossary_insertlink($format, $text, $terms_replace); |
return _glossary_insertlink($format, $text, $terms_replace); |
| 551 |
} |
} |
| 931 |
} |
} |
| 932 |
} |
} |
| 933 |
} |
} |
| 934 |
return htmlspecialchars_decode($output); |
// return htmlspecialchars_decode($output); |
| 935 |
|
return decode_entities($output); |
| 936 |
} |
} |
| 937 |
|
|
| 938 |
function glossary_admin_links($vocabulary, $destination) { |
function glossary_admin_links($vocabulary, $destination) { |