mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 23:55:26 +02:00
- fixing some bugs
- removed file_exists calls for auth plugins since they need to be there once set up git-svn-id: file:///svn/phpbb/trunk@6228 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
48a48aa86d
commit
b15a3111be
@ -213,10 +213,32 @@ class acp_permissions
|
|||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
// All users/groups selected?
|
||||||
|
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||||
|
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||||
|
|
||||||
|
if ($all_users || $all_groups)
|
||||||
|
{
|
||||||
|
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||||
|
|
||||||
|
if ($all_users && sizeof($items['user_ids']))
|
||||||
|
{
|
||||||
|
$user_id = $items['user_ids'];
|
||||||
|
}
|
||||||
|
else if ($all_groups && sizeof($items['group_ids']))
|
||||||
|
{
|
||||||
|
$group_id = $items['group_ids'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sizeof($user_id) || sizeof($group_id))
|
if (sizeof($user_id) || sizeof($group_id))
|
||||||
{
|
{
|
||||||
$this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
|
$this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'apply_permissions':
|
case 'apply_permissions':
|
||||||
@ -346,99 +368,30 @@ class acp_permissions
|
|||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND a.forum_id IN (' . implode(', ', $forum_id) . ')' : 'AND a.forum_id <> 0');
|
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||||
$sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
|
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
|
||||||
'SELECT' => 'u.username, u.user_regdate, u.user_id',
|
|
||||||
|
|
||||||
'FROM' => array(
|
|
||||||
USERS_TABLE => 'u',
|
|
||||||
ACL_OPTIONS_TABLE => 'o',
|
|
||||||
ACL_USERS_TABLE => 'a'
|
|
||||||
),
|
|
||||||
|
|
||||||
'LEFT_JOIN' => array(
|
|
||||||
array(
|
|
||||||
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
|
|
||||||
'ON' => 'a.auth_role_id = r.role_id'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
'WHERE' => "(a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
|
||||||
$sql_permission_option
|
|
||||||
$sql_forum_id
|
|
||||||
AND u.user_id = a.user_id",
|
|
||||||
|
|
||||||
'ORDER_BY' => 'u.username, u.user_regdate ASC'
|
|
||||||
));
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$s_defined_user_options = '';
|
|
||||||
$defined_user_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$s_defined_user_options .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
|
|
||||||
$defined_user_ids[] = $row['user_id'];
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
|
||||||
'SELECT' => 'g.group_type, g.group_name, g.group_id',
|
|
||||||
|
|
||||||
'FROM' => array(
|
|
||||||
GROUPS_TABLE => 'g',
|
|
||||||
ACL_OPTIONS_TABLE => 'o',
|
|
||||||
ACL_GROUPS_TABLE => 'a'
|
|
||||||
),
|
|
||||||
|
|
||||||
'LEFT_JOIN' => array(
|
|
||||||
array(
|
|
||||||
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
|
|
||||||
'ON' => 'a.auth_role_id = r.role_id'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
'WHERE' => "(a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
|
||||||
$sql_permission_option
|
|
||||||
$sql_forum_id
|
|
||||||
AND g.group_id = a.group_id",
|
|
||||||
|
|
||||||
'ORDER_BY' => 'g.group_type DESC, g.group_name ASC'
|
|
||||||
));
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$s_defined_group_options = '';
|
|
||||||
$defined_group_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$s_defined_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
|
||||||
$defined_group_ids[] = $row['group_id'];
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Now we check the users... because the "all"-selection is different here (all defined users/groups)
|
// Now we check the users... because the "all"-selection is different here (all defined users/groups)
|
||||||
$all_users = (isset($_POST['all_users'])) ? true : false;
|
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||||
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||||
|
|
||||||
if ($all_users && sizeof($defined_user_ids))
|
if ($all_users && sizeof($items['user_ids']))
|
||||||
{
|
{
|
||||||
$user_id = $defined_user_ids;
|
$user_id = $items['user_ids'];
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($all_groups && sizeof($defined_group_ids))
|
if ($all_groups && sizeof($items['group_ids']))
|
||||||
{
|
{
|
||||||
$group_id = $defined_group_ids;
|
$group_id = $items['group_ids'];
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false,
|
'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false,
|
||||||
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
|
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
|
||||||
'S_DEFINED_USER_OPTIONS' => $s_defined_user_options,
|
'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'],
|
||||||
'S_DEFINED_GROUP_OPTIONS' => $s_defined_group_options,
|
'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'],
|
||||||
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $defined_group_ids),
|
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids']),
|
||||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username'))
|
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username'))
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1117,6 +1070,92 @@ class acp_permissions
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get already assigned users/groups
|
||||||
|
*/
|
||||||
|
function retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type)
|
||||||
|
{
|
||||||
|
global $db, $user;
|
||||||
|
|
||||||
|
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND a.forum_id IN (' . implode(', ', $forum_id) . ')' : 'AND a.forum_id <> 0');
|
||||||
|
$sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
|
||||||
|
|
||||||
|
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||||
|
'SELECT' => 'u.username, u.user_regdate, u.user_id',
|
||||||
|
|
||||||
|
'FROM' => array(
|
||||||
|
USERS_TABLE => 'u',
|
||||||
|
ACL_OPTIONS_TABLE => 'o',
|
||||||
|
ACL_USERS_TABLE => 'a'
|
||||||
|
),
|
||||||
|
|
||||||
|
'LEFT_JOIN' => array(
|
||||||
|
array(
|
||||||
|
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
|
||||||
|
'ON' => 'a.auth_role_id = r.role_id'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
'WHERE' => "(a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
||||||
|
$sql_permission_option
|
||||||
|
$sql_forum_id
|
||||||
|
AND u.user_id = a.user_id",
|
||||||
|
|
||||||
|
'ORDER_BY' => 'u.username, u.user_regdate ASC'
|
||||||
|
));
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$s_defined_user_options = '';
|
||||||
|
$defined_user_ids = array();
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$s_defined_user_options .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
|
||||||
|
$defined_user_ids[] = $row['user_id'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||||
|
'SELECT' => 'g.group_type, g.group_name, g.group_id',
|
||||||
|
|
||||||
|
'FROM' => array(
|
||||||
|
GROUPS_TABLE => 'g',
|
||||||
|
ACL_OPTIONS_TABLE => 'o',
|
||||||
|
ACL_GROUPS_TABLE => 'a'
|
||||||
|
),
|
||||||
|
|
||||||
|
'LEFT_JOIN' => array(
|
||||||
|
array(
|
||||||
|
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
|
||||||
|
'ON' => 'a.auth_role_id = r.role_id'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
'WHERE' => "(a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
||||||
|
$sql_permission_option
|
||||||
|
$sql_forum_id
|
||||||
|
AND g.group_id = a.group_id",
|
||||||
|
|
||||||
|
'ORDER_BY' => 'g.group_type DESC, g.group_name ASC'
|
||||||
|
));
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$s_defined_group_options = '';
|
||||||
|
$defined_group_ids = array();
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$s_defined_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||||
|
$defined_group_ids[] = $row['group_id'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'group_ids' => $defined_group_ids,
|
||||||
|
'group_ids_options' => $s_defined_group_options,
|
||||||
|
'user_ids' => $defined_user_ids,
|
||||||
|
'user_ids_options' => $s_defined_user_options
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -707,9 +707,6 @@ class auth
|
|||||||
global $config, $db, $user, $phpbb_root_path, $phpEx;
|
global $config, $db, $user, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$method = trim(basename($config['auth_method']));
|
$method = trim(basename($config['auth_method']));
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||||
|
|
||||||
$method = 'login_' . $method;
|
$method = 'login_' . $method;
|
||||||
@ -775,7 +772,6 @@ class auth
|
|||||||
|
|
||||||
return $login;
|
return $login;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
trigger_error('Authentication method not found', E_USER_ERROR);
|
trigger_error('Authentication method not found', E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -136,8 +136,8 @@ define('FIELD_DATE', 6);
|
|||||||
// Table names
|
// Table names
|
||||||
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
|
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
|
||||||
define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
|
define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
|
||||||
define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
|
|
||||||
define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
|
define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
|
||||||
|
define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
|
||||||
define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
|
define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
|
||||||
define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
|
define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
|
||||||
define('BANLIST_TABLE', $table_prefix . 'banlist');
|
define('BANLIST_TABLE', $table_prefix . 'banlist');
|
||||||
@ -146,10 +146,6 @@ define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
|
|||||||
define('BOTS_TABLE', $table_prefix . 'bots');
|
define('BOTS_TABLE', $table_prefix . 'bots');
|
||||||
define('CONFIG_TABLE', $table_prefix . 'config');
|
define('CONFIG_TABLE', $table_prefix . 'config');
|
||||||
define('CONFIRM_TABLE', $table_prefix . 'confirm');
|
define('CONFIRM_TABLE', $table_prefix . 'confirm');
|
||||||
define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
|
|
||||||
define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
|
|
||||||
define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
|
|
||||||
define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
|
|
||||||
define('DISALLOW_TABLE', $table_prefix . 'disallow');
|
define('DISALLOW_TABLE', $table_prefix . 'disallow');
|
||||||
define('DRAFTS_TABLE', $table_prefix . 'drafts');
|
define('DRAFTS_TABLE', $table_prefix . 'drafts');
|
||||||
define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
|
define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
|
||||||
@ -164,11 +160,17 @@ define('LANG_TABLE', $table_prefix . 'lang');
|
|||||||
define('LOG_TABLE', $table_prefix . 'log');
|
define('LOG_TABLE', $table_prefix . 'log');
|
||||||
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
|
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
|
||||||
define('MODULES_TABLE', $table_prefix . 'modules');
|
define('MODULES_TABLE', $table_prefix . 'modules');
|
||||||
|
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
|
||||||
|
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
|
||||||
define('POSTS_TABLE', $table_prefix . 'posts');
|
define('POSTS_TABLE', $table_prefix . 'posts');
|
||||||
define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
|
define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
|
||||||
define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
|
|
||||||
define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
|
define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
|
||||||
define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
|
define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
|
||||||
|
define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
|
||||||
|
define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
|
||||||
|
define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
|
||||||
|
define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
|
||||||
|
define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
|
||||||
define('RANKS_TABLE', $table_prefix . 'ranks');
|
define('RANKS_TABLE', $table_prefix . 'ranks');
|
||||||
define('RATINGS_TABLE', $table_prefix . 'ratings');
|
define('RATINGS_TABLE', $table_prefix . 'ratings');
|
||||||
define('REPORTS_TABLE', $table_prefix . 'reports');
|
define('REPORTS_TABLE', $table_prefix . 'reports');
|
||||||
@ -187,15 +189,13 @@ define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
|
|||||||
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
|
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
|
||||||
define('TOPICS_TABLE', $table_prefix . 'topics');
|
define('TOPICS_TABLE', $table_prefix . 'topics');
|
||||||
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
|
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
|
||||||
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
|
|
||||||
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
|
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
|
||||||
|
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
|
||||||
define('USER_GROUP_TABLE', $table_prefix . 'user_group');
|
define('USER_GROUP_TABLE', $table_prefix . 'user_group');
|
||||||
define('USERS_TABLE', $table_prefix . 'users');
|
define('USERS_TABLE', $table_prefix . 'users');
|
||||||
define('USERS_NOTES_TABLE', $table_prefix . 'users_notes');
|
define('USERS_NOTES_TABLE', $table_prefix . 'users_notes');
|
||||||
define('WARNINGS_TABLE', $table_prefix . 'warnings');
|
define('WARNINGS_TABLE', $table_prefix . 'warnings');
|
||||||
define('WORDS_TABLE', $table_prefix . 'words');
|
define('WORDS_TABLE', $table_prefix . 'words');
|
||||||
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
|
|
||||||
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
|
|
||||||
define('ZEBRA_TABLE', $table_prefix . 'zebra');
|
define('ZEBRA_TABLE', $table_prefix . 'zebra');
|
||||||
|
|
||||||
// Additional tables
|
// Additional tables
|
||||||
|
@ -534,7 +534,7 @@ class custom_profile
|
|||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
||||||
$user_ident = str_replace('pf_', '', $profile_row['field_ident']);
|
$user_ident = '_' . str_replace('pf_', '', $profile_row['field_ident']);
|
||||||
|
|
||||||
// checkbox - only testing for isset
|
// checkbox - only testing for isset
|
||||||
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
|
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
|
||||||
@ -601,7 +601,7 @@ class custom_profile
|
|||||||
global $user, $template;
|
global $user, $template;
|
||||||
|
|
||||||
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
||||||
$user_ident = str_replace('pf_', '', $profile_row['field_ident']);
|
$user_ident = '_' . str_replace('pf_', '', $profile_row['field_ident']);
|
||||||
|
|
||||||
$now = getdate();
|
$now = getdate();
|
||||||
|
|
||||||
@ -803,7 +803,8 @@ class custom_profile
|
|||||||
$now = getdate();
|
$now = getdate();
|
||||||
$row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
|
$row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
|
||||||
}
|
}
|
||||||
$cp_data[$row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
|
|
||||||
|
$cp_data['_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ function user_delete($mode, $user_id, $post_username = false)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE);
|
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE);
|
||||||
|
|
||||||
foreach ($table_ary as $table)
|
foreach ($table_ary as $table)
|
||||||
{
|
{
|
||||||
|
@ -171,8 +171,6 @@ class session
|
|||||||
|
|
||||||
// Load limit check (if applicable)
|
// Load limit check (if applicable)
|
||||||
if ($config['limit_load'])
|
if ($config['limit_load'])
|
||||||
{
|
|
||||||
if (@file_exists('/proc/loadavg') && @is_readable('/proc/loadavg'))
|
|
||||||
{
|
{
|
||||||
if ($load = @file_get_contents('/proc/loadavg'))
|
if ($load = @file_get_contents('/proc/loadavg'))
|
||||||
{
|
{
|
||||||
@ -184,11 +182,6 @@ class session
|
|||||||
set_config('limit_load', '0');
|
set_config('limit_load', '0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
set_config('limit_load', '0');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is session_id is set or session_id is set and matches the url param if required
|
// Is session_id is set or session_id is set and matches the url param if required
|
||||||
if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id === $_GET['sid'])))
|
if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id === $_GET['sid'])))
|
||||||
@ -220,9 +213,6 @@ class session
|
|||||||
|
|
||||||
// Check whether the session is still valid if we have one
|
// Check whether the session is still valid if we have one
|
||||||
$method = basename(trim($config['auth_method']));
|
$method = basename(trim($config['auth_method']));
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||||
|
|
||||||
$method = 'validate_session_' . $method;
|
$method = 'validate_session_' . $method;
|
||||||
@ -233,7 +223,6 @@ class session
|
|||||||
$session_expired = true;
|
$session_expired = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$session_expired)
|
if (!$session_expired)
|
||||||
{
|
{
|
||||||
@ -357,9 +346,6 @@ class session
|
|||||||
}
|
}
|
||||||
|
|
||||||
$method = basename(trim($config['auth_method']));
|
$method = basename(trim($config['auth_method']));
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||||
|
|
||||||
$method = 'autologin_' . $method;
|
$method = 'autologin_' . $method;
|
||||||
@ -373,7 +359,6 @@ class session
|
|||||||
$this->cookie_data['u'] = $this->data['user_id'];
|
$this->cookie_data['u'] = $this->data['user_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If we're presented with an autologin key we'll join against it.
|
// If we're presented with an autologin key we'll join against it.
|
||||||
// Else if we've been passed a user_id we'll grab data based on that
|
// Else if we've been passed a user_id we'll grab data based on that
|
||||||
@ -547,9 +532,6 @@ class session
|
|||||||
|
|
||||||
// Allow connecting logout with external auth method logout
|
// Allow connecting logout with external auth method logout
|
||||||
$method = basename(trim($config['auth_method']));
|
$method = basename(trim($config['auth_method']));
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||||
|
|
||||||
$method = 'logout_' . $method;
|
$method = 'logout_' . $method;
|
||||||
@ -557,7 +539,6 @@ class session
|
|||||||
{
|
{
|
||||||
$method($this->data);
|
$method($this->data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->data['user_id'] != ANONYMOUS)
|
if ($this->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
|
@ -210,6 +210,7 @@ function view_folder($id, $mode, $folder_id, $folder)
|
|||||||
'U_FOLDER' => (isset($folder[$row['folder_id']])) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'folder=' . $row['folder_id']) : '',
|
'U_FOLDER' => (isset($folder[$row['folder_id']])) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'folder=' . $row['folder_id']) : '',
|
||||||
'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||||
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||||
|
'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
|
||||||
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
|
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
|
||||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ class ucp_register
|
|||||||
'CONFIRM_IMG' => $confirm_image,
|
'CONFIRM_IMG' => $confirm_image,
|
||||||
|
|
||||||
'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlentities($config['board_contact']) . '">', '</a>'),
|
'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlentities($config['board_contact']) . '">', '</a>'),
|
||||||
'L_ITEMS_REQUIRED' => $l_reg_cond,
|
'L_REG_COND' => $l_reg_cond,
|
||||||
'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||||
'L_NEW_PASSWORD_EXPLAIN' => sprintf($user->lang['NEW_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
'L_NEW_PASSWORD_EXPLAIN' => sprintf($user->lang['NEW_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ $lang = array_merge($lang, array(
|
|||||||
'NO_ROLE_AVAILABLE' => 'No role available',
|
'NO_ROLE_AVAILABLE' => 'No role available',
|
||||||
'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
|
'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
|
||||||
'NO_ROLE_SELECTED' => 'Role could not be found.',
|
'NO_ROLE_SELECTED' => 'Role could not be found.',
|
||||||
|
'NO_USER_GROUP_SELECTED' => 'You haven\'t selected any user or group.',
|
||||||
|
|
||||||
'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.',
|
'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.',
|
||||||
|
|
||||||
|
@ -213,6 +213,7 @@ $lang = array_merge($lang, array(
|
|||||||
|
|
||||||
'IF_FOLDER_FULL' => 'If folder is full',
|
'IF_FOLDER_FULL' => 'If folder is full',
|
||||||
'IMPORTANT_NEWS' => 'Important announcements',
|
'IMPORTANT_NEWS' => 'Important announcements',
|
||||||
|
'ITEMS_REQUIRED' => 'The items marked with * are required profile fields and need to be filled out',
|
||||||
|
|
||||||
'LANGUAGE' => 'Language',
|
'LANGUAGE' => 'Language',
|
||||||
'LINK_REMOTE_AVATAR' => 'Link off-site',
|
'LINK_REMOTE_AVATAR' => 'Link off-site',
|
||||||
|
@ -26,7 +26,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF L_ITEMS_REQUIRED -->
|
<!-- IF L_REG_COND -->
|
||||||
|
<tr>
|
||||||
|
<td class="row2" colspan="2"><span class="gensmall">{L_REG_COND}</span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF .profile_fields -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
|
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user