Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small code cleanup #161

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phpdotnet/phd/Package/Generic/TocFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ protected function createAtomToc($id)
if ($long && $short && $long != $short) {
$title = $short . ' -- ' . $long;
} else {
$title = ($long ?: $short);
$title = $long;
}
$link = $this->createTargetLink($chunkid);
$toc .= <<<ATM
Expand Down
2 changes: 1 addition & 1 deletion phpdotnet/phd/Package/Generic/XHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ protected function createTOC($id, $name, $props, $depth = 1, $header = true) {
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";
Expand Down
3 changes: 1 addition & 2 deletions phpdotnet/phd/Package/PEAR/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ public function header($id)
$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
);
}

Expand Down
4 changes: 2 additions & 2 deletions phpdotnet/phd/Package/PHP/XHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ public function format_root_chunk($open, $name, $attrs) {
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)) {
Expand All @@ -974,7 +974,7 @@ public function format_root_chunk($open, $name, $attrs) {
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>";
Expand Down
Loading