if ($RequestName == $ExtensionKey) { $RequestName = '[NEXT]'; } else { if ($RequestName == '[NEXT]') { $CheckExtension = $ExtensionKey; $RequestName = ''; break; } } } } // Ping the CheckExtension value if it isn't empty if ($CheckExtension != '') { $Extension = $Extensions[$CheckExtension]; // Ping the Lussumo server with extension version information $VersionStatus = OpenUrl($Context->Configuration['UPDATE_URL'] . '?Extension=' . unhtmlspecialchars($Extension->Name) . '&Version=' . unhtmlspecialchars($Extension->Version), $Context); if ($VersionStatus == "GOOD") { echo $CheckExtension . '|[GOOD]' . $Context->GetDefinition('ExtensionStatusGood'); } elseif ($VersionStatus == "UNKNOWN") { echo $CheckExtension . '|[UNKNOWN]' . $Context->GetDefinition('ExtensionStatusUnknown'); } else { // If an item is out of date, it contains two bits of information // separated by pipes // eg. Version|URL $aVersionStatus = explode("|", $VersionStatus); if (count($aVersionStatus) == 2) { echo $CheckExtension . '|[OLD]' . str_replace(array('\\1', '\\2'), array($aVersionStatus[0], $aVersionStatus[1]), $Context->GetDefinition('NewVersionAvailable')); } else { // There was some kind of error echo $CheckExtension . '|[ERROR]' . $VersionStatus; }
if ($RequestName == $ExtensionKey) { $RequestName = '[NEXT]'; } else { if ($RequestName == '[NEXT]') { $CheckExtension = $ExtensionKey; $RequestName = ''; break; } } } } // Ping the CheckExtension value if it isn't empty if ($CheckExtension != '') { $Extension = $Extensions[$CheckExtension]; // Ping the Lussumo server with extension version information $CurrentVersion = OpenUrl($Context->Configuration['UPDATE_URL'] . '?name=' . unhtmlspecialchars($Extension->Name), $Context); if ($CurrentVersion == "UNKNOWN") { echo $CheckExtension . '|[UNKNOWN]' . $Context->GetDefinition('ExtensionStatusUnknown'); } else { if ($CurrentVersion <= $Extension->Version) { echo $CheckExtension . '|[GOOD]' . $Context->GetDefinition('ExtensionStatusGood'); } elseif ($CurrentVersion >= $Extension->Version) { $ExtensionName = $Extension->Name; $ExtensionURL = str_replace(' ', '', $ExtensionName); $ExtensionURL = $Context->Configuration['UPDATE_URL'] . '../extensions/' . $ExtensionURL . '/'; echo $CheckExtension . '|[OLD]' . str_replace(array('\\1', '\\2'), array($CurrentVersion, $ExtensionURL), $Context->GetDefinition('NewVersionAvailable')); } } } else { if ($RequestName == '[NEXT]') { echo 'COMPLETE';