fixed some mistakes
This commit is contained in:
parent
f84f283e8e
commit
bf27d735fe
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('log_errors','1');
|
||||
ini_set('display_errors','0');
|
||||
ini_set('display_errors','1');
|
||||
define('ROOT_DIR', __DIR__);
|
||||
session_start();
|
||||
require_once(ROOT_DIR.'/model/testactions/TestAction.php');
|
||||
|
||||
@ -3,7 +3,7 @@ class Board {
|
||||
public $id;
|
||||
public $name;
|
||||
public $permLevel;
|
||||
function Board($id, $name, $permLevel){
|
||||
function __construct($id, $name, $permLevel){
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->permLevel = $permLevel;
|
||||
|
||||
@ -7,7 +7,7 @@ class Reply {
|
||||
public $date;
|
||||
public $owner;
|
||||
|
||||
function Reply($id, $threadID, $userID, $content, $date = null){
|
||||
function __construct($id, $threadID, $userID, $content, $date = null){
|
||||
$this->id = $id;
|
||||
$this->threadID = $threadID;
|
||||
$this->userID = $userID;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
class Thread {
|
||||
public $id;
|
||||
public $title;
|
||||
@ -12,7 +11,7 @@ class Thread {
|
||||
public $owner;
|
||||
|
||||
|
||||
function Thread($id, $userID, $boardID, $title, $content, $date_created = null) {
|
||||
function __construct($id, $userID, $boardID, $title, $content, $date_created = null) {
|
||||
$this->id = $id;
|
||||
$this->title = $title;
|
||||
$this->boardID = $boardID;
|
||||
@ -60,7 +59,7 @@ class Thread {
|
||||
$this->owner = $owner;
|
||||
}
|
||||
|
||||
public function getId():int {
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
@ -74,14 +73,14 @@ class Thread {
|
||||
/**
|
||||
* @return int $boardID
|
||||
*/
|
||||
public function getBoardID():int {
|
||||
public function getBoardID() {
|
||||
return $this->boardID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int $userID
|
||||
*/
|
||||
public function getUserID():int {
|
||||
public function getUserID() {
|
||||
return $this->userID;
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
require_once ROOT_DIR.'/model/forum/Thread.php';
|
||||
require_once ROOT_DIR.'/model/forum/User.php';
|
||||
foreach (MVCController::$viewData['boards'] as $board){
|
||||
include '/view/webcontent/modules/modules_boards/module_boardtable.php';
|
||||
include ROOT_DIR.'/view/webcontent/modules/modules_boards/module_boardtable.php';
|
||||
}
|
||||
?>
|
||||
@ -6,7 +6,7 @@
|
||||
<th width=10%>Started by</th>
|
||||
<th width=15%>Last reply</th>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
foreach (MVCController::$viewData['threads'] as $thread){
|
||||
if($thread->getBoardID() == $board->id){
|
||||
$currentRow = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user