stable
Clone or download
Only the names of browsers officially supported (or that were supported) by Tuleap are detected. The detection is done with an approach similar to the one used by Matomo [0]. The detected browser information are stored in a class with a primitive API but it should be enough to cover the needs in Tuleap. Pulling a full-blown browser detection library such as piwik/device-detector comes with a non negligible performance cost and offers far too much information that Tuleap does not need at the moment. The opportunity has been taken to extract the detection from the \HTTPRequest class for a better separation of concerns. This is a technical change to introduce a new internal API, no functional change is expected. Part of request #16147: Add a label on the web hits metric to determine which browser was used [0] https://github.com/matomo-org/device-detector Change-Id: I567fc5ce141e6df51a96e53532c182067a680bb7
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/docmanPlugin.php | +3 | −2 | Go to diff View file |
M | plugins/projectmilestones/include/Widget/ProjectMilestonesPresenterBuilder.php | +2 | −1 | Go to diff View file |
M | plugins/projectmilestones/tests/unit/Widget/ProjectMilestonesPresenterBuilderTest.php | +21 | −20 | Go to diff View file |
M | plugins/taskboard/include/Routing/TaskboardController.php | +2 | −1 | Go to diff View file |
M | plugins/taskboard/include/taskboardPlugin.php | +2 | −1 | Go to diff View file |
M | plugins/testplan/include/TestPlanController.php | +4 | −8 | Go to diff View file |
M | plugins/testplan/include/testplanPlugin.php | +0 | −1 | Go to diff View file |
M | plugins/testplan/tests/unit/TestPlanControllerTest.php | +3 | −9 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Renderer/EditRenderer.class.php | +3 | −2 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_Report_Renderer_Table.class.php | +2 | −1 | Go to diff View file |
A | src/common/BrowserDetection/DetectedBrowser.php | +112 | −0 | Go to diff View file |
D | src/common/include/Browser.class.php | +0 | −43 | Go to diff View file |
D | src/common/include/BrowserIEDeprecated.php | +0 | −61 | Go to diff View file |
M | src/common/include/HTTPRequest.class.php | +0 | −21 | Go to diff View file |
M | src/common/layout/BaseLayout.php | +35 | −2 | Go to diff View file |
A | tests/unit/common/BrowserDetection/DetectedBrowserTest.php | +133 | −0 | Go to diff View file |
D | tests/unit/common/Include/HTTPRequest/HTTPRequestBrowserTests.php | +0 | −180 | Go to diff View file |