mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
To all people having their bug status set to fixed: SF pserver CVS access is currently down, therefore the snapshots are still out of date.
- fix a bunch of bugs - <!-- $Id$ --> is no longer allowed in template (.html) files - changed layout of private message screens (folders are menu items) - removed unread mode for private messages - added new feature to template engine - "jump out of loop" or "loop another loop within my loop" :D (will be documented within the coding guidelines) - added autologin field to sessions - check session length checks - added add_log statement to sessions to track session valid to invalid changes if ip/browser change depending on config settings (only debug) - added multibyte support for various variables (exception at the moment is usernames which needs some discussion) - hopefully not broke something. :/ git-svn-id: file:///svn/phpbb/trunk@5765 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3933f0bab3
commit
431e494ae4
133 changed files with 613 additions and 661 deletions
|
@ -87,7 +87,7 @@
|
|||
<!-- IF S_CAN_UPLOAD -->
|
||||
<dl>
|
||||
<dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
|
||||
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></dd>
|
||||
<dd><input type="file" id="uploadfile" name="uploadfile" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
|
||||
|
@ -170,24 +170,22 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- IF not S_GROUP_SPECIAL -->
|
||||
<tr>
|
||||
<td class="row3" colspan="5"><b>{L_GROUP_LEAD}</b></td>
|
||||
<tr>
|
||||
<td class="row3" colspan="5"><b>{L_GROUP_LEAD}</b></td>
|
||||
</tr>
|
||||
<!-- BEGIN leader -->
|
||||
<!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a></td>
|
||||
<td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{leader.JOINED}</td>
|
||||
<td style="text-align: center;">{leader.USER_POSTS}</td>
|
||||
<td style="text-align: center;"><input type="checkbox" name="mark[]" value="{leader.USER_ID}" /></td>
|
||||
</tr>
|
||||
<!-- BEGIN leader -->
|
||||
<!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a></td>
|
||||
<td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{leader.JOINED}</td>
|
||||
<td style="text-align: center;">{leader.USER_POSTS}</td>
|
||||
<td style="text-align: center;"><input type="checkbox" name="mark[]" value="{leader.USER_ID}" /></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
|
||||
</tr>
|
||||
<!-- END leader -->
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
|
||||
</tr>
|
||||
<!-- END leader -->
|
||||
<tr>
|
||||
<td class="row3" colspan="5"><b>{L_GROUP_APPROVED}</b></td>
|
||||
</tr>
|
||||
|
|
|
@ -88,7 +88,7 @@ class cache extends acm
|
|||
$censors = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$censors['match'][] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
|
||||
$censors['match'][] = '#(?<!\w)(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')(?!\w)#i';
|
||||
$censors['replace'][] = $row['replacement'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -403,7 +403,7 @@ class acp_attachments
|
|||
$ext_row = array();
|
||||
}
|
||||
|
||||
$group_name = request_var('group_name', '');
|
||||
$group_name = request_var('group_name', '', true);
|
||||
$new_group_name = ($action == 'add') ? $group_name : (($ext_row['group_name'] != $group_name) ? $group_name : '');
|
||||
|
||||
if (!$group_name)
|
||||
|
@ -572,7 +572,7 @@ class acp_attachments
|
|||
if ($action == 'add')
|
||||
{
|
||||
$ext_group_row = array(
|
||||
'group_name' => request_var('group_name', ''),
|
||||
'group_name' => request_var('group_name', '', true),
|
||||
'cat_id' => 0,
|
||||
'allow_group' => 1,
|
||||
'allow_in_pm' => 1,
|
||||
|
|
|
@ -37,8 +37,8 @@ class acp_ban
|
|||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = request_var('banreason', '');
|
||||
$ban_give_reason = request_var('bangivereason', '');
|
||||
$ban_reason = request_var('banreason', '', true);
|
||||
$ban_give_reason = request_var('bangivereason', '', true);
|
||||
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ class acp_bots
|
|||
case 'edit':
|
||||
case 'add':
|
||||
$bot_row = array(
|
||||
'bot_name' => request_var('bot_name', ''),
|
||||
'bot_name' => request_var('bot_name', '', true),
|
||||
'bot_agent' => request_var('bot_agent', ''),
|
||||
'bot_ip' => request_var('bot_ip', ''),
|
||||
'bot_active' => request_var('bot_active', true),
|
||||
|
|
|
@ -125,6 +125,7 @@ class acp_email
|
|||
|
||||
// Send the messages
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
$messenger = new messenger($use_queue);
|
||||
|
||||
$errored = false;
|
||||
|
@ -170,12 +171,7 @@ class acp_email
|
|||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_name = (string) $db->sql_fetchfield('group_name');
|
||||
$db->sql_freeresult($result);
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -218,8 +214,8 @@ class acp_email
|
|||
'S_GROUP_OPTIONS' => $select_list,
|
||||
'USERNAMES' => $usernames,
|
||||
'U_FIND_USERNAME' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=acp_email&field=usernames",
|
||||
'SUBJECT' => request_var('subject', ''),
|
||||
'MESSAGE' => request_var('message', ''),
|
||||
'SUBJECT' => request_var('subject', '', true),
|
||||
'MESSAGE' => request_var('message', '', true),
|
||||
'S_PRIORITY_OPTIONS' => $s_priority_options)
|
||||
);
|
||||
|
||||
|
|
|
@ -315,77 +315,81 @@ class acp_groups
|
|||
}
|
||||
}
|
||||
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
if (!sizeof($error))
|
||||
{
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
|
||||
$group_attributes = array();
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit');
|
||||
foreach ($test_variables as $test)
|
||||
{
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
$group_attributes = array();
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit');
|
||||
foreach ($test_variables as $test)
|
||||
{
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
}
|
||||
}
|
||||
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
|
||||
{
|
||||
$group_perm_from = request_var('group_perm_from', 0);
|
||||
|
||||
// Copy permissions?
|
||||
if ($group_perm_from && $action == 'add')
|
||||
{
|
||||
// From the mysql documentation:
|
||||
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
|
||||
// Due to this we stay on the safe side if we do the insertion "the manual way"
|
||||
|
||||
// Copy permisisons from/to the acl groups table (only group_id gets changed)
|
||||
$sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE group_id = ' . $group_perm_from;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups_sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
{
|
||||
$groups_sql_ary[] = array(
|
||||
'group_id' => (int) $group_id,
|
||||
'forum_id' => (int) $row['forum_id'],
|
||||
'auth_option_id' => (int) $row['auth_option_id'],
|
||||
'auth_role_id' => (int) $row['auth_role_id'],
|
||||
'auth_setting' => (int) $row['auth_setting']
|
||||
);
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Now insert the data
|
||||
if (sizeof($groups_sql_ary))
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
|
||||
{
|
||||
$group_perm_from = request_var('group_perm_from', 0);
|
||||
|
||||
// Copy permissions?
|
||||
if ($group_perm_from && $action == 'add')
|
||||
{
|
||||
switch (SQL_LAYER)
|
||||
// From the mysql documentation:
|
||||
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
|
||||
// Due to this we stay on the safe side if we do the insertion "the manual way"
|
||||
|
||||
// Copy permisisons from/to the acl groups table (only group_id gets changed)
|
||||
$sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE group_id = ' . $group_perm_from;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups_sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $groups_sql_ary));
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach ($groups_sql_ary as $ary)
|
||||
{
|
||||
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
$groups_sql_ary[] = array(
|
||||
'group_id' => (int) $group_id,
|
||||
'forum_id' => (int) $row['forum_id'],
|
||||
'auth_option_id' => (int) $row['auth_option_id'],
|
||||
'auth_role_id' => (int) $row['auth_role_id'],
|
||||
'auth_setting' => (int) $row['auth_setting']
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Now insert the data
|
||||
if (sizeof($groups_sql_ary))
|
||||
{
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $groups_sql_ary));
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach ($groups_sql_ary as $ary)
|
||||
{
|
||||
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
|
||||
if (sizeof($error))
|
||||
{
|
||||
$group_rank = $submit_ary['rank'];
|
||||
|
||||
|
@ -605,20 +609,17 @@ class acp_groups
|
|||
'U_FIND_USERNAME' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=list&field=usernames")
|
||||
);
|
||||
|
||||
if ($group_row['group_type'] != GROUP_SPECIAL)
|
||||
foreach ($group_data['leader'] as $row)
|
||||
{
|
||||
foreach ($group_data['leader'] as $row)
|
||||
{
|
||||
$template->assign_block_vars('leader', array(
|
||||
'U_USER_EDIT' => $phpbb_admin_path . "index.$phpEx$SID&i=users&action=edit&u={$row['user_id']}",
|
||||
$template->assign_block_vars('leader', array(
|
||||
'U_USER_EDIT' => $phpbb_admin_path . "index.$phpEx$SID&i=users&action=edit&u={$row['user_id']}",
|
||||
|
||||
'USERNAME' => $row['username'],
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
'USER_ID' => $row['user_id'])
|
||||
);
|
||||
}
|
||||
'USERNAME' => $row['username'],
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
'USER_ID' => $row['user_id'])
|
||||
);
|
||||
}
|
||||
|
||||
$pending = false;
|
||||
|
|
|
@ -138,7 +138,7 @@ class acp_language
|
|||
'DATA' => $data,
|
||||
'NAME' => $user->lang[strtoupper($method . '_' . $data)],
|
||||
'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
|
||||
'DEFAULT' => $_REQUEST[$data] ? request_var($data, '') : $default
|
||||
'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -170,8 +170,8 @@ class acp_language
|
|||
|
||||
$sql_ary = array(
|
||||
'lang_english_name' => request_var('lang_english_name', $row['lang_english_name']),
|
||||
'lang_local_name' => request_var('lang_local_name', $row['lang_local_name']),
|
||||
'lang_author' => request_var('lang_author', $row['lang_author']),
|
||||
'lang_local_name' => request_var('lang_local_name', $row['lang_local_name'], true),
|
||||
'lang_author' => request_var('lang_author', $row['lang_author'], true),
|
||||
);
|
||||
|
||||
$db->sql_query('UPDATE ' . LANG_TABLE . '
|
||||
|
@ -238,7 +238,9 @@ class acp_language
|
|||
if ($this->language_directory == 'email')
|
||||
{
|
||||
// Email Template
|
||||
fwrite($fp, (STRIP) ? stripslashes($_POST['entry']) : $_POST['entry']);
|
||||
$entry = (STRIP) ? stripslashes($_POST['entry']) : $_POST['entry'];
|
||||
$entry = preg_replace('#&(\#[0-9]+;)#', '&\1', $entry);
|
||||
fwrite($fp, $entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -263,6 +265,7 @@ class acp_language
|
|||
foreach ($value as $_key => $_value)
|
||||
{
|
||||
$_value = (STRIP) ? stripslashes($_value) : $_value;
|
||||
$_value = preg_replace('#&(\#[0-9]+;)#', '&\1', $_value);
|
||||
$entry .= "\t\t" . (int) $_key . "\t=> '" . str_replace("'", "\\'", $_value) . "',\n";
|
||||
}
|
||||
|
||||
|
@ -283,6 +286,7 @@ class acp_language
|
|||
if (!is_array($value))
|
||||
{
|
||||
$value = (STRIP) ? stripslashes($value) : $value;
|
||||
$value = preg_replace('#&(\#[0-9]+;)#', '&\1', $value);
|
||||
$entry = "\t'" . $key . "'\t=> '" . str_replace("'", "\\'", $value) . "',\n";
|
||||
}
|
||||
else
|
||||
|
@ -292,6 +296,7 @@ class acp_language
|
|||
foreach ($value as $_key => $_value)
|
||||
{
|
||||
$_value = (STRIP) ? stripslashes($_value) : $_value;
|
||||
$_value = preg_replace('#&(\#[0-9]+;)#', '&\1', $_value);
|
||||
$entry .= "\t\t'" . $_key . "'\t=> '" . str_replace("'", "\\'", $_value) . "',\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ class acp_modules
|
|||
'module_enabled' => 0,
|
||||
'module_display' => 1,
|
||||
'parent_id' => 0,
|
||||
'module_langname' => request_var('module_langname', ''),
|
||||
'module_langname' => request_var('module_langname', '', true),
|
||||
'module_mode' => '',
|
||||
'module_auth' => '',
|
||||
);
|
||||
|
@ -301,7 +301,7 @@ class acp_modules
|
|||
$module_data['module_display'] = request_var('module_display', (int) $module_row['module_display']);
|
||||
$module_data['parent_id'] = request_var('module_parent_id', (int) $module_row['parent_id']);
|
||||
$module_data['module_class'] = $this->module_class;
|
||||
$module_data['module_langname'] = request_var('module_langname', (string) $module_row['module_langname']);
|
||||
$module_data['module_langname'] = request_var('module_langname', (string) $module_row['module_langname'], true);
|
||||
$module_data['module_mode'] = request_var('module_mode', (string) $module_row['module_mode']);
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
|
|
@ -149,7 +149,7 @@ class acp_permission_roles
|
|||
|
||||
case 'add':
|
||||
|
||||
$role_name = request_var('role_name', '');
|
||||
$role_name = request_var('role_name', '', true);
|
||||
$role_group_ids = request_var('role_group_ids', array(0));
|
||||
$pre_select = request_var('pre_select', 'custom');
|
||||
$auth_settings = request_var('setting', array('' => 0));
|
||||
|
@ -313,7 +313,7 @@ class acp_permission_roles
|
|||
$options_from = request_var('options_from', 0);
|
||||
|
||||
$role_row = array(
|
||||
'role_name' => request_var('role_name', ''),
|
||||
'role_name' => request_var('role_name', '', true),
|
||||
'role_type' => $permission_type,
|
||||
'role_group_ids' => implode(':', request_var('role_group_ids', array(0))),
|
||||
);
|
||||
|
|
|
@ -314,11 +314,11 @@ class acp_profile
|
|||
}
|
||||
|
||||
$cp->vars['field_ident'] = request_var('field_ident', $field_row['field_ident']);
|
||||
$cp->vars['lang_name'] = request_var('lang_name', $field_row['lang_name']);
|
||||
$cp->vars['lang_explain'] = request_var('lang_explain', $field_row['lang_explain']);
|
||||
$cp->vars['lang_default_value'] = request_var('lang_default_value', $field_row['lang_default_value']);
|
||||
$cp->vars['lang_name'] = request_var('lang_name', $field_row['lang_name'], true);
|
||||
$cp->vars['lang_explain'] = request_var('lang_explain', $field_row['lang_explain'], true);
|
||||
$cp->vars['lang_default_value'] = request_var('lang_default_value', $field_row['lang_default_value'], true);
|
||||
|
||||
$options = request_var('lang_options', '');
|
||||
$options = request_var('lang_options', '', true);
|
||||
|
||||
// If the user has submitted a form with options (i.e. dropdown field)
|
||||
if ($options)
|
||||
|
@ -358,14 +358,14 @@ class acp_profile
|
|||
}
|
||||
else
|
||||
{
|
||||
$var = request_var($key, $field_row[$key]);
|
||||
$var = request_var($key, $field_row[$key], true);
|
||||
}
|
||||
|
||||
// Manipulate the intended variables a little bit if needed
|
||||
if ($field_type == FIELD_DROPDOWN && $key == 'field_maxlen')
|
||||
{
|
||||
// Get the number of options if this key is 'field_maxlen'
|
||||
$var = sizeof(explode("\n", request_var('lang_options', '')));
|
||||
$var = sizeof(explode("\n", request_var('lang_options', '', true)));
|
||||
}
|
||||
|
||||
if ($field_type == FIELD_TEXT && $key == 'field_length')
|
||||
|
@ -450,7 +450,7 @@ class acp_profile
|
|||
|
||||
foreach ($exclude[3] as $key)
|
||||
{
|
||||
$cp->vars[$key] = request_var($key, array(0 => ''));
|
||||
$cp->vars[$key] = request_var($key, array(0 => ''), true);
|
||||
|
||||
if (!$cp->vars[$key] && $action == 'edit')
|
||||
{
|
||||
|
@ -526,7 +526,7 @@ class acp_profile
|
|||
|
||||
foreach ($key_ary as $key)
|
||||
{
|
||||
$var = isset($_REQUEST[$key]) ? request_var($key, '') : false;
|
||||
$var = isset($_REQUEST[$key]) ? request_var($key, '', true) : false;
|
||||
|
||||
if ($var !== false)
|
||||
{
|
||||
|
@ -846,7 +846,7 @@ class acp_profile
|
|||
$lang_options[$lang_id]['lang_iso'] = $lang_iso;
|
||||
foreach ($options as $field => $field_type)
|
||||
{
|
||||
$value = ($action == 'create') ? request_var('l_' . $field, '') : $cp->vars['l_' . $field];
|
||||
$value = ($action == 'create') ? request_var('l_' . $field, '', true) : $cp->vars['l_' . $field];
|
||||
|
||||
if ($field == 'lang_options')
|
||||
{
|
||||
|
@ -1045,10 +1045,10 @@ class acp_profile
|
|||
}
|
||||
}
|
||||
|
||||
$cp->vars['l_lang_name'] = request_var('l_lang_name', '');
|
||||
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', '');
|
||||
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', '');
|
||||
$cp->vars['l_lang_options'] = request_var('l_lang_options', '');
|
||||
$cp->vars['l_lang_name'] = request_var('l_lang_name', '', true);
|
||||
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', '', true);
|
||||
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', '', true);
|
||||
$cp->vars['l_lang_options'] = request_var('l_lang_options', '', true);
|
||||
|
||||
if ($cp->vars['lang_options'])
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ class acp_ranks
|
|||
{
|
||||
case 'save':
|
||||
|
||||
$rank_title = request_var('title', '');
|
||||
$rank_title = request_var('title', '', true);
|
||||
$special_rank = request_var('special_rank', 0);
|
||||
$min_posts = ($special_rank) ? -1 : request_var('min_posts', 0);
|
||||
$rank_image = request_var('rank_image', '');
|
||||
|
|
|
@ -39,8 +39,8 @@ class acp_reasons
|
|||
case 'edit':
|
||||
|
||||
$reason_row = array(
|
||||
'reason_title' => request_var('reason_title', ''),
|
||||
'reason_description' => request_var('reason_description', '')
|
||||
'reason_title' => request_var('reason_title', '', true),
|
||||
'reason_description' => request_var('reason_description', '', true)
|
||||
);
|
||||
|
||||
if ($submit)
|
||||
|
|
|
@ -1113,7 +1113,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
if ($update)
|
||||
{
|
||||
$name = request_var('name', '');
|
||||
$copyright = request_var('copyright', '');
|
||||
$copyright = request_var('copyright', '', true);
|
||||
|
||||
$template_id = request_var('template_id', 0);
|
||||
$theme_id = request_var('theme_id', 0);
|
||||
|
@ -1598,7 +1598,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
|
||||
$style_row = array(
|
||||
$mode . '_name' => request_var('name', ''),
|
||||
$mode . '_copyright' => request_var('copyright', ''),
|
||||
$mode . '_copyright' => request_var('copyright', '', true),
|
||||
'template_id' => 0,
|
||||
'theme_id' => 0,
|
||||
'imageset_id' => 0,
|
||||
|
|
|
@ -755,7 +755,7 @@ class acp_users
|
|||
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
||||
$deleteall = (isset($_POST['delall'])) ? true : false;
|
||||
$marked = request_var('mark', array(0));
|
||||
$message = request_var('message', '');
|
||||
$message = request_var('message', '', true);
|
||||
|
||||
// Sort keys
|
||||
$sort_days = request_var('st', 0);
|
||||
|
@ -872,7 +872,7 @@ class acp_users
|
|||
|
||||
foreach ($var_ary as $var => $default)
|
||||
{
|
||||
$data[$var] = request_var($var, $default);
|
||||
$data[$var] = (in_array($var, array('location', 'occupation', 'interests')) ? request_var($var, $default, true) : $data[$var] = request_var($var, $default);
|
||||
}
|
||||
|
||||
$var_ary = array(
|
||||
|
@ -1424,7 +1424,7 @@ class acp_users
|
|||
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
|
||||
$enable_urls = request_var('enable_urls', true);
|
||||
$signature = request_var('signature', $user_row['user_sig']);
|
||||
$signature = request_var('signature', $user_row['user_sig'], true);
|
||||
|
||||
$preview = (isset($_POST['preview'])) ? true : false;
|
||||
|
||||
|
|
|
@ -69,8 +69,8 @@ class acp_words
|
|||
|
||||
case 'save':
|
||||
$word_id = request_var('id', 0);
|
||||
$word = request_var('word', '');
|
||||
$replacement = request_var('replacement', '');
|
||||
$word = request_var('word', '', true);
|
||||
$replacement = request_var('replacement', '', true);
|
||||
|
||||
if (!$word || !$replacement)
|
||||
{
|
||||
|
|
|
@ -701,7 +701,7 @@ class auth_admin extends auth
|
|||
$id_field = $ug_type . '_id';
|
||||
|
||||
// Get any flags as required
|
||||
list(, $flag) = each(array_keys($auth));
|
||||
$flag = key($auth);
|
||||
$flag = substr($flag, 0, strpos($flag, '_') + 1);
|
||||
|
||||
// This ID (the any-flag) is set if one or more permissions are true...
|
||||
|
@ -831,7 +831,7 @@ class auth_admin extends auth
|
|||
global $db;
|
||||
|
||||
// Get any-flag as required
|
||||
list(, $flag) = each(array_keys($auth));
|
||||
$flag = key($auth);
|
||||
$flag = substr($flag, 0, strpos($flag, '_') + 1);
|
||||
|
||||
// Remove any-flag from auth ary
|
||||
|
|
|
@ -2254,7 +2254,7 @@ function tidy_warnings()
|
|||
WHERE warning_id $sql_where";
|
||||
$db->sql_query($sql);
|
||||
|
||||
foreach($user_list as $user_id => $value)
|
||||
foreach ($user_list as $user_id => $value)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . " SET user_warnings = user_warnings - $value
|
||||
WHERE user_id = $user_id";
|
||||
|
|
|
@ -116,7 +116,7 @@ class compress
|
|||
*
|
||||
* Zip extraction function by Alexandre Tedeschi, alexandrebr at gmail dot com
|
||||
*
|
||||
* Modified extensively by psoTFX and DavidMJ, © phpBB Group, 2003
|
||||
* Modified extensively by psoTFX and DavidMJ, (c) phpBB Group, 2003
|
||||
*
|
||||
* Based on work by Eric Mueller and Denis125
|
||||
* Official ZIP file format: http://www.pkware.com/appnote.txt
|
||||
|
|
|
@ -563,16 +563,18 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
|||
/**
|
||||
* User authorisation levels output
|
||||
*/
|
||||
function gen_forum_auth_level($mode, $forum_id)
|
||||
function gen_forum_auth_level($mode, $forum_id, $forum_status)
|
||||
{
|
||||
global $SID, $template, $auth, $user;
|
||||
|
||||
$locked = ($forum_status == ITEM_LOCKED && !$auth->acl_get('m_edit', $forum_id)) ? true : false;
|
||||
|
||||
$rules = array(
|
||||
($auth->acl_get('f_post', $forum_id)) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
|
||||
($auth->acl_get('f_reply', $forum_id)) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
||||
($auth->acl_gets('f_edit', 'm_edit', $forum_id)) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||
($auth->acl_gets('f_delete', 'm_delete', $forum_id)) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach', $forum_id)) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT']
|
||||
($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
|
||||
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
||||
($auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||
($auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach', $forum_id) && !$locked) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT']
|
||||
);
|
||||
|
||||
foreach ($rules as $rule)
|
||||
|
|
|
@ -834,7 +834,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
'U_POST_ID' => $row['post_id'],
|
||||
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&mode=post_details&p=" . $row['post_id'] : '',
|
||||
'U_QUOTE' => ($show_quote_button && $auth->acl_get('f_quote', $forum_id)) ? 'javascript:addquote(' . $row['post_id'] . ", '" . str_replace("'", "\\'", $poster) . "')" : '')
|
||||
'U_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? 'javascript:addquote(' . $row['post_id'] . ", '" . str_replace("'", "\\'", $poster) . "')" : '')
|
||||
);
|
||||
unset($rowset[$i]);
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ $global_rule_conditions = array(
|
|||
function get_folder($user_id, $folder_id = false)
|
||||
{
|
||||
global $db, $user, $template;
|
||||
global $phpbb_root_path, $phpEx, $SID;
|
||||
|
||||
$folder = array();
|
||||
|
||||
|
@ -163,13 +164,17 @@ function get_folder($user_id, $folder_id = false)
|
|||
// Define Folder Array for template designers (and for making custom folders usable by the template too)
|
||||
foreach ($folder as $f_id => $folder_ary)
|
||||
{
|
||||
$folder_id_name = ($f_id == PRIVMSGS_INBOX) ? 'inbox' : (($f_id == PRIVMSGS_OUTBOX) ? 'outbox' : 'sentbox');
|
||||
|
||||
$template->assign_block_vars('folder', array(
|
||||
'FOLDER_ID' => $f_id,
|
||||
'FOLDER_NAME' => $folder_ary['folder_name'],
|
||||
'NUM_MESSAGES' => $folder_ary['num_messages'],
|
||||
'UNREAD_MESSAGES' => $folder_ary['unread_messages'],
|
||||
|
||||
'S_CUR_FOLDER' => ($f_id == $folder_id) ? true : false,
|
||||
'U_FOLDER' => ($f_id > 0) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder={$f_id}" : "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder={$folder_id_name}",
|
||||
|
||||
'S_CUR_FOLDER' => ($f_id === $folder_id) ? true : false,
|
||||
'S_UNREAD_MESSAGES' => ($folder_ary['unread_messages']) ? true : false,
|
||||
'S_CUSTOM_FOLDER' => ($f_id > 0) ? true : false)
|
||||
);
|
||||
|
@ -716,7 +721,7 @@ function handle_mark_actions($user_id, $mark_action)
|
|||
AND msg_id IN (" . implode(', ', $msg_ids) . ')';
|
||||
$db->sql_query($sql);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'delete_marked':
|
||||
|
||||
|
@ -742,13 +747,7 @@ function handle_mark_actions($user_id, $mark_action)
|
|||
confirm_box(false, 'DELETE_MARKED_PM', build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'export_as_xml':
|
||||
case 'export_as_csv':
|
||||
case 'export_as_txt':
|
||||
$export_as = str_replace('export_as_', '', $mark_action);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -976,7 +975,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
|||
{
|
||||
if ($plaintext)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
$sql = 'SELECT group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id IN (' . implode(', ', $g) . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -985,7 +984,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
|||
{
|
||||
if ($check_type == 'to' || $author_id == $user->data['user_id'] || $row['user_id'] == $user->data['user_id'])
|
||||
{
|
||||
$address[] = $row['group_name'];
|
||||
$address[] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1455,7 +1454,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
|||
'AUTHOR_NAME' => $author,
|
||||
'USERNAME' => $addr['name'],
|
||||
|
||||
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=unread")
|
||||
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox")
|
||||
);
|
||||
|
||||
$messenger->send($addr['method']);
|
||||
|
|
|
@ -454,7 +454,7 @@ class custom_profile
|
|||
}
|
||||
else
|
||||
{
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value) : ((!isset($user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]) || $preview) ? $default_value : $user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]);
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value, true) : ((!isset($user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]) || $preview) ? $default_value : $user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]);
|
||||
}
|
||||
|
||||
switch ($field_validation)
|
||||
|
@ -715,7 +715,7 @@ class custom_profile
|
|||
*/
|
||||
|
||||
default:
|
||||
$var = request_var($var_name, $profile_row['field_default_value']);
|
||||
$var = request_var($var_name, $profile_row['field_default_value'], true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,6 +255,14 @@ class template_compile
|
|||
*/
|
||||
function compile_tag_block($tag_args)
|
||||
{
|
||||
$no_nesting = false;
|
||||
|
||||
if (strpos($tag_args, '!') === 0)
|
||||
{
|
||||
$no_nesting = substr_count($tag_args, '!', 0, strrpos($tag_args, '!') + 1);
|
||||
$tag_args = substr($tag_args, $no_nesting);
|
||||
}
|
||||
|
||||
// Allow for control of looping (indexes start from zero):
|
||||
// foo(2) : Will start the loop on the 3rd entry
|
||||
// foo(-2) : Will start the loop two entries from the end
|
||||
|
@ -305,7 +313,15 @@ class template_compile
|
|||
// This block is nested.
|
||||
|
||||
// Generate a namespace string for this block.
|
||||
$namespace = implode('.', $this->template->block_names);
|
||||
if ($no_nesting !== false)
|
||||
{
|
||||
// We need to implode $no_nesting times from the end...
|
||||
$namespace = implode('.', array_slice($this->template->block_names, -$no_nesting));
|
||||
}
|
||||
else
|
||||
{
|
||||
$namespace = implode('.', $this->template->block_names);
|
||||
}
|
||||
|
||||
// Get a reference to the data array for this block that depends on the
|
||||
// current indices of all parent blocks.
|
||||
|
|
|
@ -524,7 +524,7 @@ class fileupload
|
|||
$url = parse_url($upload_url);
|
||||
|
||||
$host = $url['host'];
|
||||
$path = dirname($url['path']);
|
||||
$path = $url['path'];
|
||||
$port = (!empty($url['port'])) ? (int) $url['port'] : 80;
|
||||
|
||||
$upload_ary['type'] = 'application/octet-stream';
|
||||
|
@ -543,7 +543,7 @@ class fileupload
|
|||
return $file;
|
||||
}
|
||||
|
||||
fputs($fsock, 'GET /' . $filename . " HTTP/1.1\r\n");
|
||||
fputs($fsock, 'GET /' . $path . " HTTP/1.1\r\n");
|
||||
fputs($fsock, "HOST: " . $host . "\r\n");
|
||||
fputs($fsock, "Connection: close\r\n\r\n");
|
||||
|
||||
|
@ -569,6 +569,11 @@ class fileupload
|
|||
{
|
||||
$upload_ary['type'] = rtrim(str_replace('Content-Type: ', '', $line));
|
||||
}
|
||||
else if (strpos($line, 'HTTP/1.1 404 Not Found') !== false)
|
||||
{
|
||||
$file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']);
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -609,10 +614,15 @@ class fileupload
|
|||
{
|
||||
case 1:
|
||||
$error = (@ini_get('upload_max_filesize') == '') ? $user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf($user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$error = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $this->max_filesize);
|
||||
break;
|
||||
$size_lang = ($this->max_filesize >= 1048576) ? $user->lang['MB'] : (($this->max_filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
||||
$max_filesize = ($this->max_filesize >= 1048576) ? round($this->max_filesize / 1048576 * 100) / 100 : (($this->max_filesize >= 1024) ? round($this->max_filesize / 1024 * 100) / 100 : $this->max_filesize);
|
||||
|
||||
$error = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize, $size_lang);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$error = 'The uploaded file was only partially uploaded';
|
||||
break;
|
||||
|
@ -637,7 +647,10 @@ class fileupload
|
|||
// Filesize is too big or it's 0 if it was larger than the maxsize in the upload form
|
||||
if ($this->max_filesize && ($file->get('filesize') > $this->max_filesize || $file->get('filesize') == 0))
|
||||
{
|
||||
$file->error[] = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $this->max_filesize);
|
||||
$size_lang = ($this->max_filesize >= 1048576) ? $user->lang['MB'] : (($this->max_filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
||||
$max_filesize = ($this->max_filesize >= 1048576) ? round($this->max_filesize / 1048576 * 100) / 100 : (($this->max_filesize >= 1024) ? round($this->max_filesize / 1024 * 100) / 100 : $this->max_filesize);
|
||||
|
||||
$file->error[] = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize, $size_lang);
|
||||
}
|
||||
|
||||
// check Filename
|
||||
|
|
|
@ -1253,12 +1253,7 @@ function group_delete($group_id, $group_name = false)
|
|||
|
||||
if (!$group_name)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_name = (string) $db->sql_fetchfield('group_name');
|
||||
$db->sql_freeresult($result);
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
|
||||
$start = 0;
|
||||
|
@ -1403,17 +1398,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
|||
|
||||
if (!$group_name)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if (!extract($db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error("Could not obtain name of group $group_id", E_USER_ERROR);
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
|
||||
$log = ($leader) ? 'LOG_MODS_ADDED' : 'LOG_USERS_ADDED';
|
||||
|
@ -1526,12 +1511,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
|
||||
if (!$group_name)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_name = (string) $db->sql_fetchfield('group_name');
|
||||
$db->sql_freeresult($result);
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
|
||||
$log = 'LOG_GROUP_REMOVE';
|
||||
|
@ -1590,12 +1570,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
|||
|
||||
if (!$group_name)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_name = (string) $db->sql_fetchfield('group_name');
|
||||
$db->sql_freeresult($result);
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
|
||||
add_log('admin', $log, $group_name, implode(', ', $username_ary));
|
||||
|
@ -1653,6 +1628,28 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group name
|
||||
*/
|
||||
function get_group_name($group_id)
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
$sql = 'SELECT group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id = ' . (int) $group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain either the members of a specified group, the groups the specified user is subscribed to
|
||||
* or checking if a specified user is in a specified group
|
||||
|
|
|
@ -40,8 +40,8 @@ class mcp_ban
|
|||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = request_var('banreason', '');
|
||||
$ban_give_reason = request_var('bangivereason', '');
|
||||
$ban_reason = request_var('banreason', '', true);
|
||||
$ban_give_reason = request_var('bangivereason', '', true);
|
||||
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
|
|
|
@ -34,12 +34,12 @@ class mcp_logs
|
|||
{
|
||||
list($action, ) = each($action);
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = request_var('action', '');
|
||||
}
|
||||
|
||||
// Set up general vars
|
||||
|
||||
// Isn't this set above? :o
|
||||
$action = request_var('action', '');
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$deletemark = (isset($_POST['del_marked'])) ? true : false;
|
||||
$deleteall = (isset($_POST['del_all'])) ? true : false;
|
||||
|
|
|
@ -86,7 +86,7 @@ function mcp_notes_user_view($id, $mode, $action)
|
|||
$deletemark = ($action == 'del_marked') ? true : false;
|
||||
$deleteall = ($action == 'del_all') ? true : false;
|
||||
$marked = request_var('marknote', array(0));
|
||||
$usernote = request_var('usernote', '');
|
||||
$usernote = request_var('usernote', '', true);
|
||||
|
||||
// Handle any actions
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
|
|
|
@ -535,7 +535,7 @@ function disapprove_post($post_id_list, $mode)
|
|||
}
|
||||
|
||||
$redirect = request_var('redirect', $user->data['session_page']);
|
||||
$reason = request_var('reason', '');
|
||||
$reason = request_var('reason', '', true);
|
||||
$reason_id = request_var('reason_id', 0);
|
||||
$success_msg = $additional_msg = '';
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
|
||||
// Set up some vars
|
||||
$icon_id = request_var('icon', 0);
|
||||
$subject = request_var('subject', '');
|
||||
$subject = request_var('subject', '', true);
|
||||
$start = request_var('start', 0);
|
||||
$to_topic_id = request_var('to_topic_id', 0);
|
||||
$to_forum_id = request_var('to_forum_id', 0);
|
||||
|
|
|
@ -188,7 +188,7 @@ function mcp_warn_post_view($id, $mode, $action)
|
|||
|
||||
$post_id = request_var('p', 0);
|
||||
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
|
||||
$warning = request_var('warning', '');
|
||||
$warning = request_var('warning', '', true);
|
||||
|
||||
$sql = 'SELECT u.*, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
WHERE post_id = $post_id
|
||||
|
@ -302,7 +302,7 @@ function mcp_warn_user_view($id, $mode, $action)
|
|||
$user_id = request_var('u', 0);
|
||||
$username = request_var('username', '');
|
||||
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
|
||||
$warning = request_var('warning', '');
|
||||
$warning = request_var('warning', '', true);
|
||||
|
||||
$sql_where = ($user_id) ? "user_id = $user_id" : "username = '" . $db->sql_escape($username) . "'";
|
||||
|
||||
|
|
|
@ -1062,12 +1062,7 @@ class parse_message extends bbcode_firstpass
|
|||
{
|
||||
if ($edit_comment)
|
||||
{
|
||||
$actual_comment_list = request_var('comment_list', array(''));
|
||||
|
||||
foreach ($actual_comment_list as $index => $entry)
|
||||
{
|
||||
$this->attachment_data[$index]['comment'] = preg_replace('#&(\#[0-9]+;)#', '&\1', $entry);
|
||||
}
|
||||
$actual_comment_list = request_var('comment_list', array(''), true);
|
||||
}
|
||||
|
||||
if (($add_file || $preview) && $upload_file)
|
||||
|
|
|
@ -177,22 +177,46 @@ class session
|
|||
$s_browser = ($config['browser_check']) ? substr($this->data['session_browser'], 0, 149) : '';
|
||||
$u_browser = ($config['browser_check']) ? substr($this->browser, 0, 149) : '';
|
||||
|
||||
if ($u_ip == $s_ip && $s_browser == $u_browser)
|
||||
if ($u_ip === $s_ip && $s_browser === $u_browser)
|
||||
{
|
||||
// Only update session DB a minute or so after last update or if page changes
|
||||
if ($this->time_now - $this->data['session_time'] > 60 || $this->data['session_page'] != $this->page['page'])
|
||||
$session_expired = false;
|
||||
|
||||
// Check the session length timeframe if autologin is not enabled.
|
||||
// Else check the autologin length... and also removing those having autologin enabled but no longer allowed board-wide.
|
||||
if (!$this->data['session_autologin'])
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . "
|
||||
SET session_time = $this->time_now, session_page = '" . $db->sql_escape(substr($this->page['page'], 0, 199)) . "'
|
||||
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
|
||||
$db->sql_query($sql);
|
||||
if ($this->data['session_time'] < $this->time_now - ($config['session_length'] + 60))
|
||||
{
|
||||
$session_expired = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Ultimately to be removed
|
||||
$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
|
||||
$this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
|
||||
|
||||
return true;
|
||||
else if (!$config['allow_autologin'] || ($config['max_autologin_time'] && $this->data['session_time'] < $this->time_now - (86400 * (int) $config['max_autologin_time']) + 60))
|
||||
{
|
||||
$session_expired = true;
|
||||
}
|
||||
|
||||
if (!$session_expired)
|
||||
{
|
||||
// Only update session DB a minute or so after last update or if page changes
|
||||
if ($this->time_now - $this->data['session_time'] > 60 || $this->data['session_page'] != $this->page['page'])
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . "
|
||||
SET session_time = $this->time_now, session_page = '" . $db->sql_escape(substr($this->page['page'], 0, 199)) . "'
|
||||
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Ultimately to be removed
|
||||
$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
|
||||
$this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Added logging temporarly to help debug bugs...
|
||||
add_log('critical', 'LOG_IP_BROWSER_CHECK', $u_ip, $s_ip, $u_browser, $s_browser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -356,7 +380,7 @@ class session
|
|||
}
|
||||
else
|
||||
{
|
||||
$this->data['session_last_visit'] = time();
|
||||
$this->data['session_last_visit'] = $this->time_now;
|
||||
}
|
||||
|
||||
// At this stage we should have a filled data array, defined cookie u and k data.
|
||||
|
@ -376,7 +400,10 @@ class session
|
|||
$this->data['is_bot'] = ($bot) ? true : false;
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
// @todo Change this ... check for "... && user_type & USER_NORMAL" ?
|
||||
$session_autologin = (($this->cookie_data['k'] || $persist_login) && $this->data['is_registered']) ? true : false;
|
||||
|
||||
// Create or update the session
|
||||
$sql_ary = array(
|
||||
'session_user_id' => (int) $this->data['user_id'],
|
||||
|
@ -386,6 +413,7 @@ class session
|
|||
'session_browser' => (string) $this->browser,
|
||||
'session_page' => (string) substr($this->page['page'], 0, 199),
|
||||
'session_ip' => (string) $this->ip,
|
||||
'session_autologin' => ($session_autologin) ? 1 : 0,
|
||||
'session_admin' => ($set_admin) ? 1 : 0,
|
||||
'session_viewonline' => ($viewonline) ? 1 : 0,
|
||||
);
|
||||
|
@ -423,8 +451,7 @@ class session
|
|||
$db->sql_return_on_error(false);
|
||||
|
||||
// Regenerate autologin/persistent login key
|
||||
// @todo Change this ... check for "... && user_type & USER_NORMAL" ?
|
||||
if (($this->cookie_data['k'] || $persist_login) && $this->data['user_id'] != ANONYMOUS)
|
||||
if ($session_autologin)
|
||||
{
|
||||
$this->set_login_key();
|
||||
}
|
||||
|
|
|
@ -19,9 +19,8 @@ class ucp_pm_info
|
|||
'title' => 'UCP_PM',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'view' => array('title' => 'UCP_PM_VIEW', 'auth' => 'cfg_allow_privmsg'),
|
||||
'view' => array('title' => 'UCP_PM_VIEW', 'auth' => 'cfg_allow_privmsg', 'display' => false),
|
||||
'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg'),
|
||||
'unread' => array('title' => 'UCP_PM_UNREAD', 'auth' => 'cfg_allow_privmsg'),
|
||||
'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg'),
|
||||
'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg'),
|
||||
'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => false),
|
||||
|
|
|
@ -486,26 +486,30 @@ class ucp_groups
|
|||
}
|
||||
}
|
||||
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
|
||||
$group_attributes = array();
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height');
|
||||
foreach ($test_variables as $test)
|
||||
if (!sizeof($error))
|
||||
{
|
||||
if ($action == 'add' || (isset($submit_ary[$test]) && $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
|
||||
$group_attributes = array();
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height');
|
||||
foreach ($test_variables as $test)
|
||||
{
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
if ($action == 'add' || (isset($submit_ary[$test]) && $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
{
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
}
|
||||
}
|
||||
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
|
||||
{
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . $return_page);
|
||||
}
|
||||
}
|
||||
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
|
||||
{
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . $return_page);
|
||||
}
|
||||
else
|
||||
if (sizeof($error))
|
||||
{
|
||||
$group_rank = $submit_ary['rank'];
|
||||
|
||||
|
|
|
@ -543,7 +543,7 @@ class ucp_main
|
|||
|
||||
// Get folder img, topic status/type related informations
|
||||
$folder_img = $folder_alt = $topic_type = '';
|
||||
$unread_topic = false; // TODO: get proper unread status
|
||||
$unread_topic = false;
|
||||
|
||||
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
|
||||
$view_topic_url = "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id";
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* @param inbox|outbox|sentbox display folder with the associated name
|
||||
*
|
||||
*
|
||||
* Display Unread Messages - mode=unread
|
||||
* Display Messages (default to inbox) - mode=view
|
||||
* Display single message - mode=view&p=[msg_id] or &p=[msg_id] (short linkage)
|
||||
*
|
||||
|
@ -101,7 +100,7 @@ class ucp_pm
|
|||
);
|
||||
|
||||
$tpl_file = 'ucp_pm_popup';
|
||||
break;
|
||||
break;
|
||||
|
||||
// Compose message
|
||||
case 'compose':
|
||||
|
@ -118,7 +117,7 @@ class ucp_pm
|
|||
compose_pm($id, $mode, $action);
|
||||
|
||||
$tpl_file = 'posting_body';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'options':
|
||||
$sql = 'SELECT group_message_limit
|
||||
|
@ -136,7 +135,7 @@ class ucp_pm
|
|||
message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions);
|
||||
|
||||
$tpl_file = 'ucp_pm_options';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'drafts':
|
||||
|
||||
|
@ -155,7 +154,6 @@ class ucp_pm
|
|||
|
||||
break;
|
||||
|
||||
case 'unread':
|
||||
case 'view':
|
||||
|
||||
$sql = 'SELECT group_message_limit
|
||||
|
@ -181,7 +179,7 @@ class ucp_pm
|
|||
$msg_id = request_var('p', 0);
|
||||
$view = request_var('view', '');
|
||||
|
||||
// if ($msg_id && $action == 'view_folder')
|
||||
// View message if specified
|
||||
if ($msg_id)
|
||||
{
|
||||
$action = 'view_message';
|
||||
|
@ -200,12 +198,23 @@ class ucp_pm
|
|||
|
||||
|
||||
// First Handle Mark actions and moving messages
|
||||
$submit_mark = (isset($_POST['submit_mark'])) ? true : false;
|
||||
$move_pm = (isset($_POST['move_pm'])) ? true : false;
|
||||
$mark_option = request_var('mark_option', '');
|
||||
$dest_folder = request_var('dest_folder', PRIVMSGS_NO_BOX);
|
||||
|
||||
// Is moving PM triggered through mark options?
|
||||
if (!in_array($mark_option, array('mark_important', 'delete_marked')) && $submit_mark)
|
||||
{
|
||||
$move_pm = true;
|
||||
$dest_folder = (int) $mark_option;
|
||||
$submit_mark = false;
|
||||
}
|
||||
|
||||
// Move PM
|
||||
if (isset($_REQUEST['move_pm']))
|
||||
if ($move_pm)
|
||||
{
|
||||
$move_msg_ids = (isset($_POST['marked_msg_id'])) ? array_map('intval', $_POST['marked_msg_id']) : array();
|
||||
$dest_folder = request_var('dest_folder', PRIVMSGS_NO_BOX);
|
||||
$cur_folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
|
||||
if (move_pm($user->data['user_id'], $user->data['message_limit'], $move_msg_ids, $dest_folder, $cur_folder_id))
|
||||
|
@ -221,9 +230,9 @@ class ucp_pm
|
|||
}
|
||||
|
||||
// Message Mark Options
|
||||
if (isset($_REQUEST['submit_mark']))
|
||||
if ($submit_mark)
|
||||
{
|
||||
handle_mark_actions($user->data['user_id'], request_var('mark_option', ''));
|
||||
handle_mark_actions($user->data['user_id'], $mark_option);
|
||||
}
|
||||
|
||||
// If new messages arrived, place them into the appropiate folder
|
||||
|
@ -234,7 +243,7 @@ class ucp_pm
|
|||
$num_not_moved = $user->data['user_new_privmsg'];
|
||||
}
|
||||
|
||||
if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX && $mode != 'unread')
|
||||
if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX)
|
||||
{
|
||||
$folder_id = PRIVMSGS_INBOX;
|
||||
}
|
||||
|
@ -244,8 +253,11 @@ class ucp_pm
|
|||
FROM ' . PRIVMSGS_TO_TABLE . "
|
||||
WHERE msg_id = $msg_id
|
||||
AND user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
trigger_error('NO_MESSAGE');
|
||||
}
|
||||
|
@ -256,7 +268,6 @@ class ucp_pm
|
|||
if ($action == 'view_message' && $msg_id)
|
||||
{
|
||||
// Get Message user want to see
|
||||
|
||||
if ($view == 'next' || $view == 'previous')
|
||||
{
|
||||
$sql_condition = ($view == 'next') ? '>' : '<';
|
||||
|
@ -271,8 +282,10 @@ class ucp_pm
|
|||
AND p.message_time $sql_condition p2.message_time
|
||||
ORDER BY p.message_time $sql_ordering";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
if (!$row)
|
||||
{
|
||||
$message = ($view == 'next') ? 'NO_NEWER_PM' : 'NO_OLDER_PM';
|
||||
trigger_error($message);
|
||||
|
@ -290,9 +303,11 @@ class ucp_pm
|
|||
AND t.folder_id = $folder_id
|
||||
AND t.msg_id = p.msg_id
|
||||
AND p.msg_id = $msg_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$result = $db->sql_query($sql);
|
||||
$message_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!($message_row = $db->sql_fetchrow($result)))
|
||||
if (!$message_row)
|
||||
{
|
||||
trigger_error('NO_MESSAGE');
|
||||
}
|
||||
|
@ -306,7 +321,7 @@ class ucp_pm
|
|||
$s_folder_options = $s_to_folder_options = '';
|
||||
foreach ($folder as $f_id => $folder_ary)
|
||||
{
|
||||
$option = '<option' . ((!in_array($f_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX))) ? ' class="blue"' : '') . ' value="' . $f_id . '"' . ((($f_id == $folder_id && $mode != 'unread') || ($f_id === 'unread' && $mode == 'unread')) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
|
||||
$option = '<option' . ((!in_array($f_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX))) ? ' class="blue"' : '') . ' value="' . $f_id . '"' . (($f_id == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
|
||||
|
||||
$s_to_folder_options .= ($f_id != PRIVMSGS_OUTBOX && $f_id != PRIVMSGS_SENTBOX) ? $option : '';
|
||||
$s_folder_options .= $option;
|
||||
|
@ -338,25 +353,25 @@ class ucp_pm
|
|||
'S_IN_OUTBOX' => ($folder_id == PRIVMSGS_OUTBOX) ? true : false,
|
||||
'S_IN_SENTBOX' => ($folder_id == PRIVMSGS_SENTBOX) ? true : false,
|
||||
|
||||
'FOLDER_STATUS' => $folder_status['message'],
|
||||
'FOLDER_MAX_MESSAGES' => $folder_status['max'],
|
||||
'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
|
||||
'FOLDER_STATUS' => $folder_status['message'],
|
||||
'FOLDER_MAX_MESSAGES' => $folder_status['max'],
|
||||
'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
|
||||
'FOLDER_REMAINING_MESSAGES' => $folder_status['remaining'],
|
||||
'FOLDER_PERCENT' => $folder_status['percent'])
|
||||
'FOLDER_PERCENT' => $folder_status['percent'])
|
||||
);
|
||||
|
||||
if ($mode == 'unread' || $action == 'view_folder')
|
||||
if ($action == 'view_folder')
|
||||
{
|
||||
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.'.$phpEx);
|
||||
view_folder($id, $mode, $folder_id, $folder, (($mode == 'unread') ? 'unread' : 'folder'));
|
||||
view_folder($id, $mode, $folder_id, $folder);
|
||||
|
||||
$tpl_file = 'ucp_pm_viewfolder';
|
||||
}
|
||||
else if ($action == 'view_message')
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_VIEW_MESSAGE'=> true,
|
||||
'MSG_ID' => $msg_id)
|
||||
'S_VIEW_MESSAGE' => true,
|
||||
'MSG_ID' => $msg_id)
|
||||
);
|
||||
|
||||
if (!$msg_id)
|
||||
|
@ -370,7 +385,7 @@ class ucp_pm
|
|||
$tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print' : 'ucp_pm_viewmessage';
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error('NO_ACTION_MODE');
|
||||
|
|
|
@ -413,16 +413,14 @@ function compose_pm($id, $mode, $action)
|
|||
|
||||
if ($submit || $preview || $refresh)
|
||||
{
|
||||
$subject = request_var('subject', '');
|
||||
$subject = request_var('subject', '', true);
|
||||
|
||||
if (strcmp($subject, strtoupper($subject)) == 0 && $subject)
|
||||
{
|
||||
$subject = strtolower($subject);
|
||||
}
|
||||
$subject = preg_replace('#&(\#[0-9]+;)#', '&\1', $subject);
|
||||
|
||||
$message_parser->message = (isset($_POST['message'])) ? htmlspecialchars(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message'])) : '';
|
||||
$message_parser->message = preg_replace('#&(\#[0-9]+;)#', '&\1', $message_parser->message);
|
||||
$message_parser->message = request_var('message', '', true);
|
||||
|
||||
$icon_id = request_var('icon', 0);
|
||||
|
||||
|
@ -502,7 +500,7 @@ function compose_pm($id, $mode, $action)
|
|||
unset($message_parser);
|
||||
|
||||
// ((!$message_subject) ? $subject : $message_subject)
|
||||
$msg_id = submit_pm($action, $subject, $pm_data, $update_message);
|
||||
$msg_id = submit_pm($action, $subject, $pm_data, true);
|
||||
|
||||
$return_message_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=view&p=" . $msg_id;
|
||||
$return_folder_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=outbox";
|
||||
|
|
|
@ -56,7 +56,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
// Add Folder
|
||||
if (isset($_POST['addfolder']))
|
||||
{
|
||||
$folder_name = request_var('foldername', '');
|
||||
$folder_name = request_var('foldername', '', true);
|
||||
|
||||
if ($folder_name)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
// Rename folder
|
||||
if (isset($_POST['rename_folder']))
|
||||
{
|
||||
$new_folder_name = request_var('new_folder_name', '');
|
||||
$new_folder_name = request_var('new_folder_name', '', true);
|
||||
$rename_folder_id= request_var('rename_folder_id', 0);
|
||||
|
||||
if (!$new_folder_name)
|
||||
|
@ -240,7 +240,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
$rule_option = request_var('rule_option', 0);
|
||||
$cond_option = request_var('cond_option', '');
|
||||
$action_option = explode('|', request_var('action_option', ''));
|
||||
$rule_string = ($cond_option != 'none') ? request_var('rule_string', '') : '';
|
||||
$rule_string = ($cond_option != 'none') ? request_var('rule_string', '', true) : '';
|
||||
$rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0;
|
||||
$rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0;
|
||||
|
||||
|
@ -620,7 +620,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
switch ($condition)
|
||||
{
|
||||
case 'text':
|
||||
$rule_string = request_var('rule_string', '');
|
||||
$rule_string = request_var('rule_string', '', true);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_TEXT_CONDITION' => true,
|
||||
|
@ -634,7 +634,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
|
||||
case 'user':
|
||||
$rule_user_id = request_var('rule_user_id', 0);
|
||||
$rule_string = request_var('rule_string', '');
|
||||
$rule_string = request_var('rule_string', '', true);
|
||||
|
||||
if ($rule_string && !$rule_user_id)
|
||||
{
|
||||
|
@ -677,7 +677,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
|
||||
case 'group':
|
||||
$rule_group_id = request_var('rule_group_id', 0);
|
||||
$rule_string = request_var('rule_string', '');
|
||||
$rule_string = request_var('rule_string', '', true);
|
||||
|
||||
$sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
* View message folder
|
||||
* Called from ucp_pm with mode == 'view' && action == 'view_folder'
|
||||
*/
|
||||
function view_folder($id, $mode, $folder_id, $folder, $type)
|
||||
function view_folder($id, $mode, $folder_id, $folder)
|
||||
{
|
||||
global $user, $template, $auth, $db, $cache;
|
||||
global $phpbb_root_path, $config, $phpEx, $SID;
|
||||
|
||||
$submit_export = (isset($_POST['submit_export'])) ? true : false;
|
||||
|
||||
$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id'], "{$phpbb_root_path}ucp.$phpEx$SID", $type);
|
||||
$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id'], "{$phpbb_root_path}ucp.$phpEx$SID");
|
||||
|
||||
if (!$submit_export)
|
||||
{
|
||||
|
@ -48,6 +48,20 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
|
|||
$s_mark_options .= '<option value="' . $mark_option . '">' . $user->lang[strtoupper($mark_option)] . '</option>';
|
||||
}
|
||||
|
||||
// We do the folder moving options here too, for template authors to use...
|
||||
$s_folder_move_options = '';
|
||||
foreach ($folder as $f_id => $folder_ary)
|
||||
{
|
||||
if ($f_id == PRIVMSGS_OUTBOX || $f_id == PRIVMSGS_SENTBOX || $f_id == $folder_id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$s_folder_move_options .= '<option' . (($f_id != PRIVMSGS_INBOX) ? ' class="blue"' : '') . ' value="' . $f_id . '">';
|
||||
$s_folder_move_options .= sprintf($user->lang['MOVE_MARKED_TO_FOLDER'], $folder_ary['folder_name']);
|
||||
$s_folder_move_options .= (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
|
||||
}
|
||||
|
||||
$friend = $foe = array();
|
||||
|
||||
// Get friends and foes
|
||||
|
@ -64,8 +78,8 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UNREAD' => ($type == 'unread'),
|
||||
'S_MARK_OPTIONS'=> $s_mark_options)
|
||||
'S_MARK_OPTIONS' => $s_mark_options,
|
||||
'S_MOVE_MARKED_OPTIONS' => $s_folder_move_options)
|
||||
);
|
||||
|
||||
// Okay, lets dump out the page ...
|
||||
|
@ -344,10 +358,8 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
|
|||
|
||||
/**
|
||||
* Get Messages from folder/user
|
||||
*
|
||||
* @param unread|new|folder $type type of message
|
||||
*/
|
||||
function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
||||
function get_pm_from($folder_id, $folder, $user_id, $url)
|
||||
{
|
||||
global $user, $db, $template, $config, $auth, $_POST;
|
||||
|
||||
|
@ -368,16 +380,7 @@ function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
|||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
if ($type != 'folder')
|
||||
{
|
||||
$folder_sql = ($type == 'unread') ? 't.unread = 1' : 't.new = 1';
|
||||
$folder_sql .= ' AND t.folder_id NOT IN (' . PRIVMSGS_HOLD_BOX . ', ' . PRIVMSGS_NO_BOX . ')';
|
||||
$folder_id = PRIVMSGS_INBOX;
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_sql = 't.folder_id = ' . (int) $folder_id;
|
||||
}
|
||||
$folder_sql = 't.folder_id = ' . (int) $folder_id;
|
||||
|
||||
// Limit pms to certain time frame, obtain correct pm count
|
||||
if ($sort_days)
|
||||
|
@ -404,32 +407,7 @@ function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder')
|
|||
}
|
||||
else
|
||||
{
|
||||
if ($type == 'folder')
|
||||
{
|
||||
$pm_count = $folder[$folder_id]['num_messages'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (in_array($folder_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)))
|
||||
{
|
||||
$sql = 'SELECT COUNT(t.msg_id) AS pm_count
|
||||
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . " p
|
||||
WHERE $folder_sql
|
||||
AND t.user_id = $user_id
|
||||
AND t.msg_id = p.msg_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT pm_count
|
||||
FROM ' . PRIVMSGS_FOLDER_TABLE . "
|
||||
WHERE folder_id = $folder_id
|
||||
AND user_id = $user_id";
|
||||
}
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$pm_count = ($row = $db->sql_fetchrow($result)) ? $row['pm_count'] : 0;
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$pm_count = $folder[$folder_id]['num_messages'];
|
||||
$sql_limit_time = '';
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ class ucp_profile
|
|||
|
||||
foreach ($var_ary as $var => $default)
|
||||
{
|
||||
$data[$var] = request_var($var, $default);
|
||||
$data[$var] = (in_array($var, array('location', 'occupation', 'interests'))) ? request_var($var, $default, true) : request_var($var, $default);
|
||||
}
|
||||
|
||||
$var_ary = array(
|
||||
|
@ -407,7 +407,7 @@ class ucp_profile
|
|||
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false;
|
||||
$enable_urls = request_var('enable_urls', true);
|
||||
$signature = request_var('signature', $user->data['user_sig']);
|
||||
$signature = request_var('signature', $user->data['user_sig'], true);
|
||||
|
||||
if ($submit || $preview)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,6 @@ class ucp_register
|
|||
|
||||
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||
|
||||
// Do not alter this first one to use request_var!
|
||||
$confirm_id = request_var('confirm_id', '');
|
||||
$coppa = (isset($_REQUEST['coppa'])) ? ((!empty($_REQUEST['coppa'])) ? 1 : 0) : false;
|
||||
$agreed = (!empty($_POST['agreed'])) ? 1 : 0;
|
||||
|
|
|
@ -520,6 +520,7 @@ CREATE TABLE phpbb_sessions (
|
|||
session_browser VARCHAR(150),
|
||||
session_page VARCHAR(200) NOT NULL,
|
||||
session_viewonline INTEGER DEFAULT 1 NOT NULL,
|
||||
session_autologin INTEGER DEFAULT 0 NOT NULL,
|
||||
session_admin INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
|
|
|
@ -526,6 +526,7 @@ CREATE TABLE [phpbb_sessions] (
|
|||
[session_browser] [varchar] (150) NULL ,
|
||||
[session_page] [varchar] (200) NOT NULL ,
|
||||
[session_viewonline] [int] NOT NULL ,
|
||||
[session_autologin] [int] NOT NULL ,
|
||||
[session_admin] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
@ -1525,6 +1526,7 @@ ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
|
|||
CONSTRAINT [DF_sessio_session_time] DEFAULT (0) FOR [session_time],
|
||||
CONSTRAINT [DF_sessio_session_ip] DEFAULT ('0') FOR [session_ip],
|
||||
CONSTRAINT [DF_sessio_session_viewonline] DEFAULT (1) FOR [session_viewonline],
|
||||
CONSTRAINT [DF_sessio_session_autologin] DEFAULT (0) FOR [session_autologin],
|
||||
CONSTRAINT [DF_sessio_session_admin] DEFAULT (0) FOR [session_admin]
|
||||
GO
|
||||
|
||||
|
|
|
@ -611,6 +611,7 @@ CREATE TABLE phpbb_sessions (
|
|||
session_browser varchar(150) DEFAULT '' NOT NULL,
|
||||
session_page varchar(200) DEFAULT '' NOT NULL,
|
||||
session_viewonline tinyint(1) DEFAULT '1' NOT NULL,
|
||||
session_autologin tinyint(1) DEFAULT '0' NOT NULL,
|
||||
session_admin tinyint(1) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (session_id),
|
||||
KEY session_time (session_time),
|
||||
|
|
|
@ -1220,6 +1220,7 @@ CREATE TABLE phpbb_sessions (
|
|||
session_browser varchar2(150) DEFAULT '',
|
||||
session_page varchar2(200) DEFAULT '',
|
||||
session_viewonline number(1) DEFAULT '1' NOT NULL,
|
||||
session_autologin number(1) DEFAULT '0' NOT NULL,
|
||||
session_admin number(1) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
|
||||
)
|
||||
|
|
|
@ -828,6 +828,7 @@ CREATE TABLE phpbb_sessions (
|
|||
session_browser varchar(150) DEFAULT '' NULL,
|
||||
session_page varchar(200) DEFAULT '' NOT NULL,
|
||||
session_viewonline INT2 DEFAULT '1' NOT NULL,
|
||||
session_autologin INT2 DEFAULT '0' NOT NULL,
|
||||
session_admin INT2 DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (session_id),
|
||||
CHECK (session_user_id>=0)
|
||||
|
|
|
@ -220,7 +220,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_list', 1);
|
|||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_read', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_post', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_reply', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_quote', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_edit', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_user_lock', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_delete', 1);
|
||||
|
@ -240,7 +239,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_flash', 1);
|
|||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_sigs', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_search', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_email', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_rate', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_print', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_ignoreflood', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_postcount', 1);
|
||||
|
@ -467,21 +465,20 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class,
|
|||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (24, 1, 'prefs', 'ucp', 1, 23, 80, 81, 'UCP_PREFS_PERSONAL', 'personal', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (25, 1, 'prefs', 'ucp', 1, 23, 82, 83, 'UCP_PREFS_VIEW', 'view', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (26, 1, 'prefs', 'ucp', 1, 23, 84, 85, 'UCP_PREFS_POST', 'post', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (27, 1, '', 'ucp', 1, 0, 87, 100, 'UCP_PM', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (28, 1, 'pm', 'ucp', 1, 27, 88, 89, 'UCP_PM_VIEW', 'view', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (27, 1, '', 'ucp', 1, 0, 87, 98, 'UCP_PM', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (28, 1, 'pm', 'ucp', 0, 27, 88, 89, 'UCP_PM_VIEW', 'view', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (29, 1, 'pm', 'ucp', 1, 27, 90, 91, 'UCP_PM_COMPOSE', 'compose', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (30, 1, 'pm', 'ucp', 1, 27, 92, 93, 'UCP_PM_UNREAD', 'unread', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (31, 1, 'pm', 'ucp', 1, 27, 94, 95, 'UCP_PM_DRAFTS', 'drafts', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (32, 1, 'pm', 'ucp', 1, 27, 96, 97, 'UCP_PM_OPTIONS', 'options', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (33, 1, '', 'ucp', 1, 0, 101, 106, 'UCP_USERGROUPS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (34, 1, 'groups', 'ucp', 1, 33, 102, 103, 'UCP_USERGROUPS_MEMBER', 'membership', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (35, 1, 'groups', 'ucp', 1, 33, 104, 105, 'UCP_USERGROUPS_MANAGE', 'manage', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (36, 1, '', 'ucp', 1, 0, 107, 110, 'UCP_ATTACHMENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (37, 1, 'attachments', 'ucp', 1, 36, 108, 109, 'UCP_ATTACHMENTS', 'attachments', 'acl_u_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (38, 1, '', 'ucp', 1, 0, 111, 116, 'UCP_ZEBRA', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (39, 1, 'zebra', 'ucp', 1, 38, 112, 113, 'UCP_ZEBRA_FRIENDS', 'friends', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (40, 1, 'zebra', 'ucp', 1, 38, 114, 115, 'UCP_ZEBRA_FOES', 'foes', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (90, 1, 'pm', 'ucp', 0, 27, 98, 99, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (31, 1, 'pm', 'ucp', 1, 27, 92, 93, 'UCP_PM_DRAFTS', 'drafts', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (32, 1, 'pm', 'ucp', 1, 27, 94, 95, 'UCP_PM_OPTIONS', 'options', 'cfg_allow_privmsg');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (33, 1, '', 'ucp', 1, 0, 99, 104, 'UCP_USERGROUPS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (34, 1, 'groups', 'ucp', 1, 33, 100, 101, 'UCP_USERGROUPS_MEMBER', 'membership', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (35, 1, 'groups', 'ucp', 1, 33, 102, 103, 'UCP_USERGROUPS_MANAGE', 'manage', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (36, 1, '', 'ucp', 1, 0, 105, 108, 'UCP_ATTACHMENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (37, 1, 'attachments', 'ucp', 1, 36, 106, 107, 'UCP_ATTACHMENTS', 'attachments', 'acl_u_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (38, 1, '', 'ucp', 1, 0, 109, 114, 'UCP_ZEBRA', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (39, 1, 'zebra', 'ucp', 1, 38, 110, 111, 'UCP_ZEBRA_FRIENDS', 'friends', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (40, 1, 'zebra', 'ucp', 1, 38, 112, 113, 'UCP_ZEBRA_FOES', 'foes', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (90, 1, 'pm', 'ucp', 0, 27, 96, 97, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg');
|
||||
|
||||
# ACP
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (2, 1, 1, '', 'acp', 0, 237, 274, 'ACP_CAT_GENERAL', '', '');
|
||||
|
@ -661,19 +658,19 @@ INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting)
|
|||
|
||||
# REGISTERED/REGISTERED COPPA groups - common forum rights
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 4, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_chggrp', 'u_viewonline', 'u_chgname');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 4, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_edit', 'f_delete', 'f_vote', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 4, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_edit', 'f_delete', 'f_vote', 'f_votechg', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_report', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 4, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_edit', 'f_delete', 'f_vote', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 4, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_edit', 'f_delete', 'f_vote', 'f_votechg', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_report', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 5, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_chgcensors', 'u_chggrp', 'u_viewonline', 'u_chgname');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 5, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_edit', 'f_delete', 'f_vote', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 5, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_edit', 'f_delete', 'f_vote', 'f_votechg', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_report', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 5, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_edit', 'f_delete', 'f_vote', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_subscribe');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 5, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_', 'f_list', 'f_read', 'f_post', 'f_reply', 'f_edit', 'f_delete', 'f_vote', 'f_votechg', 'f_download', 'f_bbcode', 'f_smilies', 'f_img', 'f_flash', 'f_sigs', 'f_search', 'f_email', 'f_print', 'f_postcount', 'f_report', 'f_subscribe');
|
||||
|
||||
# GUESTS, INACTIVE, INACTIVE_COPPA group - basic rights
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 1, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 1, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 2, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 3, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 3, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_quote', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 1, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 1, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 2, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 3, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 3, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read', 'f_post', 'f_reply', 'f_bbcode', 'f_search', 'f_print');
|
||||
|
||||
# BOTS - read/view only
|
||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 8, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_list', 'f_read');
|
||||
|
|
|
@ -613,6 +613,7 @@ CREATE TABLE phpbb_sessions (
|
|||
session_browser varchar(150) NOT NULL DEFAULT '',
|
||||
session_page varchar(200) NOT NULL DEFAULT '',
|
||||
session_viewonline tinyint(1) NOT NULL DEFAULT '1',
|
||||
session_autologin tinyint(1) NOT NULL DEFAULT '0',
|
||||
session_admin tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (session_id)
|
||||
);
|
||||
|
|
|
@ -122,7 +122,6 @@ $lang = array_merge($lang, array(
|
|||
'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'),
|
||||
'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
|
||||
'acl_f_reply' => array('lang' => 'Can reply to posts', 'cat' => 'post'),
|
||||
'acl_f_quote' => array('lang' => 'Can quote posts', 'cat' => 'post'),
|
||||
'acl_f_icons' => array('lang' => 'Can use post icons', 'cat' => 'post'),
|
||||
|
||||
'acl_f_poll' => array('lang' => 'Can create polls', 'cat' => 'polls'),
|
||||
|
@ -141,7 +140,6 @@ $lang = array_merge($lang, array(
|
|||
'acl_f_delete' => array('lang' => 'Can delete own posts', 'cat' => 'actions'),
|
||||
'acl_f_user_lock' => array('lang' => 'Can lock own topics', 'cat' => 'actions'),
|
||||
'acl_f_bump' => array('lang' => 'Can bump topics', 'cat' => 'actions'),
|
||||
'acl_f_rate' => array('lang' => 'Can rate posts', 'cat' => 'actions'),
|
||||
'acl_f_report' => array('lang' => 'Can report posts', 'cat' => 'actions'),
|
||||
'acl_f_subscribe' => array('lang' => 'Can subscribe forum', 'cat' => 'actions'),
|
||||
'acl_f_print' => array('lang' => 'Can print topics', 'cat' => 'actions'),
|
||||
|
|
|
@ -71,6 +71,7 @@ $lang = array_merge($lang, array(
|
|||
'AVATAR_PHP_SIZE_NA' => 'The avatar is too huge in filesize.<br />Could not determine the maximum size defined by PHP in php.ini.',
|
||||
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar is too huge in filesize, maximum upload size is %d MB.<br />Please note this is set in php.ini and cannot be overriden.',
|
||||
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
|
||||
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
|
||||
'AVATAR_WRONG_FILESIZE' => 'The avatar must be between 0 and %1d %2s.',
|
||||
'AVATAR_WRONG_SIZE' => 'The avatar must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high.',
|
||||
|
||||
|
@ -251,6 +252,8 @@ $lang = array_merge($lang, array(
|
|||
'LOG_USER_WARNING' => '<b>Added user warning</b><br />»%s',
|
||||
'LOG_USER_WARNING_BODY' => '<b>The following warning was issued to this user</b><br />»%s',
|
||||
|
||||
'LOG_IP_BROWSER_CHECK' => '<b>Session IP/Browser check failed</b><br />»User IP "<i>%s</i>" checked against session IP "<i>%s</i>" and user browser string "<i>%s</i>" checked against session browser string "<i>%s</i>".',
|
||||
|
||||
'MARK' => 'Mark',
|
||||
'MARK_ALL' => 'Mark all',
|
||||
'MARK_FORUMS_READ' => 'Mark Forums Read',
|
||||
|
@ -260,6 +263,7 @@ $lang = array_merge($lang, array(
|
|||
'MEMBERLIST_EXPLAIN' => 'View complete list of members',
|
||||
'MERGE_TOPIC' => 'Merge Topic',
|
||||
'MESSAGE' => 'Message',
|
||||
'MESSAGES' => 'Messages',
|
||||
'MESSAGE_BODY' => 'Message body',
|
||||
'MINUTES' => 'Minutes',
|
||||
'MODERATE' => 'Moderate',
|
||||
|
@ -469,6 +473,7 @@ $lang = array_merge($lang, array(
|
|||
'USERGROUPS' => 'Groups',
|
||||
'USERNAME' => 'Username',
|
||||
'USERNAMES' => 'Usernames',
|
||||
'USER_CANNOT_READ' => 'You cannot read posts in this forum',
|
||||
'USER_POST' => '%d Post',
|
||||
'USER_POSTS' => '%d Posts',
|
||||
'USERS' => 'Users',
|
||||
|
|
|
@ -181,10 +181,10 @@ $lang = array_merge($lang, array(
|
|||
'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you whish this topic to be displayed',
|
||||
'UPDATE_COMMENT' => 'Update comment',
|
||||
'URL_INVALID' => 'The URL you specified is invalid.',
|
||||
'URL_NOT_FOUND' => 'The file specified could not be found.',
|
||||
'USER_CANNOT_BUMP' => 'You cannot bump topics in this forum',
|
||||
'USER_CANNOT_DELETE' => 'You cannot delete posts in this forum',
|
||||
'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum',
|
||||
'USER_CANNOT_QUOTE' => 'You cannot quote posts in this forum',
|
||||
'USER_CANNOT_REPLY' => 'You cannot reply in this forum',
|
||||
'USERNAME_DISALLOWED' => 'The username you entered has been banned.',
|
||||
'USERNAME_TAKEN' => 'The username you entered is already in use, please select an alternative.',
|
||||
|
|
|
@ -126,6 +126,7 @@ $lang = array_merge($lang, array(
|
|||
'DEFAULT_NOTIFY' => 'Notify me upon replies by default',
|
||||
'DEFAULT_SMILIES' => 'Enable smilies by default',
|
||||
'DEFINED_RULES' => 'Defined Rules',
|
||||
'DELETED_TOPIC' => 'Topic has been removed',
|
||||
'DELETE_ALL' => 'Delete all',
|
||||
'DELETE_ATTACHMENT' => 'Delete Attachment',
|
||||
'DELETE_ATTACHMENTS' => 'Delete Attachments',
|
||||
|
@ -223,6 +224,7 @@ $lang = array_merge($lang, array(
|
|||
'MESSAGES_DELETED' => 'Messages successfully deleted',
|
||||
'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to',
|
||||
'MOVE_DOWN' => 'Move down',
|
||||
'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s',
|
||||
'MOVE_PM_ERROR' => 'An error occurred while moving the messages to the new folder, only %1d from %2d messages were moved.',
|
||||
'MOVE_TO_FOLDER' => 'Move to Folder',
|
||||
'MOVE_UP' => 'Move up',
|
||||
|
|
|
@ -33,7 +33,8 @@ $id = request_var('i', '');
|
|||
|
||||
if (isset($_REQUEST['mode']) && is_array($_REQUEST['mode']))
|
||||
{
|
||||
list($mode, ) = each(request_var('mode', array('')));
|
||||
$mode = request_var('mode', array(''));
|
||||
list($mode, ) = each($mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -446,8 +446,8 @@ switch ($mode)
|
|||
trigger_error('FLOOD_EMAIL_LIMIT');
|
||||
}
|
||||
|
||||
$name = strip_tags(request_var('name', ''));
|
||||
$email = strip_tags(request_var('email', ''));
|
||||
$name = request_var('name', '');
|
||||
$email = request_var('email', '');
|
||||
$email_lang = request_var('lang', '');
|
||||
$subject = request_var('subject', '');
|
||||
$message = request_var('message', '');
|
||||
|
|
|
@ -285,17 +285,29 @@ else
|
|||
$notify_set = 0;
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('f_' . $mode, $forum_id) && $forum_type == FORUM_POST)
|
||||
// Check permissions
|
||||
if ($forum_type != FORUM_POST && !$auth->acl_get('f_read', $forum_id))
|
||||
{
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
trigger_error('USER_CANNOT_' . strtoupper($mode));
|
||||
trigger_error('USER_CANNOT_READ');
|
||||
}
|
||||
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_POST']);
|
||||
}
|
||||
|
||||
$check_auth = ($mode == 'quote') ? 'reply' : $mode;
|
||||
|
||||
if (!$auth->acl_get('f_' . $check_auth, $forum_id) && $forum_type == FORUM_POST)
|
||||
{
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
trigger_error('USER_CANNOT_' . strtoupper($check_auth));
|
||||
}
|
||||
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]);
|
||||
}
|
||||
|
||||
|
||||
// Forum/Topic locked?
|
||||
if (($forum_status == ITEM_LOCKED || $topic_status == ITEM_LOCKED) && !$auth->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
|
@ -402,7 +414,7 @@ $bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_i
|
|||
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id));
|
||||
$img_status = ($auth->acl_get('f_img', $forum_id));
|
||||
$flash_status = ($auth->acl_get('f_flash', $forum_id));
|
||||
$quote_status = ($auth->acl_get('f_quote', $forum_id));
|
||||
$quote_status = ($auth->acl_get('f_reply', $forum_id));
|
||||
|
||||
// Bump Topic
|
||||
if ($mode == 'bump' && ($bump_time = bump_topic_allowed($forum_id, $topic_bumped, $topic_last_post_time, $topic_poster, $topic_last_poster_id)))
|
||||
|
@ -517,7 +529,7 @@ if ($submit || $preview || $refresh)
|
|||
$message_parser->message = request_var('message', '', true);
|
||||
|
||||
$username = (isset($_POST['username'])) ? request_var('username', '') : $username;
|
||||
$post_edit_reason = (isset($_POST['edit_reason']) && !empty($_POST['edit_reason']) && $mode == 'edit' && $user->data['user_id'] != $poster_id) ? request_var('edit_reason', '') : '';
|
||||
$post_edit_reason = (isset($_POST['edit_reason']) && !empty($_POST['edit_reason']) && $mode == 'edit' && $user->data['user_id'] != $poster_id) ? request_var('edit_reason', '', true) : '';
|
||||
|
||||
$topic_type = (isset($_POST['topic_type'])) ? (int) $_POST['topic_type'] : (($mode != 'post') ? $topic_type : POST_NORMAL);
|
||||
$topic_time_limit = (isset($_POST['topic_time_limit'])) ? (int) $_POST['topic_time_limit'] : (($mode != 'post') ? $topic_time_limit : 0);
|
||||
|
@ -586,9 +598,9 @@ if ($submit || $preview || $refresh)
|
|||
}
|
||||
else
|
||||
{
|
||||
$poll_title = request_var('poll_title', '');
|
||||
$poll_title = request_var('poll_title', '', true);
|
||||
$poll_length = request_var('poll_length', 0);
|
||||
$poll_option_text = request_var('poll_option_text', '');
|
||||
$poll_option_text = request_var('poll_option_text', '', true);
|
||||
$poll_max_options = request_var('poll_max_options', 1);
|
||||
$poll_vote_change = ($auth->acl_get('f_votechg', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ $user->setup('mcp');
|
|||
|
||||
$post_id = request_var('p', 0);
|
||||
$reason_id = request_var('reason_id', 0);
|
||||
$report_text = request_var('report_text', '');
|
||||
$report_text = request_var('report_text', '', true);
|
||||
$user_notify = (isset($_POST['notify']) && $user->data['is_registered']) ? true : false;
|
||||
|
||||
if (!$post_id)
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post"><table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<a name="top"></a>
|
||||
<div id="pagecontent">
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF U_MCP -->
|
||||
<div id="pageheader">
|
||||
<p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form action="{S_LOGIN_ACTION}" method="post">
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
<form name="login" method="post" action="{S_LOGIN_ACTION}"><table class="tablebg" width="100%" cellspacing="1" align="center">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
<!-- $Id$ -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF U_VIEW_FORUM_LOGS --><a href="{U_VIEW_FORUM_LOGS}">{L_VIEW_FORUM_LOGS}</a><!-- ENDIF -->
|
||||
|
||||
<form method="post" name="mcp" action="{S_MCP_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF S_SHOW_UNAPPROVED -->
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<script language="javascript" type="text/javascript" defer="defer">
|
||||
<!--
|
||||
function marklist(form_name, status)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<!-- Note: no longer in use... -->
|
||||
|
||||
<form name="jumpbox" method="post" action="{S_JUMPBOX_ACTION}">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form method="post" name="mcp" action="{U_POST_ACTION}">
|
||||
|
||||
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post"><table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<form method="post" name="mcp" action="{U_POST_ACTION}">
|
||||
<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form method="post" name="mcp" action="{U_POST_ACTION}">
|
||||
|
||||
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF S_MCP_REPORT -->
|
||||
<form method="post" name="mcp_report" action="{U_CLOSE_ACTION}"><table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form name="mcp" method="post" action="{S_MCP_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
|
||||
<!-- IF S_CAN_SPLIT -->
|
||||
<tr>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<form method="post" name="mcp" action="{U_POST_ACTION}">
|
||||
<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<form method="post" name="mcp" action="{U_POST_ACTION}">
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
|
||||
<tr>
|
||||
<th colspan="2" height="28" align="center">{L_POST}</th>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- INCLUDE mcp_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
|
||||
<tr>
|
||||
<th colspan="2" height="28" align="center">{USERNAME}</th>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF S_SEARCH_USER --><!-- INCLUDE memberlist_search.html --><!-- ENDIF -->
|
||||
|
||||
<!-- IF S_SHOW_GROUP --><!-- INCLUDE memberlist_group.html --><!-- ENDIF -->
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form method="post" action="{S_MODE_ACTION}">
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
<form method="post" action="{S_PROFILE_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<th>{MESSAGE_TITLE}</th>
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
"phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
|
||||
forums may be affected.
|
||||
|
||||
The phpBB Group : 2003
|
||||
The phpBB Group : 2006
|
||||
// -->
|
||||
|
||||
<div id="wrapfooter">
|
||||
<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
|
||||
<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> © 2002, 2006 phpBB Group<br />
|
||||
<span class="copyright">Powered by <a href="http://www.phpbb.com/" target="_blank">phpBB</a> © 2002, 2006 phpBB Group<br />
|
||||
{TRANSLATION_INFO}<!-- IF DEBUG_OUTPUT --><br />[ {DEBUG_OUTPUT} ]<!-- ENDIF --></span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -14,14 +14,6 @@
|
|||
{META}
|
||||
<title>{SITENAME} • {PAGE_TITLE}</title>
|
||||
|
||||
<!--
|
||||
phpBB style name: subsilver
|
||||
Based on style: subsilver (the default phpBB 2 style)
|
||||
Original author: subBlue ( http://www.subBlue.com/ )
|
||||
Modified by: psoTFX ( http://www.phpbb.com )
|
||||
Last update: $Id$
|
||||
-->
|
||||
|
||||
<!-- IF T_STYLESHEET_LINK -->
|
||||
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
|
||||
<!-- ELSE -->
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
function popup_progress_bar()
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<tr>
|
||||
<th colspan="2" height="28">{L_ADD_POLL}</th>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<th>{L_PREVIEW}</th>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<th align="center">{L_POST_REVIEW}</th>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<!-- INCLUDE simple_header.html -->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form method="post" id="report" action="{S_REPORT_ACTION}">
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<div id="pagecontent">
|
||||
|
||||
<form method="get" action="{S_SEARCH_ACTION}"><table class="tablebg" width="100%" cellspacing="1">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<form method="post" action="{S_SEARCH_ACTION}">
|
||||
|
||||
<table width="100%" cellspacing="1">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// -->
|
||||
|
||||
<div id="wrapfooter">
|
||||
<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> © 2002, 2006 phpBB Group</span>
|
||||
<span class="copyright">Powered by <a href="http://www.phpbb.com/" target="_blank">phpBB</a> © 2002, 2006 phpBB Group</span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- IF S_SHOW_COPPA or S_REGISTRATION -->
|
||||
|
||||
<form method="post" action="{S_UCP_ACTION}">
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue