Author: rande
Date: 2010-05-11 00:14:32 +0200 (Tue, 11 May 2010)
New Revision: 29408
Modified:
plugins/sfSolrPlugin/branches/sf1.2/lib/results/sfLuceneModelResult.class.php
Log:
[sfSolrPlugin] align description code with title code
Modified:
plugins/sfSolrPlugin/branches/sf1.2/lib/results/sfLuceneModelResult.class.php
===================================================================
---
plugins/sfSolrPlugin/branches/sf1.2/lib/results/sfLuceneModelResult.class.php
2010-05-10 22:10:15 UTC (rev 29407)
+++
plugins/sfSolrPlugin/branches/sf1.2/lib/results/sfLuceneModelResult.class.php
2010-05-10 22:14:32 UTC (rev 29408)
@@ -28,19 +28,15 @@
{
return $this->getResult()->__get($model->get('title'));
}
- else
- {
- foreach (array('title', 'subject') as $check)
+ foreach (array('title', 'subject') as $check)
+ {
+ if ($model->get('fields')->has($check))
{
-
- if ($model->get('fields')->has($check))
- {
-
- return strip_tags($this->getResult()->__get($check));
- }
+ return strip_tags($this->getResult()->__get($check));
}
}
+
return 'No title available.';
}
@@ -81,7 +77,7 @@
*/
public function getInternalPartial($module = 'sfLucene')
{
- $model = $this->retrieveModel();
+ $model = $this->retrieveModel();
if ($model->get('partial'))
{
@@ -102,7 +98,7 @@
foreach (array('description','summary','about') as $check)
{
- if ($model->get('fields')->has($check) && !is_null($model->get($check)))
+ if ($model->get('fields')->has($check))
{
return strip_tags($this->result->__get($check));
}
--
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.