1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Preliminary 'freeze' on permissions awaiting developer feedback, testing, etc. Caching of non-dynmaic config and acl option elements.

git-svn-id: file:///svn/phpbb/trunk@2970 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-10-26 12:36:38 +00:00
parent a7d186fd91
commit 1edc9d362f
7 changed files with 133 additions and 121 deletions

View File

@@ -41,17 +41,13 @@ $phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Do we have ban permissions?
//
if ( !$auth->acl_get('a_ban') )
{
return;
}
//
// Mode setting
//
if ( isset($_POST['mode']) || isset($_GET['mode']) )
{
$mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
@@ -63,15 +59,15 @@ else
$current_time = time();
//
// Start program
//
if ( isset($_POST['bansubmit']) )
if ( isset($_POST['bansubmit']) || isset($_GET['bansubmit']) )
{
$ban_reason = ( isset($_POST['banreason']) ) ? $_POST['banreason'] : '';
$ban_list = array_unique(explode("\n", $_POST['ban']));
$ban = ( !empty($_POST['ban']) ) ? $_POST['ban'] : $_GET['ban'];
$ban_list = array_unique(explode("\n", $ban));
$ban_list_log = implode(', ', $ban_list);
$ban_reason = ( isset($_POST['banreason']) ) ? $_POST['banreason'] : '';
if ( !empty($_POST['banlength']) )
{
if ( $_POST['banlength'] != -1 || empty($_POST['banlengthother']) )
@@ -207,11 +203,9 @@ if ( isset($_POST['bansubmit']) )
for($i = 0; $i < count($ban_list); $i++)
{
//
// This ereg match is based on one by php@unreelpro.com
// contained in the annotated php manual at php.com (ereg
// section)
//
if ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', trim($ban_list[$i])) )
{
$banlist[] = '\'' . trim($ban_list[$i]) . '\'';