Remove obsolete update scripts (2.0 -> 2.1)
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 May 2015 21:33:07 +0000 (23:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 May 2015 21:33:07 +0000 (23:33 +0200)
13 files changed:
com.woltlab.wcf/pre_update_check.tar [deleted file]
com.woltlab.wcf/update_210.sql [deleted file]
com.woltlab.wcf/update_212.sql [deleted file]
com.woltlab.wcf/update_user1_210.sql [deleted file]
com.woltlab.wcf/update_user2_210.sql [deleted file]
com.woltlab.wcf/update_user3_210.sql [deleted file]
com.woltlab.wcf/update_user4_210.sql [deleted file]
com.woltlab.wcf/update_user5_210.sql [deleted file]
wcfsetup/install/files/acp/pre_update_com.woltlab.wcf_2.1.php [deleted file]
wcfsetup/install/files/acp/rebuild_attachments_com.woltlab.wcf_2.1.4.php [deleted file]
wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php [deleted file]
wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php [deleted file]
wcfsetup/install/files/acp/update_mqc_com.woltlab.wcf_2.1.php [deleted file]

diff --git a/com.woltlab.wcf/pre_update_check.tar b/com.woltlab.wcf/pre_update_check.tar
deleted file mode 100644 (file)
index e37c953..0000000
Binary files a/com.woltlab.wcf/pre_update_check.tar and /dev/null differ
diff --git a/com.woltlab.wcf/update_210.sql b/com.woltlab.wcf/update_210.sql
deleted file mode 100644 (file)
index 1a601d6..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-/* 
- * ##################
- * ### NEW TABLES ###
- * ##################
- */
-
-DROP TABLE IF EXISTS wcf1_ad;
-CREATE TABLE wcf1_ad (
-       adID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       objectTypeID INT(10) NOT NULL,
-       adName VARCHAR(255) NOT NULL,
-       ad MEDIUMTEXT,
-       isDisabled TINYINT(1) NOT NULL DEFAULT 0,
-       showOrder INT(10) NOT NULL DEFAULT 0
-);
-
-DROP TABLE IF EXISTS wcf1_captcha_question;
-CREATE TABLE wcf1_captcha_question (
-       questionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       question VARCHAR(255) NOT NULL,
-       answers MEDIUMTEXT,
-       isDisabled TINYINT(1) NOT NULL DEFAULT 0
-);
-
-DROP TABLE IF EXISTS wcf1_condition;
-CREATE TABLE wcf1_condition (
-       conditionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       objectTypeID INT(10) NOT NULL,
-       objectID INT(10) NOT NULL,
-       conditionData MEDIUMTEXT
-);
-
-DROP TABLE IF EXISTS wcf1_edit_history_entry;
-CREATE TABLE wcf1_edit_history_entry (
-       entryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       objectTypeID INT(10) NOT NULL,
-       objectID INT(10) NOT NULL,
-       userID INT(10),
-       username VARCHAR(255) NOT NULL DEFAULT '',
-       time INT(10) NOT NULL DEFAULT 0, -- time the version was created, displayed to the user
-       obsoletedAt INT(10) NOT NULL DEFAULT 0, -- time the version was inserted into the edit history, used for clean up
-       obsoletedByUserID INT(10),
-       message MEDIUMTEXT,
-       editReason TEXT,
-       
-       KEY (objectTypeID, objectID),
-       KEY (obsoletedAt, obsoletedByUserID)
-);
-
-DROP TABLE IF EXISTS wcf1_message_embedded_object;
-CREATE TABLE wcf1_message_embedded_object (
-       messageObjectTypeID INT(10) NOT NULL,
-       messageID INT(10) NOT NULL,
-       embeddedObjectTypeID INT(10) NOT NULL,
-       embeddedObjectID INT(10) NOT NULL,
-       
-       KEY (messageObjectTypeID, messageID)
-);
-
-DROP TABLE IF EXISTS wcf1_notice;
-CREATE TABLE wcf1_notice (
-       noticeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       noticeName VARCHAR(255) NOT NULL,
-       notice MEDIUMTEXT,
-       noticeUseHtml TINYINT(1) NOT NULL DEFAULT 0,
-       cssClassName VARCHAR(255) NOT NULL DEFAULT 'info',
-       showOrder INT(10) NOT NULL DEFAULT 0,
-       isDisabled TINYINT(1) NOT NULL DEFAULT 0,
-       isDismissible TINYINT(1) NOT NULL DEFAULT 0
-);
-
-DROP TABLE IF EXISTS wcf1_notice_dismissed;
-CREATE TABLE wcf1_notice_dismissed (
-       noticeID INT(10) NOT NULL,
-       userID INT(10) NOT NULL,
-       PRIMARY KEY (noticeID, userID)
-);
-
-DROP TABLE IF EXISTS wcf1_paid_subscription;
-CREATE TABLE wcf1_paid_subscription (
-       subscriptionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       title VARCHAR(255) NOT NULL DEFAULT '',
-       description TEXT,
-       isDisabled TINYINT(1) NOT NULL DEFAULT 0,
-       showOrder INT(10) NOT NULL DEFAULT 0,
-       cost DECIMAL(10,2) NOT NULL DEFAULT 0,
-       currency VARCHAR(3) NOT NULL DEFAULT 'EUR',
-       subscriptionLength SMALLINT(3) NOT NULL DEFAULT 0,
-       subscriptionLengthUnit ENUM('', 'D', 'M', 'Y') NOT NULL DEFAULT '',
-       isRecurring TINYINT(1) NOT NULL DEFAULT 0,
-       groupIDs TEXT,
-       excludedSubscriptionIDs TEXT
-);
-
-DROP TABLE IF EXISTS wcf1_paid_subscription_user;
-CREATE TABLE wcf1_paid_subscription_user (
-       subscriptionUserID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       subscriptionID INT(10) NOT NULL,
-       userID INT(10) NOT NULL,
-       startDate INT(10) NOT NULL DEFAULT 0,
-       endDate INT(10) NOT NULL DEFAULT 0,
-       isActive TINYINT(1) NOT NULL DEFAULT 1,
-       
-       UNIQUE KEY (subscriptionID, userID),
-       KEY (isActive)
-);
-
-DROP TABLE IF EXISTS wcf1_paid_subscription_transaction_log;
-CREATE TABLE wcf1_paid_subscription_transaction_log (
-       logID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       subscriptionUserID INT(10),
-       userID INT(10),
-       subscriptionID INT(10),
-       paymentMethodObjectTypeID INT(10) NOT NULL,
-       logTime INT(10) NOT NULL DEFAULT 0,
-       transactionID VARCHAR(255) NOT NULL DEFAULT '',
-       transactionDetails MEDIUMTEXT,
-       logMessage VARCHAR(255) NOT NULL DEFAULT ''
-);
-
-DROP TABLE IF EXISTS wcf1_session_virtual;
-CREATE TABLE wcf1_session_virtual (
-       virtualSessionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       sessionID CHAR(40) NOT NULL,
-       ipAddress VARCHAR(39) NOT NULL DEFAULT '',
-       userAgent VARCHAR(255) NOT NULL DEFAULT '',
-       lastActivityTime INT(10) NOT NULL DEFAULT 0,
-       UNIQUE KEY (sessionID, ipAddress, userAgent)
-);
-
-DROP TABLE IF EXISTS wcf1_stat_daily;
-CREATE TABLE wcf1_stat_daily (
-       statID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       objectTypeID INT(10) NOT NULL,
-       date DATE NOT NULL,
-       counter INT(10) NOT NULL DEFAULT 0,
-       total INT(10) NOT NULL DEFAULT 0,
-       
-       UNIQUE KEY (objectTypeID, date)
-);
-
-DROP TABLE IF EXISTS wcf1_user_authentication_failure;
-CREATE TABLE wcf1_user_authentication_failure (
-       failureID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       environment ENUM('user', 'admin') NOT NULL DEFAULT 'user',
-       userID INT(10),
-       username VARCHAR(255) NOT NULL DEFAULT '',
-       time INT(10) NOT NULL DEFAULT 0,
-       ipAddress VARCHAR(39) NOT NULL DEFAULT '',
-       userAgent VARCHAR(255) NOT NULL DEFAULT '',
-       KEY (ipAddress, time),
-       KEY (time)
-);
-
-DROP TABLE IF EXISTS wcf1_user_group_assignment;
-CREATE TABLE wcf1_user_group_assignment (
-       assignmentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       groupID INT(10) NOT NULL,
-       title VARCHAR(255) NOT NULL,
-       isDisabled TINYINT(1) NOT NULL DEFAULT 0
-);
-
-DROP TABLE IF EXISTS wcf1_user_notification_author;
-CREATE TABLE wcf1_user_notification_author (
-       notificationID INT(10) NOT NULL,
-       authorID INT(10),
-       time INT(10) NOT NULL DEFAULT 0,
-       UNIQUE KEY (notificationID, authorID)
-);
-
-/* 
- * ############################
- * ### DROP EXISTING TABLES ###
- * ############################
- */
-
-DROP TABLE wcf1_search_index;
-
-/* 
- * ##############################
- * ### MODIFY EXISTING TABLES ###
- * ##############################
- */
-
-ALTER TABLE wcf1_bbcode ADD originIsSystem TINYINT(1) NOT NULL DEFAULT 0;
-
-ALTER TABLE wcf1_label_group ADD showOrder INT(10) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_label_group ADD groupDescription VARCHAR(255) NOT NULL DEFAULT '';
-
-ALTER TABLE wcf1_moderation_queue ADD comments SMALLINT(5) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_moderation_queue DROP FOREIGN KEY objectTypeID;
-ALTER TABLE wcf1_moderation_queue DROP KEY affectedObject;
-ALTER TABLE wcf1_moderation_queue ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-/* change default value to '1' */
-ALTER TABLE wcf1_like CHANGE time time INT(10) NOT NULL DEFAULT 1;
-
-ALTER TABLE wcf1_package_update_server ADD apiVersion ENUM('2.0', '2.1') NOT NULL DEFAULT '2.0';
-ALTER TABLE wcf1_package_update_server ADD metaData TEXT;
-
-ALTER TABLE wcf1_page_menu_item ADD originIsSystem TINYINT(1) NOT NULL DEFAULT 0;
-
-/* truncate table to ensure consistency */
-DELETE FROM wcf1_session;
-DELETE FROM wcf1_session_virtual;
-
-ALTER TABLE wcf1_session ADD UNIQUE KEY uniqueUserID (userID);
-
-ALTER TABLE wcf1_sitemap ADD permissions TEXT NULL;
-ALTER TABLE wcf1_sitemap ADD options TEXT NULL;
-
-ALTER TABLE wcf1_template_listener ADD niceValue TINYINT(3) NOT NULL DEFAULT 0;
-
-ALTER TABLE wcf1_user_group_option ADD usersOnly TINYINT(1) NOT NULL DEFAULT 0;
-
-ALTER TABLE wcf1_user_menu_item ADD iconClassName VARCHAR(255) NOT NULL DEFAULT '';
-
-/* truncate table to ensure consistency */
-DELETE FROM wcf1_user_notification;
-
-ALTER TABLE wcf1_user_notification CHANGE authorID authorID INT(10) NULL;
-ALTER TABLE wcf1_user_notification ADD timesTriggered INT(10) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_user_notification ADD guestTimesTriggered INT(10) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_user_notification ADD userID INT(10) NOT NULL;
-ALTER TABLE wcf1_user_notification ADD mailNotified TINYINT(1) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_user_notification ADD confirmTime INT(10) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_user_notification ADD baseObjectID INT(10) NOT NULL DEFAULT 0;
-ALTER TABLE wcf1_user_notification ADD KEY userRelatedFields (userID, eventID, objectID, confirmTime);
-ALTER TABLE wcf1_user_notification ADD KEY userConfirmTime (userID, confirmTime);
-ALTER TABLE wcf1_user_notification DROP KEY eventHash;
-ALTER TABLE wcf1_user_notification DROP FOREIGN KEY packageID;
-ALTER TABLE wcf1_user_notification DROP KEY packageID;
-
-ALTER TABLE wcf1_user_notification_to_user DROP mailNotified;
-
-ALTER TABLE wcf1_user_notification_event ADD presetMailNotificationType ENUM('none', 'instant', 'daily') NOT NULL DEFAULT 'none';
-
-ALTER TABLE wcf1_user_option ADD originIsSystem TINYINT(1) NOT NULL DEFAULT 0;
-
-/* 
- * ####################
- * ### FOREIGN KEYS ###
- * ####################
- */
-
-ALTER TABLE wcf1_ad ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_condition ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (obsoletedByUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-
-ALTER TABLE wcf1_paid_subscription_user ADD FOREIGN KEY (subscriptionID) REFERENCES wcf1_paid_subscription (subscriptionID) ON DELETE CASCADE;
-ALTER TABLE wcf1_paid_subscription_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (subscriptionUserID) REFERENCES wcf1_paid_subscription_user (subscriptionUserID) ON DELETE SET NULL;
-ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (subscriptionID) REFERENCES wcf1_paid_subscription (subscriptionID) ON DELETE SET NULL;
-ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (paymentMethodObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_session (sessionID) ON DELETE CASCADE ON UPDATE CASCADE;
-
-ALTER TABLE wcf1_user_group_assignment ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification_author ADD FOREIGN KEY (notificationID) REFERENCES wcf1_user_notification (notificationID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_author ADD FOREIGN KEY (authorID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_authentication_failure ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-
-ALTER TABLE wcf1_message_embedded_object ADD FOREIGN KEY (messageObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-ALTER TABLE wcf1_message_embedded_object ADD FOREIGN KEY (embeddedObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_stat_daily ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_notice_dismissed ADD FOREIGN KEY (noticeID) REFERENCES wcf1_notice (noticeID) ON DELETE CASCADE;
-ALTER TABLE wcf1_notice_dismissed ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-
-/* 
- * #######################
- * ### STYLE VARIABLES ###
- * #######################
- */
-
-UPDATE wcf1_style_variable SET defaultValue = '0px' WHERE variableName = 'wcfContainerBorderRadius';
-DELETE FROM wcf1_style_variable WHERE variableName = 'wcfMainMenuHoverBackgroundColor';
-
-/* 
- * #######################
- * ### MEDIA PROVIDERS ###
- * #######################
- */
-
-INSERT INTO wcf1_bbcode_media_provider (title, regex, html) VALUES ('Soundcloud set', 'https?://soundcloud.com/(?P<artist>[a-zA-Z0-9_-]+)/sets/(?P<name>[a-zA-Z0-9_-]+)', '<iframe width="100%" height="450" scrolling="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fsoundcloud.com%2F{$artist}%2Fsets%2F{$name}"></iframe>');
-UPDATE wcf1_bbcode_media_provider SET regex = 'https?://soundcloud.com/(?P<artist>[a-zA-Z0-9_-]+)/(?!sets/)(?P<song>[a-zA-Z0-9_-]+)' WHERE title = 'Soundcloud';
-UPDATE wcf1_bbcode_media_provider SET html = '<iframe style="max-width:100%;" width="560" height="315" src="https://www.youtube-nocookie.com/embed/{$ID}?wmode=transparent{$start}" allowfullscreen></iframe>' WHERE title = 'YouTube';
-UPDATE wcf1_bbcode_media_provider SET regex = 'https?://vimeo\\.com/(?P<ID>\\d+)', html = '<iframe src="https://player.vimeo.com/video/{$ID}" width="400" height="225" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>' WHERE title = 'Vimeo';
-
-/* 
- * ##############################
- * ### TYPHOON UPDATE SERVERS ###
- * ##############################
- */
-
-INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://update.woltlab.com/typhoon/', 'online', 0, NULL, 0, '', '');
-INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://store.woltlab.com/typhoon/', 'online', 0, NULL, 0, '', '');
-
-/* 
- * ########################
- * ### MINOR UPDATES ######
- * ########################
- */
-
-/* change default value to '1' */
-UPDATE wcf1_like SET time = 1 WHERE time = 0;
diff --git a/com.woltlab.wcf/update_212.sql b/com.woltlab.wcf/update_212.sql
deleted file mode 100644 (file)
index 7ea7d1c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-UPDATE wcf1_bbcode_media_provider SET html = '<iframe style="max-width:100%;" width="560" height="315" src="https://www.youtube.com/embed/{$ID}?wmode=transparent{$start}" allowfullscreen></iframe>' WHERE title = 'YouTube';
diff --git a/com.woltlab.wcf/update_user1_210.sql b/com.woltlab.wcf/update_user1_210.sql
deleted file mode 100644 (file)
index decb8f7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE wcf1_user ADD banExpires INT(10) NOT NULL DEFAULT 0;
diff --git a/com.woltlab.wcf/update_user2_210.sql b/com.woltlab.wcf/update_user2_210.sql
deleted file mode 100644 (file)
index 41a9d3f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE wcf1_user ADD disableAvatarExpires INT(10) NOT NULL DEFAULT 0;
diff --git a/com.woltlab.wcf/update_user3_210.sql b/com.woltlab.wcf/update_user3_210.sql
deleted file mode 100644 (file)
index 1407ea3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE wcf1_user ADD disableSignatureExpires INT(10) NOT NULL DEFAULT 0;
diff --git a/com.woltlab.wcf/update_user4_210.sql b/com.woltlab.wcf/update_user4_210.sql
deleted file mode 100644 (file)
index 310f32f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE wcf1_user ADD socialNetworkPrivacySettings TEXT;
diff --git a/com.woltlab.wcf/update_user5_210.sql b/com.woltlab.wcf/update_user5_210.sql
deleted file mode 100644 (file)
index bde3881..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE wcf1_user ADD gravatarFileExtension VARCHAR(3) NOT NULL DEFAULT '';
diff --git a/wcfsetup/install/files/acp/pre_update_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/pre_update_com.woltlab.wcf_2.1.php
deleted file mode 100644 (file)
index 9acde03..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-use wcf\data\package\Package;
-use wcf\system\exception\SystemException;
-use wcf\system\WCF;
-
-/**
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @category   Community Framework
- */
-
-if (Package::compareVersion(preg_replace('~ \(Maelstrom\)$~', '', WCF_VERSION), '2.0.10', '<')) {
-       if (WCF::getLanguage()->getFixedLanguageCode() == 'de') {
-               throw new SystemException("Die Aktualisierung erfordert WoltLab Community Framework (com.woltlab.wcf) in Version 2.0.10 oder hoeher");
-       }
-       else {
-               throw new SystemException("Update requires at least WoltLab Community Framework (com.woltlab.wcf) in version 2.0.10 or higher");
-       }
-}
diff --git a/wcfsetup/install/files/acp/rebuild_attachments_com.woltlab.wcf_2.1.4.php b/wcfsetup/install/files/acp/rebuild_attachments_com.woltlab.wcf_2.1.4.php
deleted file mode 100644 (file)
index c64d355..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-use wcf\data\attachment\AttachmentList;
-use wcf\system\package\SplitNodeException;
-use wcf\system\WCF;
-
-/**
- * Checks the filesize of all image attachments since the release of WCF 2.1 due
- * to issues with rotated images whose filesize is incorrect.
- * 
- * @author     Matthias Schmidt
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @category   Community Framework
- */
-$minimumAttachmentTime = 1425219870; // time of the release note
-
-$attachmentsPerRun = 100;
-$rebuildData = WCF::getSession()->getVar('__wcfUpdateRebuildAttachments');
-if ($rebuildData === null) {
-       $sql = "SELECT  COUNT(*)
-               FROM    wcf".WCF_N."_attachment
-               WHERE   isImage = ?
-                       AND uploadTime >= ?";
-       $statement = WCF::getDB()->prepareStatement($sql);
-       $statement->execute(array(
-               1,
-               $minimumAttachmentTime
-       ));
-       $count = $statement->fetchColumn();
-       
-       $rebuildData = array(
-               'i' => 0,
-               'max' => 0
-       );
-       
-       if ($count) {
-               $rebuildData['max'] = ceil($count / $attachmentsPerRun);
-       }
-}
-
-if ($rebuildData['max']) {
-       // get attachment file data
-       $attachmentList = new AttachmentList();
-       $attachmentList->getConditionBuilder()->add('isImage = ?', array(1));
-       $attachmentList->getConditionBuilder()->add('uploadTime >= ?', array($minimumAttachmentTime));
-       $attachmentList->sqlOffset = $rebuildData['i'] * $attachmentsPerRun;
-       $attachmentList->sqlLimit = $attachmentsPerRun;
-       $attachmentList->readObjects();
-       
-       if (!count($attachmentList)) {
-               // all relevant attachments have been processed
-               WCF::getSession()->unregister('__wcfUpdateRebuildAttachments');
-       }
-       else {
-               $attachmentUpdates = array();
-               foreach ($attachmentList as $attachment) {
-                       if (!file_exists($attachment->getLocation())) {
-                               // missing files should not cause the update to fail
-                               continue;
-                       }
-                       
-                       $filesize = filesize($attachment->getLocation());
-                       if ($filesize != $attachment->filesize) {
-                               $attachmentUpdates[$attachment->attachmentID] = $filesize;
-                       }
-               }
-               
-               if (!empty($attachmentUpdates)) {
-                       $sql = "UPDATE  wcf".WCF_N."_attachment
-                               SET     filesize = ?
-                               WHERE   attachmentID = ?";
-                       $statement = WCF::getDB()->prepareStatement($sql);
-                       
-                       WCF::getDB()->beginTransaction();
-                       foreach ($attachmentUpdates as $attachmentID => $filesize) {
-                               $statement->execute(array(
-                                       $filesize,
-                                       $attachmentID
-                               ));
-                       }
-                       WCF::getDB()->commitTransaction();
-               }
-               
-               // update rebuiled data
-               $rebuildData['i']++;
-               WCF::getSession()->register('__wcfUpdateRebuildAttachments', $rebuildData);
-               
-               throw new SplitNodeException();
-       }
-}
diff --git a/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php
deleted file mode 100644 (file)
index b764032..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-use wcf\system\package\SplitNodeException;
-use wcf\system\WCF;
-
-/**
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @category   Community Framework
- */
-$commentsPerRun = 100;
-$rebuildData = WCF::getSession()->getVar('__wcfUpdateRebuildComments');
-if ($rebuildData === null) {
-       $sql = "SELECT  COUNT(*) AS count
-               FROM    wcf".WCF_N."_comment
-               WHERE   responses > ?";
-       $statement = WCF::getDB()->prepareStatement($sql);
-       $statement->execute(array(3));
-       $row = $statement->fetchSingleRow();
-       
-       $rebuildData = array(
-               'i' => 0,
-               'max' => 0
-       );
-       
-       if ($row['count']) {
-               $rebuildData['max'] = ceil($row['count'] / $commentsPerRun);
-       }
-}
-
-if ($rebuildData['max']) {
-       $offset = $rebuildData['i'] * $commentsPerRun;
-       
-       // get comments
-       $sql = "SELECT          commentID
-               FROM            wcf".WCF_N."_comment
-               WHERE           responses > ?
-               ORDER BY        commentID";
-       $statement = WCF::getDB()->prepareStatement($sql, $commentsPerRun, $offset);
-       $statement->execute(array(3));
-       
-       $commentIDs = array();
-       while ($row = $statement->fetchArray()) {
-               $commentIDs[] = $row['commentID'];
-       }
-       
-       if (empty($commentIDs)) {
-               WCF::getSession()->unregister('__wcfUpdateRebuildComments');
-       }
-       else {
-               // get responses per comment
-               $sql = "SELECT          responseID
-                       FROM            wcf".WCF_N."_comment_response
-                       WHERE           commentID = ?
-                       ORDER BY        time ASC, responseID ASC";
-               $statement = WCF::getDB()->prepareStatement($sql, 5);
-               
-               $commentData = array();
-               for ($i = 0, $length = count($commentIDs); $i < $length; $i++) {
-                       $commentID = $commentIDs[$i];
-                       $commentData[$commentID] = array();
-                       
-                       $statement->execute(array($commentID));
-                       while ($row = $statement->fetchArray()) {
-                               $commentData[$commentID][] = $row['responseID'];
-                       }
-               }
-               
-               // set responseIDs per comment
-               $sql = "UPDATE  wcf".WCF_N."_comment
-                       SET     responseIDs = ?
-                       WHERE   commentID = ?";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               WCF::getDB()->beginTransaction();
-               foreach ($commentData as $commentID => $responseIDs) {
-                       $statement->execute(array(
-                               serialize($responseIDs),
-                               $commentID
-                       ));
-               }
-               WCF::getDB()->commitTransaction();
-               
-               $rebuildData['i']++;
-               WCF::getSession()->register('__wcfUpdateRebuildComments', $rebuildData);
-               
-               // call this script again
-               throw new SplitNodeException();
-       }
-}
diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php
deleted file mode 100644 (file)
index 9bf180f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-use wcf\data\option\OptionEditor;
-
-/**
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @category   Community Framework
- */
-
-$options = array(
-       'cache_source_type' => (CACHE_SOURCE_TYPE == 'no' ? 'disk' : CACHE_SOURCE_TYPE), 
-       'last_update_time' => TIME_NOW,
-       'url_legacy_mode' => 1,
-       'url_to_lowercase' => 0,
-       'user_cleanup_notification_lifetime' => (USER_CLEANUP_NOTIFICATION_LIFETIME == 60 ? 14 : USER_CLEANUP_NOTIFICATION_LIFETIME),
-       // the line below equals \wcf\util\StringUtil::getUUID(), but since we have to do it in one step, the "old" class exists in memory
-       'wcf_uuid' => sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535))
-);
-
-// clear recaptcha keys if public key and private key match WoltLab's OEM key
-if (RECAPTCHA_PUBLICKEY === '6LfOlMYSAAAAADvo3s4puBAYDqI-6YK2ybe7BJE5' && RECAPTCHA_PRIVATEKEY === '6LfOlMYSAAAAAKR3m_EFxmDv1xS8PCfeaSZ2LdG9') {
-       $options['recaptcha_publickey'] = '';
-       $options['recaptcha_privatekey'] = '';
-}
-
-OptionEditor::import($options);
-
-OptionEditor::resetCache();
diff --git a/wcfsetup/install/files/acp/update_mqc_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/update_mqc_com.woltlab.wcf_2.1.php
deleted file mode 100644 (file)
index 2a54e5a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-use wcf\system\WCF;
-
-/**
- * Updates the wcf1_moderation_queue by converting the 'comment' field into a wcf1_comment object.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @category   Community Framework
- */
-
-$sql = "SELECT objectTypeID
-       FROM    wcf".WCF_N."_object_type
-       WHERE   objectType = ?
-               AND definitionID = (
-                       SELECT  definitionID
-                       FROM    wcf".WCF_N."_object_type_definition
-                       WHERE   definitionName = ?
-               )";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute(array(
-       'com.woltlab.wcf.moderation.queue',
-       'com.woltlab.wcf.comment.commentableContent'
-));
-$row = $statement->fetchArray();
-
-// create comments for non-empty 'comment' fields
-$sql = "INSERT INTO    wcf".WCF_N."_comment
-                       (objectTypeID, objectID, time, userID, username, message)
-       SELECT          ".$row['objectTypeID'].", queueID, ".TIME_NOW.", NULL, 'Unknown', comment
-       FROM            wcf".WCF_N."_moderation_queue
-       WHERE           comment <> ''";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute();
-
-// set comment counter
-$sql = "UPDATE wcf".WCF_N."_moderation_queue
-       SET     comments = 1
-       WHERE   comment <> ''";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute();
-
-// drop comment column
-WCF::getDB()->getEditor()->dropColumn('wcf'.WCF_N.'_moderation_queue', 'comment');