1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00
git-svn-id: file:///svn/phpbb/trunk@5922 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-05-17 16:58:56 +00:00
parent 4ea4f1d1da
commit 760d0a66d4
2 changed files with 15 additions and 16 deletions

View File

@@ -685,11 +685,11 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
$topic_ids = $draft_rows = array();
// Load those drafts not connected to forums/topics
// If forum_id == 0 AND topic_id == 0 then this is a PM draft
$sql = 'SELECT *
FROM ' . DRAFTS_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . '
AND forum_id = 0
OR topic_id = 0
AND (forum_id = 0 OR topic_id = 0)
ORDER BY save_time DESC';
$result = $db->sql_query($sql);
@@ -762,7 +762,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
$insert_url = "{$phpbb_root_path}posting.$phpEx$SID&f=" . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id'];
}
else if ($auth->acl_get('f_read', $draft['forum_id']))
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
{
$link_forum = true;
$view_url = "{$phpbb_root_path}viewforum.$phpEx$SID&f=" . $draft['forum_id'];
@@ -772,6 +772,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
}
else
{
// Either display as PM draft if forum_id and topic_id are empty or if access to the forums has been denied afterwards...
$link_pm = true;
$insert_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id&mode=compose&d=" . $draft['draft_id'];
}