diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-17 13:01:17 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-17 13:01:17 +0000 |
commit | a2c81d763fa2e591bf3aa8f48ffeed4beb363975 (patch) | |
tree | 45b7c11ec918b0d9b98cf3a6671d0c606d15a12a /phpBB/includes/functions_posting.php | |
parent | 94a91530da9f952a8b6e729ff187932706282f5a (diff) | |
download | forums-a2c81d763fa2e591bf3aa8f48ffeed4beb363975.tar forums-a2c81d763fa2e591bf3aa8f48ffeed4beb363975.tar.gz forums-a2c81d763fa2e591bf3aa8f48ffeed4beb363975.tar.bz2 forums-a2c81d763fa2e591bf3aa8f48ffeed4beb363975.tar.xz forums-a2c81d763fa2e591bf3aa8f48ffeed4beb363975.zip |
#11046 - properly show load button.
git-svn-id: file:///svn/phpbb/trunk@7615 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index bea1c7397b..9fe27fdd1a 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -844,13 +844,20 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) $link_topic = $link_forum = $link_pm = false; $insert_url = $view_url = $title = ''; - if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id'])) + if (isset($topic_rows[$draft['topic_id']]) + && ( + ($topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id'])) + || + (!$topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_getf_global('f_read')) + )) { + $topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id; + $link_topic = true; - $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id']); + $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id']); $title = $topic_rows[$draft['topic_id']]['topic_title']; - $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']); + $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']); } else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id'])) { |