Author: david
Date: Wed Oct 27 15:18:30 2010
New Revision: 8574

Log:
Use $this->resource for holding search. Fixes issue #1852.

Modified:
   trunk/apps/qubit/modules/search/actions/indexAction.class.php

Modified: trunk/apps/qubit/modules/search/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/search/actions/indexAction.class.php       Wed Oct 
27 15:15:35 2010        (r8573)
+++ trunk/apps/qubit/modules/search/actions/indexAction.class.php       Wed Oct 
27 15:18:30 2010        (r8574)
@@ -26,14 +26,10 @@
       $request->limit = sfConfig::get('app_hits_per_page');
     }
 
-    if (isset($request->id))
+    $this->resource = $this->getRoute()->resource;
+    if (isset($this->resource) && 'QubitRepository' == 
get_class($this->resource))
     {
-      $repository = QubitRepository::getById($request->id);
-
-      if (null !== $repository)
-      {
-        $request->query .= ' and 
repository:"'.$repository->authorizedFormOfName.'"';
-      }
+      $request->query .= ' and 
repository:"'.$this->resource->authorizedFormOfName.'"';
     }
 
     $this->response->setTitle('Search for "'.$request->query.'" - 
'.$this->response->getTitle());

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" 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/qubit-commits?hl=en.

Reply via email to