]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7868 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 30 Jan 2026 17:09:39 +0000 (18:09 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 30 Jan 2026 17:09:39 +0000 (18:09 +0100)
app/Fluidbook/Compiler/Links.php
app/Models/FluidbookPublication.php
resources/linkeditor-stable/js/linkeditor.form.js

index 704ef34446550115eb4412abaa2f466878554aad..1a82f21092fddd7943e14ec071c97d3d824d7c3f 100644 (file)
@@ -531,7 +531,7 @@ trait Links
     public function shortenURL($url)
     {
 
-        if (!$this->config->linkShortener || !Url::isDistant($url)) {
+        if (!$this->config->linkShortener || $this->config->linkShortener === 'none' || !Url::isDistant($url)) {
             return $url;
         }
         return LinkShortener::shorturl($url, $this->config->linkShortener);
index f26235469e624e3dee4cd289f7fbad750ae1e382..96b2678133c14faa57a976a896b3704b44abb920 100644 (file)
@@ -1410,7 +1410,7 @@ class FluidbookPublication extends ToolboxStatusModel
 
     public function getShortenedLinks()
     {
-        if (!$this->linkShortener) {
+        if (!$this->linkShortener || $this->linkShortener === 'none') {
             return [];
         }
         $res = [];
index bf6b258c54d470e1086f33b4f50504a0e672872c..97e4ae5de2bb6d55d1718391306c099fab5a5784 100644 (file)
@@ -273,8 +273,6 @@ LinkeditorForm.prototype = {
         var type = $(link).attr('fb-type');
         var form = $("#linkeditor-form-template-" + type).clone(false);
 
-
-
         $(form).attr('id', null);
         $(form).data('link', link);
         $(form).find('.init-tooltip').removeClass('init-tooltip');