fixed some mistakes

This commit is contained in:
Andreas 2019-09-24 16:37:00 +02:00
parent f84f283e8e
commit bf27d735fe
6 changed files with 9 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set('log_errors','1'); ini_set('log_errors','1');
ini_set('display_errors','0'); ini_set('display_errors','1');
define('ROOT_DIR', __DIR__); define('ROOT_DIR', __DIR__);
session_start(); session_start();
require_once(ROOT_DIR.'/model/testactions/TestAction.php'); require_once(ROOT_DIR.'/model/testactions/TestAction.php');

View File

@ -3,7 +3,7 @@ class Board {
public $id; public $id;
public $name; public $name;
public $permLevel; public $permLevel;
function Board($id, $name, $permLevel){ function __construct($id, $name, $permLevel){
$this->id = $id; $this->id = $id;
$this->name = $name; $this->name = $name;
$this->permLevel = $permLevel; $this->permLevel = $permLevel;

View File

@ -7,7 +7,7 @@ class Reply {
public $date; public $date;
public $owner; public $owner;
function Reply($id, $threadID, $userID, $content, $date = null){ function __construct($id, $threadID, $userID, $content, $date = null){
$this->id = $id; $this->id = $id;
$this->threadID = $threadID; $this->threadID = $threadID;
$this->userID = $userID; $this->userID = $userID;

View File

@ -1,5 +1,4 @@
<?php <?php
class Thread { class Thread {
public $id; public $id;
public $title; public $title;
@ -12,7 +11,7 @@ class Thread {
public $owner; 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->id = $id;
$this->title = $title; $this->title = $title;
$this->boardID = $boardID; $this->boardID = $boardID;
@ -60,7 +59,7 @@ class Thread {
$this->owner = $owner; $this->owner = $owner;
} }
public function getId():int { public function getId() {
return $this->id; return $this->id;
} }
@ -74,14 +73,14 @@ class Thread {
/** /**
* @return int $boardID * @return int $boardID
*/ */
public function getBoardID():int { public function getBoardID() {
return $this->boardID; return $this->boardID;
} }
/** /**
* @return int $userID * @return int $userID
*/ */
public function getUserID():int { public function getUserID() {
return $this->userID; return $this->userID;
} }

View File

@ -2,6 +2,6 @@
require_once ROOT_DIR.'/model/forum/Thread.php'; require_once ROOT_DIR.'/model/forum/Thread.php';
require_once ROOT_DIR.'/model/forum/User.php'; require_once ROOT_DIR.'/model/forum/User.php';
foreach (MVCController::$viewData['boards'] as $board){ 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';
} }
?> ?>