Skip to content

Commit

Permalink
Update config view helper on getting the page id
Browse files Browse the repository at this point in the history
  • Loading branch information
sircxes committed Jun 25, 2019
1 parent 27813f2 commit c9f19ac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/View/Helper/SiteConfigViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ public function __invoke($key, $section = null, $language = null)
if(empty($pageId) && !empty($postVal['pageId'])){
$pageId = $postVal['pageId'];
}

/**
* if page id is still empty,
* try to get it from the global $_GET & _POST variable
* with pageId as variable name
* if page id is still empty, try on get
*/
if(empty($pageId)){
if(!empty($_GET['pageId']))
$pageId = $_GET['pageId'];
if(!empty($_POST['pageId']) && empty($pageId))
$pageId = $_POST['pageId'];
$getValue = $request->getQuery();
if(empty($pageId) && !empty($getValue['idpage'])){
$pageId = $getValue['idpage'];
}
if(empty($pageId) && !empty($getValue['pageId'])){
$pageId = $getValue['pageId'];
}

/** @var MelisSiteConfigService $siteConfigSrv */
Expand Down

0 comments on commit c9f19ac

Please sign in to comment.