From 8822f934385fc8079039f25137b6ec28372bae5a Mon Sep 17 00:00:00 2001 From: shuki Date: Thu, 5 Mar 2026 02:16:58 +0200 Subject: [PATCH] Fix JS syntax errors: convert qq{} to heredocs in restore.live.cgi Perl's qq{} delimiter matches balanced braces, which conflicted with JavaScript curly braces, producing empty function bodies. Converted _print_step1_js and _print_step2_js to heredoc blocks. Co-Authored-By: Claude Opus 4.6 --- cpanel/gniza/restore.live.cgi | 706 +++++++++++++++++----------------- 1 file changed, 355 insertions(+), 351 deletions(-) diff --git a/cpanel/gniza/restore.live.cgi b/cpanel/gniza/restore.live.cgi index 3b9f385..ad9ab9a 100644 --- a/cpanel/gniza/restore.live.cgi +++ b/cpanel/gniza/restore.live.cgi @@ -232,83 +232,85 @@ sub handle_step1 { sub _print_step1_js { my ($esc_type, $next_step) = @_; - print qq{\n}; + print <<"END_JS"; + +END_JS } # ── Step 2: Select specific item ───────────────────────────── @@ -409,280 +411,282 @@ sub _render_file_picker { sub _print_step2_js { my ($esc_type, $esc_remote, $esc_timestamp) = @_; - print qq{\n}; + print <<"END_JS"; + +END_JS } # ── Step 3: Confirmation ─────────────────────────────────────