From: Tim Düsterhus Date: Wed, 1 Jun 2022 12:20:28 +0000 (+0200) Subject: Remove the Page::$isLandingPage property X-Git-Tag: 6.0.0_Alpha_1~1219^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=64a1be56f2ef06f8b4b2bea0cccc7c8b8374588a;p=GitHub%2FWoltLab%2FWCF.git Remove the Page::$isLandingPage property This property is redundant with wcf1_application.landingPageID for the 'wcf' app. Previously it needed to be kept in sync across both tables which didn't really work well in all cases. Remove this property to gain a single source of truth for the landing page. --- diff --git a/wcfsetup/install/files/acp/post_install.php b/wcfsetup/install/files/acp/post_install.php index 7896efb8fe..886f4ab405 100644 --- a/wcfsetup/install/files/acp/post_install.php +++ b/wcfsetup/install/files/acp/post_install.php @@ -8,13 +8,17 @@ use wcf\data\user\UserProfileAction; use wcf\system\WCF; // set default landing page -$sql = "UPDATE wcf" . WCF_N . "_page - SET isLandingPage = ? - WHERE identifier = ?"; -$statement = WCF::getDB()->prepareStatement($sql); +$sql = "UPDATE wcf1_application + SET landingPageID = ( + SELECT pageID + FROM wcf1_page + WHERE identifier = ? + ) + WHERE packageID = ?"; +$statement = WCF::getDB()->prepare($sql); $statement->execute([ - 1, 'com.woltlab.wcf.Dashboard', + 1, ]); // update administrator user rank and user online marking diff --git a/wcfsetup/install/files/acp/templates/pageAdd.tpl b/wcfsetup/install/files/acp/templates/pageAdd.tpl index 16c87aed37..9fefd9594c 100644 --- a/wcfsetup/install/files/acp/templates/pageAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageAdd.tpl @@ -1,34 +1,5 @@ {include file='header' pageTitle='wcf.acp.page.'|concat:$action} - - {if $action == 'add'}