1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +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;
}
}
?>

View File

@@ -1980,7 +1980,8 @@ function cache_moderators()
AND a.group_id = ug.group_id
AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
AND ug.user_pending = 0
AND o.auth_option LIKE 'm\_%'",
AND o.auth_option LIKE 'm\_%'" .
((SQL_LAYER == 'mssql' || SQL_LAYER == 'mssql_odbc') ? " ESCAPE '\\'" : ''),
));
$result = $db->sql_query($sql);

View File

@@ -533,7 +533,7 @@ function create_thumbnail($source, $destination, $mimetype)
// Only use imagemagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
if (file_exists($destination))
{
$used_imagick = true;

View File

@@ -318,7 +318,7 @@ class ucp_groups
$sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
$sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type
FROM ' . GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('group_id', $group_id_ary, true) . ")
WHERE ' . $db->sql_in_set('group_id', $group_id_ary, true) . "
AND group_type $sql_and
ORDER BY group_type DESC, group_name";
$result = $db->sql_query($sql);