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

- some fixes

- added script for easy adjustement of username_clean column within the users table (please see the note i added to the utf8_clean_string() function)


git-svn-id: file:///svn/phpbb/trunk@6561 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-10 13:49:52 +00:00
parent 805af6f437
commit 3d0759974b
20 changed files with 130 additions and 67 deletions

View File

@@ -705,7 +705,7 @@ class acp_language
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
if ($row)
{
trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}

View File

@@ -64,7 +64,7 @@ class acp_modules
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
if (confirm_box(true))
{
$errors = $this->delete_module($module_id);
@@ -94,7 +94,7 @@ class acp_modules
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . '
SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . "
WHERE module_id = $module_id";
@@ -351,6 +351,7 @@ class acp_modules
$navigation = '<a href="' . $this->u_action . '">' . strtoupper($this->module_class) . '</a>';
$modules_nav = $this->get_module_branch($this->parent_id, 'parents', 'descending');
foreach ($modules_nav as $row)
{
$langname = $this->lang_name($row['module_langname']);
@@ -392,13 +393,16 @@ class acp_modules
}
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
$template->assign_block_vars('modules', array(
'MODULE_IMAGE' => $module_image,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,
'S_ACP_CAT_SYSTEM' => ($this->module_class == 'acp' && $row['module_langname'] == 'ACP_CAT_SYSTEM') ? true : false,
'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,
'U_MODULE' => $this->u_action . '&amp;parent_id=' . $row['module_id'],
'U_MOVE_UP' => $url . '&amp;action=move_up',
'U_MOVE_DOWN' => $url . '&amp;action=move_down',
@@ -1008,6 +1012,14 @@ class acp_modules
return $this->lang_name($target['module_langname']);
}
/**
* Check if the module or her childs hold the management module(s)
*/
function is_management_module($module_id)
{
}
}
?>

View File

@@ -295,7 +295,7 @@ class acp_search
if ($post_counter <= $this->max_post_id)
{
redirect($this->u_action . '&amp;action=delete', 3);
redirect($this->u_action . '&amp;action=delete');
}
}
@@ -339,7 +339,7 @@ class acp_search
if ($post_counter <= $this->max_post_id)
{
redirect($this->u_action . '&amp;action=create', 3);
redirect($this->u_action . '&amp;action=create');
}
}

View File

@@ -298,19 +298,16 @@ class dbal
$array = array($array);
}
$values = array();
foreach ($array as $var)
if (sizeof($array) == 1)
{
$values[] = $this->_sql_validate_value($var);
}
@reset($array);
$var = current($array);
if (sizeof($values) == 1)
{
return $field . ($negate ? ' <> ' : ' = ') . $values[0];
return $field . ($negate ? ' <> ' : ' = ') . $this->_sql_validate_value($var);
}
else
{
return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', $values) . ')';
return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')';
}
}

View File

@@ -3350,7 +3350,7 @@ function page_footer($run_cron = true)
$template->assign_vars(array(
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? "{$phpbb_root_path}adm/index.$phpEx?sid=" . $user->session_id : '')
'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", '', true, $user->session_id) : '')
);
// Call cron-type script

View File

@@ -549,7 +549,7 @@ class template_compile
*/
function compile_tag_include_php($tag_args)
{
return "include('" . $this->template->root . '/' . $tag_args . "');";
return "include('" . $tag_args . "');";
}
/**
@@ -559,7 +559,7 @@ class template_compile
*/
function _parse_is_expr($is_arg, $tokens)
{
$expr_end = 0;
$expr_end = 0;
$negate_expr = false;
if (($first_token = array_shift($tokens)) == 'not')
@@ -578,12 +578,12 @@ class template_compile
if (@$tokens[$expr_end] == 'by')
{
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "!(($is_arg / $expr_arg) % $expr_arg)";
$expr_arg = $tokens[$expr_end++];
$expr = "!(($is_arg / $expr_arg) % $expr_arg)";
}
else
{
$expr = "!($is_arg % 2)";
$expr = "!($is_arg % 2)";
}
break;
@@ -591,12 +591,12 @@ class template_compile
if (@$tokens[$expr_end] == 'by')
{
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "(($is_arg / $expr_arg) % $expr_arg)";
$expr_arg = $tokens[$expr_end++];
$expr = "(($is_arg / $expr_arg) % $expr_arg)";
}
else
{
$expr = "($is_arg % 2)";
$expr = "($is_arg % 2)";
}
break;
@@ -604,18 +604,18 @@ class template_compile
if (@$tokens[$expr_end] == 'by')
{
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "!($is_arg % $expr_arg)";
$expr_arg = $tokens[$expr_end++];
$expr = "!($is_arg % $expr_arg)";
}
break;
}
if ($negate_expr)
{
$expr = "!($expr)";
$expr = "!($expr)";
}
array_splice($tokens, 0, $expr_end, $expr);
array_splice($tokens, 0, $expr_end, $expr);
return $tokens;
}

View File

@@ -931,6 +931,9 @@ function utf8_case_fold($text, $option = 'full')
/**
* @todo needs documenting
*
* Please be aware that if you change something within this function or within
* functions used here you need to rebuild/update the complete users table.
*/
function utf8_clean_string($text)
{