aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_forums.php12
-rw-r--r--phpBB/includes/acp/acp_language.php6
-rw-r--r--phpBB/includes/acp/acp_main.php17
-rw-r--r--phpBB/includes/acp/acp_users.php16
4 files changed, 16 insertions, 35 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 2d9a9461e7..379df056d4 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -222,12 +222,16 @@ class acp_forums
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'] . '&select_all_groups=1';
- // Redirect to permissions
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
- $message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
- // redirect directly to permission settings screen
- if ($action == 'add' && !$forum_perm_from)
+ // Redirect to permissions
+ if ($auth->acl_get('a_fauth'))
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
+ }
+
+ // redirect directly to permission settings screen if authed
+ if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
{
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
}
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index b9001b24da..e54dc41dec 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -123,7 +123,7 @@ class acp_language
'HIDDEN' => $hidden_data,
'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false,
- 'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection === false) ? true : false
+ 'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection !== true) ? true : false
));
break;
@@ -327,9 +327,9 @@ class acp_language
trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
}
- if (!$transfer->open_session())
+ if (($result = $transfer->open_session()) !== true)
{
- trigger_error($user->lang['ERR_CONNECTING_SERVER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang[$result] . adm_back_link($this->u_action));
}
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 090ee0fe06..0e1e4fe793 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -59,19 +59,8 @@ class acp_main
set_config('num_users', $config['num_users'] + sizeof($mark_ary), true);
- // Get latest username
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
- ORDER BY user_id DESC';
- $result = $db->sql_query_limit($sql, 1);
-
- if ($row = $db->sql_fetchrow($result))
- {
- set_config('newest_user_id', $row['user_id'], true);
- set_config('newest_username', $row['username'], true);
- }
- $db->sql_freeresult($result);
+ // Update latest username
+ update_last_username();
}
else if ($action == 'delete')
{
@@ -368,7 +357,7 @@ class acp_main
{
while (($file = readdir($avatar_dir)) !== false)
{
- if ($file{0} != '.' && strpos($file, 'index.') === false)
+ if ($file{0} != '.' && $file != 'CVS' && strpos($file, 'index.') === false)
{
$avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index fba21b3cb9..f2ce3ee18c 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -297,20 +297,8 @@ class acp_users
set_config('num_users', $config['num_users'] - 1, true);
}
- // Get latest username
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
- ORDER BY user_id DESC';
- $result = $db->sql_query_limit($sql, 1);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- set_config('newest_user_id', $row['user_id'], true);
- set_config('newest_username', $row['username'], true);
- }
+ // Update latest username
+ update_last_username();
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;u=' . $user_id));