Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Klap-in committed Feb 8, 2024
1 parent 1a022be commit 0806dc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions syntax/news.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ public function showSameAuthor($R, $data)
}

$limit = $data['entries'] > 0 ? $data['entries'] : 10;
$itr = 0;
$i = 0;
$R->doc .= '<ul>';
while ($itr < count($rel['sameauthor']) && $itr < $limit) {
$R->doc .= '<li>' . $this->hlp->pluginlink($R, $rel['sameauthor'][$itr++]) . '</li>';
while ($i < count($rel['sameauthor']) && $i < $limit) {
$R->doc .= '<li>' . $this->hlp->pluginlink($R, $rel['sameauthor'][$i++]) . '</li>';
}
$R->doc .= '</ul>';
}
Expand Down

0 comments on commit 0806dc5

Please sign in to comment.