fix php8 error on undefined const

This commit is contained in:
Steffen Müller
2023-03-12 11:41:04 +01:00
parent 9ef3938e10
commit 7601038f6b
3 changed files with 14 additions and 11 deletions
+4 -3
View File
@@ -26,7 +26,8 @@ class Template{
if ( 'admin' == $str_url ) {
$strSubsMenu = '';
} else {
if (SUBSCRIBE_EMAIL || SUBSCRIBE_TELEGRAM ) {
$strSubsMenu = '';
if (defined('SUBSCRIBE_EMAIL') || defined('SUBSCRIBE_TELEGRAM') ) {
// Subscriber menu is to be shown...
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
// If subscriber is not logged on, display subscriber menus
@@ -56,7 +57,7 @@ class Template{
<html lang="en">
<head>
<?php
if(!admin){
if(defined('admin') && !admin){
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
$head_additionalcode = fread($versionfile,filesize("head.txt"));
fclose($headfile);
@@ -237,7 +238,7 @@ class Template{
<?php }?>
<script src="<?php echo WEB_URL;?>/js/vendor/bootstrap.min.js"></script>
<script src="<?php echo WEB_URL;?>/js/main.js"></script>
<?php if ( GOOGLE_RECAPTCHA ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
<?php if ( defined('GOOGLE_RECAPTCHA') ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
</body>
</html>
<?php