1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 21:54:00 +02:00
git-svn-id: file:///svn/phpbb/trunk@6275 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-08-12 15:10:43 +00:00
parent ef71892edd
commit f5cabf864c
17 changed files with 44 additions and 62 deletions

View File

@@ -1150,7 +1150,7 @@ class acp_attachments
{
$imagick = '';
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
$exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';
$magic_home = getenv('MAGICK_HOME');

View File

@@ -133,11 +133,6 @@ class acp_bbcodes
}
}
if (strlen($data['first_pass_match']) >= 255 || strlen($data['first_pass_replace']) >= 255 || strlen($data['second_pass_match']) >= 255)
{
trigger_error('BBCODE_TAG_TOO_LONG');
}
$sql_ary = array(
'bbcode_tag' => $data['bbcode_tag'],
'bbcode_match' => $bbcode_match,

View File

@@ -14,6 +14,12 @@
class acp_users
{
var $u_action;
var $p_master;
function acp_users(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{
@@ -114,7 +120,7 @@ class acp_users
foreach ($forms_ary['modes'] as $value => $ary)
{
if (!$this->is_authed($ary['auth']))
if (!$this->p_master->module_auth($ary['auth']))
{
continue;
}
@@ -1996,26 +2002,6 @@ class acp_users
$var = ($data) ? $data : $user_row['user_options'];
return ($var & 1 << $user->keyoptions[$key]) ? true : false;
}
/**
* Check if user is allowed to call this user mode
*/
function is_authed($module_auth)
{
global $config, $auth;
$module_auth = trim($module_auth);
if (!$module_auth)
{
return true;
}
$is_auth = false;
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $config["\\1"]'), $module_auth) . ');');
return $is_auth;
}
}
?>