Skip to content
Snippets Groups Projects
Commit 2f9ccf08 authored by Ankur Kaneria's avatar Ankur Kaneria
Browse files

MAGETWO-51929: [Github] [Deferred for 2.1 GA] Web Setup Wizard does not work...

MAGETWO-51929: [Github] [Deferred for 2.1 GA] Web Setup Wizard does not work when Magento is installed in pub #4159

- Updates based on review comments
- Moved MenuBuilder plugin to adminhtml/di.xml
- Updated DocRootLocator logic to look for "/pub" at the end of the base path
parent 4c7e58ca
No related merge requests found
......@@ -138,4 +138,7 @@
<argument name="isIncludesAvailable" xsi:type="boolean">false</argument>
</arguments>
</type>
<type name="Magento\Backend\Model\Menu\Builder">
<plugin name="SetupMenuBuilder" type="Magento\Backend\Model\Setup\MenuBuilder" />
</type>
</config>
......@@ -214,7 +214,4 @@
</argument>
</arguments>
</type>
<type name="Magento\Backend\Model\Menu\Builder">
<plugin name="SetupMenuBuilder" type="Magento\Backend\Model\Setup\MenuBuilder" />
</type>
</config>
......@@ -43,6 +43,6 @@ class DocRootLocator
{
$rootBasePath = $this->request->getServer('DOCUMENT_ROOT');
$readDirectory = $this->readFactory->create(DirectoryList::ROOT);
return strpos($rootBasePath, 'pub') && !$readDirectory->isExist($rootBasePath . 'setup');
return (substr($rootBasePath, -strlen('/pub')) === '/pub') && !$readDirectory->isExist($rootBasePath . 'setup');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment