Skip to content

Commit

Permalink
Export models_html5/glossary.html if the glossary is used
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Sep 15, 2014
1 parent 2f1d388 commit 38a3dc3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/xerte/export.php
Expand Up @@ -108,6 +108,13 @@
_debug("copy model " . $parent_template_path . "models_html5/colourChanger.html");
array_push($file_array, array($parent_template_path . "models_html5/colourChanger.html", ""));

/* Add glossary if used */
if ($xml->glossaryUsed())
{
_debug("copy model " . $parent_template_path . "models_html5/glossary.html");
array_push($file_array, array($parent_template_path . "models_html5/glossary.html", ""));
}

export_folder_loop($parent_template_path . "common_html5/");
}
array_push($file_array, array($parent_template_path . $row['template_name'] . ".rlt", ""));
Expand Down
13 changes: 13 additions & 0 deletions website_code/php/xmlInspector.php
Expand Up @@ -138,6 +138,14 @@ public function loadTemplateXML($name)

$this->xml = simplexml_load_string($xml);
$this->language = (string)$this->xml['language'];
if (strlen((string)$this->xml['glossary'])>0)
{
$this->glossary = true;
}
else
{
$this->glossary = false;
}
if (strlen($this->language) == 0)
$this->language = 'en-GB';
$this->name = (string)$this->xml['name'];
Expand Down Expand Up @@ -188,6 +196,11 @@ public function modelUsed($model)
return false;
}

public function glossaryUsed()
{
return $this->glossary;
}

}

//$template = new XerteXMLInspector();
Expand Down

0 comments on commit 38a3dc3

Please sign in to comment.