Skip to content

Commit 53f9afe

Browse files
Small code cleanup (#161)
1 parent 673b2da commit 53f9afe

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

phpdotnet/phd/Package/Generic/TocFeed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ protected function createAtomToc($id)
364364
if ($long && $short && $long != $short) {
365365
$title = $short . ' -- ' . $long;
366366
} else {
367-
$title = ($long ?: $short);
367+
$title = $long;
368368
}
369369
$link = $this->createTargetLink($chunkid);
370370
$toc .= <<<ATM

phpdotnet/phd/Package/Generic/XHTML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ protected function createTOC($id, $name, $props, $depth = 1, $header = true) {
575575
if ($isLDesc && $isSDesc) {
576576
$toc .= '<li><a href="' . $link . '">' . $short . '</a> — ' . $long . $list . "</li>\n";
577577
} else {
578-
$toc .= '<li><a href="' . $link . '">' . ($long ? $long : $short) . '</a>' . $list . "</li>\n";
578+
$toc .= '<li><a href="' . $link . '">' . $long . '</a>' . $list . "</li>\n";
579579
}
580580
}
581581
$toc .= "</ul>\n";

phpdotnet/phd/Package/PEAR/Web.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ public function header($id)
7171
$siblingIDs = Format::getChildren($parent);
7272
foreach ($siblingIDs as $sid) {
7373
$sdesc = Format::getShortDescription($sid);
74-
$ldesc = Format::getLongDescription($sid);
7574
$toc[] = array(
7675
$sid . $ext,
77-
empty($sdesc) ? $ldesc : $sdesc
76+
$sdesc
7877
);
7978
}
8079

phpdotnet/phd/Package/PHP/XHTML.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ public function format_root_chunk($open, $name, $attrs) {
962962
if ($long && $short && $long != $short) {
963963
$content .= '<li><a href="' .$href. '">' .$short. '</a> — ' .$long;
964964
} else {
965-
$content .= '<li><a href="' .$href. '">' .($long ? $long : $short). '</a>';
965+
$content .= '<li><a href="' .$href. '">' . $long . '</a>';
966966
}
967967
$children = Format::getChildren($chunkid);
968968
if (count($children)) {
@@ -974,7 +974,7 @@ public function format_root_chunk($open, $name, $attrs) {
974974
if ($long && $short && $long != $short) {
975975
$content .= '<li><a href="' .$href. '">' .$short. '</a> — ' .$long. '</li>';
976976
} else {
977-
$content .= '<li><a href="' .$href. '">' .($long ? $long : $short). '</a></li>';
977+
$content .= '<li><a href="' .$href. '">' . $long . '</a></li>';
978978
}
979979
}
980980
$content .="</ul>";

0 commit comments

Comments
 (0)