Skip to content

Commit

Permalink
Fixes for PHP8
Browse files Browse the repository at this point in the history
  • Loading branch information
mariohommel committed Nov 22, 2022
1 parent cbd67d7 commit f062347
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions serendipity_event_dsgvo_gdpr/ChangeLog
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions serendipity_event_dsgvo_gdpr/serendipity_event_dsgvo_gdpr.php
Expand Up @@ -17,7 +17,7 @@ function introspect(&$propbag)
$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',
Expand Down Expand Up @@ -324,7 +324,7 @@ function parseText($text) {
function isActive() {
global $serendipity;

if ($serendipity['GET']['subpage'] == 'dsgvo_gdpr_privacy') {
if ($serendipity['GET']['subpage']?? ' ' == 'dsgvo_gdpr_privacy') {
return true;
}

Expand Down Expand Up @@ -498,7 +498,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null) {
?>
<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
Expand Down
4 changes: 4 additions & 0 deletions serendipity_event_entrypaging/ChangeLog
@@ -1,3 +1,7 @@
1.42:
-------
Fix PHP8 compats

1.40:
-----
* Fix and allow Smarty option assignement to be used in entries tpl
Expand Down
Expand Up @@ -20,7 +20,7 @@ function introspect(&$propbag)
$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',
Expand Down Expand Up @@ -102,6 +102,7 @@ function makeLink($resultset, $type = 'next')
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']);
}
Expand Down Expand Up @@ -198,7 +199,9 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
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
Expand Down

0 comments on commit f062347

Please sign in to comment.