<instruction type="style">defaultStyle.tar</instruction>
</instructions>
+ <!-- WARNING: RE-IMPORT ALL PAGE.XML-PIPS ALONG WITH THE NEXT UPDATE (3.1.0) -->
+
<instructions type="update" fromversion="3.1.0 RC 2">
<instruction type="acpTemplate">acptemplates_update.tar</instruction>
<instruction type="file">files_update.tar</instruction>
--- /dev/null
+-- Force-enable the visibility of *all* pages by setting `allowSpidersToIndex` to `2`.
+--
+-- This value isn't valid by definition, but because it is considered to be a true-ish
+-- value, we can use this to imply an "implicit yes" without breaking any checks. Check
+-- the PagePackageInstallationPlugin to see what this magic value is good for.
+UPDATE wcf1_page SET allowSpidersToIndex = 2;
-- default recipient: site administrator
INSERT INTO wcf1_contact_recipient (recipientID, name, email, isAdministrator, originIsSystem) VALUES (1, 'wcf.contact.recipient.name1', '', 1, 1);
--- force-enable the visibility of all non-system pages (the page.xml is shortly after and sets the exact values)
-UPDATE wcf1_page SET allowSpidersToIndex = 1 WHERE pageType <> 'system';
+-- Force-enable the visibility of *all* pages by setting `allowSpidersToIndex` to `2`.
+--
+-- This value isn't valid by definition, but because it is considered to be a true-ish
+-- value, we can use this to imply an "implicit yes" without breaking any checks. Check
+-- the PagePackageInstallationPlugin to see what this magic value is good for.
+UPDATE wcf1_page SET allowSpidersToIndex = 2;
// allow update of `controller`, `handler` and `excludeFromLandingPage`
// only, prevents user modifications form being overwritten
if (!empty($data['controller'])) {
+ $allowSpidersToIndex = $row['allowSpidersToIndex'];
+ if ($allowSpidersToIndex == 2) {
+ // The value `2` resolves to be true-ish, eventually resulting in the same behavior
+ // when setting it to `1`. This value is special to the 3.0 -> 3.1 upgrade, because
+ // it force-enables the visibility, while also being some sort of indicator for non-
+ // user-modified values. The page edit form will set it to either `1` or `0`, there-
+ // fore `2` means that we can safely update the value w/o breaking the user's choice.
+ $allowSpidersToIndex = $data['allowSpidersToIndex'];
+ }
+
$page = parent::import($row, [
'controller' => $data['controller'],
'handler' => $data['handler'],
'options' => $data['options'],
'permissions' => $data['permissions'],
- 'excludeFromLandingPage' => $data['excludeFromLandingPage']
+ 'excludeFromLandingPage' => $data['excludeFromLandingPage'],
+ 'allowSpidersToIndex' => $allowSpidersToIndex
]);
}
else {