diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 18 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_search.php | 4 | ||||
-rw-r--r-- | phpBB/includes/db/dbal.php | 13 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_template.php | 24 | ||||
-rw-r--r-- | phpBB/includes/utf/utf_tools.php | 3 |
7 files changed, 39 insertions, 27 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 0e32a9dc6a..61310cff01 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -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); } diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 04457c0e13..1323c7aee4 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -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 . '&parent_id=' . $this->parent_id . '&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 . '&parent_id=' . $row['module_id'], 'U_MOVE_UP' => $url . '&action=move_up', 'U_MOVE_DOWN' => $url . '&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) + { + + } } ?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index fee5beb8eb..6b1eefe8e6 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -295,7 +295,7 @@ class acp_search if ($post_counter <= $this->max_post_id) { - redirect($this->u_action . '&action=delete', 3); + redirect($this->u_action . '&action=delete'); } } @@ -339,7 +339,7 @@ class acp_search if ($post_counter <= $this->max_post_id) { - redirect($this->u_action . '&action=create', 3); + redirect($this->u_action . '&action=create'); } } diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index 1fee674f80..d2d3efedaa 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -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)) . ')'; } } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7a2ec278f8..48b64f8092 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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 diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 8dce06c0c7..47ff906a28 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -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; } diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index 7a2b536e97..d90590e813 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -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) { |