diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-11 18:13:52 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-11 18:13:52 +0000 |
| commit | 01b41453812dc7b990f03b81f85dcfb9a18076fd (patch) | |
| tree | d12e93524fa7625d1220088d34a5a957cd618624 /phpBB/includes/acp | |
| parent | ce3b07eee7dbefc68dcd8eab3ab667e6532c8561 (diff) | |
| download | forums-01b41453812dc7b990f03b81f85dcfb9a18076fd.tar forums-01b41453812dc7b990f03b81f85dcfb9a18076fd.tar.gz forums-01b41453812dc7b990f03b81f85dcfb9a18076fd.tar.bz2 forums-01b41453812dc7b990f03b81f85dcfb9a18076fd.tar.xz forums-01b41453812dc7b990f03b81f85dcfb9a18076fd.zip | |
- fixed a few bugs
- added user_add() function
- check posted images ([img]) for same domain/scipt and php files
- auth_api.html updated to the coding guidelines look&feel
- introduced ability to force non page-updates (cron is using it)
- correctly resend coppa email
git-svn-id: file:///svn/phpbb/trunk@6048 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_forums.php | 12 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_language.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_main.php | 17 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_users.php | 16 |
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 . '&u=' . $user_id)); |
