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

new permissions, merged attachment tables (the intended purpose of two tables is no longer valid), attachment updates along the merging...

Note: please merge your attachment tables (develop dir).


git-svn-id: file:///svn/phpbb/trunk@4637 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-11-04 22:05:38 +00:00
parent 88f814a5c5
commit cd70db7976
17 changed files with 202 additions and 284 deletions

View File

@@ -356,7 +356,7 @@ if ($submit && $mode == 'orphan')
while ($row = $db->sql_fetchrow($result))
{
echo sprintf($user->lang['UPLOADING_FILE_TO'], $upload_list[$row['post_id']], $row['post_id']) . '<br />';
if (!$auth->acl_get('f_attach', $row['forum_id']))
if (!$auth->acl_gets('f_attach', 'u_attach', $row['forum_id']))
{
echo '<span style="color:red">' . sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) . '</span><br /><br />';
}
@@ -716,7 +716,7 @@ function marklist(match, name, status)
<?php
$sql = 'SELECT physical_filename
FROM ' . ATTACHMENTS_DESC_TABLE;
FROM ' . ATTACHMENTS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -918,6 +918,9 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
if ($filedata['post_attach'] && !sizeof($filedata['error']))
{
$message_parser->attachment_data = array(
'post_id' => $post_id,
'poster_id' => $user->data['user_id'],
'topic_id' => $topic_id,
'physical_filename' => $filedata['destination_filename'],
'real_filename' => $filedata['filename'],
'comment' => $message_parser->filename_data['filecomment'],
@@ -936,17 +939,6 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
$db->sql_transaction();
$sql = 'INSERT INTO ' . ATTACHMENTS_DESC_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql);
$db->sql_query($sql);
$attach_sql = array(
'attach_id' => $db->sql_nextid(),
'post_id' => $post_id,
'privmsgs_id' => 0,
'user_id_from' => $user->data['user_id'],
'user_id_to' => 0
);
$sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql);
$db->sql_query($sql);