-
Notifications
You must be signed in to change notification settings - Fork 10
Compatibility with the DisplayLastPost extension by Aurelienazerty #14
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
base: master
Are you sure you want to change the base?
Conversation
Quick modification for made works with DisplayLastPost extension https://www.phpbb.com/customise/db/extension/displaylastpost/
kasimi
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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++); | ||
|
|
There was a problem hiding this comment.
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.
|
New comit |
|
Could you also fix the formatting issues that I commented? |
Quick modification for made works with DisplayLastPost extension
https://www.phpbb.com/customise/db/extension/displaylastpost/