Skip to content

Commit

Permalink
Merge pull request #16 from Crizz0/update-for-php8_4
Browse files Browse the repository at this point in the history
Add change for PHP 8.4 compatibility and bump requirement to PHP7.1.3
  • Loading branch information
Crizz0 authored Dec 7, 2024
2 parents 6b6382e + 02d5547 commit 5ba70a4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"IP anonymised" extension for phpBB 3.2 & 3.3
"IP anonymised" extension for phpBB 3.3
======
This phpBB extension will anonymise the user's IP in posts, logs, sessions etc. after a defined time span e.g. it overwrites all IPs which are older than 180 days.

You should use at least phpBB 3.3.1 and PHP 7.1.3 to use this extension.

Author: Christian Schnegelberger

URL: https://www.crizzo.de
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"type": "phpbb-extension",
"description": "This phpBB extension will anonymise the user's IP in posts, logs, sessions etc.",
"homepage": "https://github.com/Crizz0/ipanonym",
"version": "1.0.4",
"time": "2023-12-31",
"version": "1.1.0",
"time": "2024-12-04",
"license": "GPL-2.0-only",
"authors": [{
"name": "Christian Schnegelberger",
Expand All @@ -13,12 +13,12 @@
"role": "Developer/Founder"
}],
"require": {
"php": ">=5.4.7"
"php": ">=7.1.3"
},
"extra": {
"display-name": "IP anonymised",
"soft-require": {
"phpbb/phpbb": ">=3.2.4, <4.0.0@dev"
"phpbb/phpbb": ">=3.3.1, <4.0.0@dev"
},
"version-check": {
"host": "www.crizzo.de",
Expand Down
2 changes: 1 addition & 1 deletion cron/task/task_anonymise.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class task_anonymise
* @param \phpbb\config\config $config
* @param \phpbb\db\driver\driver_interface $db
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \dmzx\mchat\core\settings $mchat = null)
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, ?\dmzx\mchat\core\settings $mchat = null)
{
$this->config = $config;
$this->db = $db;
Expand Down
22 changes: 22 additions & 0 deletions ext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
*
* IP anonymised extension for the phpBB Forum Software package.
*
* @copyright (c) 2024 Crizzo <https://www.crizzo.de>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace crizzo\ipanonym;

class ext extends \phpbb\extension\base
{
public function is_enableable()
{
$valid_phpbb = phpbb_version_compare(PHPBB_VERSION, '3.3.1', '>=') && phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<');
$valid_php = phpbb_version_compare(PHP_VERSION, '7.1.3', '>=');

return ($valid_phpbb && $valid_php);
}
}

0 comments on commit 5ba70a4

Please sign in to comment.