From aa38f90b3afbc48a0609caa9a1874ead606d905a Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Fri, 12 Apr 2019 16:13:57 +0200 Subject: [PATCH] Add comments --- public_html/lists/admin/upgrade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public_html/lists/admin/upgrade.php b/public_html/lists/admin/upgrade.php index e21bc9b52..5902c17fe 100644 --- a/public_html/lists/admin/upgrade.php +++ b/public_html/lists/admin/upgrade.php @@ -175,12 +175,14 @@ function output($message) // Update jQuery version referenced in public page HTML stored in the database if (version_compare($dbversion, '3.4.1', '<')) { + // The new filename does not hard-code the jQuery version number $replacement = "jquery.min.js"; - // Replace jQuery version in config table. + // Replace jQuery version public page footers in config table $oldConfigFooter = getConfig('pagefooter'); $matches = null; + // Find and replace all references to version-specific jQuery files preg_match('/jquery-3.3.1.min.js/', $oldConfigFooter, $matches); if ($matches[0] == "jquery-3.3.1.min.js") { $pattern = "jquery-3.3.1.min.js"; @@ -197,6 +199,8 @@ function output($message) while ($row = Sql_Fetch_Assoc($req)) { $footersArray[] = $row['data']; } + + // Find and replace all references to version-specific jQuery files foreach ($footersArray as $key => $value) { preg_match('/jquery-3.3.1.min.js/', $value, $matches); if ($matches[0] == "jquery-3.3.1.min.js") {