Skip to content

Commit 2f9ccf0

Browse files
committed
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
1 parent 4c7e58c commit 2f9ccf0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/code/Magento/Backend/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,7 @@
138138
<argument name="isIncludesAvailable" xsi:type="boolean">false</argument>
139139
</arguments>
140140
</type>
141+
<type name="Magento\Backend\Model\Menu\Builder">
142+
<plugin name="SetupMenuBuilder" type="Magento\Backend\Model\Setup\MenuBuilder" />
143+
</type>
141144
</config>

app/code/Magento/Backend/etc/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,4 @@
214214
</argument>
215215
</arguments>
216216
</type>
217-
<type name="Magento\Backend\Model\Menu\Builder">
218-
<plugin name="SetupMenuBuilder" type="Magento\Backend\Model\Setup\MenuBuilder" />
219-
</type>
220217
</config>

lib/internal/Magento/Framework/App/DocRootLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public function isPub()
4343
{
4444
$rootBasePath = $this->request->getServer('DOCUMENT_ROOT');
4545
$readDirectory = $this->readFactory->create(DirectoryList::ROOT);
46-
return strpos($rootBasePath, 'pub') && !$readDirectory->isExist($rootBasePath . 'setup');
46+
return (substr($rootBasePath, -strlen('/pub')) === '/pub') && !$readDirectory->isExist($rootBasePath . 'setup');
4747
}
4848
}

0 commit comments

Comments
 (0)