From: Alexander Ebert Date: Tue, 15 Jan 2013 00:31:41 +0000 (+0100) Subject: Removed 'updateType' and replaced with 'isCritical' X-Git-Tag: 2.0.0_Beta_1~562^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=507f6f5b0893fe73482e9a738c3b159287c67c1d;p=GitHub%2FWoltLab%2FWCF.git Removed 'updateType' and replaced with 'isCritical' --- diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index dbc26ff7d1..5ee20f25af 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -186,13 +186,10 @@ class PackageUpdateDispatcher extends SingletonFactory { 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) { @@ -203,10 +200,6 @@ class PackageUpdateDispatcher extends SingletonFactory { } break; - case 'updatetype': - $packageInfo['versions'][$versionNo]['updateType'] = $child->nodeValue; - break; - case 'timestamp': $packageInfo['versions'][$versionNo]['packageDate'] = $child->nodeValue; break; @@ -350,10 +343,10 @@ class PackageUpdateDispatcher extends SingletonFactory { $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 { @@ -363,10 +356,10 @@ class PackageUpdateDispatcher extends SingletonFactory { '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; @@ -460,7 +453,7 @@ class PackageUpdateDispatcher extends SingletonFactory { (packageUpdateVersionID, package) VALUES (?, ?)"; $statement = WCF::getDB()->prepareStatement($sql); - foreach ($requirementInserts as $requirement) { + foreach ($optionalInserts as $requirement) { $statement->execute(array( $requirement['packageUpdateVersionID'], $requirement['package'] diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index ac4b08c4f0..24eed0b635 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -493,12 +493,12 @@ CREATE TABLE wcf1_package_update_version ( 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) );