From a1259ec8d9412cb448dc139bcc0b0afe703a9310 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 2 Sep 2021 22:39:10 +0100 Subject: [PATCH] action-random: use new slugify() function --- modules/action-random.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/action-random.php b/modules/action-random.php index dca656a..63177ef 100644 --- a/modules/action-random.php +++ b/modules/action-random.php @@ -5,7 +5,7 @@ register_module([ "name" => "Random Page", - "version" => "0.3", + "version" => "0.3.1", "author" => "Starbeamrainbowlabs", "description" => "Adds an action called 'random' that redirects you to a random page.", "id" => "action-random", @@ -23,7 +23,7 @@ register_module([ add_action("random", function() { global $pageindex; - $mode = preg_replace("/[^a-z-_]/i", "", $_GET["mode"] ?? ""); + $mode = slugify($_GET["mode"] ?? ""); $pageNames = array_keys(get_object_vars($pageindex));