mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
action-random: use new slugify() function
This commit is contained in:
parent
bacfc11723
commit
a1259ec8d9
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Random Page",
|
"name" => "Random Page",
|
||||||
"version" => "0.3",
|
"version" => "0.3.1",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds an action called 'random' that redirects you to a random page.",
|
"description" => "Adds an action called 'random' that redirects you to a random page.",
|
||||||
"id" => "action-random",
|
"id" => "action-random",
|
||||||
|
@ -23,7 +23,7 @@ register_module([
|
||||||
add_action("random", function() {
|
add_action("random", function() {
|
||||||
global $pageindex;
|
global $pageindex;
|
||||||
|
|
||||||
$mode = preg_replace("/[^a-z-_]/i", "", $_GET["mode"] ?? "");
|
$mode = slugify($_GET["mode"] ?? "");
|
||||||
|
|
||||||
$pageNames = array_keys(get_object_vars($pageindex));
|
$pageNames = array_keys(get_object_vars($pageindex));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue