Improved new import so that it does not flood the output with multiple XML errors.
authorNik Okuntseff <support@anuko.com>
Wed, 14 Nov 2018 23:57:41 +0000 (23:57 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 14 Nov 2018 23:57:41 +0000 (23:57 +0000)
WEB-INF/lib/ttOrgImportHelper.class.php
WEB-INF/templates/footer.tpl

index 77458cf..96ac570 100644 (file)
@@ -525,7 +525,7 @@ class ttOrgImportHelper {
 
     // Read and parse the content of the file. During parsing, startElement is called back for each tag.
     $file = fopen($filename, 'r');
-    while ($data = fread($file, 4096)) {
+    while (($data = fread($file, 4096)) && $this->errors->no()) {
       if (!xml_parse($parser, $data, feof($file))) {
         $this->errors->add(sprintf($i18n->get('error.xml'),
           xml_get_current_line_number($parser),
@@ -554,7 +554,7 @@ class ttOrgImportHelper {
 
     // Read and parse the content of the file. During parsing, startElement is called back for each tag.
     $file = fopen($filename, 'r');
-    while ($data = fread($file, 4096)) {
+    while (($data = fread($file, 4096)) && $this->errors->no()) {
       if (!xml_parse($parser, $data, feof($file))) {
         $this->errors->add(sprintf($i18n->get('error.xml'),
           xml_get_current_line_number($parser),
index 16196a6..1f8ef09 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.12.4424 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.12.4425 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>