Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
samtuke committed Apr 12, 2019
1 parent 6089b33 commit aa38f90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public_html/lists/admin/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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") {
Expand Down

0 comments on commit aa38f90

Please sign in to comment.