Resuming work on attachments.
authorNik Okuntseff <support@anuko.com>
Tue, 26 Mar 2019 16:03:40 +0000 (16:03 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 26 Mar 2019 16:03:40 +0000 (16:03 +0000)
WEB-INF/lib/ttFileHelper.class.php
WEB-INF/templates/footer.tpl

index a45326c..5c9b385 100644 (file)
@@ -85,8 +85,14 @@ class ttFileHelper {
       curl_close($ch);
 
       $result_array = json_decode($result, true);
-      if ($result_array && $result_array['id'] && $result_array['key']) {
-
+      if (!$result_array) {
+        $this->errors->add($i18n->get('error.file_storage'));
+      }
+      else if ($result_array['error']) {
+        // Add an error from file storage facility if we have it.
+        $this->errors->add($result_array['error']);
+      }
+      else if ($result_array['id'] && $result_array['key']) {
         $this->site_id = $result_array['id'];
         $this->site_key = $result_array['key'];
 
@@ -159,12 +165,12 @@ class ttFileHelper {
     $result_array = json_decode($result, true);
     $file_id = (int) $result_array['file_id'];
     $file_key = $result_array['file_key'];
-    $file_error = $result_array['file_error'];
+    $error = $result_array['error'];
 
     if (!$file_id || !$file_key) {
-      if ($file_error) {
+      if ($error) {
         // Add an error from file storage facility if we have it.
-        $this->errors->add($file_error);
+        $this->errors->add($error);
       }
       return false;
     }
index ae385b3..eef3760 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.61.4885 | 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.61.4886 | 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>