livecomment 2.5.6: PHP 8 compatibility fixes

This commit is contained in:
onli 2021-06-06 13:17:23 +02:00
parent 31df56adce
commit e83820bb5e
2 changed files with 16 additions and 19 deletions

View file

@ -1,3 +1,6 @@
2.5.6:
* PHP 8 compatibility fixes
2.5.4:
* Made jQuery-Scripts compatible to other frameworks
* Don't link to javascript when not on a singly entry

View file

@ -5,13 +5,7 @@ if (IN_serendipity !== true) {
die ("Don't hack!");
}
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
include $probelang;
}
include dirname(__FILE__) . '/lang_en.inc.php';
@serendipity_plugin_api::load_language(dirname(__FILE__));
class serendipity_event_livecomment extends serendipity_event
{
@ -27,9 +21,9 @@ class serendipity_event_livecomment extends serendipity_event
$propbag->add('author', 'Malte Paskuda, Garvin Hicking');
$propbag->add('requirements', array(
'serendipity' => '1.0',
'php' => '4.1.0'
'php' => '7.0'
));
$propbag->add('version', '2.5.5');
$propbag->add('version', '2.5.6');
$propbag->add('event_hooks', array(
'frontend_footer' => true,
'external_plugin' => true,
@ -145,34 +139,34 @@ class serendipity_event_livecomment extends serendipity_event
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
if ($variant === null) {
if (($variant ?? null) === null) {
$variant = $this->get_config('variant', 'jquery');
}
if ($buttons === null) {
if (($buttons ?? null) === null) {
$buttons = serendipity_db_bool($this->get_config('buttons', true));
}
if ($timeout === null) {
if (($timeout ?? null) === null) {
$timeout = $this->get_config('timeout', '');
}
if ($preview_animation === null) {
if (($preview_animation ?? null) === null) {
$preview_animation = $this->get_config('preview_animation', 'fadeIn');
}
if ($preview_animation_speed === null) {
if (($preview_animation_speed ?? null) === null) {
$preview_animation_speed = $this->get_config('preview_animation_speed', 'slow');
}
if ($button_animation === null) {
if (($button_animation ?? null) === null) {
$button_animation = $this->get_config('button_animation', 'slideDown');
}
if ($button_animation_speed === null) {
if (($button_animation_speed ?? null) === null) {
$button_animation_speed = $this->get_config('button_animation_speed', 'slow');
}
if ($elastic === null) {
if (($elastic ?? null) === null) {
$elastic = serendipity_db_bool($this->get_config('elastic', false));
}
if ($inline === null) {
if (($inline ?? null) === null) {
$inline = serendipity_db_bool($this->get_config('inline', false));
}
if ($path === null) {
if (($path ?? null) === null) {
$path = $this->get_config('path', '');
}
if (!empty($path) && $path != 'default' && $path != 'none' && $path != 'empty') {