From 65dde102919be3afc0f336574987778918391664 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Wed, 18 Feb 2026 14:45:46 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20refactorer=20les=20variables=20de=20tem?= =?UTF-8?q?plate=20en=20expressions=20inline=20pour=20simplifier=20la=20lo?= =?UTF-8?q?gique=20et=20supprimer=20la=20variable=20interm=C3=A9diaire=20i?= =?UTF-8?q?sCalledFromBookmarklet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shaarli-pro/editlink.html | 8 ++++---- shaarli-pro/page.header.html | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/shaarli-pro/editlink.html b/shaarli-pro/editlink.html index 9ce3d7e..e77ee54 100644 --- a/shaarli-pro/editlink.html +++ b/shaarli-pro/editlink.html @@ -16,14 +16,14 @@ {$index=""} {/if} {$batchModeValue=empty($batch_mode) ? '0' : '1'} -{$readLaterChecked=strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false} -{$noteDefaultChecked=$link_is_new && empty($link.url)} -{$noteChecked=strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked} +{function="($readLaterChecked = strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false) ? '' : ''"} +{function="($noteDefaultChecked = $link_is_new && empty($link.url)) ? '' : ''"} +{function="($noteChecked = strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked) ? '' : ''"} {$effectiveTags=$link.tags} {if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"} {$effectiveTags=trim($effectiveTags . ' note')} {/if} -{$privateChecked=$link.private == true || $link_is_new} +{function="($privateChecked = $link.private == true || $link_is_new) ? '' : ''"}
diff --git a/shaarli-pro/page.header.html b/shaarli-pro/page.header.html index 47d076e..fd79897 100644 --- a/shaarli-pro/page.header.html +++ b/shaarli-pro/page.header.html @@ -1,8 +1,7 @@ -{if="$isCalledFromBookmarklet"} +{if="isset($_GET['source']) && $_GET['source'] == 'bookmarklet'"} {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore} {else}