aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_board.php5
-rwxr-xr-xphpBB/includes/acp/acp_inactive.php43
-rw-r--r--phpBB/includes/acp/acp_permissions.php8
-rw-r--r--phpBB/includes/acp/acp_styles.php7
-rw-r--r--phpBB/includes/acp/auth.php45
5 files changed, 100 insertions, 8 deletions
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 .= '<option value="' . $setting . '"' . $selected . '>' . $user->lang['permission_type'][$setting] . '</option>';
+ $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 .= '<option value="' . $setting . '"' . $selected . '>' . $l_setting . '</option>';
}
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 = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $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 = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $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)
);