Skip to content

Commit

Permalink
Allow ThreadManager to set keywords on the thread document
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Dec 9, 2011
1 parent cf0c5b6 commit 6fd9eb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Document/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ public function setCreatedAt(\DateTime $createdAt)
$this->createdAt = $createdAt;
}

/**
* @param string
*/
public function setKeywords($keywords)
{
$this->keywords = $keywords;
}

/**
* Gets the users participating in this conversation
*
Expand Down
2 changes: 1 addition & 1 deletion DocumentManager/ThreadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ protected function doKeywords(Thread $thread)
}

// we only need each word once
$thread->keywords = implode(' ', array_unique(str_word_count(mb_strtolower($keywords, 'UTF-8'), 1)));
$thread->setKeywords(implode(' ', array_unique(str_word_count(mb_strtolower($keywords, 'UTF-8'), 1))));
}

/**
Expand Down

0 comments on commit 6fd9eb5

Please sign in to comment.