From 2690afba236a6fbb30a287f1005ca374e4adada2 Mon Sep 17 00:00:00 2001 From: Colin Fleming Date: Thu, 5 Jun 2014 19:41:50 +0100 Subject: Update "pkg_edit.,php" "custom_php_after_head_command", if the PHP code also contains JavaScript ("squid_auth.xml" for example) then this will cause HTML errors, as you are not supposed to have anything between the closing HEAD tag and the opening BODY tag. Add the CLOSEHEAD PHP variable, move the include HEAD.INC into the PHP IF statement and manually close the HEAD tab, else just include HEAD.INC --- usr/local/www/pkg_edit.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php index 8db3eae..d9544ed 100644 --- a/usr/local/www/pkg_edit.php +++ b/usr/local/www/pkg_edit.php @@ -258,10 +258,15 @@ else $title = gettext("Package Editor"); $pgtitle = $title; -include("head.inc"); -if ($pkg['custom_php_after_head_command']) +if ($pkg['custom_php_after_head_command']) { + $closehead = false; + include("head.inc"); eval($pkg['custom_php_after_head_command']); + echo "\n"; +} +else + include("head.inc"); ?> -- cgit v1.1