]> git.mxchange.org Git - friendica-addons.git/commitdiff
Code formatting
authorGrischa Brockhaus <github@brockha.us>
Fri, 25 Nov 2022 01:21:03 +0000 (02:21 +0100)
committerGrischa Brockhaus <github@brockha.us>
Fri, 25 Nov 2022 01:21:03 +0000 (02:21 +0100)
Wow.. This is very picky... |-(

fancybox/fancybox.php

index a0279914c084cdc5f7715c56176762af243095a1..3fb548b9e4edd21800d0c6e37c03b3265a6dac0c 100644 (file)
@@ -41,12 +41,14 @@ function fancybox_render(App $a, array &$b)
        }
        $html = $b['html'];
        while (preg_match($pattern, $html, $matches, PREG_OFFSET_CAPTURE)) {
-               if (is_array($matches)) $matches = $matches[0];
-               $part = $matches[0];
+               if (is_array($matches)) {
+                       $matches = $matches[0];
+               }
+               $part     = $matches[0];
                $replaced = str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $part);
                $replaced = str_replace('<div class="body-attach"', '<div class="body-attach done"', $replaced);
-               $html = str_replace($part, $replaced, $html);
+               $html     = str_replace($part, $replaced, $html);
        }
-       $html = str_replace('class="body-attach done"', 'class="body-attach"', $html);
+       $html      = str_replace('class="body-attach done"', 'class="body-attach"', $html);
        $b['html'] = $html;
 }
\ No newline at end of file