From 43f2118ffeb95830ee6e5b7da348bb0ea0cc935b Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 19 Jan 2026 10:06:49 +0100 Subject: [PATCH] wait #7946 @0.25 --- app/Fluidbook/Compiler/Compiler.php | 2 +- app/Fluidbook/Link/LinksData.php | 14 +++++++++----- app/SubForms/Link/Base.php | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 5c3929651..53f40badb 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -313,7 +313,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError * @throws \Exception */ - function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, ?FluidbookTheme $theme, $hybrid = false, ?Command $command) + function __construct(FluidbookPublication $book, $variant = 'online', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false, FluidbookTheme $theme=null, $hybrid = false, Command $command=null) { ExcelToArray::setCache($book->protected_path('fluidbookpublication/cache/exceltoarray')); YoutubeDL::setCookiesFile(resource_path('yt-dlp/cookies.txt'), 'firefox'); diff --git a/app/Fluidbook/Link/LinksData.php b/app/Fluidbook/Link/LinksData.php index 6142c98d1..db8d24950 100644 --- a/app/Fluidbook/Link/LinksData.php +++ b/app/Fluidbook/Link/LinksData.php @@ -626,14 +626,18 @@ class LinksData } } if (!isset(static::$_names[$u])) { - $u=User::find($u); - if($u){ - static::$_names[$u] = $u->name; + $u = User::find($u); + if ($u) { + $uid = $u->id; + static::$_names[$uid] = $u->name; } else { - static::$_names[$u] = '-'; + $uid = $u; + static::$_names[$uid] = '-'; } + } else { + $uid = $u; } - return static::$_names[$u]; + return static::$_names[$uid]; } public static function getMeta($book_id, $update = 'latest') diff --git a/app/SubForms/Link/Base.php b/app/SubForms/Link/Base.php index d3c274702..4b0e8977f 100644 --- a/app/SubForms/Link/Base.php +++ b/app/SubForms/Link/Base.php @@ -355,7 +355,7 @@ class Base extends Form * @return string */ - public function render(?callable $callback) + public function render(?callable $callback=null) { return view('fluidbook_publication.link_editor_form', ['form' => $this, 'crud' => $this->crud])->render($callback); } -- 2.39.5