Alphabetize the blacklist
This commit is contained in:
@ -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)
|
||||
|
@ -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 ) );
|
||||
|
||||
|
Reference in New Issue
Block a user