commit
917afbdb22
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -777,10 +777,10 @@ class Main
|
||||||
$parts = explode('<code>', $text);
|
$parts = explode('<code>', $text);
|
||||||
$newStr = '';
|
$newStr = '';
|
||||||
|
|
||||||
if(count($parts) > 1) {
|
if (count($parts) > 1) {
|
||||||
foreach ($parts as $p) {
|
foreach ($parts as $p) {
|
||||||
$parts2 = explode('</code>', $p);
|
$parts2 = explode('</code>', $p);
|
||||||
if(count($parts2) > 1) {
|
if (count($parts2) > 1) {
|
||||||
$code = str_replace('<br />', '', $parts2[0]);
|
$code = str_replace('<br />', '', $parts2[0]);
|
||||||
$code = str_replace('<br/>', '', $code);
|
$code = str_replace('<br/>', '', $code);
|
||||||
$code = str_replace('<br>', '', $code);
|
$code = str_replace('<br>', '', $code);
|
||||||
|
|
|
@ -28,7 +28,7 @@ if (version_compare(phpversion(), '5.4.0', '<')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include third-party libraries
|
// Include third-party libraries
|
||||||
if(!@include_once ROOT . 'vendor/autoload.php') {
|
if (!@include_once ROOT . 'vendor/autoload.php') {
|
||||||
die('<h3>Autoloader not found, did you run composer?</h3>');
|
die('<h3>Autoloader not found, did you run composer?</h3>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue