stable
Clone or download
Until now, in order to be displayed in the "Services" list in project administration, plugins had to be first injected inside the database for each and every service. This was usually done with `install.sql` and copy/paste of an INSERT INTO ... SELECT query. The, as services are duplicated at SQL level when project are created it was working just fine. But since we introduced the XML based project templates it no longer works that fine because XML based templates no longer clone a list of services. They are copied from the XML declaration of services. Hence all templates must list the list of all possible services, even disabled because if they are not there at project creation, they won't appear. This is odd and it's time to move forward: Service activation shouldn't depend from the database but must be managed by the Plugin itself. This commit is a first implementation and should be self sufficent. However the management of services have grown mad and with this new event, a plugin is expected to implement 5 hooks to "just" have a service in the sidebar. This will be the purpose of the following commits. Part of: story #24228 create/update/delete mediawiki-standalone in my project Change-Id: I2767e329176717205b98eaf4f4e8cd4f7fe14bb2
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/mediawiki_standalone/include/Service/MediawikiStandaloneService.php | +24 | −0 | Go to diff View file |
M | plugins/mediawiki_standalone/include/mediawiki_standalonePlugin.php | +26 | −11 | Go to diff View file |
M | site-content/en_US/project/project.tab | +0 | −1 | Go to diff View file |
M | site-content/fr_FR/LC_MESSAGES/tuleap-core.po | +3 | −0 | Go to diff View file |
M | site-content/fr_FR/project/project.tab | +0 | −1 | Go to diff View file |
M | site-content/pt_BR/LC_MESSAGES/tuleap-core.po | +3 | −0 | Go to diff View file |
M | src/common/Plugin/Plugin.php | +14 | −4 | Go to diff View file |
M | src/common/Project/Service.class.php | +2 | −0 | Go to diff View file |
A | src/common/Project/Service/AddMissingService.php | +64 | −0 | Go to diff View file |
M | src/common/Project/Service/EditController.php | +37 | −50 | Go to diff View file |
M | src/common/Project/Service/ServiceJSONPresenter.php | +0 | −1 | Go to diff View file |
M | src/common/Project/Service/ServicePOSTDataBuilder.php | +1 | −1 | Go to diff View file |
M | src/common/Project/Service/ServiceUpdator.php | +20 | −17 | Go to diff View file |
M | src/common/Project/Service/ServicesPresenterBuilder.php | +5 | −7 | Go to diff View file |
M | tests/lib/Builders/HTTPRequestBuilder.php | +8 | −0 | Go to diff View file |
A | tests/lib/Stubs/ProjectByIDFactoryStub.php | +52 | −0 | Go to diff View file |
A | tests/unit/common/Project/Service/AddMissingServiceTest.php | +100 | −0 | Go to diff View file |
M | tests/unit/common/Project/Service/EditControllerTest.php | +128 | −45 | Go to diff View file |
M | tests/unit/common/Project/Service/ServicesPresenterBuilderTest.php | +90 | −19 | Go to diff View file |