]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/Attachment.php
Add footer element, styles, and associated settings
[bookstack] / app / Uploads / Attachment.php
index eb9a0fe68e02b60eb605911e12d6c8ca40e3fa87..3f0b447df7388a573602396d052bce2e5c5bca7a 100644 (file)
@@ -13,7 +13,7 @@ class Attachment extends Ownable
      */
     public function getFileName()
     {
-        if (str_contains($this->name, '.')) {
+        if (strpos($this->name, '.') !== false) {
             return $this->name;
         }
         return $this->name . '.' . $this->extension;
@@ -37,6 +37,6 @@ class Attachment extends Ownable
         if ($this->external && strpos($this->path, 'http') !== 0) {
             return $this->path;
         }
-        return baseUrl('/attachments/' . $this->id);
+        return url('/attachments/' . $this->id);
     }
 }