Fix blank admin page with PHP8 (#148)

Add missing TOP_EXITS and SHOWS_TOP_EXIT string definitions that
lead to a blank serendipity_admin.php page under PHP 8.
See https://board.s9y.org/viewtopic.php?t=25730

Also add the IN_serendipity check, and ChangeLog.
This commit is contained in:
Eike Rathke 2022-12-31 20:38:20 +01:00 committed by GitHub
parent 5b29e9dda6
commit 67b0fae8da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,3 @@
1.2:
---
* Fixed blank admin page with PHP8

View file

@ -0,0 +1,4 @@
<?php
@define('TOP_EXITS', 'Top Exits');
@define('SHOWS_TOP_EXIT', 'Shows the most common exit urls');
?>

View file

@ -1,5 +1,11 @@
<?php
if (IN_serendipity !== true) {
die ("Don't hack!");
}
@serendipity_plugin_api::load_language(dirname(__FILE__));
class serendipity_plugin_topexits extends serendipity_plugin {
var $title = TOP_EXITS;
@ -9,7 +15,7 @@ class serendipity_plugin_topexits extends serendipity_plugin {
$propbag->add('description', SHOWS_TOP_EXIT);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.1');
$propbag->add('version', '1.2');
$propbag->add('configuration', array('limit', 'use_links', 'interval'));
$propbag->add('groups', array('STATISTICS'));
}