Merge branch 'master' of github.com:flashwave/sakura
This commit is contained in:
commit
fd6baecb7d
4 changed files with 9 additions and 7 deletions
|
@ -17,7 +17,7 @@ use Sakura\BBcode;
|
||||||
class Posting
|
class Posting
|
||||||
{
|
{
|
||||||
// Construct a new post action
|
// Construct a new post action
|
||||||
public function __construct($forum, $thread = null) {
|
public function __construct($forum, $thread = null)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,12 +75,14 @@ class Thread
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the opening post
|
// Get the opening post
|
||||||
public function firstPost() {
|
public function firstPost()
|
||||||
|
{
|
||||||
return $this->posts() ? array_values($this->_posts)[0] : (new Post(0));
|
return $this->posts() ? array_values($this->_posts)[0] : (new Post(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the last reply
|
// Get the last reply
|
||||||
public function lastPost() {
|
public function lastPost()
|
||||||
|
{
|
||||||
return $this->posts() ? end($this->_posts) : (new Post(0));
|
return $this->posts() ? end($this->_posts) : (new Post(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue