X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/37a47dbd255874bcdfc14f2e7a5dc1461ddd145e..f12df2f8648eba2faeea62064813521f92cc6611:/lib/functions.php?ds=inline

diff --git a/lib/functions.php b/lib/functions.php
index 9091af7..7ac4c9e 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -446,7 +446,7 @@ function jirafeau_upload($file, $one_time_download, $key, $time, $ip, $crypt, $l
                  'link' => '',
                  'delete_link' => ''));
     }
-    jirafeau_add_file($file, $one_time_download, $key, $time, $ip, $crypt, $link_name_length, $file_hash_method);
+    return jirafeau_add_file($file, $one_time_download, $key, $time, $ip, $crypt, $link_name_length, $file_hash_method);
 }
 
 /**
@@ -623,7 +623,7 @@ function jirafeau_is_viewable($mime)
     if (!empty($mime)) {
         $viewable = array('image', 'video', 'audio');
         $decomposed = explode('/', $mime);
-        if (in_array($decomposed[0], $viewable) && strpos($mime, 'image/svg+xml') === false) {
+        if (in_array($decomposed[0], $viewable) && stripos($mime, 'image/svg+xml') === false) {
             return true;
         }
         $viewable = array('text/plain');