Fixes for PHP8

This commit is contained in:
Mario Hommel 2022-11-22 21:57:04 +01:00
parent cbd67d73a4
commit f062347afe
4 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,4 @@
1.3.2: More Fixes for PHP8
1.3.1: Hotfixes for PHP 8 (surrim)
1.3: Shorten one more block for IPv6 comments
1.2.1: Really display legal information for plugins.

View file

@ -17,7 +17,7 @@ class serendipity_event_dsgvo_gdpr extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_DSGVO_GDPR_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.3.1');
$propbag->add('version', '1.3.2');
$propbag->add('requirements', array(
'serendipity' => '2.0',
'smarty' => '2.6.7',
@ -324,7 +324,7 @@ class serendipity_event_dsgvo_gdpr extends serendipity_event
function isActive() {
global $serendipity;
if ($serendipity['GET']['subpage'] == 'dsgvo_gdpr_privacy') {
if ($serendipity['GET']['subpage']?? ' ' == 'dsgvo_gdpr_privacy') {
return true;
}
@ -498,7 +498,7 @@ class serendipity_event_dsgvo_gdpr extends serendipity_event
?>
<div class="form_toolbar dsgvo_gdpr_comment">
<div class="form_box">
<input id="checkbox_dsgvo_gdpr" name="serendipity[accept_privacy]" value="1" type="checkbox" <?php echo ($serendipity['POST']['accept_privacy'] == 1 ? 'checked="checked"' : ''); ?>><label for="checkbox_dsgvo_gdpr"><?php echo $this->parseText($this->get_config('commentform_text')); ?></label>
<input id="checkbox_dsgvo_gdpr" name="serendipity[accept_privacy]" value="1" type="checkbox" <?php echo ($serendipity['POST']['accept_privacy']??null == 1 ? 'checked="checked"' : ''); ?>><label for="checkbox_dsgvo_gdpr"><?php echo $this->parseText($this->get_config('commentform_text')); ?></label>
</div>
</div>
<?php

View file

@ -1,3 +1,7 @@
1.42:
-------
Fix PHP8 compats
1.40:
-----
* Fix and allow Smarty option assignement to be used in entries tpl

View file

@ -20,7 +20,7 @@ class serendipity_event_entrypaging extends serendipity_event
$propbag->add('description', PLUGIN_ENTRYPAGING_BLAHBLAH);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking, Wesley Hwang-Chung');
$propbag->add('version', '1.41');
$propbag->add('version', '1.42');
$propbag->add('requirements', array(
'serendipity' => '1.6',
'smarty' => '2.6.7',
@ -102,6 +102,7 @@ class serendipity_event_entrypaging extends serendipity_event
if (class_exists('serendipity_event_multilingual')) {
$localtitle = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = {$resultset[0]['id']} AND property = 'multilingual_title_{$serendipity['lang']}'", true, "both", false, false, false, true);
}
$localtitle = $_GET ['localtitle'] ?? 'not set';
if (!is_array($localtitle)) {
$localtitle = array(0 => $resultset[0]['title']);
}
@ -198,7 +199,9 @@ class serendipity_event_entrypaging extends serendipity_event
serendipity_plugin_api::hook_event('frontend_fetchentry', $cond);
if (serendipity_db_bool($this->get_config('use_category')) && !empty($currentTimeSQL['categoryid'])) {
$cond['joins'] .= " JOIN {$serendipity['dbPrefix']}entrycat AS ec ON (ec.categoryid = " . (int)$currentTimeSQL['categoryid'] . " AND ec.entryid = e.id)";
}
} else {
$cond['joins'] = NULL;
}
$querystring = "SELECT
e.id, e.title, e.timestamp