diff --git a/application/core/ManiaExchange/MXMapInfo.php b/application/core/ManiaExchange/MXMapInfo.php index b0c52751..57760243 100644 --- a/application/core/ManiaExchange/MXMapInfo.php +++ b/application/core/ManiaExchange/MXMapInfo.php @@ -16,7 +16,7 @@ class MXMapInfo { public $prefix, $id, $uid, $name, $userid, $author, $uploaded, $updated, $type, $maptype; public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; - public $replaytyp, $replayid, $replaycnt, $acomment, $awards, $comments; + public $replaytyp, $replayid, $replaycnt, $authorComment, $commentCount, $awards; public $pageurl, $replayurl, $imageurl, $thumburl, $downloadurl, $dir; public $ratingVoteCount, $ratingVoteAverage, $vehicleName; @@ -75,11 +75,12 @@ class MXMapInfo { $this->replaytyp = isset($mx->ReplayTypeName) ? $mx->ReplayTypeName : ''; $this->replayid = isset($mx->ReplayWRID) ? $mx->ReplayWRID : 0; $this->replaycnt = isset($mx->ReplayCount) ? $mx->ReplayCount : 0; - $this->acomment = $mx->Comments; $this->awards = isset($mx->AwardCount) ? $mx->AwardCount : 0; - $this->comments = $mx->CommentCount; $this->vehicleName = isset($mx->VehicleName) ? $mx->VehicleName : ''; + $this->authorComment = $mx->Comments; + $this->commentCount = $mx->CommentCount; + $this->ratingVoteCount = isset($mx->RatingVoteCount) ? $mx->RatingVoteCount : 0; $this->ratingVoteAverage = isset($mx->RatingVoteAverage) ? $mx->RatingVoteAverage : 0; @@ -89,15 +90,9 @@ class MXMapInfo { $this->lbrating = $this->trkvalue; } - $search = array(chr(31), '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[url]', '[/url]'); - $replace = array('
', '', '', '', '', '', '', '', ''); - $this->acomment = str_ireplace($search, $replace, $this->acomment); - $this->acomment = preg_replace('/\[url=.*\]/', '', $this->acomment); - $this->pageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/view/' . $this->id; $this->downloadurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/download/' . $this->id; - if ($mx->HasScreenshot) { $this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/screenshot/normal/' . $this->id; } else {