Author: Jonathan.Wage
Date: 2010-02-12 17:51:54 +0100 (Fri, 12 Feb 2010)
New Revision: 27957
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
Log:
[1.4][sfSympalPlugin][1.0] Use toArray() for search data if custom method does
not exist
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
2010-02-12 16:34:55 UTC (rev 27956)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
2010-02-12 16:51:54 UTC (rev 27957)
@@ -52,7 +52,12 @@
// store job primary key to identify it in the search results
$doc->addField(Zend_Search_Lucene_Field::Keyword('pk',
$this->_getRecordSearchPrimaryKey($record)));
- $data = $record->getSearchData();
+ if (method_exists($record, 'getSearchData'))
+ {
+ $data = $record->getSearchData();
+ } else {
+ $data = $record->toArray(false);
+ }
foreach ($data as $key => $value)
{
$doc->addField(Zend_Search_Lucene_Field::UnStored($key, $value,
'utf-8'));
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.