1
0
mirror of https://github.com/php/phd.git synced 2026-03-24 07:02:07 +01:00

Small code cleanup (#161)

This commit is contained in:
Kamil Tekiela
2024-10-13 21:57:16 +02:00
committed by GitHub
parent 673b2dab11
commit 53f9afe269
4 changed files with 5 additions and 6 deletions

View File

@@ -364,7 +364,7 @@ abstract class Package_Generic_TocFeed extends Format
if ($long && $short && $long != $short) {
$title = $short . ' -- ' . $long;
} else {
$title = ($long ?: $short);
$title = $long;
}
$link = $this->createTargetLink($chunkid);
$toc .= <<<ATM

View File

@@ -575,7 +575,7 @@ abstract class Package_Generic_XHTML extends Format_Abstract_XHTML {
if ($isLDesc && $isSDesc) {
$toc .= '<li><a href="' . $link . '">' . $short . '</a> — ' . $long . $list . "</li>\n";
} else {
$toc .= '<li><a href="' . $link . '">' . ($long ? $long : $short) . '</a>' . $list . "</li>\n";
$toc .= '<li><a href="' . $link . '">' . $long . '</a>' . $list . "</li>\n";
}
}
$toc .= "</ul>\n";

View File

@@ -71,10 +71,9 @@ manualHeader("index.php"'
$siblingIDs = Format::getChildren($parent);
foreach ($siblingIDs as $sid) {
$sdesc = Format::getShortDescription($sid);
$ldesc = Format::getLongDescription($sid);
$toc[] = array(
$sid . $ext,
empty($sdesc) ? $ldesc : $sdesc
$sdesc
);
}

View File

@@ -962,7 +962,7 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML {
if ($long && $short && $long != $short) {
$content .= '<li><a href="' .$href. '">' .$short. '</a> — ' .$long;
} else {
$content .= '<li><a href="' .$href. '">' .($long ? $long : $short). '</a>';
$content .= '<li><a href="' .$href. '">' . $long . '</a>';
}
$children = Format::getChildren($chunkid);
if (count($children)) {
@@ -974,7 +974,7 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML {
if ($long && $short && $long != $short) {
$content .= '<li><a href="' .$href. '">' .$short. '</a> — ' .$long. '</li>';
} else {
$content .= '<li><a href="' .$href. '">' .($long ? $long : $short). '</a></li>';
$content .= '<li><a href="' .$href. '">' . $long . '</a></li>';
}
}
$content .="</ul>";