diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index f7bea46942..4d30bb0b91 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1330,6 +1330,15 @@ fieldset.permissions .padding { font-size: 0.90em; } +.permissions-reset { + margin-top: -6px; + padding-bottom: 10px; +} + +.permissions-reset a { + font-size: .8em; +} + /* Tabbed menu */ .permissions-category { line-height: normal; diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index 05368cbc78..e4a8e8076a 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -32,7 +32,10 @@
phpBB categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to images/avatars/gallery phpBB will expect to find a series of folders within that path, eg. images/avatars/gallery/moviestars, images/avatars/gallery/cartoons, images/avatars/gallery/misc, etc. Placing images directly in images/avatars/gallery/ will result in nothing being listed in your gallery.
+phpBB categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to images/avatars/gallery phpBB will expect to find a series of folders within that path, e.g. images/avatars/gallery/moviestars, images/avatars/gallery/cartoons, images/avatars/gallery/misc, etc. Placing images directly in images/avatars/gallery/ will result in nothing being listed in your gallery.
If you (or your users) are, after attempting a login, being returned to the index (or other page) without appearing to be logged in the most likely problem is incorrect cookie settings. phpBB uses cookies to store a session id and a small amount of user data. For this data to be stored correctly the cookie domain, name, path and secure settings must be correct. You can check this in Admin->General->Server Configuration->Cookie Settings
. Typically the cookie domain can be left blank and the cookie path set to / (a single forward slash). Do not set the cookie as being secure unless your board is running over a secure sockets layer connection, ie. https://
If you still have problems try setting the cookie domain to your full domain name, eg. www.mysystem.tld, www.something.mydomain.tld. You must ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, eg. .mydomain.com, mydomain.com. Do not add http:// or anything else to the domain name!
+If you still have problems try setting the cookie domain to your full domain name, e.g. www.mysystem.tld, www.something.mydomain.tld. You must ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, e.g. .mydomain.com, mydomain.com. Do not add http:// or anything else to the domain name!
If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:
The relevant database type/version is listed within the administration control panel
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index c3b6d922b2..463087e106 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -73,9 +73,10 @@ class acp_board 'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend2' => 'ACP_LOAD_SETTINGS', - 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), + 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), @@ -250,7 +251,7 @@ class acp_board 'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), + 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 450b9fd0de..a3eefdfaba 100755 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -60,7 +60,50 @@ class acp_inactive if ($action == 'activate') { + if ($config['require_activation'] == USER_ACTIVATION_ADMIN) + { + // Get those 'being activated'... + $sql = 'SELECT user_id, username, user_email, user_lang + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_id', $mark) . ' + AND user_type = ' . USER_INACTIVE; + $result = $db->sql_query($sql); + + $inactive_users = array(); + while ($row = $db->sql_fetchrow($result)) + { + $inactive_users[] = $row; + } + $db->sql_freeresult($result); + } + user_active_flip('activate', $mark); + + if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users)) + { + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + + $messenger = new messenger(); + + foreach ($inactive_users as $row) + { + $messenger->template('admin_welcome_activated', $row['user_lang']); + + $messenger->to($row['user_email'], $row['username']); + + $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); + $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); + $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); + + $messenger->assign_vars(array( + 'USERNAME' => htmlspecialchars_decode($row['username'])) + ); + + $messenger->send(NOTIFY_EMAIL); + } + + $messenger->save_queue(); + } } else if ($action == 'delete') { diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 1ad5ea2903..008e5f5494 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -448,7 +448,7 @@ class acp_permissions } $template->assign_vars(array( - 'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type) : false, + 'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false, 'L_PERMISSION_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)], 'U_ACTION' => $this->u_action, @@ -522,7 +522,7 @@ class acp_permissions /** * Build dropdown field for changing permission types */ - function build_permission_dropdown($options, $default_option) + function build_permission_dropdown($options, $default_option, $permission_scope) { global $user, $auth; @@ -533,8 +533,10 @@ class acp_permissions { continue; } + $selected = ($setting == $default_option) ? ' selected="selected"' : ''; - $s_dropdown_options .= ''; + $l_setting = (isset($user->lang['permission_type'][$permission_scope][$setting])) ? $user->lang['permission_type'][$permission_scope][$setting] : $user->lang['permission_type'][$setting]; + $s_dropdown_options .= ''; } return $s_dropdown_options; diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 91b185c52b..1e0e3af54a 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1351,7 +1351,7 @@ parse_css_file = {PARSE_CSS_FILE} { while (($file = readdir($dp)) !== false) { - if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS') + if ($file[0] != '.' && strtoupper($file) != 'CVS' && !is_file($dir . '/' . $file) && !is_link($dir . '/' . $file)) { $langs[] = $file; } @@ -2429,6 +2429,11 @@ parse_css_file = {PARSE_CSS_FILE} $file_ary = array(); while ($file = readdir($dp)) { + if ($file[0] == '.') + { + continue; + } + if (is_file($phpbb_root_path . 'cache/' . $file) && (strpos($file, $cache_prefix) === 0)) { $file_ary[] = str_replace('.', '/', preg_replace('#^' . preg_quote($cache_prefix, '#') . '_(.*?)\.html\.' . $phpEx . '$#i', '\1', $file)); diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index b0409a2b28..bc1ef75d1a 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -469,13 +469,16 @@ class auth_admin extends auth 'S_GROUP_MODE' => ($user_mode == 'group') ? true : false) ); - foreach ($content_array as $ug_id => $ug_array) + @reset($content_array); + while (list($ug_id, $ug_array) = each($content_array)) { // Build role dropdown options $current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0; $s_role_options = ''; - foreach ($roles as $role_id => $role_row) + + @reset($roles); + while (list($role_id, $role_row) = each($roles)) { $role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']); $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name']; @@ -489,10 +492,29 @@ class auth_admin extends auth $s_role_options = '' . $s_role_options; } + if (!$current_role_id && $mode != 'view') + { + $s_custom_permissions = false; + + foreach ($ug_array as $key => $value) + { + if ($value['S_NEVER'] || $value['S_YES']) + { + $s_custom_permissions = true; + break; + } + } + } + else + { + $s_custom_permissions = false; + } + $template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array( 'NAME' => $ug_names_ary[$ug_id], 'S_ROLE_OPTIONS' => $s_role_options, 'UG_ID' => $ug_id, + 'S_CUSTOM' => $s_custom_permissions, 'FORUM_ID' => $forum_id) ); @@ -556,10 +578,29 @@ class auth_admin extends auth $s_role_options = '' . $s_role_options; } + if (!$current_role_id && $mode != 'view') + { + $s_custom_permissions = false; + + foreach ($forum_array as $key => $value) + { + if ($value['S_NEVER'] || $value['S_YES']) + { + $s_custom_permissions = true; + break; + } + } + } + else + { + $s_custom_permissions = false; + } + $template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array( 'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'], 'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'], 'S_ROLE_OPTIONS' => $s_role_options, + 'S_CUSTOM' => $s_custom_permissions, 'UG_ID' => $ug_id, 'FORUM_ID' => $forum_id) ); diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index b2cb5ec054..bd838a3346 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -26,7 +26,9 @@ class messenger */ function messenger($use_queue = true) { - $this->use_queue = $use_queue; + global $config; + + $this->use_queue = (!$config['email_package_size']) ? false : $use_queue; $this->subject = ''; } @@ -287,6 +289,7 @@ class messenger if ($config['email_package_size'] && $this->use_queue && !empty($this->queue)) { $this->queue->save(); + return; } } @@ -819,7 +822,11 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '') $smtp->add_backtrace('Connecting to ' . $config['smtp_host'] . ':' . $config['smtp_port']); // Ok we have error checked as much as we can to this point let's get on it already. - if (!$smtp->socket = @fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20)) + ob_start(); + $smtp->socket = fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20); + $error_contents = ob_get_clean(); + + if (!$smtp->socket) { if ($errstr) { @@ -827,6 +834,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '') } $err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr"; + $err_msg .= ($error_contents) ? '
{L_SENT_AT}: {SENT_DATE}
{L_PM_FROM}: {MESSAGE_AUTHOR_FULL}
-
{L_TO}: {to_recipient.NAME}
-
{L_BCC}: {bcc_recipient.NAME}
+
{L_TO}: {to_recipient.NAME_FULL}{to_recipient.NAME}
+
{L_BCC}: {bcc_recipient.NAME_FULL}{bcc_recipient.NAME}
- {ERROR_MESSAGE} - {NOTIFICATION_MESSAGE} + {ERROR_MESSAGE} + {NOTIFICATION_MESSAGE} |