Constants cannot hold arrays.

This commit is contained in:
Keir 2015-12-16 13:38:48 +00:00
parent b5149d2da7
commit 56d606adf0
2 changed files with 3 additions and 8 deletions

View File

@ -1,15 +1,10 @@
<?php class Message
{
const TYPE_DISPLAY_NAMES = array("Chat", "PM");
public static $TYPE_DISPLAY_NAMES = array("Chat", "PM");
const TYPE_CHAT = 0;
const TYPE_PM = 1;
static function init()
{
}
/**
* @param $type
* @return int

View File

@ -199,7 +199,7 @@ function removeBadCharacters($input)
<link rel="stylesheet" href="css/tiger.css">
<link href='https://fonts.googleapis.com/css?family=Crete+Round' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<title>Report #<?php $report->getId() ?> &middot; Mineplex</title>
<title>Report #<?= $report->getId() ?> &middot; Mineplex</title>
<script>
$("#test").click(function (){
@ -240,7 +240,7 @@ function removeBadCharacters($input)
foreach($messages as $message):
$typeId = $message->getType();
$typeDisplayName = Message::TYPE_DISPLAY_NAMES[$typeId];
$typeDisplayName = Message::$TYPE_DISPLAY_NAMES[$typeId];
$isPM = strcmp($typeId, Message::TYPE_PM) == 0;
// If this is a PM, then the "-> <recipient>" suffix will be applied.