Make the old code compatible with modern PHP
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
session_start();
|
||||
$included = true;
|
||||
$lang = empty($_GET['lang']) ? 'cs' : $_GET['lang'];
|
||||
$page = htmlspecialchars($_GET['page']);
|
||||
$page = htmlspecialchars($_GET['page'] ?? 'main');
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
$root = '/krk/lob2011';
|
||||
$pretitle = 'LOB 2011';
|
||||
@@ -16,7 +16,7 @@ $CMS['%headerLinkHref%'] = rplc('%root%/') . $lang;
|
||||
$CMS['%pretitle%'] = $pretitle;
|
||||
$CMS['%comefrom%'] = $_SERVER['HTTP_REFERER'];
|
||||
$CMS['%dateFormat%'] = 'd.m.Y H:i';
|
||||
function rplc($string) {
|
||||
function rplc(string $string): string {
|
||||
global $CMS;
|
||||
|
||||
return str_replace(array_keys($CMS), $CMS, $string);
|
||||
|
||||
Reference in New Issue
Block a user