aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/acp/acp_modules.php58
-rw-r--r--phpBB/includes/acp/acp_permissions.php4
-rw-r--r--phpBB/includes/acp/acp_profile.php12
-rw-r--r--phpBB/includes/acp/acp_prune.php4
-rw-r--r--phpBB/includes/acp/acp_users.php4
-rw-r--r--phpBB/includes/db/dbal.php6
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_module.php20
-rw-r--r--phpBB/includes/functions_posting.php6
-rw-r--r--phpBB/includes/functions_privmsgs.php70
-rw-r--r--phpBB/includes/functions_profile_fields.php4
-rw-r--r--phpBB/includes/mcp/mcp_main.php2
-rwxr-xr-xphpBB/includes/mcp/mcp_notes.php2
-rw-r--r--phpBB/includes/mcp/mcp_post.php2
-rwxr-xr-xphpBB/includes/mcp/mcp_warn.php2
-rw-r--r--phpBB/includes/message_parser.php10
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php8
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_remind.php2
-rw-r--r--phpBB/includes/ucp/ucp_resend.php2
24 files changed, 109 insertions, 123 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 5bcf3c894a..4c73f5ffa0 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1102,7 +1102,7 @@ class acp_attachments
'in_message' => 0,
'physical_filename' => $filedata['physical_filename'],
'real_filename' => $filedata['real_filename'],
- 'comment' => $message_parser->filename_data['filecomment'],
+ 'attach_comment' => $message_parser->filename_data['filecomment'],
'extension' => $filedata['extension'],
'mimetype' => $filedata['mimetype'],
'filesize' => $filedata['filesize'],
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 1d1ef640fe..824c266780 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -144,16 +144,16 @@ class acp_modules
break;
}
- list($module_name, $module_mode) = explode('::', $quick_install);
+ list($module_basename, $module_mode) = explode('::', $quick_install);
// Check if module name and mode exist...
- $fileinfo = $this->get_module_infos($module_name);
- $fileinfo = $fileinfo[$module_name];
+ $fileinfo = $this->get_module_infos($module_basename);
+ $fileinfo = $fileinfo[$module_basename];
if (isset($fileinfo['modes'][$module_mode]))
{
$module_data = array(
- 'module_name' => $module_name,
+ 'module_basename' => $module_basename,
'module_enabled' => 0,
'module_display' => (isset($fileinfo['modes'][$module_mode]['display'])) ? $fileinfo['modes'][$module_mode]['display'] : 1,
'parent_id' => $parent_id,
@@ -202,7 +202,7 @@ class acp_modules
if ($action == 'add')
{
$module_row = array(
- 'module_name' => '',
+ 'module_basename' => '',
'module_enabled' => 0,
'module_display' => 1,
'parent_id' => 0,
@@ -214,7 +214,7 @@ class acp_modules
$module_data = array();
- $module_data['module_name'] = request_var('module_name', (string) $module_row['module_name']);
+ $module_data['module_basename'] = request_var('module_basename', (string) $module_row['module_basename']);
$module_data['module_enabled'] = request_var('module_enabled', (int) $module_row['module_enabled']);
$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']);
@@ -235,7 +235,7 @@ class acp_modules
if ($module_type == 'category')
{
- $module_data['module_name'] = $module_data['module_mode'] = $module_data['module_auth'] = '';
+ $module_data['module_basename'] = $module_data['module_mode'] = $module_data['module_auth'] = '';
$module_data['module_display'] = 1;
}
@@ -245,10 +245,10 @@ class acp_modules
}
// Adjust auth row
- if ($module_data['module_name'] && $module_data['module_mode'])
+ if ($module_data['module_basename'] && $module_data['module_mode'])
{
- $fileinfo = $this->get_module_infos($module_data['module_name']);
- $module_data['module_auth'] = $fileinfo[$module_data['module_name']]['modes'][$module_data['module_mode']]['auth'];
+ $fileinfo = $this->get_module_infos($module_data['module_basename']);
+ $module_data['module_auth'] = $fileinfo[$module_data['module_basename']]['modes'][$module_data['module_mode']]['auth'];
}
$errors = $this->update_module_data($module_data);
@@ -262,7 +262,7 @@ class acp_modules
}
// Category/not category?
- $is_cat = (!$module_data['module_name']) ? true : false;
+ $is_cat = (!$module_data['module_basename']) ? true : false;
// Get module informations
$module_infos = $this->get_module_infos();
@@ -271,20 +271,20 @@ class acp_modules
$s_name_options = $s_mode_options = '';
foreach ($module_infos as $option => $values)
{
- if (!$module_data['module_name'])
+ if (!$module_data['module_basename'])
{
- $module_data['module_name'] = $option;
+ $module_data['module_basename'] = $option;
}
// Name options
- $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_name']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
+ $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
$template->assign_block_vars('m_names', array('NAME' => $option));
// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
{
- if ($option == $module_data['module_name'])
+ if ($option == $module_data['module_basename'])
{
$s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>';
}
@@ -387,7 +387,7 @@ class acp_modules
}
else
{
- $module_image = (!$row['module_name'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" width="46" height="25" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" width="46" height="25" alt="' . $user->lang['MODULE'] . '" />';
+ $module_image = (!$row['module_basename'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" width="46" height="25" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" width="46" height="25" alt="' . $user->lang['MODULE'] . '" />';
}
$url = $this->u_action . '&amp;parent_id=' . $parent_id . '&amp;m=' . $row['module_id'];
@@ -551,22 +551,10 @@ class acp_modules
{
global $db, $user, $auth, $config;
- switch (SQL_LAYER)
- {
- case 'firebird':
- $sql = 'SELECT module_id, module_enabled, "module_name", parent_id, module_langname, left_id, right_id, module_auth
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- ORDER BY left_id ASC";
- break;
-
- default:
- $sql = 'SELECT module_id, module_enabled, module_name, parent_id, module_langname, left_id, right_id, module_auth
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
- ORDER BY left_id ASC";
- break;
- }
+ $sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ ORDER BY left_id ASC";
$result = $db->sql_query($sql);
$right = $iteration = 0;
@@ -607,13 +595,13 @@ class acp_modules
}
// empty category
- if (!$row['module_name'] && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
+ if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
{
continue;
}
// ignore non-category?
- if ($row['module_name'] && $ignore_noncat)
+ if ($row['module_basename'] && $ignore_noncat)
{
continue;
}
@@ -777,7 +765,7 @@ class acp_modules
{
$row = $this->get_module_row($module_data['module_id']);
- if ($module_data['module_name'] && !$row['module_name'])
+ if ($module_data['module_basename'] && !$row['module_basename'])
{
// we're turning a category into a module
$branch = $this->get_module_branch($module_data['module_id'], 'children', 'descending', false);
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 3619075fc8..be88016f74 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -59,8 +59,8 @@ class acp_permissions
$subforum_id = request_var('subforum_id', 0);
$forum_id = request_var('forum_id', array(0));
- $username = request_var('username', array(''), true);
- $usernames = request_var('usernames', '', true);
+ $username = request_var('username', array(''));
+ $usernames = request_var('usernames', '');
$user_id = request_var('user_id', array(0));
$group_id = request_var('group_id', array(0));
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 28f547189d..42e70eddd8 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -304,7 +304,7 @@ class acp_profile
$lang_options = array();
while ($row = $db->sql_fetchrow($result))
{
- $lang_options[$row['option_id']] = $row['value'];
+ $lang_options[$row['option_id']] = $row['lang_value'];
}
$db->sql_freeresult($result);
@@ -486,7 +486,7 @@ class acp_profile
$l_lang_options = array();
while ($row = $db->sql_fetchrow($result))
{
- $l_lang_options[$row['lang_id']][$row['option_id']] = $row['value'];
+ $l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
}
$db->sql_freeresult($result);
@@ -1203,8 +1203,8 @@ class acp_profile
}
$sql_ary = array(
- 'lang_name' => $cp->vars['lang_name'],
- 'lang_explain' => $cp->vars['lang_explain'],
+ 'lang_name' => $cp->vars['lang_name'],
+ 'lang_explain' => $cp->vars['lang_explain'],
'lang_default_value' => $cp->vars['lang_default_value']
);
@@ -1277,7 +1277,7 @@ class acp_profile
{
$sql_ary = array(
'field_type' => (int) $field_type,
- 'value' => $value
+ 'lang_value' => $value
);
if ($action == 'create')
@@ -1332,7 +1332,7 @@ class acp_profile
'lang_id' => (int) $lang_id,
'option_id' => (int) $option_id,
'field_type' => (int) $field_type,
- 'value' => $value
+ 'lang_value' => $value
);
}
}
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 56bd735de0..3fa99b6727 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -214,7 +214,7 @@ class acp_prune
}
else
{
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$email = request_var('email', '');
$joined_select = request_var('joined_select', 'lt');
@@ -317,7 +317,7 @@ class acp_prune
'prune' => 1,
'users' => request_var('users', ''),
- 'username' => request_var('username', '', true),
+ 'username' => request_var('username', ''),
'email' => request_var('email', ''),
'joined_select' => request_var('joined_select', ''),
'joined' => request_var('joined', ''),
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index d89cf53d78..5c75c895ac 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -28,7 +28,7 @@ class acp_users
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
$error = array();
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$user_id = request_var('u', 0);
$action = request_var('action', '');
@@ -1711,7 +1711,7 @@ class acp_users
$template->assign_block_vars('attach', array(
'REAL_FILENAME' => $row['real_filename'],
- 'COMMENT' => nl2br($row['comment']),
+ 'COMMENT' => nl2br($row['attach_comment']),
'EXTENSION' => $row['extension'],
'SIZE' => ($row['filesize'] >= 1048576) ? ($row['filesize'] >> 20) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? ($row['filesize'] >> 10) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']),
'DOWNLOAD_COUNT' => $row['download_count'],
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index e8cc69a553..d7a274643a 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -177,8 +177,6 @@ class dbal
* Idea for this from Ikonboard
* Possible query values: INSERT, INSERT_SELECT, MULTI_INSERT, UPDATE, SELECT
*
- * If a key is 'module_name' and firebird used it gets adjusted to '"module_name"'
- * on INSERT, INSERT_SELECT, UPDATE and SELECT
*/
function sql_build_array($query, $assoc_ary = false)
{
@@ -193,7 +191,7 @@ class dbal
{
foreach ($assoc_ary as $key => $var)
{
- $fields[] = ($key == 'module_name' && SQL_LAYER == 'firebird') ? '"' . $key . '"' : $key;
+ $fields[] = $key;
if (is_null($var))
{
@@ -247,8 +245,6 @@ class dbal
$values = array();
foreach ($assoc_ary as $key => $var)
{
- $key = ($key == 'module_name' && SQL_LAYER == 'firebird') ? '"' . $key . '"' : $key;
-
if (is_null($var))
{
$values[] = "$key = NULL";
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 0da1bf243d..13558acccf 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1526,7 +1526,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
if (isset($_POST['login']))
{
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$password = request_var('password', '');
$autologin = (!empty($_POST['autologin'])) ? true : false;
$viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 515246461b..b343d69c05 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -761,7 +761,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
- $comment = str_replace("\n", '<br />', censor_text($attachment['comment']));
+ $comment = str_replace("\n", '<br />', censor_text($attachment['attach_comment']));
$block_array += array(
'UPLOAD_ICON' => $upload_icon,
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 3eaf4e86c0..9541c9f4cf 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -86,7 +86,7 @@ class p_master
}
// Category with no members, ignore
- if (!$row['module_name'] && ($row['left_id'] + 1 == $row['right_id']))
+ if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id']))
{
unset($this->module_cache['modules'][$key]);
continue;
@@ -135,7 +135,7 @@ class p_master
}
// Category with no members on their way down (we have to check every level)
- if (!$row['module_name'])
+ if (!$row['module_basename'])
{
$empty_category = true;
@@ -145,7 +145,7 @@ class p_master
if ($temp_row['left_id'] > $row['left_id'] && $temp_row['left_id'] < $row['right_id'])
{
// Module there
- if ($temp_row['module_name'] && $temp_row['module_enabled'])
+ if ($temp_row['module_basename'] && $temp_row['module_enabled'])
{
$empty_category = false;
break;
@@ -168,15 +168,15 @@ class p_master
// We need to prefix the functions to not create a naming conflict
// Function for building 'url_extra'
- $url_func = '_module_' . $row['module_name'] . '_url';
+ $url_func = '_module_' . $row['module_basename'] . '_url';
// Function for building the language name
- $lang_func = '_module_' . $row['module_name'] . '_lang';
+ $lang_func = '_module_' . $row['module_basename'] . '_lang';
// Custom function for calling parameters on module init (for example assigning template variables)
- $custom_func = '_module_' . $row['module_name'];
+ $custom_func = '_module_' . $row['module_basename'];
- $names[$row['module_name'] . '_' . $row['module_mode']][] = true;
+ $names[$row['module_basename'] . '_' . $row['module_mode']][] = true;
$module_row = array(
'depth' => $depth,
@@ -185,15 +185,15 @@ class p_master
'parent' => (int) $row['parent_id'],
'cat' => ($row['right_id'] > $row['left_id'] + 1) ? true : false,
- 'is_duplicate' => ($row['module_name'] && sizeof($names[$row['module_name'] . '_' . $row['module_mode']]) > 1) ? true : false,
+ 'is_duplicate' => ($row['module_basename'] && sizeof($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false,
- 'name' => (string) $row['module_name'],
+ 'name' => (string) $row['module_basename'],
'mode' => (string) $row['module_mode'],
'display' => (int) $row['module_display'],
'url_extra' => (function_exists($url_func)) ? $url_func($row['module_mode']) : '',
- 'lang' => ($row['module_name'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']),
+ 'lang' => ($row['module_basename'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']),
'langname' => $row['module_langname'],
'left' => $row['left_id'],
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 9096586b33..8f706905c8 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -676,7 +676,7 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
$template->assign_block_vars('attach_row', array(
'FILENAME' => basename($attach_row['real_filename']),
'ATTACH_FILENAME' => basename($attach_row['physical_filename']),
- 'FILE_COMMENT' => $attach_row['comment'],
+ 'FILE_COMMENT' => $attach_row['attach_comment'],
'ATTACH_ID' => $attach_row['attach_id'],
'ASSOC_INDEX' => $count,
@@ -1705,7 +1705,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
{
// update entry in db if attachment already stored in db and filespace
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
- SET comment = '" . $db->sql_escape($attach_row['comment']) . "'
+ SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "'
WHERE attach_id = " . (int) $attach_row['attach_id'];
$db->sql_query($sql);
}
@@ -1724,7 +1724,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'poster_id' => $poster_id,
'physical_filename' => basename($attach_row['physical_filename']),
'real_filename' => basename($attach_row['real_filename']),
- 'comment' => $attach_row['comment'],
+ 'attach_comment' => $attach_row['attach_comment'],
'extension' => $attach_row['extension'],
'mimetype' => $attach_row['mimetype'],
'filesize' => $attach_row['filesize'],
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 86c573e7c6..238ac76cb5 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -86,8 +86,8 @@ $global_privmsgs_rules = array(
),
CHECK_STATUS => array(
- RULE_ANSWERED => array('check0' => 'replied', 'function' => '{CHECK0} == 1'),
- RULE_FORWARDED => array('check0' => 'forwarded', 'function' => '{CHECK0} == 1'),
+ RULE_ANSWERED => array('check0' => 'pm_replied', 'function' => '{CHECK0} == 1'),
+ RULE_FORWARDED => array('check0' => 'pm_forwarded', 'function' => '{CHECK0} == 1'),
),
CHECK_TO => array(
@@ -121,7 +121,7 @@ function get_folder($user_id, $folder_id = false)
$folder = array();
// Get folder informations
- $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(unread) as num_unread
+ $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(pm_unread) as num_unread
FROM ' . PRIVMSGS_TO_TABLE . "
WHERE user_id = $user_id
AND folder_id <> " . PRIVMSGS_NO_BOX . '
@@ -280,7 +280,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
case ACTION_MARK_AS_READ:
case ACTION_MARK_AS_IMPORTANT:
case ACTION_DELETE_MESSAGE:
- return array('action' => $rule_row['rule_action'], 'unread' => $message_row['unread'], 'marked' => $message_row['marked']);
+ return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']);
break;
default:
@@ -454,7 +454,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
break;
case ACTION_MARK_AS_READ:
- if ($rule_ary['unread'])
+ if ($rule_ary['pm_unread'])
{
$unread_ids[] = $msg_id;
}
@@ -466,7 +466,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
break;
case ACTION_MARK_AS_IMPORTANT:
- if (!$rule_ary['marked'])
+ if (!$rule_ary['pm_marked'])
{
$important_ids[] = $msg_id;
}
@@ -495,7 +495,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
if (sizeof($unread_ids))
{
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
- SET unread = 0
+ SET pm_unread = 0
WHERE msg_id IN (' . implode(', ', $unread_ids) . ")
AND user_id = $user_id
AND folder_id = " . PRIVMSGS_NO_BOX;
@@ -506,7 +506,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
if (sizeof($important_ids))
{
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
- SET marked = !marked
+ SET pm_marked = !pm_marked
WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
AND user_id = $user_id
AND msg_id IN (" . implode(', ', $important_ids) . ')';
@@ -520,7 +520,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
// Determine Full Folder Action - we need the move to folder id later eventually
$full_folder_action = ($user->data['user_full_folder'] == FULL_FOLDER_NONE) ? ($config['full_folder_action'] - (FULL_FOLDER_NONE*(-1))) : $user->data['user_full_folder'];
-
+
$sql = 'SELECT folder_id, pm_count
FROM ' . PRIVMSGS_FOLDER_TABLE . '
WHERE folder_id IN (' . implode(', ', array_keys($move_into_folder)) . (($full_folder_action >= 0) ? ', ' . $full_folder_action : '') . ")
@@ -586,6 +586,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
$delete_ids[] = $row['msg_id'];
}
$db->sql_freeresult($result);
+
delete_pm($user_id, $delete_ids, $dest_folder);
}
}
@@ -594,6 +595,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
if ($full_folder_action == FULL_FOLDER_HOLD)
{
$num_not_moved += sizeof($msg_ary);
+
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
SET folder_id = ' . PRIVMSGS_HOLD_BOX . '
WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
@@ -604,10 +606,10 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
else
{
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
- SET folder_id = $dest_folder, new = 0
+ SET folder_id = $dest_folder, pm_new = 0
WHERE folder_id = " . PRIVMSGS_NO_BOX . "
AND user_id = $user_id
- AND new = 1
+ AND pm_new = 1
AND msg_id IN (" . implode(', ', $msg_ary) . ')';
$db->sql_query($sql);
@@ -761,7 +763,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
global $db;
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
- SET unread = 0
+ SET pm_unread = 0
WHERE msg_id = $msg_id
AND user_id = $user_id
AND folder_id = $folder_id";
@@ -794,7 +796,7 @@ function handle_mark_actions($user_id, $mark_action)
case 'mark_important':
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
- SET marked = !marked
+ SET pm_marked = !pm_marked
WHERE folder_id = $cur_folder_id
AND user_id = $user_id
AND msg_id IN (" . implode(', ', $msg_ids) . ')';
@@ -865,7 +867,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
}
// Get PM Informations for later deleting
- $sql = 'SELECT msg_id, unread, new
+ $sql = 'SELECT msg_id, pm_unread, pm_new
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE msg_id IN (' . implode(', ', array_map('intval', $msg_ids)) . ")
AND folder_id = $folder_id
@@ -876,8 +878,8 @@ function delete_pm($user_id, $msg_ids, $folder_id)
$num_unread = $num_new = $num_deleted = 0;
while ($row = $db->sql_fetchrow($result))
{
- $num_unread += (int) $row['unread'];
- $num_new += (int) $row['new'];
+ $num_unread += (int) $row['pm_unread'];
+ $num_new += (int) $row['pm_new'];
$delete_rows[$row['msg_id']] = 1;
}
@@ -907,7 +909,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
// Set delete flag for those intended to receive the PM
// We do not remove the message actually, to retain some basic informations (sent time for example)
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
- SET deleted = 1
+ SET pm_deleted = 1
WHERE msg_id IN (' . implode(', ', array_keys($delete_rows)) . ')';
$db->sql_query($sql);
@@ -1250,7 +1252,7 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
// Set message_replied switch for this user
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
- SET replied = 1
+ SET pm_replied = 1
WHERE user_id = ' . $data['from_user_id'] . '
AND msg_id = ' . $data['reply_from_msg_id'];
@@ -1328,13 +1330,13 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
foreach ($recipients as $user_id => $type)
{
$sql_ary[] = array(
- 'msg_id' => (int) $data['msg_id'],
- 'user_id' => (int) $user_id,
- 'author_id' => (int) $data['from_user_id'],
- 'folder_id' => PRIVMSGS_NO_BOX,
- 'new' => 1,
- 'unread' => 1,
- 'forwarded' => ($mode == 'forward') ? 1 : 0
+ 'msg_id' => (int) $data['msg_id'],
+ 'user_id' => (int) $user_id,
+ 'author_id' => (int) $data['from_user_id'],
+ 'folder_id' => PRIVMSGS_NO_BOX,
+ 'pm_new' => 1,
+ 'pm_unread' => 1,
+ 'pm_forwarded' => ($mode == 'forward') ? 1 : 0
);
}
@@ -1366,13 +1368,13 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
if ($put_in_outbox)
{
$db->sql_query('INSERT INTO ' . PRIVMSGS_TO_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'msg_id' => (int) $data['msg_id'],
- 'user_id' => (int) $data['from_user_id'],
- 'author_id' => (int) $data['from_user_id'],
- 'folder_id' => PRIVMSGS_OUTBOX,
- 'new' => 0,
- 'unread' => 0,
- 'forwarded' => ($mode == 'forward') ? 1 : 0))
+ 'msg_id' => (int) $data['msg_id'],
+ 'user_id' => (int) $data['from_user_id'],
+ 'author_id' => (int) $data['from_user_id'],
+ 'folder_id' => PRIVMSGS_OUTBOX,
+ 'pm_new' => 0,
+ 'pm_unread' => 0,
+ 'pm_forwarded' => ($mode == 'forward') ? 1 : 0))
);
}
@@ -1401,7 +1403,7 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
{
// update entry in db if attachment already stored in db and filespace
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
- SET comment = '" . $db->sql_escape($attach_row['comment']) . "'
+ SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "'
WHERE attach_id = " . (int) $attach_row['attach_id'];
$db->sql_query($sql);
}
@@ -1415,7 +1417,7 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
'poster_id' => $data['from_user_id'],
'physical_filename' => basename($attach_row['physical_filename']),
'real_filename' => basename($attach_row['real_filename']),
- 'comment' => $attach_row['comment'],
+ 'attach_comment' => $attach_row['attach_comment'],
'extension' => $attach_row['extension'],
'mimetype' => $attach_row['mimetype'],
'filesize' => $attach_row['filesize'],
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 9910d58e5b..0a77eb9d3d 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -230,7 +230,7 @@ class custom_profile
}
else
{
- $sql = 'SELECT option_id, value
+ $sql = 'SELECT option_id, lang_value
FROM ' . PROFILE_FIELDS_LANG_TABLE . "
WHERE field_id = $field_id
AND lang_id = $lang_id
@@ -240,7 +240,7 @@ class custom_profile
while ($row = $db->sql_fetchrow($result))
{
- $this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['value'];
+ $this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['lang_value'];
}
$db->sql_freeresult($result);
}
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 835c48f389..00237781eb 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -918,7 +918,7 @@ function mcp_fork_topic($topic_ids)
'physical_filename' => (string) basename($attach_row['physical_filename']),
'real_filename' => (string) basename($attach_row['real_filename']),
'download_count' => (int) $attach_row['download_count'],
- 'comment' => (string) $attach_row['comment'],
+ 'attach_comment' => (string) $attach_row['attach_comment'],
'extension' => (string) $attach_row['extension'],
'mimetype' => (string) $attach_row['mimetype'],
'filesize' => (int) $attach_row['filesize'],
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 9bca3a9c9a..03b81f1fe8 100755
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -68,7 +68,7 @@ class mcp_notes
global $template, $db, $user, $auth;
$user_id = request_var('u', 0);
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$start = request_var('start', 0);
$st = request_var('st', 0);
$sk = request_var('sk', 'b');
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 8346986e2a..b004cbeff1 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -59,7 +59,7 @@ function mcp_post_details($id, $mode, $action)
if ($action == 'chgposter')
{
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$sql_where = "username = '" . $db->sql_escape($username) . "'";
}
else
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 281b5d6410..a83fa30211 100755
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -309,7 +309,7 @@ function mcp_warn_user_view($id, $mode, $action)
global $template, $db, $user, $auth;
$user_id = request_var('u', 0);
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
$warning = request_var('warning', '', true);
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index b5090d3950..a44a11d566 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1148,7 +1148,7 @@ class parse_message extends bbcode_firstpass
{
$new_entry = array(
'physical_filename' => $filedata['physical_filename'],
- 'comment' => $this->filename_data['filecomment'],
+ 'attach_comment' => $this->filename_data['filecomment'],
'real_filename' => $filedata['real_filename'],
'extension' => $filedata['extension'],
'mimetype' => $filedata['mimetype'],
@@ -1218,7 +1218,7 @@ class parse_message extends bbcode_firstpass
$edit_comment = request_var('edit_comment', array(0 => ''));
$edit_comment = key($edit_comment);
- $this->attachment_data[$edit_comment]['comment'] = $actual_comment_list[$edit_comment];
+ $this->attachment_data[$edit_comment]['attach_comment'] = $actual_comment_list[$edit_comment];
}
if (($add_file || $preview) && $upload_file)
@@ -1232,7 +1232,7 @@ class parse_message extends bbcode_firstpass
{
$new_entry = array(
'physical_filename' => $filedata['physical_filename'],
- 'comment' => $this->filename_data['filecomment'],
+ 'attach_comment' => $this->filename_data['filecomment'],
'real_filename' => $filedata['real_filename'],
'extension' => $filedata['extension'],
'mimetype' => $filedata['mimetype'],
@@ -1308,7 +1308,7 @@ class parse_message extends bbcode_firstpass
{
$pos = $attach_ids[$row['attach_id']];
$this->attachment_data[$pos] = $row;
- set_var($this->attachment_data[$pos]['comment'], $_POST['attachment_data'][$pos]['comment'], 'string', true);
+ set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
unset($attach_ids[$row['attach_id']]);
}
@@ -1348,7 +1348,7 @@ class parse_message extends bbcode_firstpass
'thumbnail' => (file_exists($phpbb_root_path . $config['upload_path'] . '/thumb_' . $physical_filename)) ? 1 : 0,
);
- set_var($this->attachment_data[$pos]['comment'], $_POST['attachment_data'][$pos]['comment'], 'string', true);
+ set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
set_var($this->attachment_data[$pos]['real_filename'], $_POST['attachment_data'][$pos]['real_filename'], 'string', true);
set_var($this->attachment_data[$pos]['filetime'], $_POST['attachment_data'][$pos]['filetime'], 'int');
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index 08a2549646..1b2bd1d538 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -60,7 +60,7 @@ class ucp_attachments
// Select box eventually
$sort_key_text = array('a' => $user->lang['SORT_FILENAME'], 'b' => $user->lang['SORT_COMMENT'], 'c' => $user->lang['SORT_EXTENSION'], 'd' => $user->lang['SORT_SIZE'], 'e' => $user->lang['SORT_DOWNLOADS'], 'f' => $user->lang['SORT_POST_TIME'], 'g' => $user->lang['SORT_TOPIC_TITLE']);
- $sort_key_sql = array('a' => 'a.real_filename', 'b' => 'a.comment', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title');
+ $sort_key_sql = array('a' => 'a.real_filename', 'b' => 'a.attach_comment', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title');
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
@@ -114,7 +114,7 @@ class ucp_attachments
$template->assign_block_vars('attachrow', array(
'ROW_NUMBER' => $row_count + ($start + 1),
'FILENAME' => $row['real_filename'],
- 'COMMENT' => str_replace("\n", '<br />', $row['comment']),
+ 'COMMENT' => str_replace("\n", '<br />', $row['attach_comment']),
'EXTENSION' => $row['extension'],
'SIZE' => ($row['filesize'] >= 1048576) ? ($row['filesize'] >> 20) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? ($row['filesize'] >> 10) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']),
'DOWNLOAD_COUNT' => $row['download_count'],
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index 394004ccc4..5d1a4297ee 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -318,7 +318,7 @@ class ucp_pm
}
// Update unread status
- update_unread_status($message_row['unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id);
+ update_unread_status($message_row['pm_unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id);
}
$folder = get_folder($user->data['user_id'], $folder_id);
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 4498e39270..272b93af55 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -138,7 +138,7 @@ function compose_pm($id, $mode, $action)
trigger_error('NO_MESSAGE');
}
- $sql = 'SELECT msg_id, unread, new, author_id, folder_id
+ $sql = 'SELECT msg_id, pm_unread, pm_new, author_id, folder_id
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . "
AND msg_id = $msg_id";
@@ -311,7 +311,7 @@ function compose_pm($id, $mode, $action)
if ($message_attachment && !$submit && !$refresh && !$preview && $action == 'edit')
{
- $sql = 'SELECT attach_id, physical_filename, comment, real_filename, extension, mimetype, filesize, filetime, thumbnail
+ $sql = 'SELECT attach_id, physical_filename, attach_comment, real_filename, extension, mimetype, filesize, filetime, thumbnail
FROM ' . ATTACHMENTS_TABLE . "
WHERE post_msg_id = $msg_id
AND in_message = 1
@@ -868,8 +868,8 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
$user_id_ary = array();
// Build usernames to add
- $usernames = (isset($_REQUEST['username'])) ? array(request_var('username', '', true)) : array();
- $username_list = request_var('username_list', '', true);
+ $usernames = (isset($_REQUEST['username'])) ? array(request_var('username', '')) : array();
+ $username_list = request_var('username_list', '');
if ($username_list)
{
$usernames = array_merge($usernames, explode("\n", $username_list));
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 2e7a80903d..aa2a27b07d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -189,7 +189,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '',
'EDITED_MESSAGE' => $l_edited_by,
- 'U_INFO' => ($auth->acl_get('m_info') && $message_row['forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&amp;p=' . $message_row['msg_id'], true, $user->session_id) : '',
+ 'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&amp;p=' . $message_row['msg_id'], true, $user->session_id) : '',
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_AUTHOR_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $author_id),
'U_EMAIL' => $user_info['email'],
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index 6117e50c95..11edb54b95 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -22,7 +22,7 @@ class ucp_remind
global $config, $phpbb_root_path, $phpEx;
global $db, $user, $auth, $template;
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$email = request_var('email', '');
$submit = (isset($_POST['submit'])) ? true : false;
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index 85ec560d14..0e59c7560c 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -22,7 +22,7 @@ class ucp_resend
global $config, $phpbb_root_path, $phpEx;
global $db, $user, $auth, $template;
- $username = request_var('username', '', true);
+ $username = request_var('username', '');
$email = request_var('email', '');
$submit = (isset($_POST['submit'])) ? true : false;