From eadeb6669e86338bd7feb3cba16f1bdd2e5cc85d Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Fri, 8 Jul 2011 23:03:12 +1000 Subject: wildcard option ("*") for per-board mods --- mod.php | 94 +++++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 54 insertions(+), 40 deletions(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index 2e020acf..91ba7f7d 100644 --- a/mod.php +++ b/mod.php @@ -1008,7 +1008,7 @@ $boards = Array(); foreach($_POST as $name => $null) { - if(preg_match('/^board_(\w+)/', $name, $m)) + if(preg_match('/^board_(.+)$/', $name, $m)) $boards[] = $m[1]; } $boards = implode(',', $boards); @@ -1021,50 +1021,57 @@ $query->execute() or error(db_error($query)); modLog('Create a new user: "' . $_POST['username'] . '"'); - } + header('Location: ?/users', true, $config['redirect_http']); + } else { - $__boards = ''; + $__boards = '