bootstrap4: PHP 8 compatibility fixes

This commit is contained in:
onli 2021-07-04 14:12:46 +02:00
parent fa69a788a8
commit 91c8ee2d8d
7 changed files with 17 additions and 17 deletions

View File

@ -834,7 +834,7 @@ function &serendipity_searchEntries($term, $limit = '', $searchresults = '') {
$limit = serendipity_db_limit_sql($limit);
$term = serendipity_db_escape_string($term);
$cond = array();
$cond = array('having' => '');
$relevance_enabled = false;
if ($serendipity['dbType'] == 'postgres' ||
$serendipity['dbType'] == 'pdo-postgres') {

View File

@ -91,7 +91,7 @@ switch ($serendipity['GET']['action']) {
array(
'content_message' => sprintf(YOUR_SEARCH_RETURNED_BLAHBLAH, '<span class="searchterm">' . $serendipity['GET']['searchTerm'] . '</span>', '<span class="searchresults">' . serendipity_getTotalEntries() . '</span>'),
'searchresult_results' => true,
'searchresult_fullentry' => $serendipity['GET']['fullentry']
'searchresult_fullentry' => $serendipity['GET']['fullentry'] ?? null
)
);

View File

@ -8,18 +8,18 @@
<input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}">
<div class="form-group">
<label for="serendipity_commentform_name">{$CONST.NAME}{if $required_fields.name}*{/if}</label>
<input id="serendipity_commentform_name" class="form-control" type="text" name="serendipity[name]" value="{$commentform_name}"{if $required_fields.name} required{/if}>
<label for="serendipity_commentform_name">{$CONST.NAME}{if isset($required_fields.name) and $required_fields.name}*{/if}</label>
<input id="serendipity_commentform_name" class="form-control" type="text" name="serendipity[name]" value="{$commentform_name}"{if isset($required_fields.name) and $required_fields.name} required{/if}>
</div>
<div class="form-group">
<label for="serendipity_commentform_email">{$CONST.EMAIL}{if $required_fields.email}*{/if}</label>
<input id="serendipity_commentform_email" class="form-control" type="email" name="serendipity[email]" value="{$commentform_email}"{if $required_fields.email} required{/if}>
<label for="serendipity_commentform_email">{$CONST.EMAIL}{if isset($required_fields.email) and $required_fields.email}*{/if}</label>
<input id="serendipity_commentform_email" class="form-control" type="email" name="serendipity[email]" value="{$commentform_email}"{if isset($required_fields.email) and $required_fields.email} required{/if}>
</div>
<div class="form-group">
<label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if $required_fields.url}*{/if}</label>
<input id="serendipity_commentform_url" class="form-control" type="url" name="serendipity[url]" value="{$commentform_url}"{if $required_fields.url} required{/if}>
<label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if isset($required_fields.url) and $required_fields.url}*{/if}</label>
<input id="serendipity_commentform_url" class="form-control" type="url" name="serendipity[url]" value="{$commentform_url}"{if isset($required_fields.url) and $required_fields.url} required{/if}>
</div>
<div class="form-group">
@ -28,8 +28,8 @@
</div>
<div class="form-group">
<label for="serendipity_commentform_comment">{$CONST.COMMENT}{if $required_fields.comment}*{/if}</label>
<textarea id="serendipity_commentform_comment" class="form-control" rows="10" name="serendipity[comment]"{if $required_fields.comment} required{/if}>{$commentform_data}</textarea>
<label for="serendipity_commentform_comment">{$CONST.COMMENT}{if isset($required_fields.comment) and $required_fields.comment}*{/if}</label>
<textarea id="serendipity_commentform_comment" class="form-control" rows="10" name="serendipity[comment]"{if isset($required_fields.comment) and $required_fields.comment} required{/if}>{$commentform_data}</textarea>
</div>
{serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry}
{if $is_commentform_showToolbar}

View File

@ -13,7 +13,7 @@
{/if}
</div>
{if $entry.allow_comments AND $comment.body != 'COMMENT_DELETED'}
<a id="serendipity_reply_{$comment.id}" class="comment_reply btn btn-outline-primary btn-sm" href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>
<a id="serendipity_reply_{$comment.id}" class="comment_reply btn btn-outline-primary btn-sm" href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {if isset($comment_onchange)}{$comment_onchange}{/if}">{$CONST.REPLY}</a>
<div id="serendipity_replyform_{$comment.id}"></div>
{/if}
</li>

View File

@ -103,9 +103,9 @@ $template_config = array(
);
$template_global_config = array('navigation' => true);
$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true);
$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'] ?? '', true);
serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config);
if ($_SESSION['serendipityUseTemplate']) {
if (isset($_SESSION['serendipityUseTemplate']) && $_SESSION['serendipityUseTemplate']) {
$template_loaded_config['use_corenav'] = false;
}

View File

@ -34,7 +34,7 @@
{if $entry.has_comments}
<li class="post_comments d-inline-block"><svg class="icon-comments" role="img" viewbox="0 0 1792 1792" width="1792" height="1792" aria-labelledby="title"><title id="title">{$entry.label_comments}</title><use xlink:href="{$serendipityHTTPPath}templates/{$template}/img/icons.svg#comments"></use></svg><a href="{$entry.link}#comments" title="{$entry.comments} {$entry.label_comments}{if $entry.has_trackbacks}, {$entry.trackbacks} {$entry.label_trackbacks}{/if}">{$entry.comments}</a></li>
{/if}
{if $entry.freetag.tags.tags}
{if isset($entry.freetag.tags.tags) && $entry.freetag.tags.tags}
<li class="post_tags d-inline-block"><svg class="icon-tag" role="img" viewbox="0 0 1792 1792" width="1792" height="1792" aria-labelledby="title"><title id="title">Tags</title><use xlink:href="{$serendipityHTTPPath}templates/{$template}/img/icons.svg#tag"></use></svg>{foreach from=$entry.freetag.tags.tags item="tag"}{$tag} {/foreach}</li>
{/if}
</ul>
@ -109,8 +109,8 @@
<p class="alert alert-info" role="alert">{$CONST.NO_ENTRIES_TO_PRINT}</p>
{/if}
{/foreach}
{if not $is_preview}
{if $staticpage_pagetitle == ''}
{if not $is_preview and ! $is_single_entry}
{if ! isset($staticpage_pagetitle) || $staticpage_pagetitle == ''}
<nav aria-label="{$footer_info}" title="{$footer_info}">
<ul class="pagination justify-content-between">
<li class="page-item{if !$footer_prev_page} disabled{/if}">

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$head_title|default:$blogTitle}{if $head_subtitle} | {$head_subtitle}{/if}</title>
<meta name="generator" content="Serendipity v.{$head_version}">
{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')}
{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || (isset($staticpage_pagetitle) && $staticpage_pagetitle != "") || (isset($robots_index) and $robots_index == 'index'))}
<meta name="robots" content="index,follow">
{else}
<meta name="robots" content="noindex,follow">