From 5461e1250f72b03f0b5ed735be13d17f78333fd1 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 31 Dec 2022 20:39:20 +0100 Subject: [PATCH] Fix broken admin page with PHP8 (#149) Undefined language constants TOP_REFERRER and TOP_EXITS lead to uncaught error, apparently assumed to be available via serendipity_plugin_entrylinks. Create and use proper PLUGIN_EVENT_STATISTICS_TOP_REFERRER and PLUGIN_EVENT_STATISTICS_TOP_EXITS constants. --- serendipity_event_statistics/ChangeLog | 1 + serendipity_event_statistics/lang_en.inc.php | 3 +++ .../serendipity_event_statistics.php | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/serendipity_event_statistics/ChangeLog b/serendipity_event_statistics/ChangeLog index d3e23e2c..96aa9b89 100644 --- a/serendipity_event_statistics/ChangeLog +++ b/serendipity_event_statistics/ChangeLog @@ -1,3 +1,4 @@ +1.66: Fixed broken admin page with PHP8 1.65: Added legal gdpr/dsgvo info 1.63: Restrict sql index key length for utf8mb4 migration 1.62: Iconfont a11y fix (yellowled) diff --git a/serendipity_event_statistics/lang_en.inc.php b/serendipity_event_statistics/lang_en.inc.php index 8bf9aea7..ba40e165 100644 --- a/serendipity_event_statistics/lang_en.inc.php +++ b/serendipity_event_statistics/lang_en.inc.php @@ -104,3 +104,6 @@ @define('PLUGIN_EVENT_STATISTICS_SHOW_CURRENTVISITORS', 'Show number of current visitors (aggregate past 15 minutes)'); @define('PLUGIN_EVENT_STATISTICS_TEXT_CURRENTVISITORS', '%s visitor(s) online'); + +@define('PLUGIN_EVENT_STATISTICS_TOP_REFERRER', 'Top Referrers'); +@define('PLUGIN_EVENT_STATISTICS_TOP_EXITS', 'Top Exits'); diff --git a/serendipity_event_statistics/serendipity_event_statistics.php b/serendipity_event_statistics/serendipity_event_statistics.php index 1422f603..121be399 100644 --- a/serendipity_event_statistics/serendipity_event_statistics.php +++ b/serendipity_event_statistics/serendipity_event_statistics.php @@ -16,7 +16,7 @@ class serendipity_event_statistics extends serendipity_event $propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg, kalkin, Matthias Mees, Ian'); - $propbag->add('version', '1.65'); + $propbag->add('version', '1.66'); $propbag->add('requirements', array( 'serendipity' => '1.6', 'smarty' => '2.6.7', @@ -600,13 +600,13 @@ class serendipity_event_statistics extends serendipity_event
-

+

-

+