removed unused stuff

This commit is contained in:
Andy Miller
2016-02-05 12:35:21 -07:00
parent 63812cc6b1
commit cd7366ca8d
2 changed files with 3 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ class Truncator {
list($txt, $nb, $opts) = static::truncateNode($doc, $childNode, $remaining, $opts);
}
else if ($childNode->nodeType === XML_TEXT_NODE) {
list($txt, $nb, $opts) = static::truncateText($doc, $childNode, $remaining, $opts);
list($txt, $nb, $opts) = static::truncateText($childNode, $remaining, $opts);
} else {
$txt = '';
$nb = 0;
@@ -141,7 +141,7 @@ class Truncator {
return array($inner, $remaining, $opts);
}
protected static function truncateText($doc, $node, $length, $opts)
protected static function truncateText($node, $length, $opts)
{
$string = $node->textContent;
@@ -165,7 +165,7 @@ class Truncator {
$words = $words[0];
$count = count($words);
if ($count <= $length && $length > 0) {
return array($xhtml, $count, $opts);
return array($string, $count, $opts);
}
return array(implode('', array_slice($words, 0, $length)), $count, $opts);
}

View File

@@ -1369,8 +1369,6 @@ class Page
/** @var Uri $uri */
$uri = self::getGrav()['uri'];
$include_port = false;
// get pre-route
if ($include_lang && $language->enabled()) {
$pre_route = $language->getLanguageURLPrefix();