Skip to content

Commit 6089b33

Browse files
xh3n1samtuke
authored andcommitted
Add brackets
1 parent 86e6200 commit 6089b33

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

public_html/lists/admin/upgrade.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,18 @@ function output($message)
175175
// Update jQuery version referenced in public page HTML stored in the database
176176
if (version_compare($dbversion, '3.4.1', '<')) {
177177

178-
179-
180178
$replacement = "jquery.min.js";
181179

182180
// Replace jQuery version in config table.
183181
$oldConfigFooter = getConfig('pagefooter');
184182
$matches = null;
185183

186184
preg_match('/jquery-3.3.1.min.js/', $oldConfigFooter, $matches);
187-
if ($matches[0] == "jquery-3.3.1.min.js"){
185+
if ($matches[0] == "jquery-3.3.1.min.js") {
188186
$pattern = "jquery-3.3.1.min.js";
189-
} else $pattern = "jquery-1.12.1.min.js";
187+
} else {
188+
$pattern = "jquery-1.12.1.min.js";
189+
}
190190

191191
$newConfigFooter = str_replace($pattern, $replacement, $oldConfigFooter);
192192
SaveConfig('pagefooter', $newConfigFooter);
@@ -199,10 +199,11 @@ function output($message)
199199
}
200200
foreach ($footersArray as $key => $value) {
201201
preg_match('/jquery-3.3.1.min.js/', $value, $matches);
202-
if ($matches[0] == "jquery-3.3.1.min.js"){
202+
if ($matches[0] == "jquery-3.3.1.min.js") {
203203
$pattern = "jquery-3.3.1.min.js";
204-
} else $pattern = "jquery-1.12.1.min.js";
205-
204+
} else {
205+
$pattern = "jquery-1.12.1.min.js";
206+
}
206207
$newFooter = str_replace($pattern, $replacement, $value);
207208
Sql_Query(sprintf('update %s set data = "%s" where data = "%s" ', $GLOBALS['tables']['subscribepage_data'], sql_escape($newFooter), addslashes($value)));
208209
}

0 commit comments

Comments
 (0)