<packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
<packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
<isapplication>1</isapplication>
- <version>5.2.7</version> <!-- codename: hurricane -->
- <date>2020-06-27</date>
+ <version>5.3.0 Alpha 1</version>
+ <date>2020-06-28</date>
</packageinformation>
<authorinformation>
<instruction type="script">acp/update_com.woltlab.wcf_preventMailAbuse.php</instruction>
</instructions>
-
- <instructions type="update" fromversion="5.2.6">
- <instruction type="acpTemplate">acptemplates_update.tar</instruction>
- <instruction type="file">files_update.tar</instruction>
- <instruction type="template">templates_update.tar</instruction>
-
- <instruction type="language" />
-
- <instruction type="mediaProvider" />
- <instruction type="option" />
- </instructions>
</package>
+++ /dev/null
-INSERT IGNORE INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorTableBorder', 'rgba(221, 221, 221, 1)');
-INSERT IGNORE INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfPageThemeColor', ''); -- uses `$wcfHeaderBackground` if left empty
+++ /dev/null
-<?php
-use wcf\system\database\table\column\BinaryDatabaseTableColumn;
-use wcf\system\database\table\column\CharDatabaseTableColumn;
-use wcf\system\database\table\column\DateDatabaseTableColumn;
-use wcf\system\database\table\column\DatetimeDatabaseTableColumn;
-use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
-use wcf\system\database\table\column\DefaultTrueBooleanDatabaseTableColumn;
-use wcf\system\database\table\column\EnumDatabaseTableColumn;
-use wcf\system\database\table\column\IntDatabaseTableColumn;
-use wcf\system\database\table\column\MediumtextDatabaseTableColumn;
-use wcf\system\database\table\column\NotNullInt10DatabaseTableColumn;
-use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
-use wcf\system\database\table\column\ObjectIdDatabaseTableColumn;
-use wcf\system\database\table\column\SmallintDatabaseTableColumn;
-use wcf\system\database\table\column\TextDatabaseTableColumn;
-use wcf\system\database\table\DatabaseTable;
-use wcf\system\database\table\DatabaseTableChangeProcessor;
-use wcf\system\database\table\index\DatabaseTableForeignKey;
-use wcf\system\database\table\index\DatabaseTableIndex;
-use wcf\system\database\table\index\DatabaseTablePrimaryIndex;
-use wcf\system\package\plugin\ScriptPackageInstallationPlugin;
-use wcf\system\WCF;
-
-/**
- * Updates the database table layout from WoltLab Suite Core 3.1 to 5.2.
- *
- * TODO: untested, potentially incomplete
- *
- * @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-
-$tables = [
- DatabaseTable::create('wcf1_bbcode_media_provider')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('isDisabled')
- ]),
-
- DatabaseTable::create('wcf1_blacklist_status')
- ->columns([
- DateDatabaseTableColumn::create('date')
- ->notNull(),
- DefaultFalseBooleanDatabaseTableColumn::create('delta1'),
- DefaultFalseBooleanDatabaseTableColumn::create('delta2'),
- DefaultFalseBooleanDatabaseTableColumn::create('delta3'),
- DefaultFalseBooleanDatabaseTableColumn::create('delta4')
- ])
- ->indices([
- DatabaseTableIndex::create('day')
- ->type(DatabaseTableIndex::UNIQUE_TYPE)
- ->columns(['date']),
- ]),
-
- DatabaseTable::create('wcf1_blacklist_entry')
- ->columns([
- EnumDatabaseTableColumn::create('type')
- ->enumValues(['email', 'ipv4', 'ipv6','username']),
- BinaryDatabaseTableColumn::create('hash')
- ->length(32),
- DatetimeDatabaseTableColumn::create('lastSeen')
- ->notNull(),
- SmallintDatabaseTableColumn::create('occurrences')
- ->length(5)
- ->notNull()
- ])
- ->indices([
- DatabaseTableIndex::create('entry')
- ->type(DatabaseTableIndex::UNIQUE_TYPE)
- ->columns(['type', 'hash']),
- DatabaseTableIndex::create('numberOfReports')
- ->columns(['type', 'occurrences'])
- ]),
-
- DatabaseTable::create('wcf1_box')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('isDisabled')
- ]),
-
- DatabaseTable::create('wcf1_category')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('descriptionUseHtml')
- ]),
-
- DatabaseTable::create('wcf1_comment')
- ->columns([
- MediumtextDatabaseTableColumn::create('message')
- ->notNull()
- ]),
-
- DatabaseTable::create('wcf1_comment_response')
- ->columns([
- MediumtextDatabaseTableColumn::create('message')
- ->notNull()
- ]),
-
- DatabaseTable::create('wcf1_contact_attachment')
- ->columns([
- NotNullInt10DatabaseTableColumn::create('attachmentID'),
- CharDatabaseTableColumn::create('accessKey')
- ->length(40)
- ->notNull()
- ])
- ->foreignKeys([
- DatabaseTableForeignKey::create()
- ->columns(['attachmentID'])
- ->referencedTable('wcf1_attachment')
- ->referencedColumns(['attachmentID'])
- ->onDelete('CASCADE')
- ]),
-
- DatabaseTable::create('wcf1_language_item')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('isCustomLanguageItem')
- ]),
-
- DatabaseTable::create('wcf1_like')
- ->columns([
- NotNullInt10DatabaseTableColumn::create('reactionTypeID')
- ]),
-
- DatabaseTable::create('wcf1_like_object')
- ->columns([
- TextDatabaseTableColumn::create('cachedReactions')
- ]),
-
- DatabaseTable::create('wcf1_media')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('captionEnableHtml'),
- NotNullInt10DatabaseTableColumn::create('downloads')
- ->defaultValue(0),
- NotNullInt10DatabaseTableColumn::create('lastDownloadTime')
- ->defaultValue(0)
- ]),
-
- DatabaseTable::create('wcf1_page')
- ->columns([
- IntDatabaseTableColumn::create('overrideApplicationPackageID')
- ->length(10),
- DefaultFalseBooleanDatabaseTableColumn::create('enableShareButtons')
- ])
- ->foreignKeys([
- DatabaseTableForeignKey::create()
- ->columns(['overrideApplicationPackageID'])
- ->referencedTable('wcf1_package')
- ->referencedColumns(['packageID'])
- ->onDelete('SET NULL')
- ]),
-
- DatabaseTable::create('wcf1_package')
- ->indices([
- DatabaseTableIndex::create('package')
- ->type(DatabaseTableIndex::UNIQUE_TYPE)
- ->columns(['package'])
- ]),
-
- DatabaseTable::create('wcf1_reaction_type')
- ->columns([
- ObjectIdDatabaseTableColumn::create('reactionTypeID'),
- NotNullVarchar255DatabaseTableColumn::create('title'),
- NotNullInt10DatabaseTableColumn::create('showOrder')
- ->defaultValue(0),
- NotNullVarchar255DatabaseTableColumn::create('iconFile')
- ->defaultValue(''),
- DefaultTrueBooleanDatabaseTableColumn::create('isAssignable')
- ])
- ->indices([
- DatabaseTablePrimaryIndex::create()
- ->columns(['reactionTypeID'])
- ]),
-
- DatabaseTable::create('wcf1_style')
- ->columns([
- EnumDatabaseTableColumn::create('apiVersion')
- ->notNull()
- ->enumValues(['3.0', '3.1', '5.2'])
- ->defaultValue('3.0')
- ]),
-
- DatabaseTable::create('wcf1_trophy')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('revokeAutomatically'),
- DefaultFalseBooleanDatabaseTableColumn::create('trophyUseHtml'),
- NotNullInt10DatabaseTableColumn::create('showOrder')
- ->defaultValue(0)
- ]),
-
- DatabaseTable::create('wcf1_user')
- ->columns([
- NotNullInt10DatabaseTableColumn::create('articles')
- ->defaultValue(0),
- NotNullVarchar255DatabaseTableColumn::create('blacklistMatches')
- ->defaultValue('')
- ]),
-
- DatabaseTable::create('wcf1_user_group')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('allowMention')
- ]),
-
- DatabaseTable::create('wcf1_user_trophy')
- ->columns([
- DefaultFalseBooleanDatabaseTableColumn::create('trophyUseHtml')
- ]),
-];
-
-(new DatabaseTableChangeProcessor(
- /** @var ScriptPackageInstallationPlugin $this */
- $this->installation->getPackage(),
- $tables,
- WCF::getDB()->getEditor())
-)->process();
+++ /dev/null
-<?php
-/**
- * This script deletes all recent activity events for likes. Running this script is necessary after an update to version 5.2,
- * because with this version the reaction system was introduced and the events there were changed so that they contain the
- * reaction type, which is not present in previous fired events. Older events will otherwise throw an error.
- *
- * @author Joshua Ruesweg
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-
-$definitionList = new \wcf\data\object\type\definition\ObjectTypeDefinitionList();
-$definitionList->getConditionBuilder()->add('definitionName = ?', ['com.woltlab.wcf.user.recentActivityEvent']);
-$definitionList->readObjects();
-$definition = $definitionList->current();
-
-$sql = "SELECT objectTypeID
- FROM wcf". WCF_N ."_object_type
- WHERE objectType LIKE '%likeable%'
- AND definitionID = ?";
-$statement = \wcf\system\WCF::getDB()->prepareStatement($sql);
-$statement->execute([$definition->definitionID]);
-$objectTypeIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
-
-$conditionBuilder = new \wcf\system\database\util\PreparedStatementConditionBuilder();
-$conditionBuilder->add('objectTypeID IN (?)', [$objectTypeIDs]);
-
-$sql = "DELETE FROM wcf". WCF_N ."_user_activity_event ".$conditionBuilder;
-$statement = \wcf\system\WCF::getDB()->prepareStatement($sql);
-$statement->execute($conditionBuilder->getParameters());
+++ /dev/null
-<?php
-use wcf\system\WCF;
-
-// This script ensures that an upgrade that failed during the SQL changes can be repeated without requiring a rollback.
-
-$dbEditor = WCF::getDB()->getEditor();
-$existingColumns = $dbEditor->getColumns('wcf'.WCF_N.'_package_installation_sql_log');
-$hasIsDoneColumn = false;
-foreach ($existingColumns as $column) {
- if ($column['name'] === 'isDone') {
- $hasIsDoneColumn = true;
- break;
- }
-}
-
-if (!$hasIsDoneColumn) {
- $dbEditor->addColumn('wcf'.WCF_N.'_package_installation_sql_log', 'isDone', [
- 'type' => 'tinyint',
- 'length' => 1,
- 'notNull' => 1,
- 'default' => 1,
- ]);
-}
+++ /dev/null
-<?php
-use wcf\data\package\Package;
-use wcf\system\exception\SystemException;
-use wcf\system\WCF;
-
-/**
- * @author Alexander Ebert
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-if (Package::compareVersion(WCF_VERSION, '3.1.11', '<')) {
- if (WCF::getLanguage()->getFixedLanguageCode() == 'de') {
- throw new SystemException("Die Aktualisierung erfordert WoltLab Suite Core (com.woltlab.wcf) in Version 3.1.11 oder höher.");
- }
- else {
- throw new SystemException("The update requires WoltLab Suite Core (com.woltlab.wcf) in version 3.1.11 or newer.");
- }
-}
-
-$requiredPHPVersion = '7.0.22';
-$comparePhpVersion = preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', phpversion());
-if (version_compare($comparePhpVersion, $requiredPHPVersion) === -1) {
- if (WCF::getLanguage()->getFixedLanguageCode() == 'de') {
- throw new SystemException("Die Aktualisierung erfordert PHP in Version {$requiredPHPVersion} oder höher.");
- }
- else {
- throw new SystemException("The update requires PHP in version {$requiredPHPVersion} or newer.");
- }
-}
-
-// check sql version
-$sqlVersion = WCF::getDB()->getVersion();
-$compareSQLVersion = preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion);
-if (stripos($sqlVersion, 'MariaDB') === false) {
- // For MySQL 8.0, MySQL 8.0.14+ is required
- // https://bugs.mysql.com/bug.php?id=88718
- if ($compareSQLVersion[0] === '8') {
- // MySQL 8.0.14+
- if (!(version_compare($compareSQLVersion, '8.0.14') >= 0)) {
- if (WCF::getLanguage()->getFixedLanguageCode() == 'de') {
- throw new SystemException("Ihre eingesetzte Version von MySQL 8 enthält einen bekannten Fehler und verhindert eine Aktualisierung, es wird mindestens MySQL 8.0.14 oder höher benötigt.");
- }
- else {
- throw new SystemException("The version of MySQL 8 that you are using contains a known bug that prevents an upgrade, MySQL 8.0.14 or newer is required.");
- }
- }
- }
-}
+++ /dev/null
-<?php
-use wcf\data\language\item\LanguageItemEditor;
-use wcf\data\like\Like;
-use wcf\data\option\OptionEditor;
-use wcf\system\language\LanguageFactory;
-use wcf\system\WCF;
-
-// !!!!!!!!!
-// HEADS UP! The columns for wcf1_like, wcf1_like_object and the wcf1_reaction_type table must already exists, before calling this script.
-// HEADS UP! The foreign key for the wcf1_like table will be created within this script, after providing real values for the reactionTypeID
-// HEADS UP! column. Also this script provides the basic reactionTypes.
-// !!!!!!!!!
-
-/**
- * @author Joshua Ruesweg
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-
-OptionEditor::import([
- 'like_show_summary' => 1,
-]);
-
-try {
- WCF::getDB()->beginTransaction();
-
- $reactions = ['like', 'thanks', 'haha', 'confused', 'sad'];
- if (LIKE_ENABLE_DISLIKE) {
- // Remove the existing phrase in case a previous upgrade attempt has failed.
- $sql = "DELETE FROM wcf".WCF_N."_language_item
- WHERE languageItem = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(['wcf.reactionType.title6']);
-
- $reactions[] = 'thumbsDown';
-
- $sql = "SELECT languageCategoryID
- FROM wcf".WCF_N."_language_category
- WHERE languageCategory = ?";
- $statement = WCF::getDB()->prepareStatement($sql, 1);
- $statement->execute(['wcf.reactionType']);
- $languageCategoryID = $statement->fetchSingleColumn();
-
- // Create a custom phrase for this reaction, it needs to be "manually" added
- // because it would otherwise conflict with the next reaction created by the
- // user, *if* there are no dislikes.
- foreach (LanguageFactory::getInstance()->getLanguages() as $language) {
- LanguageItemEditor::create([
- 'languageID' => $language->languageID,
- 'languageItem' => 'wcf.reactionType.title6',
- 'languageItemValue' => ($language->getFixedLanguageCode() === 'de' ? 'Gefällt mir nicht' : 'Dislike'),
- 'languageCategoryID' => $languageCategoryID,
- 'packageID' => 1,
- ]);
- }
- }
-
- $sql = "INSERT IGNORE INTO wcf".WCF_N."_reaction_type
- (reactionTypeID, title, showOrder, iconFile)
- VALUES (?, ?, ?, ?)";
- $statement = WCF::getDB()->prepareStatement($sql);
- for ($i = 0, $length = count($reactions); $i < $length; $i++) {
- $reactionTypeID = $i + 1;
-
- $statement->execute([
- $reactionTypeID,
- "wcf.reactionType.title{$reactionTypeID}",
- $reactionTypeID,
- "{$reactions[$i]}.svg",
- ]);
- }
-
- // Update the existing (dis)likes.
- $likeValues = [Like::LIKE => 1];
- if (LIKE_ENABLE_DISLIKE) $likeValues[Like::DISLIKE] = 6;
-
- $sql = "UPDATE wcf".WCF_N."_like
- SET reactionTypeID = ?
- WHERE likeValue = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
- foreach ($likeValues as $likeValue => $reactionTypeID) {
- $statement->execute([
- $reactionTypeID,
- $likeValue,
- ]);
- }
-
- // Delete outdated or unsupported likes.
- WCF::getDB()->prepareStatement("DELETE FROM wcf".WCF_N."_like WHERE reactionTypeID = 0")->execute();
-
- // Adjust the like objects by moving all dislikes into regular likes/cumulativeLikes.
- $sql = "UPDATE wcf".WCF_N."_like_object
- SET likes = likes + dislikes,
- cumulativeLikes = likes,
- dislikes = 0";
- WCF::getDB()->prepareStatement($sql)->execute();
-
- $dbEditor = WCF::getDB()->getEditor();
- $foreignKeys = $dbEditor->getForeignKeys('wcf'.WCF_N.'_like');
- $expectedKey = 'fe5076ee92a558ce8177e3afbfc3dafc_fk';
- $hasExpectedKey = false;
-
- // Find the previously added foreign key, in case the upgrade was interrupted before.
- foreach ($foreignKeys as $indexName => $definition) {
- if ($indexName === $expectedKey) {
- $hasExpectedKey = true;
- break;
- }
-
- if ($definition['referencedTable'] === 'wcf'.WCF_N.'_reaction_type') {
- if (count($definition['columns']) === 1 && $definition['columns'][0] === 'reactionTypeID') {
- $dbEditor->dropForeignKey('wcf'.WCF_N.'_like', $indexName);
- }
- }
- }
-
- if (!$hasExpectedKey) {
- $dbEditor->addForeignKey('wcf' . WCF_N . '_like', $expectedKey, [
- 'columns' => 'reactionTypeID',
- 'referencedColumns' => 'reactionTypeID',
- 'referencedTable' => 'wcf'.WCF_N.'_reaction_type',
- 'ON DELETE' => 'CASCADE',
- ]);
- }
-
- WCF::getDB()->commitTransaction();
-}
-catch (Exception $e) {
- WCF::getDB()->rollBackTransaction();
-
- throw $e;
-}
+++ /dev/null
-<?php
-namespace wcf\acp;
-use wcf\data\option\OptionEditor;
-
-OptionEditor::resetCache();
+++ /dev/null
-<?php
-namespace wcf\acp;
-use wcf\system\WCF;
-
-$sql = "UPDATE wcf".WCF_N."_user_group_option_value
- SET optionValue = ?
- WHERE optionID = (
- SELECT optionID
- FROM wcf".WCF_N."_user_group_option
- WHERE optionName = ?
- )";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute([
- 0,
- 'user.profile.canMail',
-]);
}
// define current woltlab suite version
-define('WCF_VERSION', '5.2.7');
+define('WCF_VERSION', '5.3.0 Alpha 1');
// define current API version
// @deprecated 5.2