Skip to content

Commit

Permalink
Fixed ambiguities in the variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Boes committed May 28, 2024
1 parent b92b29a commit b10cae9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/code/core/Mage/Core/Model/Design/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,14 +684,15 @@ public static function getPackageByUserAgent(array $rules, $regexpsConfigPath =
*/
public function getMergedJsUrl($files)
{
$olderTimestamp = '';
$newestTimestamp = '';
foreach ($files as $file) {
if ($olderTimestamp < filemtime($file)) {
$olderTimestamp = filemtime($file);
$filemtime = filemtime($file);
if ($filemtime > $newestTimestamp) {
$newestTimestamp = $filemtime;
}
}

$targetFilename = md5(implode(',', $files) . "|{$olderTimestamp}") . '.js';
$targetFilename = md5(implode(',', $files) . "|{$newestTimestamp}") . '.js';
$targetDir = $this->_initMergerDir('js');
if (!$targetDir) {
return '';
Expand Down Expand Up @@ -727,14 +728,15 @@ public function getMergedCssUrl($files)
}

// merge into target file
$olderTimestamp = '';
$newestTimestamp = '';
foreach ($files as $file) {
if ($olderTimestamp < filemtime($file)) {
$olderTimestamp = filemtime($file);
$filemtime = filemtime($file);
if ($filemtime > $newestTimestamp) {
$newestTimestamp = $filemtime;
}
}

$targetFilename = md5(implode(',', $files) . "|{$hostname}|{$port}|{$olderTimestamp}") . '.css';
$targetFilename = md5(implode(',', $files) . "|{$hostname}|{$port}|{$newestTimestamp}") . '.css';
$mergeFilesResult = $this->_mergeFiles(
$files,
$targetDir . DS . $targetFilename,
Expand Down

0 comments on commit b10cae9

Please sign in to comment.