Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Exported entries with attachments are now properly shown everywhere.

  • Loading branch information...
commit b764feaa29757738867a9cf064f8b06549e59b66 1 parent 9c131dd
willcast authored
View
6 lang/en/glossary.php
@@ -21,9 +21,9 @@
$string['deletingnoneemptycategory'] = "If a non empty category is deleted, its relations with their entries will also be deleted. If you wish to delete the entries, you will have to do so manually.";
$string['displayformat'] = "Display format";
$string['displayformatdefault'] = "Simple, dictionary style";
-$string['displayformat1'] = "Full without author.";
-$string['displayformat2'] = "Full with author.";
-$string['displayformat3'] = "Encyclopedia.";
+$string['displayformat1'] = "Full without author";
+$string['displayformat2'] = "Full with author";
+$string['displayformat3'] = "Encyclopedia";
$string['editentry'] = "Edit entry";
$string['editcategories'] = "Edit categories";
$string['entries'] = "Entries";
View
4 lang/es/glossary.php
@@ -20,8 +20,8 @@
$string['deletingnoneemptycategory'] = "Si una categoría es eliminada por consiguiente su relación con las entradas también lo será. Si desea eliminar las entradas, tendrá que hacerlo manualmente.";
$string['displayformat'] = "Formato de muestra de entradas";
$string['displayformatdefault'] = "Simple, estilo diccionario";
-$string['displayformat1'] = "Completo sin autor.";
-$string['displayformat2'] = "Completo con autor.";
+$string['displayformat1'] = "Completo sin autor";
+$string['displayformat2'] = "Completo con autor";
$string['displayformat3'] = "Enciclopedia";
$string['editentry'] = "Editar entrada";
$string['editcategories'] = "Editar categorías";
View
15 mod/glossary/lib.php
@@ -303,9 +303,9 @@ function glossary_search_entries($searchterms, $glossary, $includedefinition) {
foreach ($searchterms as $searchterm) {
- if (strlen($searchterm) < 2) {
+/* if (strlen($searchterm) < 2) {
continue;
- }
+ }*/
if ($conceptsearch) {
$conceptsearch.= " OR ";
}
@@ -470,15 +470,20 @@ function glossary_print_attachments($entry, $return=NULL, $align="left") {
// if return=html, then return a html string.
// if return=text, then return a text-only string.
// otherwise, print HTML for non-images, and return image HTML
-
+// if attachment is an image, $align set its aligment.
global $CFG;
+
+ $newentry = $entry;
+ if ( $newentry->sourceglossaryid ) {
+ $newentry->glossaryid = $newentry->sourceglossaryid;
+ }
- $filearea = glossary_file_area_name($entry);
+ $filearea = glossary_file_area_name($newentry);
$imagereturn = "";
$output = "";
- if ($basedir = glossary_file_area($entry)) {
+ if ($basedir = glossary_file_area($newentry)) {
if ($files = get_directory_list($basedir)) {
$strattachment = get_string("attachment", "glossary");
$strpopupwindow = get_string("popupwindow");
Please sign in to comment.
Something went wrong with that request. Please try again.