mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Changed $doc->id to $doc->docid to prevent clashes with Zend Search's internal
$doc->id
This commit is contained in:
parent
7d6af8ca5a
commit
fef0afe183
@ -5,7 +5,7 @@
|
||||
|
||||
abstract class SearchDocument extends Zend_Search_Lucene_Document {
|
||||
public function __construct(&$doc, &$data, $document_type, $course_id, $group_id) {
|
||||
$this->addField(Zend_Search_Lucene_Field::Keyword('id', $doc->id));
|
||||
$this->addField(Zend_Search_Lucene_Field::Keyword('docid', $doc->docid));
|
||||
$this->addField(Zend_Search_Lucene_Field::Text('title', $doc->title));
|
||||
$this->addField(Zend_Search_Lucene_Field::Text('author', $doc->author));
|
||||
$this->addField(Zend_Search_Lucene_Field::UnStored('contents', $doc->contents));
|
||||
|
@ -8,7 +8,7 @@
|
||||
class ForumSearchDocument extends SearchDocument {
|
||||
public function __construct(&$post, $forum_id, $course_id, $group_id) {
|
||||
// generic information
|
||||
$doc->id = $post['id'];
|
||||
$doc->docid = $post['id'];
|
||||
$doc->title = $post['subject'];
|
||||
$doc->author = $post['firstname']." ".$post['lastname'];
|
||||
$doc->contents = $post['message'];
|
||||
|
@ -12,7 +12,7 @@
|
||||
class GlossarySearchDocument extends SearchDocument {
|
||||
public function __construct(&$entry, $glossary_id, $course_id, $group_id) {
|
||||
// generic information; required
|
||||
$doc->id = $entry['id'];
|
||||
$doc->docid = $entry['id'];
|
||||
$doc->title = $entry['concept'];
|
||||
|
||||
$user = get_recordset('user', 'id', $entry['userid'])->fields;
|
||||
@ -60,6 +60,10 @@
|
||||
} //foreach
|
||||
|
||||
return $documents;
|
||||
} //glossary_get_content_for_index
|
||||
} //glossary_get_content_for_index
|
||||
|
||||
function glossary_delete($info) {
|
||||
return $info;
|
||||
} //glossary_delete
|
||||
|
||||
?>
|
@ -19,7 +19,7 @@
|
||||
class WikiSearchDocument extends SearchDocument {
|
||||
public function __construct(&$page, $wiki_id, $course_id, $group_id) {
|
||||
// generic information; required
|
||||
$doc->id = $page->id;
|
||||
$doc->docid = $page->id;
|
||||
$doc->title = $page->pagename;
|
||||
|
||||
//remove '(ip.ip.ip.ip)' from wiki author field
|
||||
|
Loading…
x
Reference in New Issue
Block a user