<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>3.0.0 RC 2</version> <!-- codename: vortex -->
- <date>2016-12-21</date>
+ <version>3.0.0 RC 3</version> <!-- codename: vortex -->
+ <date>2016-12-21</date> <!-- TODO: update version -->
</packageinformation>
<authorinformation>
<instruction type="script">acp/update_com.woltlab.wcf_3.0_post_sql.php</instruction>
</instructions>
- <!-- Update RC 2 -> RC 3: deploy *all* acptemplates to account for missing update at Beta 5 -> RC 1 -->
-
- <instructions type="update" fromversion="3.0.0 RC 1">
+ <instructions type="update" fromversion="3.0.0 RC 2">
+ <!-- do not move this down, it is required to deploy the update script below -->
<instruction type="file">files_update.tar</instruction>
- <instruction type="sql">update_3.0.0_rc_2.sql</instruction>
-
- <!-- !!! whichever instruction comes next: run="standalone" !!! -->
- <instruction type="language" run="standalone">language/*.xml</instruction>
+ <!-- force deploy of all acp templates -->
+ <instruction type="acpTemplate" />
+ <!-- fix missing SQL update when upgrading WCF 2.1 -> WSC 3.0 RC 2 -->
+ <instruction type="script">acp/update_com.woltlab.wcf_3.0.0_rc_3.php</instruction>
- <instruction type="template">templates_update.tar</instruction>
-
- <instruction type="page" />
+ <!-- TODO: all the other fancy stuff -->
</instructions>
</package>
ALTER TABLE wcf1_application DROP COLUMN cookiePath;
ALTER TABLE wcf1_application DROP COLUMN isPrimary;
ALTER TABLE wcf1_application ADD isTainted TINYINT(1) NOT NULL DEFAULT 0;
+ALTER TABLE wcf1_application ADD landingPageID INT(10) NULL;
DROP TABLE IF EXISTS wcf1_article;
CREATE TABLE wcf1_article (
+++ /dev/null
-/* 495a4c11a530a91c4d3320124752d4157ac48ec7 */
-ALTER TABLE wcf1_application ADD COLUMN landingPageID INT(10) NULL;
-ALTER TABLE wcf1_application ADD FOREIGN KEY (landingPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
-
-UPDATE wcf1_application SET landingPageID = (SELECT pageID FROM wcf1_page WHERE isLandingPage = 1 LIMIT 1) WHERE packageID = 1;
ALTER TABLE wcf1_acp_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_acp_session (sessionID) ON DELETE CASCADE ON UPDATE CASCADE;
+ALTER TABLE wcf1_application ADD FOREIGN KEY (landingPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
+
ALTER TABLE wcf1_article ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
ALTER TABLE wcf1_article ADD FOREIGN KEY (categoryID) REFERENCES wcf1_category (categoryID) ON DELETE SET NULL;
INSERT INTO wcf1_bbcode_media_provider (title, regex, html) VALUES ('YouTube Playlist', 'https?://(?:.+?\\.)?youtu(?:\\.be/|be\\.com/)playlist\\?(?:.*?&)?list=(?P<ID>[a-zA-Z0-9_-]+)', '<div class="videoContainer"><iframe src="https://www.youtube.com/embed/videoseries?list={$ID}" allowfullscreen></iframe></div>');
UPDATE wcf1_bbcode_media_provider SET regex = 'https?://vimeo\\.com/(?:channels/[^/]+/)?(?P<ID>\\d+)' WHERE title = 'Vimeo';
UPDATE wcf1_bbcode_media_provider SET regex = 'https?://(?:www\\.)?dailymotion\\.com/video/(?P<ID>[a-zA-Z0-9_-]+)', html = '<iframe width="480" height="270" src="//www.dailymotion.com/embed/video/{$ID}"></iframe>' WHERE title = 'DailyMotion';
+
+-- application landing page
+UPDATE wcf1_application SET landingPageID = (SELECT pageID FROM wcf1_page WHERE isLandingPage = 1 LIMIT 1) WHERE packageID = 1;
+++ /dev/null
-<?php
-use wcf\system\session\SessionHandler;
-use wcf\system\WCF;
-
-/**
- * @author Alexander Ebert
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-$sessionID = SessionHandler::getInstance()->sessionID;
-
-SessionHandler::getInstance()->disableUpdate();
-
-$sql = "SELECT *
- FROM wcf".WCF_N."_acp_session_virtual
- WHERE sessionID = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute([$sessionID]);
-$sessionVariables = '';
-while ($row = $statement->fetchArray()) {
- $tmp = @unserialize($row['sessionVariables']);
- if ($tmp['__SECURITY_TOKEN'] == SECURITY_TOKEN) {
- $sessionVariables = $row['sessionVariables'];
- }
-}
-
-$sql = "UPDATE wcf".WCF_N."_acp_session
- SET sessionVariables = ?
- WHERE sessionID = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute([
- $sessionVariables,
- $sessionID
-]);
-
-$statement = WCF::getDB()->prepareStatement("ALTER TABLE wcf".WCF_N."_acp_session_virtual DROP COLUMN sessionVariables");
-$statement->execute();
-
--- /dev/null
+<?php
+use wcf\system\WCF;
+
+/**
+ * @author Alexander Ebert
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core
+ */
+$columns = WCF::getDB()->getEditor()->getColumns("wcf".WCF_N."_application");
+$hasLandingPageID = false;
+foreach ($columns as $column) {
+ if ($column['name'] == 'landingPageID') {
+ $hasLandingPageID = true;
+ break;
+ }
+}
+
+if (!$hasLandingPageID) {
+ $statement = WCF::getDB()->prepareStatement("ALTER TABLE wcf".WCF_N."_application ADD COLUMN landingPageID INT(10) NULL");
+ $statement->execute();
+
+ $statement = WCF::getDB()->prepareStatement("ALTER TABLE wcf".WCF_N."_application ADD CONSTRAINT `8a7fc72db2348bc5695394ffd616cbf5_fk` FOREIGN KEY (landingPageID) REFERENCES wcf".WCF_N."_page (pageID) ON DELETE SET NULL;");
+ $statement->execute();
+
+ $statement = WCF::getDB()->prepareStatement("UPDATE wcf".WCF_N."_application SET landingPageID = (SELECT pageID FROM wcf".WCF_N."_page WHERE isLandingPage = 1 LIMIT 1) WHERE packageID = 1;");
+ $statement->execute();
+}
use wcf\system\package\PackageInstallationDispatcher;
use wcf\system\request\Request;
use wcf\system\request\RequestHandler;
-use wcf\system\request\RouteHandler;
use wcf\system\session\SessionFactory;
use wcf\system\session\SessionHandler;
use wcf\system\style\StyleHandler;
}
// define current woltlab suite version
-define('WCF_VERSION', '3.0.0 RC 2');
+define('WCF_VERSION', '3.0.0 RC 3');
// define current unix timestamp
define('TIME_NOW', time());