aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note.php
diff options
context:
space:
mode:
authorwinter2025-02-16 22:18:57 +0000
committerwinter2025-02-16 22:18:57 +0000
commit13999840c56e12e708432ee560ee83fe7c9ff361 (patch)
tree30f0c159697a9b30ec0a60bd240a49c3fbc43ca0 /templates/note.php
parent00fc10a04f90e761edf2b1ddca04f0ec6bb030b5 (diff)
fix a freaky bug with note deletion and home timeline
Diffstat (limited to 'templates/note.php')
-rw-r--r--templates/note.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/note.php b/templates/note.php
index 19a1895..6835a0f 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -5,7 +5,7 @@ use Digitigrade\Model\NotePrivacyScope;
use Digitigrade\Model\UserAccount;
use Digitigrade\UserSettings;
-const MAX_PREVIEW_CARDS = 1;
+$MAX_PREVIEW_CARDS = 1;
$user = UserAccount::findByCurrentSession();
$prefs = $user ? new UserSettings($user) : null;
@@ -95,7 +95,7 @@ $pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id;
$i = 0;
foreach ($note->getLinkPreviews() as $preview) {
call_template("note_link_preview", ['preview' => $preview]);
- if (++$i > MAX_PREVIEW_CARDS)
+ if (++$i > $MAX_PREVIEW_CARDS)
break;
}
?>