From a82f62ecc71fccdc743588e470d6a153ad786bd2 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Fri, 9 Jun 2017 21:18:42 +0200
Subject: [PATCH] [TASK] Merge EXT:cshmanual into EXT:documentation

To reduce the amount of system extensions the extension
cshmanual can be merged into EXT:documentation.

Resolves: #81574
Releases: master
Change-Id: I5cd728938ffd319f5c13bf0af4caeda48c08ee37
Reviewed-on: https://review.typo3.org/53180
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
---
 composer.json                                 |   3 +-
 composer.lock                                 |   2 +-
 .../Classes/Utility/BackendUtility.php        |   2 +-
 .../Public/JavaScript/ContextHelp.js          |   4 +-
 ...temExtensionCshmanualIntoDocumentation.rst |  17 +
 .../InstalledExtensionsCest.php               |   4 +-
 typo3/sysext/cshmanual/LICENSE.txt            | 345 ------------------
 .../Resources/Public/Icons/Extension.png      | Bin 717 -> 0 bytes
 typo3/sysext/cshmanual/composer.json          |  40 --
 typo3/sysext/cshmanual/ext_emconf.php         |  21 --
 typo3/sysext/cshmanual/ext_tables.php         |  21 --
 .../Classes/Controller/HelpController.php     |   4 +-
 .../Repository/TableManualRepository.php      |  10 +-
 .../Classes/Service/AccessService.php         |   2 +-
 .../Classes/Service/JavaScriptService.php     |   6 +-
 .../Migrations/Code/ClassAliasMap.php         |   6 +
 .../Migrations/Code/LegacyClassesForIde.php   |  22 ++
 .../Language/locallang_mod_help_cshmanual.xlf |   0
 .../Private/Language/locallang_view_help.xlf  |   0
 .../Layouts/ContextSensitiveHelp.html}        |   0
 .../Resources/Private/Partials/Manual.html    |   6 +-
 .../Private/Partials/TableOfContents.html     |   8 +-
 .../Resources/Private/Templates/Help/All.html |   6 +-
 .../Private/Templates/Help/Detail.html        |   5 +-
 .../Private/Templates/Help/Index.html         |   5 +-
 .../Public/Icons/module-cshmanual.svg         |   0
 typo3/sysext/documentation/composer.json      |  13 +-
 typo3/sysext/documentation/ext_tables.php     |  17 +
 .../Updates/BackendUserStartModuleUpdate.php  | 101 +++++
 typo3/sysext/install/ext_localconf.php        |   2 +
 30 files changed, 207 insertions(+), 465 deletions(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Important-81574-MergedSystemExtensionCshmanualIntoDocumentation.rst
 delete mode 100644 typo3/sysext/cshmanual/LICENSE.txt
 delete mode 100644 typo3/sysext/cshmanual/Resources/Public/Icons/Extension.png
 delete mode 100644 typo3/sysext/cshmanual/composer.json
 delete mode 100644 typo3/sysext/cshmanual/ext_emconf.php
 delete mode 100644 typo3/sysext/cshmanual/ext_tables.php
 rename typo3/sysext/{cshmanual => documentation}/Classes/Controller/HelpController.php (98%)
 rename typo3/sysext/{cshmanual => documentation}/Classes/Domain/Repository/TableManualRepository.php (98%)
 rename typo3/sysext/{cshmanual => documentation}/Classes/Service/AccessService.php (96%)
 rename typo3/sysext/{cshmanual => documentation}/Classes/Service/JavaScriptService.php (90%)
 create mode 100644 typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php
 create mode 100644 typo3/sysext/documentation/Migrations/Code/LegacyClassesForIde.php
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Language/locallang_mod_help_cshmanual.xlf (100%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Language/locallang_view_help.xlf (100%)
 rename typo3/sysext/{cshmanual/Resources/Private/Layouts/Default.html => documentation/Resources/Private/Layouts/ContextSensitiveHelp.html} (100%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Partials/Manual.html (78%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Partials/TableOfContents.html (54%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Templates/Help/All.html (61%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Templates/Help/Detail.html (60%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Private/Templates/Help/Index.html (57%)
 rename typo3/sysext/{cshmanual => documentation}/Resources/Public/Icons/module-cshmanual.svg (100%)
 create mode 100644 typo3/sysext/install/Classes/Updates/BackendUserStartModuleUpdate.php

diff --git a/composer.json b/composer.json
index ca6064392f8b..e3ae34ba37a3 100644
--- a/composer.json
+++ b/composer.json
@@ -72,6 +72,7 @@
 			"always-add-alias-loader": true,
 			"class-alias-maps": [
 				"typo3/sysext/core/Migrations/Code/ClassAliasMap.php",
+				"typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php",
 				"typo3/sysext/extbase/Migrations/Code/ClassAliasMap.php",
 				"typo3/sysext/fluid/Migrations/Code/ClassAliasMap.php",
 				"typo3/sysext/info/Migrations/Code/ClassAliasMap.php",
@@ -92,7 +93,6 @@
 		"typo3/cms-beuser": "self.version",
 		"typo3/cms-context-help": "self.version",
 		"typo3/cms-core": "self.version",
-		"typo3/cms-cshmanual": "self.version",
 		"typo3/cms-documentation": "self.version",
 		"typo3/cms-extbase": "self.version",
 		"typo3/cms-extensionmanager": "self.version",
@@ -138,7 +138,6 @@
 			"TYPO3\\CMS\\Belog\\": "typo3/sysext/belog/Classes/",
 			"TYPO3\\CMS\\Beuser\\": "typo3/sysext/beuser/Classes/",
 			"TYPO3\\CMS\\Core\\": "typo3/sysext/core/Classes/",
-			"TYPO3\\CMS\\Cshmanual\\": "typo3/sysext/cshmanual/Classes/",
 			"TYPO3\\CMS\\Documentation\\": "typo3/sysext/documentation/Classes/",
 			"TYPO3\\CMS\\Extbase\\": "typo3/sysext/extbase/Classes/",
 			"TYPO3\\CMS\\Extensionmanager\\": "typo3/sysext/extensionmanager/Classes/",
diff --git a/composer.lock b/composer.lock
index 789b997918b3..105f18d8224e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "9ceecfd2a5223b2a9f1fb5589454cdf5",
+    "content-hash": "b054fb89baff8fbce0b4822829f871f3",
     "packages": [
         {
             "name": "cogpowered/finediff",
diff --git a/typo3/sysext/backend/Classes/Utility/BackendUtility.php b/typo3/sysext/backend/Classes/Utility/BackendUtility.php
index d050d02e7690..a7c640149a87 100644
--- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php
+++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php
@@ -2431,7 +2431,7 @@ class BackendUtility
         // @todo: right now this is a hard dependency on csh manual, as the whole help system should be moved to
         // the extension. The core provides an API for adding help and rendering help, but the rendering
         // should be up to the extension itself
-        if ((!empty($helpText) || $hasHelpTextOverload) && ExtensionManagementUtility::isLoaded('cshmanual')) {
+        if ((!empty($helpText) || $hasHelpTextOverload) && ExtensionManagementUtility::isLoaded('documentation')) {
             // If no text was given, just use the regular help icon
             if ($text == '') {
                 /** @var IconFactory $iconFactory */
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
index 4019d95b5b75..edf32e0cddd1 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
@@ -112,8 +112,8 @@ define(['jquery', 'TYPO3/CMS/Backend/Popover', 'bootstrap'], function($, Popover
 		try {
 			var cshWindow = window.open(
 				ContextHelp.helpModuleUrl +
-					'&tx_cshmanual_help_cshmanualcshmanual[table]=' + $trigger.data('table') +
-					'&tx_cshmanual_help_cshmanualcshmanual[field]=' + $trigger.data('field'),
+					'&tx_documentation_help_documentationcshmanual[table]=' + $trigger.data('table') +
+					'&tx_documentation_help_documentationcshmanual[field]=' + $trigger.data('field'),
 				'ContextHelpWindow',
 				'height=400,width=600,status=0,menubar=0,scrollbars=1'
 			);
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-81574-MergedSystemExtensionCshmanualIntoDocumentation.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-81574-MergedSystemExtensionCshmanualIntoDocumentation.rst
new file mode 100644
index 000000000000..5543d4bf92c2
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Important-81574-MergedSystemExtensionCshmanualIntoDocumentation.rst
@@ -0,0 +1,17 @@
+.. include:: ../../Includes.txt
+
+===============================================================
+Important: #81574 - Merged EXT:cshmanual into EXT:documentation
+===============================================================
+
+See :issue:`81574`
+
+Description
+===========
+
+The system extension "cshmanual" was migrated into the "documentation" extension.
+
+The functionality goes in line with streamline the amount of system extensions and
+sorting out parts which belong together conceptually.
+
+.. index:: Backend
diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php
index e78a526c9689..e6782cbece3b 100644
--- a/typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php
@@ -45,13 +45,13 @@ class InstalledExtensionsCest
         $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
 
         // Fill extension search field
-        $I->fillField('Tx_Extensionmanager_extensionkey', 'cshmanual');
+        $I->fillField('Tx_Extensionmanager_extensionkey', 'documentation');
 
         // see 2 rows. 1 for the header and one for the result
         $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', 1);
 
         // Look for extension key
-        $I->canSee('cshmanual', '#typo3-extension-list tbody tr[role="row"] td');
+        $I->canSee('documentation', '#typo3-extension-list tbody tr[role="row"] td');
 
         // unset the filter
         $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 1);
diff --git a/typo3/sysext/cshmanual/LICENSE.txt b/typo3/sysext/cshmanual/LICENSE.txt
deleted file mode 100644
index 95d36a78ffce..000000000000
--- a/typo3/sysext/cshmanual/LICENSE.txt
+++ /dev/null
@@ -1,345 +0,0 @@
-Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
-Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
-set is distributed under a Creative Commons Attribution 2.5 License. The
-license can be found at http://creativecommons.org/licenses/by/2.5/.
----------------------------------
-
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/typo3/sysext/cshmanual/Resources/Public/Icons/Extension.png b/typo3/sysext/cshmanual/Resources/Public/Icons/Extension.png
deleted file mode 100644
index 7be668c89618ae15dfc703351f48a4a405f2e1b7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 717
zcmV;;0y6!HP)<h;3K|Lk000e1NJLTq002M$002M;0{{R3owtGP0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUzEKp2TMdXn=<dHh$k~`#+Jmr%;<&-|<
zlt1N_K;@P~<(EU{mqg~5Mdp}B=9x(5nn~xIOy`|X=bljKpHt|dQ|Y8z>7`xireEo&
zVCkn}>ZoJtsbuP^X6mbG>#b|+uW#(IaqO^i?6Gp}vUKdSb?mfv?X-FAwtMclf9|@1
z@4Scay@>C>i|@aT@W77n!H@C9m+{A%@yDC;$({1bpYqG1^Ub95&#3dzs`SvS^wF*K
z)35c_v-Q=q_1L-g*}L}Iz4qL{_uj+z;K%sk$@t>R_~Xs^<j(o$)cWby`svvE>)ZP5
z-1_X@`t08O?%@0I<oxmG{PO7h^y~fh?)~=f{rB<x`11Yv^Zxnt{`vL(`u6_&_x}6%
z{`~p={QCa=`~Us?|Ni~||Nj5~|4}!t$N&HVH%UZ6R2UiU!TlnWaTv$p&t{8SVP-=j
zv=(a3ytELid5y*zTg{^OJ^yp?KlkJQ9l&#4#A30SBXjt-rF(AbIfB(>`I#ip@U={1
z1ggn4Oqe;@8U$LFZJj_>*`^uG6XHasR+7c;D884nZNsiU;z}OMRwUI?8P{jodV|bL
z6Sxj!`vx^N6S#iJwggRW;>z}A`aeQJn#EO>?Fg#sr13nvl&u0M+QYT22;*e?dWWka
z+c~_~?Q=YXe`NavbsgY(s|Yh>ZdAtgUAC(fB`JqzsxR9P?C2Cv`b-f@q}p1;^GXrA
zL(E81cqSEL7i#*Iz*Cg%wg4B}!c~#w_wfScrFmQ*)P9O>Mcp*6>_5H1G|<pj0<5Z6
ze!)XezDTbLkl0j|4Z_UtclFTqQHfYA7JJkk8Y3r9HHJ8l00000NkvXXu0mjfPt~Nu

diff --git a/typo3/sysext/cshmanual/composer.json b/typo3/sysext/cshmanual/composer.json
deleted file mode 100644
index d28159bceef8..000000000000
--- a/typo3/sysext/cshmanual/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-	"name": "typo3/cms-cshmanual",
-	"type": "typo3-cms-framework",
-	"description": "Shows TYPO3 inline user manual.",
-	"homepage": "https://typo3.org",
-	"license": ["GPL-2.0+"],
-	"authors": [{
-			"name": "TYPO3 Core Team",
-			"email": "typo3cms@typo3.org",
-			"role": "Developer"
-		}],
-
-	"require": {
-		"typo3/cms-core": ">=9.0.0 <=9.0.99"
-	},
-	"conflict": {
-		"typo3/cms": "*"
-	},
-	"replace": {
-		"cshmanual": "*"
-	},
-	"extra": {
-		"branch-alias": {
-			"dev-master": "9.x-dev"
-		},
-		"typo3/cms": {
-			"Package": {
-				"protected": false,
-				"partOfFactoryDefault": true,
-				"partOfMinimalUsableSystem": true
-			},
-			"extension-key": "cshmanual"
-		}
-	},
-	"autoload": {
-		"psr-4": {
-			"TYPO3\\CMS\\Cshmanual\\": "Classes/"
-		}
-	}
-}
diff --git a/typo3/sysext/cshmanual/ext_emconf.php b/typo3/sysext/cshmanual/ext_emconf.php
deleted file mode 100644
index 26e2afcd8fbd..000000000000
--- a/typo3/sysext/cshmanual/ext_emconf.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-$EM_CONF[$_EXTKEY] = [
-    'title' => 'Help>TYPO3 Manual',
-    'description' => 'Shows TYPO3 inline user manual.',
-    'category' => 'module',
-    'state' => 'stable',
-    'uploadfolder' => 0,
-    'createDirs' => '',
-    'clearCacheOnLoad' => 0,
-    'author' => 'TYPO3 Core Team',
-    'author_email' => 'typo3cms@typo3.org',
-    'author_company' => '',
-    'version' => '9.0.0',
-    'constraints' => [
-        'depends' => [
-            'typo3' => '9.0.0-9.0.99',
-        ],
-        'conflicts' => [],
-        'suggests' => [],
-    ],
-];
diff --git a/typo3/sysext/cshmanual/ext_tables.php b/typo3/sysext/cshmanual/ext_tables.php
deleted file mode 100644
index 8055c54ffdd1..000000000000
--- a/typo3/sysext/cshmanual/ext_tables.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-if (TYPO3_MODE === 'BE') {
-    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
-        'TYPO3.CMS.Cshmanual',
-        'help',
-        'cshmanual',
-        'top',
-        [
-            'Help' => 'index,all,detail',
-        ],
-        [
-            'access' => 'user,group',
-            'icon' => 'EXT:cshmanual/Resources/Public/Icons/module-cshmanual.svg',
-            'labels' => 'LLL:EXT:cshmanual/Resources/Private/Language/locallang_mod_help_cshmanual.xlf',
-        ]
-    );
-
-    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook']['cshmanual'] = \TYPO3\CMS\Cshmanual\Service\JavaScriptService::class . '->addJavaScript';
-}
diff --git a/typo3/sysext/cshmanual/Classes/Controller/HelpController.php b/typo3/sysext/documentation/Classes/Controller/HelpController.php
similarity index 98%
rename from typo3/sysext/cshmanual/Classes/Controller/HelpController.php
rename to typo3/sysext/documentation/Classes/Controller/HelpController.php
index 06e257775608..09653d3200d9 100644
--- a/typo3/sysext/cshmanual/Classes/Controller/HelpController.php
+++ b/typo3/sysext/documentation/Classes/Controller/HelpController.php
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Cshmanual\Controller;
+namespace TYPO3\CMS\Documentation\Controller;
 
 /*
  * This file is part of the TYPO3 CMS project.
@@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Cshmanual\Domain\Repository\TableManualRepository;
+use TYPO3\CMS\Documentation\Domain\Repository\TableManualRepository;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
 use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 
diff --git a/typo3/sysext/cshmanual/Classes/Domain/Repository/TableManualRepository.php b/typo3/sysext/documentation/Classes/Domain/Repository/TableManualRepository.php
similarity index 98%
rename from typo3/sysext/cshmanual/Classes/Domain/Repository/TableManualRepository.php
rename to typo3/sysext/documentation/Classes/Domain/Repository/TableManualRepository.php
index d283e4f94e71..d115ef60eaaf 100644
--- a/typo3/sysext/cshmanual/Classes/Domain/Repository/TableManualRepository.php
+++ b/typo3/sysext/documentation/Classes/Domain/Repository/TableManualRepository.php
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Cshmanual\Domain\Repository;
+namespace TYPO3\CMS\Documentation\Domain\Repository;
 
 /*
  * This file is part of the TYPO3 CMS project.
@@ -18,12 +18,12 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 
 /**
- * Tabble manual repository
+ * Table manual repository
  */
 class TableManualRepository
 {
     /**
-     * @var \TYPO3\CMS\Cshmanual\Service\AccessService
+     * @var \TYPO3\CMS\Documentation\Service\AccessService
      */
     protected $accessService;
 
@@ -32,7 +32,7 @@ class TableManualRepository
      */
     public function __construct()
     {
-        $this->accessService = GeneralUtility::makeInstance(\TYPO3\CMS\Cshmanual\Service\AccessService::class);
+        $this->accessService = GeneralUtility::makeInstance(\TYPO3\CMS\Documentation\Service\AccessService::class);
     }
 
     /**
@@ -139,7 +139,7 @@ class TableManualRepository
             }
         }
 
-        if ($mode === \TYPO3\CMS\Cshmanual\Controller\HelpController::TOC_ONLY) {
+        if ($mode === \TYPO3\CMS\Documentation\Controller\HelpController::TOC_ONLY) {
             return $tocArray;
         }
 
diff --git a/typo3/sysext/cshmanual/Classes/Service/AccessService.php b/typo3/sysext/documentation/Classes/Service/AccessService.php
similarity index 96%
rename from typo3/sysext/cshmanual/Classes/Service/AccessService.php
rename to typo3/sysext/documentation/Classes/Service/AccessService.php
index 755ceffad45d..7d832053f29a 100644
--- a/typo3/sysext/cshmanual/Classes/Service/AccessService.php
+++ b/typo3/sysext/documentation/Classes/Service/AccessService.php
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Cshmanual\Service;
+namespace TYPO3\CMS\Documentation\Service;
 
 /*
  * This file is part of the TYPO3 CMS project.
diff --git a/typo3/sysext/cshmanual/Classes/Service/JavaScriptService.php b/typo3/sysext/documentation/Classes/Service/JavaScriptService.php
similarity index 90%
rename from typo3/sysext/cshmanual/Classes/Service/JavaScriptService.php
rename to typo3/sysext/documentation/Classes/Service/JavaScriptService.php
index 76503ce13046..ad916ea1ff07 100644
--- a/typo3/sysext/cshmanual/Classes/Service/JavaScriptService.php
+++ b/typo3/sysext/documentation/Classes/Service/JavaScriptService.php
@@ -1,5 +1,5 @@
 <?php
-namespace TYPO3\CMS\Cshmanual\Service;
+namespace TYPO3\CMS\Documentation\Service;
 
 /*
  * This file is part of the TYPO3 CMS project.
@@ -38,8 +38,8 @@ class JavaScriptService
         if ($beUser && !empty($beUser->user)) {
             $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
             $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');
-            $pageRenderer->addInlineSetting('ContextHelp', 'moduleUrl', BackendUtility::getModuleUrl('help_CshmanualCshmanual', [
-                'tx_cshmanual_help_cshmanualcshmanual' => [
+            $pageRenderer->addInlineSetting('ContextHelp', 'moduleUrl', BackendUtility::getModuleUrl('help_DocumentationCshmanual', [
+                'tx_documentation_help_documentationcshmanual' => [
                     'controller' => 'Help',
                     'action' => 'detail'
                 ]
diff --git a/typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php b/typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php
new file mode 100644
index 000000000000..e4960e9fd1bd
--- /dev/null
+++ b/typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php
@@ -0,0 +1,6 @@
+<?php
+return [
+    'TYPO3\\CMS\\Cshmanual\\Domain\\Repository\\TableManualRepository' => \TYPO3\CMS\Documentation\Domain\Repository\TableManualRepository::class,
+    'TYPO3\\CMS\\Cshmanual\\Service\\AccessService' => \TYPO3\CMS\Documentation\Service\AccessService::class,
+    'TYPO3\\CMS\\Cshmanual\\Service\\JavaScriptService' => \TYPO3\CMS\Documentation\Service\JavaScriptService::class
+];
diff --git a/typo3/sysext/documentation/Migrations/Code/LegacyClassesForIde.php b/typo3/sysext/documentation/Migrations/Code/LegacyClassesForIde.php
new file mode 100644
index 000000000000..d4b2b7f2cc07
--- /dev/null
+++ b/typo3/sysext/documentation/Migrations/Code/LegacyClassesForIde.php
@@ -0,0 +1,22 @@
+<?php
+namespace {
+    die('Access denied');
+}
+
+namespace TYPO3\CMS\Cshmanual\Domain\Repository {
+    class TableManualRepository extends \TYPO3\CMS\Documentation\Domain\Repository\TableManualRepository
+    {
+    }
+}
+
+namespace TYPO3\CMS\Cshmanual\Service {
+    class AccessService extends \TYPO3\CMS\Documentation\Service\AccessService
+    {
+    }
+}
+
+namespace TYPO3\CMS\Cshmanual\Service {
+    class JavaScriptService extends \TYPO3\CMS\Documentation\Service\JavaScriptService
+    {
+    }
+}
diff --git a/typo3/sysext/cshmanual/Resources/Private/Language/locallang_mod_help_cshmanual.xlf b/typo3/sysext/documentation/Resources/Private/Language/locallang_mod_help_cshmanual.xlf
similarity index 100%
rename from typo3/sysext/cshmanual/Resources/Private/Language/locallang_mod_help_cshmanual.xlf
rename to typo3/sysext/documentation/Resources/Private/Language/locallang_mod_help_cshmanual.xlf
diff --git a/typo3/sysext/cshmanual/Resources/Private/Language/locallang_view_help.xlf b/typo3/sysext/documentation/Resources/Private/Language/locallang_view_help.xlf
similarity index 100%
rename from typo3/sysext/cshmanual/Resources/Private/Language/locallang_view_help.xlf
rename to typo3/sysext/documentation/Resources/Private/Language/locallang_view_help.xlf
diff --git a/typo3/sysext/cshmanual/Resources/Private/Layouts/Default.html b/typo3/sysext/documentation/Resources/Private/Layouts/ContextSensitiveHelp.html
similarity index 100%
rename from typo3/sysext/cshmanual/Resources/Private/Layouts/Default.html
rename to typo3/sysext/documentation/Resources/Private/Layouts/ContextSensitiveHelp.html
diff --git a/typo3/sysext/cshmanual/Resources/Private/Partials/Manual.html b/typo3/sysext/documentation/Resources/Private/Partials/Manual.html
similarity index 78%
rename from typo3/sysext/cshmanual/Resources/Private/Partials/Manual.html
rename to typo3/sysext/documentation/Resources/Private/Partials/Manual.html
index 5b7015ceaeb1..f62c2537ae04 100644
--- a/typo3/sysext/cshmanual/Resources/Private/Partials/Manual.html
+++ b/typo3/sysext/documentation/Resources/Private/Partials/Manual.html
@@ -6,14 +6,14 @@
 
 <f:if condition="{manual.configuration.details}">
 	<h3>
-		<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:details" />
+		<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:details" />
 	</h3>
 	{manual.configuration.details -> f:format.stripTags(allowedTags:'<strong><em><b><i>') -> f:format.nl2br()}
 </f:if>
 
 <f:if condition="{manual.configuration.syntax}">
 	<h3>
-		<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:syntax" />
+		<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:syntax" />
 	</h3>
 	{manual.configuration.syntax -> f:format.raw()}
 </f:if>
@@ -32,7 +32,7 @@
 
 <f:if condition="{manual.seeAlso}">
 	<h3>
-		<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:seeAlso" />
+		<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:seeAlso" />
 	</h3>
 	<ul>
 		<f:for each="{manual.seeAlso}" as="link">
diff --git a/typo3/sysext/cshmanual/Resources/Private/Partials/TableOfContents.html b/typo3/sysext/documentation/Resources/Private/Partials/TableOfContents.html
similarity index 54%
rename from typo3/sysext/cshmanual/Resources/Private/Partials/TableOfContents.html
rename to typo3/sysext/documentation/Resources/Private/Partials/TableOfContents.html
index 5c7c9f1bbfee..89bd6772c2dc 100644
--- a/typo3/sysext/cshmanual/Resources/Private/Partials/TableOfContents.html
+++ b/typo3/sysext/documentation/Resources/Private/Partials/TableOfContents.html
@@ -1,19 +1,19 @@
 <h1>
-	<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:manual_title" />
+	<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:manual_title" />
 </h1>
 <p class="lead">
-	<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:description" />
+	<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:description" />
 </p>
 
 <h2>
-	<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:TOC" />
+	<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:TOC" />
 </h2>
 
 <f:if condition="{toc}">
 	<ul>
 		<f:for each="{toc}" as="modules" key="type">
 			<li>
-				<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:TOC_{type}" default="{type}" />
+				<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:TOC_{type}" default="{type}" />
 
 				<ul>
 					<f:for each="{modules}" as="title" key="module">
diff --git a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/All.html b/typo3/sysext/documentation/Resources/Private/Templates/Help/All.html
similarity index 61%
rename from typo3/sysext/cshmanual/Resources/Private/Templates/Help/All.html
rename to typo3/sysext/documentation/Resources/Private/Templates/Help/All.html
index 976ddde86db1..4172bcf3c20a 100644
--- a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/All.html
+++ b/typo3/sysext/documentation/Resources/Private/Templates/Help/All.html
@@ -1,11 +1,11 @@
-<f:layout name="Default" />
+<f:layout name="ContextSensitiveHelp" />
 
 <f:section name="content">
-	<f:render partial="TableOfContents" arguments="{toc:all.toc,all:1}" />
+	<f:render partial="TableOfContents" arguments="{toc:all.toc, all:1}" />
 
 	<f:for each="{all.content}" as="sections">
 		<f:for each="{sections.content}" as="item">
 			<f:render partial="Manual" arguments="{manual:item}" />
 		</f:for>
 	</f:for>
-</f:section>
\ No newline at end of file
+</f:section>
diff --git a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/Detail.html b/typo3/sysext/documentation/Resources/Private/Templates/Help/Detail.html
similarity index 60%
rename from typo3/sysext/cshmanual/Resources/Private/Templates/Help/Detail.html
rename to typo3/sysext/documentation/Resources/Private/Templates/Help/Detail.html
index 314bdd7dce2e..01b3af04764e 100644
--- a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/Detail.html
+++ b/typo3/sysext/documentation/Resources/Private/Templates/Help/Detail.html
@@ -1,8 +1,7 @@
-{namespace csh=TYPO3\CMS\Cshmanual\ViewHelpers}
-<f:layout name="Default" />
+<f:layout name="ContextSensitiveHelp" />
 
 <f:section name="content">
 	<f:for each="{manuals}" as="manual">
 		<f:render partial="Manual" arguments="{manual:manual}" />
 	</f:for>
-</f:section>
\ No newline at end of file
+</f:section>
diff --git a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/Index.html b/typo3/sysext/documentation/Resources/Private/Templates/Help/Index.html
similarity index 57%
rename from typo3/sysext/cshmanual/Resources/Private/Templates/Help/Index.html
rename to typo3/sysext/documentation/Resources/Private/Templates/Help/Index.html
index 7749c0082d32..718bad3a784e 100644
--- a/typo3/sysext/cshmanual/Resources/Private/Templates/Help/Index.html
+++ b/typo3/sysext/documentation/Resources/Private/Templates/Help/Index.html
@@ -1,13 +1,12 @@
-<f:layout name="Default" />
+<f:layout name="ContextSensitiveHelp" />
 
 <f:section name="docheader">
 
 </f:section>
 <f:section name="content">
-
 	<f:render partial="TableOfContents" arguments="{toc:toc,all:0}" />
 
 	<f:link.action action="all">
-		<f:translate key="LLL:EXT:cshmanual/Resources/Private/Language/locallang_view_help.xlf:full_manual" />
+		<f:translate key="LLL:EXT:documentation/Resources/Private/Language/locallang_view_help.xlf:full_manual" />
 	</f:link.action>
 </f:section>
diff --git a/typo3/sysext/cshmanual/Resources/Public/Icons/module-cshmanual.svg b/typo3/sysext/documentation/Resources/Public/Icons/module-cshmanual.svg
similarity index 100%
rename from typo3/sysext/cshmanual/Resources/Public/Icons/module-cshmanual.svg
rename to typo3/sysext/documentation/Resources/Public/Icons/module-cshmanual.svg
diff --git a/typo3/sysext/documentation/composer.json b/typo3/sysext/documentation/composer.json
index c149f0156443..9fe7b5493d44 100644
--- a/typo3/sysext/documentation/composer.json
+++ b/typo3/sysext/documentation/composer.json
@@ -9,7 +9,6 @@
 			"email": "typo3cms@typo3.org",
 			"role": "Developer"
 		}],
-
 	"require": {
 		"typo3/cms-core": ">=9.0.0 <=9.0.99"
 	},
@@ -17,7 +16,9 @@
 		"typo3/cms": "*"
 	},
 	"replace": {
-		"documentation": "*"
+		"documentation": "*",
+		"csh_manual": "*",
+		"typo3/cms-cshmanual": "*"
 	},
 	"extra": {
 		"branch-alias": {
@@ -25,9 +26,15 @@
 		},
 		"typo3/cms": {
 			"Package": {
-				"partOfFactoryDefault": true
+				"partOfFactoryDefault": true,
+				"partOfMinimalUsableSystem": true
 			},
 			"extension-key": "documentation"
+		},
+		"typo3/class-alias-loader": {
+			"class-alias-maps": [
+				"Migrations/Code/ClassAliasMap.php"
+			]
 		}
 	},
 	"autoload": {
diff --git a/typo3/sysext/documentation/ext_tables.php b/typo3/sysext/documentation/ext_tables.php
index f719ca7373bf..4ac5d81564a9 100644
--- a/typo3/sysext/documentation/ext_tables.php
+++ b/typo3/sysext/documentation/ext_tables.php
@@ -17,4 +17,21 @@ if (TYPO3_MODE === 'BE') {
             'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod.xlf',
         ]
     );
+
+    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+        'TYPO3.CMS.Documentation',
+        'help',
+        'cshmanual',
+        'top',
+        [
+            'Help' => 'index,all,detail',
+        ],
+        [
+            'access' => 'user,group',
+            'icon' => 'EXT:documentation/Resources/Public/Icons/module-cshmanual.svg',
+            'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod_help_cshmanual.xlf',
+        ]
+    );
+
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook']['cshmanual'] = \TYPO3\CMS\Documentation\Service\JavaScriptService::class . '->addJavaScript';
 }
diff --git a/typo3/sysext/install/Classes/Updates/BackendUserStartModuleUpdate.php b/typo3/sysext/install/Classes/Updates/BackendUserStartModuleUpdate.php
new file mode 100644
index 000000000000..a559528bef18
--- /dev/null
+++ b/typo3/sysext/install/Classes/Updates/BackendUserStartModuleUpdate.php
@@ -0,0 +1,101 @@
+<?php
+namespace TYPO3\CMS\Install\Updates;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Update backend user setting startModule if set to "help_aboutmodules" or "help_CshmanualCshmanual"
+ */
+class BackendUserStartModuleUpdate extends AbstractUpdate
+{
+    /**
+     * @var string
+     */
+    protected $title = 'Update backend user setting "startModule"';
+
+    /**
+     * Checks if an update is needed
+     *
+     * @param string &$description The description for the update
+     * @return bool Whether an update is needed (TRUE) or not (FALSE)
+     */
+    public function checkForUpdate(&$description)
+    {
+        $statement = GeneralUtility::makeInstance(ConnectionPool::class)
+            ->getConnectionForTable('be_users')
+            ->select(['uid', 'uc'], 'be_users', []);
+        $needsExecution = false;
+        while ($backendUser = $statement->fetch()) {
+            if ($backendUser['uc'] !== null) {
+                $userConfig = unserialize($backendUser['uc'], ['allowed_classes' => false]);
+                if ($userConfig['startModule'] === 'help_aboutmodules'
+                    || $userConfig['startModule'] === 'help_AboutmodulesAboutmodules'
+                    || $userConfig['startModule'] === 'help_AboutAboutmodules'
+                    || $userConfig['startModule'] === 'help_CshmanualCshmanual'
+                ) {
+                    $needsExecution = true;
+                    break;
+                }
+            }
+        }
+        if ($needsExecution) {
+            $description = 'The backend user setting startModule is changed for the extensions about/aboutmodules a d help/cshmanual. Update all'
+                . ' backend users that use EXT:aboutmodules and EXT:cshmanual as startModule.';
+        }
+        return $needsExecution;
+    }
+
+    /**
+     * Performs the database update if backend user's startmodule is
+     * "help_aboutmodules" or "help_AboutmodulesAboutmodules" or "help_CshmanualCshmanual"
+     *
+     * @param array &$databaseQueries Queries done in this update
+     * @param string &$customMessage Custom message
+     * @return bool
+     */
+    public function performUpdate(array &$databaseQueries, &$customMessage)
+    {
+        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
+        $statement = $queryBuilder->select('uid', 'uc')->from('be_users')->execute();
+        while ($backendUser = $statement->fetch()) {
+            if ($backendUser['uc'] !== null) {
+                $userConfig = unserialize($backendUser['uc'], ['allowed_classes' => false]);
+                if ($userConfig['startModule'] === 'help_aboutmodules'
+                    || $userConfig['startModule'] === 'help_AboutmodulesAboutmodules'
+                    || $userConfig['startModule'] === 'help_AboutAboutmodules'
+                    || $userConfig['startModule'] === 'help_CshmanualCshmanual'
+                ) {
+                    $userConfig['startModule'] = $userConfig['startModule'] === 'help_CshmanualCshmanual' ? 'help_DocumentationCshmanual' : 'help_AboutAbout';
+                    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
+                    $queryBuilder->update('be_users')
+                        ->where(
+                            $queryBuilder->expr()->eq(
+                                'uid',
+                                $queryBuilder->createNamedParameter($backendUser['uid'], \PDO::PARAM_INT)
+                            )
+                        )
+                        // Manual quoting and false as third parameter to have the final
+                        // value in $databaseQueries and not a statement placeholder
+                        ->set('uc', serialize($userConfig));
+                    $databaseQueries[] = $queryBuilder->getSQL();
+                    $queryBuilder->execute();
+                }
+            }
+        }
+        return true;
+    }
+}
diff --git a/typo3/sysext/install/ext_localconf.php b/typo3/sysext/install/ext_localconf.php
index 229f51585ac0..aa610a1bceec 100644
--- a/typo3/sysext/install/ext_localconf.php
+++ b/typo3/sysext/install/ext_localconf.php
@@ -48,6 +48,8 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['separateSysH
     = \TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['rdctExtension']
     = \TYPO3\CMS\Install\Updates\RedirectExtractionUpdate::class;
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cshmanualBackendUsers']
+    = \TYPO3\CMS\Install\Updates\BackendUserStartModuleUpdate::class;
 
 $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
 $icons = [
-- 
GitLab