From 628b01faf4c59ccbcf55145a297e750ba8d21178 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Wed, 26 Nov 2008 10:08:51 +0100 Subject: [PATCH] Fixed the indexing for the issues. It was not indexing the content correctly when creating the issue as the content of the issue was not yet stored in the database. --- src/IDF/Issue.php | 5 ++++- src/IDF/IssueComment.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/IDF/Issue.php b/src/IDF/Issue.php index e0690e0..1cda1a2 100644 --- a/src/IDF/Issue.php +++ b/src/IDF/Issue.php @@ -159,7 +159,10 @@ class IDF_Issue extends Pluf_Model function postSave($create=false) { - IDF_Search::index($this); + // Note: No indexing is performed here. The indexing is + // triggered in the postSave step of the comment to ensure + // that the issue as at least one comment in the database when + // doing the indexing. if ($create) { IDF_Timeline::insert($this, $this->get_project(), $this->get_submitter()); diff --git a/src/IDF/IssueComment.php b/src/IDF/IssueComment.php index de3d2af..741a3d5 100644 --- a/src/IDF/IssueComment.php +++ b/src/IDF/IssueComment.php @@ -123,6 +123,7 @@ class IDF_IssueComment extends Pluf_Model $this->get_submitter()); } } + IDF_Search::index($this->get_issue()); } public function timelineFragment($request)