From 805107cd2202ddee66c4743e43804a3069508f29 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 2 Apr 2001 15:54:37 +0000 Subject: Commiting my work of last Sunday: - removed ban.inc and ban.module and integrated it in account.module under the name "access control" --> the ban code was not really up to standard so this has now been dealt with. This refactoring and reintegration cuts down the code size with 100 lines too. :-) (The ban.module code was really old and it showed.) - added node.module and made the other modules reuse some of this code --> cut down the code size of modules by at least 100 lines and adds stability. - added a status() function to admin.php to display a conform status message where appropriate. See admin.php for usage. - removed $theme->control() and made comments.inc handle this itself wrapped in a $theme->box(). No need to clutter the themes with such complexity --> updated all themes already. :-) - some small visual changes to some administration pages to be more consistent across different modules. --- modules/ban.module | 143 ----------------------------------------------------- 1 file changed, 143 deletions(-) delete mode 100644 modules/ban.module (limited to 'modules/ban.module') diff --git a/modules/ban.module b/modules/ban.module deleted file mode 100644 index 3d1d8a64f..000000000 --- a/modules/ban.module +++ /dev/null @@ -1,143 +0,0 @@ - "ban_help", - "admin" => "ban_admin"); - -include_once "includes/ban.inc"; - - -function ban_help() { - ?> -

The ban module keeps a list of bans in four categories:

- -

The ban module allows you to use a flexible wild-card ban system. This means you can block all email addresses from a certain domain name, block every username starting with "guest", etc. To do this, use the following wild-card characters:

- -

Examples:

- - \n"; - $output .= " \n"; - $output .= " \n"; - $output .= "
\n"; - $output .= " \n"; - $output .= " \n"; - $output .= "
\n"; - $output .= " \n"; - $output .= " \n"; - $output .= " maskreasonoperations\n"; - while ($ban = db_fetch_object($result)) { - $output .= " $ban->mask$ban->reasonid\">delete\n"; - } - $output .= " %: matches any number of characters, even zero characters.
_: matches exactly one character.
\n"; - $output .= "\n"; - - print $output; -} - -function ban_admin_add() { - global $type2index; - - $output .= "

Add new ban:

\n"; - $output .= "
\n"; - - $output .= "Banmask:
\n"; - $output .= "

\n"; - - $output .= "Type:
\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "\n"; - $output .= "

\n"; - - $output .= "Reason:
\n"; - $output .= "

\n"; - - $output .= "
\n"; - $output .= "

\n"; - - print $output; -} - -function ban_check($mask, $category) { - $ban = ban_match($mask, $category); - $output .= "". ($ban ? "Matched ban '$ban->mask' with reason: $ban->reason.

\n" : "No matching bans for '$mask'.

\n") .""; - print $output; -} - -function ban_admin_check() { - global $type2index; - - $output .= "

Ban check:

\n"; - $output .= "
\n"; - - $output .= "Banmask:
\n"; - $output .= "

\n"; - - $output .= "Type:
\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "\n"; - $output .= "

\n"; - - $output .= "
\n"; - $output .= "

\n"; - - print $output; -} - -function ban_admin() { - global $op, $id, $mask, $category, $reason; - - print "add ban | check ban | overview | help
\n"; - - switch ($op) { - case "Add ban": - ban_admin_new(check_input($mask), check_input($category), check_input($reason)); - ban_display(check_input($category)); - break; - case "Check ban": - ban_check(check_input($mask), check_input($category)); - break; - case "add": - ban_admin_add(); - break; - case "help": - ban_help(); - break; - case "check": - ban_admin_check(); - break; - case "delete": - ban_delete(check_input($id)); - default: - ban_display(check_input($category)); - } -} - -?> -- cgit v1.2.3