Preparing the release 5.2.0 RC 2 5.2.0_RC_2
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Dec 2019 19:26:08 +0000 (20:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Dec 2019 19:26:08 +0000 (20:26 +0100)
com.woltlab.wcf/files_pre.tar
com.woltlab.wcf/package.xml
wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2.0_rc_2.php [new file with mode: 0644]
wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2_preUpdate.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/WCF.class.php

index dc0774f9d6ffa1eaa3602116baefe76e8a16d995..5a42367369b780ab8b6e02c2c754bacd99c6d319 100644 (file)
Binary files a/com.woltlab.wcf/files_pre.tar and b/com.woltlab.wcf/files_pre.tar differ
index be91906a810655957c5082ebdb783bbe2f0479df..aebb15fb2780366d0c9aa2d40fad0eefd1e4db1f 100644 (file)
@@ -5,8 +5,8 @@
                <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.0 RC 1</version> <!-- codename: hurricane -->
-               <date>2019-12-12</date>
+               <version>5.2.0 RC 2</version> <!-- codename: hurricane -->
+               <date>2019-12-20</date>
        </packageinformation>
        
        <authorinformation>
@@ -51,7 +51,8 @@
        </instructions>
        
        <instructions type="update" fromversion="3.1.*">
-               <!-- TODO: Add a check for the minimum version and the PHP requirements! -->
+               <instruction type="file">files_preUpdate.tar</instruction>
+               <instruction type="script" flushCache="false">acp/update_com.woltlab.wcf_5.2_preUpdate.php</instruction>
                
                <!-- Contains a few PIP-scripts, \wcf\data\option\OptionEditor, \wcf\system\cache\builder\RoutingCacheBuilder and \wcf\system\database\table\* -->
                <instruction type="file" run="standalone">files_pre.tar</instruction>
                <instruction type="style" run="standalone">defaultStyle.tar</instruction>
        </instructions>
        
-       <!-- @TODO Add script to delete the likeable recent activities.  -->
-       <instructions type="update" fromversion="5.2.0 Beta 4">
-               <instruction type="acpTemplate">acptemplates_update.tar</instruction>
+       <instructions type="update" fromversion="5.2.0 RC 1">
                <instruction type="file">files_update.tar</instruction>
                
+               <instruction type="script">acp/update_com.woltlab.wcf_5.2.0_rc_2.php</instruction>
+               <instruction type="script">acp/update_com.woltlab.wcf_5.2_deleteRecentActivity.php</instruction>
+               
                <instruction type="language" />
                
-               <instruction type="userOption" />
+               <instruction type="bbcode" />
        </instructions>
 </package>
diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2.0_rc_2.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2.0_rc_2.php
new file mode 100644 (file)
index 0000000..cc63b5c
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+use wcf\system\database\table\column\NotNullInt10DatabaseTableColumn;
+use wcf\system\database\table\DatabaseTableChangeProcessor;
+use wcf\system\database\table\PartialDatabaseTable;
+use wcf\system\package\plugin\ScriptPackageInstallationPlugin;
+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>
+ */
+$tables = [
+       PartialDatabaseTable::create('wcf1_media')
+               ->columns([
+                       // Incorrect column name in the upgrade 3.1 -> 5.2.0 RC 1
+                       NotNullInt10DatabaseTableColumn::create('lastDownload')
+                               ->defaultValue(0)
+                               ->drop(),
+                       NotNullInt10DatabaseTableColumn::create('lastDownloadTime')
+                               ->defaultValue(0)
+               ]),
+];
+
+(new DatabaseTableChangeProcessor(
+       /** @var ScriptPackageInstallationPlugin $this */
+       $this->installation->getPackage(),
+       $tables,
+       WCF::getDB()->getEditor())
+)->process();
diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2_preUpdate.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.2_preUpdate.php
new file mode 100644 (file)
index 0000000..6c3a29f
--- /dev/null
@@ -0,0 +1,30 @@
+<?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&ouml;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&ouml;her.");
+       }
+       else {
+               throw new SystemException("The update requires PHP in version {$requiredPHPVersion} or newer.");
+       }
+}
index 6b9d87d5c25403c94b540f04499e5308b0e940dc..8bb613e1a327f7698ea95ef1ca2de494803d104f 100644 (file)
@@ -49,7 +49,7 @@ if (!@ini_get('date.timezone')) {
 }
 
 // define current woltlab suite version
-define('WCF_VERSION', '5.2.0 RC 1');
+define('WCF_VERSION', '5.2.0 RC 2');
 
 // define current API version
 // @deprecated 5.2