Skip to content

Commit

Permalink
MAGETWO-51929: [Github] [Deferred for 2.1 GA] Web Setup Wizard does n…
Browse files Browse the repository at this point in the history
…ot 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
  • Loading branch information
ark99 committed Jun 8, 2016
1 parent 4c7e58c commit 2f9ccf0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/code/Magento/Backend/etc/adminhtml/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/App/DocRootLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function isPub()
{
$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 comments on commit 2f9ccf0

Please sign in to comment.