Commit f5bb1543 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4119 (Give message if linked post deleted)

parent 298131d3
Loading
Loading
Loading
Loading
+9 −0
Changes for forum/pages/modules/topicview.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ class Module_topicview
            }

            $jump_post_id = get_param_integer('post_id', null);
            $jump_post_found = false;

            // Render non-threaded
            $posts = new Tempcode();
@@ -338,6 +339,10 @@ class Module_topicview
            $second_poster = $topic_info['first_poster'];
            $poster_details_cache = array();
            foreach ($topic_info['posts'] as $array_id => $_postdetails) {
                if ($_postdetails['id'] === $jump_post_id) {
                    $jump_post_found = true;
                }

                if ($array_id == 0) {
                    $description = $topic_info['description'];
                } else {
@@ -520,6 +525,10 @@ class Module_topicview

            $serialized_options = mixed();
            $hash = mixed();

            if (($jump_post_id !== null) && (!$jump_post_found)) {
                attach_message(do_lang_tempcode('_MISSING_RESOURCE', strval($jump_post_id), 'post'), 'warn');
            }
        } else { // Threaded
            $posts = $this->posts;
            $serialized_options = $this->serialized_options;