foreach ($elements as $element) {
$versionNo = $element->getAttribute('name');
$packageInfo['versions'][$versionNo] = array(
- 'isAccessible' => true
+ 'isAccessible' => ($element->getAttribute('accessible') == 'true' ? true : false),
+ 'isCritical' => ($element->getAttribute('critical') == 'true' ? true : false)
);
- if ($element->hasAttribute('accessible') && $element->getAttribute('accessible') == 'false') {
- $packageInfo['versions'][$versionNo]['accessible'] = false;
- }
-
$children = $xpath->query('child::*', $element);
foreach ($children as $child) {
switch ($child->tagName) {
}
break;
- case 'updatetype':
- $packageInfo['versions'][$versionNo]['updateType'] = $child->nodeValue;
- break;
-
case 'timestamp':
$packageInfo['versions'][$versionNo]['packageDate'] = $child->nodeValue;
break;
$versionEditor->update(array(
'filename' => $packageFile,
'isAccessible' => ($versionData['isAccessible'] ? 1 : 0),
+ 'isCritical' => ($versionData['isCritical'] ? 1 : 0),
'license' => (isset($versionData['license']['license']) ? $versionData['license']['license'] : ''),
'licenseURL' => (isset($versionData['license']['license']) ? $versionData['license']['licenseURL'] : ''),
- 'packageDate' => $versionData['packageDate'],
- 'updateType' => $versionData['updateType']
+ 'packageDate' => $versionData['packageDate']
));
}
else {
'license' => (isset($versionData['license']['license']) ? $versionData['license']['license'] : ''),
'licenseURL' => (isset($versionData['license']['license']) ? $versionData['license']['licenseURL'] : ''),
'isAccessible' => ($versionData['isAccessible'] ? 1 : 0),
+ 'isCritical' => ($versionData['isCritical'] ? 1 : 0),
'packageDate' => $versionData['packageDate'],
'packageUpdateID' => $packageUpdateID,
- 'packageVersion' => $packageVersion,
- 'updateType' => $versionData['updateType']
+ 'packageVersion' => $packageVersion
));
$packageUpdateVersionID = $version->packageUpdateVersionID;
(packageUpdateVersionID, package)
VALUES (?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
- foreach ($requirementInserts as $requirement) {
+ foreach ($optionalInserts as $requirement) {
$statement->execute(array(
$requirement['packageUpdateVersionID'],
$requirement['package']
packageUpdateVersionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
packageUpdateID INT(10) NOT NULL,
packageVersion VARCHAR(50) NOT NULL DEFAULT '',
- updateType VARCHAR(10) NOT NULL DEFAULT '',
packageDate INT(10) NOT NULL DEFAULT 0,
filename VARCHAR(255) NOT NULL DEFAULT '',
license VARCHAR(255) NOT NULL DEFAULT '',
licenseURL VARCHAR(255) NOT NULL DEFAULT '',
isAccessible TINYINT(1) NOT NULL DEFAULT 1,
+ isCritical TINYINT(1) NOT NULL DEFAULT 0,
UNIQUE KEY packageUpdateID (packageUpdateID, packageVersion)
);