Skip to content

Commit

Permalink
sMeta parameter is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
alexschwarz89 committed Dec 11, 2015
1 parent 5aeb1c2 commit a5a8031
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions source/application/controllers/alist.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,30 +476,31 @@ protected function _getCatPathString()
*/
protected function _prepareMetaDescription($sMeta, $iLength = 1024, $blDescTag = false)
{
$sDescription = '';
// appending parent title
if ($oCategory = $this->getActiveCategory()) {
if (($oParent = $oCategory->getParentCategory())) {
$sDescription .= " {$oParent->oxcategories__oxtitle->value} -";
}
if ($sMeta === false) {
$sMeta = '';
// appending parent title
if ($oCategory = $this->getActiveCategory()) {
if (($oParent = $oCategory->getParentCategory())) {
$sMeta .= " {$oParent->oxcategories__oxtitle->value} -";
}

// adding category title
$sDescription .= " {$oCategory->oxcategories__oxtitle->value}.";
// adding category title
$sMeta .= " {$oCategory->oxcategories__oxtitle->value}.";
}
}

// and final component ..
//changed for #2776
if (($sSuffix = $this->getConfig()->getActiveShop()->oxshops__oxtitleprefix->value)) {
$sDescription .= " {$sSuffix}";
$sMeta .= " {$sSuffix}";
}

// making safe for output
$sDescription = getStr()->html_entity_decode($sDescription);
$sDescription = getStr()->strip_tags($sDescription);
$sDescription = getStr()->cleanStr($sDescription);
$sDescription = getStr()->htmlspecialchars($sDescription);
$sMeta = getStr()->html_entity_decode($sMeta);
$sMeta = getStr()->strip_tags($sMeta);
$sMeta = getStr()->cleanStr($sMeta);
$sMeta = getStr()->htmlspecialchars($sMeta);

return trim($sDescription);
return trim($sMeta);
}

/**
Expand Down

0 comments on commit a5a8031

Please sign in to comment.