Skip to content

Commit

Permalink
Added crutch for Workshop maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruzya committed Oct 21, 2016
1 parent 3785368 commit dec8cad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web_upload/includes/sb-callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,11 @@ function ServerHostPlayers($sid, $type="servers", $obId="", $tplsid="", $open=""
$objResponse->addAssign("vac_$sid", "innerHTML", "<img src='images/shield.png'>");
else
$objResponse->addAssign("vac_$sid", "innerHTML", "<img src='images/noshield.png'>");
// Костыль для $info['map'] и Воркшопа (ммм, костыльчики, мои родные)
if (strpos($info['map'], '/') !== FALSE) {
$tmp = explode('/', $info['map']);
$info['map'] = $tmp[count($tmp)-1];
}
$objResponse->addAssign("map_$sid", "innerHTML", basename($info['map'])); // Strip Steam Workshop folder
if(!$inHome) {
$objResponse->addScript("$('mapimg_$sid').setProperty('src', '".GetMapImage($info['map'])."').setProperty('alt', '".$info['map']."').setProperty('title', '".basename($info['map'])."');");
Expand Down

0 comments on commit dec8cad

Please sign in to comment.