Skip to content

Commit

Permalink
Fixed old-style extraction of URL params
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Nov 22, 2024
1 parent 8b5caff commit e0a4bbc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/Resources/contao/classes/TagHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ public function deleteUnusedTags()
}
}

public static function getSavedURLParams($objInput)
public static function getSavedURLParams()
{
$strParams = '';
$arrParams = array();
if (strlen($objInput->get('year')))
if (strlen(Input::get('year')))
{
\array_push($arrParams, 'year=' . $objInput->get('year'));
\array_push($arrParams, 'year=' . Input::get('year'));
}
if (strlen($objInput->get('month')))
if (strlen(Input::get('month')))
{
\array_push($arrParams, 'month=' . $objInput->get('month'));
\array_push($arrParams, 'month=' . Input::get('month'));
}
if (strlen($objInput->get('day')))
if (strlen(Input::get('day')))
{
\array_push($arrParams, 'day=' . $objInput->get('day'));
\array_push($arrParams, 'day=' . Input::get('day'));
}
if (count($arrParams))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/modules/ModuleTagCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function showTags()

if ($this->keep_url_params)
{
$strParams = TagHelper::getSavedURLParams($this->Input);
$strParams = TagHelper::getSavedURLParams();
}

$relatedlist = (strlen(TagHelper::decode(Input::get('related')))) ? preg_split("/,/", TagHelper::decode(Input::get('related'))) : array();
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/modules/ModuleTagScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function compile()
$strParams = '';
if ($this->keep_url_params)
{
$strParams = TagHelper::getSavedURLParams($this->Input);
$strParams = TagHelper::getSavedURLParams();
}
$tagurls = array();
foreach ($this->arrTags as $idx => $tag)
Expand Down

0 comments on commit e0a4bbc

Please sign in to comment.