diff --git a/README.md b/README.md index 24d8af8..9a7c5f9 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Also thanks to [LudoBoggio](https://github.com/LudoBoggio) for the [YourlsBlackl --------- +v0.06 Alphabetize the blacklist v0.05 Fix all links being blocked v0.04 Fix https and not both https and http blocking v0.03 Fix some crap code (of mine) diff --git a/plugin.php b/plugin.php index 9554725..b557ce7 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ Plugin Name: Better Yourls BlackList Domains Plugin URI: https://git.oldgate.org/Sophia/better-yourls-blacklist-domains Description: Plugin which disallows blacklisted domains and bans the submitter's IP address. GPL v3 -Version: 0.05 +Version: 0.06 Author: Sophia Atkinson Author URI: https://sophia.wtf Original Author: apelly @@ -110,6 +110,9 @@ function better_blacklist_process_form() { // Sanitize and process the form input $blacklist_form = array_filter( array_map( 'trim', explode( "\r\n", $_POST['blacklist_form'] ) ) ); + // Alphabetize the blacklist + sort($blacklist_form, SORT_STRING | SORT_FLAG_CASE); + // Update the option with serialized data yourls_update_option( 'better_blacklist_domain_list', serialize( $blacklist_form ) );