# HG changeset patch # User clebeaupin # Date 1269430090 -3600 # Node ID a4385e32235609e4ddd56f3b8e9e9bbe38d4173f # Parent b40169630952ca4e0973810c279d90e97e4c1798 Add production_countries field on film model diff -r b40169630952 -r a4385e322356 web/thdProject/apps/frontend/modules/homepage/actions/components.class.php --- a/web/thdProject/apps/frontend/modules/homepage/actions/components.class.php Wed Mar 24 11:47:38 2010 +0100 +++ b/web/thdProject/apps/frontend/modules/homepage/actions/components.class.php Wed Mar 24 12:28:10 2010 +0100 @@ -1,4 +1,4 @@ -tag = Array('score' => 3); } - + public function executeRandomFilm() { - + // FIXME: Dummy value + $this->tag = Array('score' => 3); } - + public function executeLastTaggedList() { $query = Doctrine_Query::create() ->from('ThdFilm F') @@ -26,7 +28,7 @@ ->limit(0,10); $this->lastTaggedFilms = $query->execute(); $this->videoPath = sfConfig::get('app_player_videoPath'); - + } public function executeMostTaggedList() { $query = Doctrine_Query::create() @@ -39,18 +41,18 @@ $this->mostTaggedFilms = $query->execute(); $this->videoPath = sfConfig::get('app_player_videoPath'); } - + public function executeResultList(sfWebRequest $request) { - + $text = $request->getParameter('text'); - + $event = $this->dispatcher->notify(new sfEvent($this, 'uvmc_solr.search', array('query' => $text))); $response = $event->getReturnValue(); // solr is configured to give you back a serialized php array $rawResp = $response->getRawResponse(); $results = unserialize($rawResp); - + $primaryKeys = array(); foreach($results['response']['docs'] as $doc) @@ -71,8 +73,8 @@ $this->searchResult = array(); $this->searchCount = 0; } - - + + /*$query = Doctrine_Query::create() ->from('ThdFilm F') ->leftJoin('F.images I ') diff -r b40169630952 -r a4385e322356 web/thdProject/apps/frontend/modules/homepage/templates/_randomFilm.php --- a/web/thdProject/apps/frontend/modules/homepage/templates/_randomFilm.php Wed Mar 24 11:47:38 2010 +0100 +++ b/web/thdProject/apps/frontend/modules/homepage/templates/_randomFilm.php Wed Mar 24 12:28:10 2010 +0100 @@ -18,19 +18,19 @@ }); } -