File tree Expand file tree Collapse file tree
app/code/Magento/Store/Model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1164,11 +1164,12 @@ public function isDefault()
11641164 * Retrieve current url for store
11651165 *
11661166 * @param bool $fromStore
1167+ * @param bool $clearUrl
11671168 * @return string
11681169 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
11691170 * @SuppressWarnings(PHPMD.NPathComplexity)
11701171 */
1171- public function getCurrentUrl ($ fromStore = true )
1172+ public function getCurrentUrl ($ fromStore = true , $ clearUrl = false )
11721173 {
11731174 $ sidQueryParam = $ this ->_sidResolver ->getSessionIdQueryParam ($ this ->_getSession ());
11741175 $ requestString = $ this ->_url ->escape (ltrim ($ this ->_request ->getRequestString (), '/ ' ));
@@ -1217,6 +1218,10 @@ public function getCurrentUrl($fromStore = true)
12171218
12181219 $ currentUrlQueryParams = array_merge ($ requestString , $ storeParsedQuery );
12191220
1221+ if ($ clearUrl !== false ) {
1222+ $ currentUrlQueryParams = false ;
1223+ }
1224+
12201225 $ currentUrl = $ storeParsedUrl ['scheme ' ]
12211226 . ':// '
12221227 . $ storeParsedUrl ['host ' ]
You can’t perform that action at this time.
0 commit comments