Skip to content

Conversation

@Aurelienazerty
Copy link

Quick modification for made works with DisplayLastPost extension
https://www.phpbb.com/customise/db/extension/displaylastpost/

@Aurelienazerty
Copy link
Author

Copy link
Owner

@kasimi kasimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor code style issues, and please add a check for your config value display_last_post_show, otherwise the numbers are off if your extension's setting is set to no.

* @param template $template
* @param db_interface $db
* @param FirstPostOnEveryPage $firstPostOnEveryPage
* @param DisplayLastPost $displayLastPost
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tabs here to fix alignment.

$this->template = $template;
$this->db = $db;
$this->firstPostOnEveryPage = $firstPostOnEveryPage;
$this->displayLastPost = $displayLastPost;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a tab here to fix alignment.

return $this->first_post_num + ($is_ascending ? +$this->offset++ : -$this->offset++);
$return = $this->first_post_num + ($is_ascending ? +$this->offset++ : -$this->offset++);

if ($this->displayLastPost !== null && $start) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the { to a new line.


return $this->first_post_num + ($is_ascending ? +$this->offset++ : -$this->offset++);
$return = $this->first_post_num + ($is_ascending ? +$this->offset++ : -$this->offset++);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the tabs on this empty line, same on line 334.

@Aurelienazerty
Copy link
Author

New comit

@kasimi
Copy link
Owner

kasimi commented Aug 16, 2018

Could you also fix the formatting issues that I commented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants