1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

- renamed the following columns:

comment -> attach_comment
new, forwarded, unread, marked, deleted -> pm_new, pm_forwarded, pm_unread, pm_marked, pm_deleted
module_name -> module_basename
value -> lang_value

- every column is now NOT NULL
- every column is now having a DEFAULT value
- hopefully mostly consistent across every db schema
- untested schemas: sqlite, oracle, firebird


git-svn-id: file:///svn/phpbb/trunk@6177 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-07-13 12:51:56 +00:00
parent 4cd73bf7e5
commit c4f2430645
37 changed files with 4876 additions and 5956 deletions

View File

@@ -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'],

View File

@@ -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);

View File

@@ -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));

View File

@@ -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'],

View File

@@ -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;

View File

@@ -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;