Skip to content

Commit c3594b9

Browse files
authored
fix(includes): Missing header/footer for ingame page
1 parent efcade4 commit c3594b9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

web/includes/functions.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ function pageHeader($title = '', $location = '')
223223
global $db, $g_options;
224224
if ( defined('PAGE') && PAGE == 'HLSTATS' )
225225
include (PAGE_PATH . '/header.php');
226+
elseif ( defined('PAGE') && PAGE == 'INGAME' )
227+
include (PAGE_PATH . '/ingame/header.php');
226228
}
227229

228230

@@ -242,6 +244,8 @@ function pageFooter()
242244
global $g_options;
243245
if ( defined('PAGE') && PAGE == 'HLSTATS' )
244246
include (PAGE_PATH . '/footer.php');
247+
elseif ( defined('PAGE') && PAGE == 'INGAME' )
248+
include (PAGE_PATH . '/ingame/footer.php');
245249
}
246250

247251
/**
@@ -453,12 +457,10 @@ function getImage($filename, $externalURL = null)
453457
$path = IMAGE_PATH . $filename;
454458
$url = IMAGE_PATH . $relpath . rawurlencode($realfilename);
455459

456-
// Vérification du lien externe en premier
457460
if ($externalURL !== null) {
458-
// Remplace les variables dans le lien
461+
$externalURL = str_replace('$map', $realfilename, $externalURL);
459462
$externalURL = str_replace('$map', $realfilename, $externalURL);
460463

461-
// Vérifier si le fichier distant existe
462464
if (checkRemoteFileExists("$externalURL")) {
463465
$size = getImageSize($externalURL);
464466

@@ -467,7 +469,6 @@ function getImage($filename, $externalURL = null)
467469
}
468470
}
469471

470-
// Vérifier si l'image locale existe
471472
if (file_exists($path . '.png')) {
472473
$ext = 'png';
473474
} elseif (file_exists($path . '.gif')) {
@@ -489,10 +490,10 @@ function getImage($filename, $externalURL = null)
489490
}
490491

491492
/**
492-
* Vérifie si un fichier distant existe à l'URL donnée
493+
* Checks if a remote file exists at the given URL
493494
*
494495
* @param string $url
495-
* @return bool True si le fichier existe, false sinon
496+
* @return bool True if the file exists, false otherwise
496497
*/
497498
function checkRemoteFileExists($url)
498499
{
@@ -602,4 +603,4 @@ function hex2rgb($hexVal = '')
602603
return array('red' => $arrTmp[0], 'green' => $arrTmp[1], 'blue' => $arrTmp[2]);
603604
}
604605

605-
?>
606+
?>

0 commit comments

Comments
 (0)