1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Update in Modules to correct fatal error when upgrading from a much older version of ProcessWire

This commit is contained in:
Ryan Cramer
2023-06-03 10:31:39 -04:00
parent 0503a1bf68
commit 3b5bad2c58
5 changed files with 17 additions and 7 deletions

View File

@@ -1096,14 +1096,14 @@ class ModulesInfo extends ModulesClass {
$fromVersion = $this->modules->formatVersion($moduleVersions[$id]);
$toVersion = $this->modules->formatVersion($moduleInfo['version']);
$versionChanges[$moduleName] = "$fromVersion => $toVersion: $moduleName";
$editUrl = $this->modules->configs->getModuleEditUrl($moduleName, false);
$editUrl = $this->modules->configs->getModuleEditUrl($moduleName, false) . '&upgrade=1';
$this->modulesLastVersions[$id] = $moduleVersions[$id];
if(strpos($moduleName, 'Fieldtype') === 0) {
// apply update now, to Fieldtype modules only (since they are loaded differently)
$this->modules->getModule($moduleName);
} else {
$upgradeLinks[$moduleName] = "<a class='pw-modal' target='_blank' href='$editUrl'>" .
$sanitizer->entities1($this->_('Apply now')) . "</a>";
$sanitizer->entities1($this->_('Apply')) . "</a>";
}
}
}