# HG changeset patch # User IRI <> # Date 1270829935 -7200 # Node ID a63a8ff719ff87b489cffb05adc77fe5aa41bc8c # Parent 2dcf4fe5175f39c77dfa6c4ebf4f9f53c2a3e6a6 start implementing reindex action diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/backend/modules/film/actions/actions.class.php --- a/web/thdProject/apps/backend/modules/film/actions/actions.class.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/backend/modules/film/actions/actions.class.php Fri Apr 09 18:18:55 2010 +0200 @@ -13,4 +13,22 @@ */ class filmActions extends autoFilmActions { + public function executeListReindex(sfWebRequest $request) { + sfContext::getInstance()->getLogger()->info("FilmAction : listReindex"); + + //empty solr + //empty sonyengine + + // get all films + // add film to film array for sonyengine + // for each film get all segments + // get all tags + // add to film array for sony engine + // solr index film + + // add all films to sonyengine + // add all tags to sony engine + + $this->redirect("@thd_film_film"); + } } diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/backend/modules/film/config/generator.yml --- a/web/thdProject/apps/backend/modules/film/config/generator.yml Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/backend/modules/film/config/generator.yml Fri Apr 09 18:18:55 2010 +0200 @@ -13,7 +13,10 @@ config: actions: ~ fields: ~ - list: ~ + list: + actions: + _new : ~ + reindex : {label: Reindex} filter: ~ form: ~ edit: ~ diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/editor/templates/_player.php --- a/web/thdProject/apps/frontend/modules/editor/templates/_player.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/editor/templates/_player.php Fri Apr 09 18:18:55 2010 +0200 @@ -96,7 +96,7 @@ echo " {".$film->getOriginalTitle()."}"; } ?> - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/films/templates/_filmList.php --- a/web/thdProject/apps/frontend/modules/films/templates/_filmList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/films/templates/_filmList.php Fri Apr 09 18:18:55 2010 +0200 @@ -15,7 +15,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/films/templates/viewFilmListSuccess.php --- a/web/thdProject/apps/frontend/modules/films/templates/viewFilmListSuccess.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/films/templates/viewFilmListSuccess.php Fri Apr 09 18:18:55 2010 +0200 @@ -17,7 +17,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/films/templates/viewTopFilmListSuccess.php --- a/web/thdProject/apps/frontend/modules/films/templates/viewTopFilmListSuccess.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/films/templates/viewTopFilmListSuccess.php Fri Apr 09 18:18:55 2010 +0200 @@ -17,7 +17,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/homepage/templates/_lastTaggedList.php --- a/web/thdProject/apps/frontend/modules/homepage/templates/_lastTaggedList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/homepage/templates/_lastTaggedList.php Fri Apr 09 18:18:55 2010 +0200 @@ -15,7 +15,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/homepage/templates/_mostTaggedList.php --- a/web/thdProject/apps/frontend/modules/homepage/templates/_mostTaggedList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/homepage/templates/_mostTaggedList.php Fri Apr 09 18:18:55 2010 +0200 @@ -16,7 +16,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/homepage/templates/_resultList.php --- a/web/thdProject/apps/frontend/modules/homepage/templates/_resultList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/homepage/templates/_resultList.php Fri Apr 09 18:18:55 2010 +0200 @@ -13,7 +13,7 @@ // image file $video_file = $item->getVideos(); // directors list - $directors = json_decode($item->getDirectors(), true); + $directors = json_decode($item->getDirectorsArray(), true); ?>
  • ') no-repeat;" href="""> diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/search/templates/_searchList.php --- a/web/thdProject/apps/frontend/modules/search/templates/_searchList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/search/templates/_searchList.php Fri Apr 09 18:18:55 2010 +0200 @@ -11,7 +11,7 @@ // image file $video_file = $item->getVideos(); // directors list - $directors = json_decode($item->getDirectors(), true); + $directors = json_decode($item->getDirectorsArray(), true); ?>
  • ') no-repeat;" href=""> diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/tag/templates/_player.php --- a/web/thdProject/apps/frontend/modules/tag/templates/_player.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/templates/_player.php Fri Apr 09 18:18:55 2010 +0200 @@ -90,7 +90,7 @@ echo " {".$film->getOriginalTitle()."}"; } ?> - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php --- a/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/templates/_suggestionFilmList.php Fri Apr 09 18:18:55 2010 +0200 @@ -16,7 +16,7 @@
  • - De getDirectors(), 'name'); ?> + De getDirectorsArray(), 'name'); ?>
    diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/data/fixtures/data.yml --- a/web/thdProject/data/fixtures/data.yml Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/data/fixtures/data.yml Fri Apr 09 18:18:55 2010 +0200 @@ -10,7 +10,7 @@ original_title: null production_countries: '[{"label":"France"}]' production_year: '2000' - uniqueid: '1' + uniqueid: 'DCFF65E8-A1D3-9198-B0E6AF96CEB52705' ThdFilm_2: ref: '025001' title: 'A travers la forêt' @@ -22,7 +22,7 @@ original_title: null production_countries: '[{"label":"France"}]' production_year: '2004' - uniqueid: '2' + uniqueid: 'DCFF65F7-F57A-CA9C-8F59463F79FD8BB7' ThdFilm_3: ref: '039031' title: 'Après lui' @@ -34,7 +34,7 @@ original_title: null production_countries: '[{"label":"France"}]' production_year: '2006' - uniqueid: '3' + uniqueid: 'DCFF6607-04F7-5BF5-FF993C70537DCC06' ThdFilm_4: ref: '013002' title: 'Buenos Aires 100 km' @@ -46,7 +46,7 @@ original_title: 'Buenos Aires 100 kilómetros' production_countries: '[{"label":"Argentine"},{"label":"France"},{"label":"Espagne"}]' production_year: '2004' - uniqueid: '4' + uniqueid: 'DCFF6617-C505-BD60-5BFBBE7A2CF29B1E' ThdImage: ThdImage_1: ThdFilm: ThdFilm_1 diff -r 2dcf4fe5175f -r a63a8ff719ff web/thdProject/lib/model/doctrine/ThdFilm.class.php --- a/web/thdProject/lib/model/doctrine/ThdFilm.class.php Wed Apr 07 18:06:27 2010 +0200 +++ b/web/thdProject/lib/model/doctrine/ThdFilm.class.php Fri Apr 09 18:18:55 2010 +0200 @@ -33,15 +33,15 @@ return json_decode($data[$attr], true); } - public function getDirectors() { + public function getDirectorsArray() { return $this->decodeJsonData('directors'); } - public function getActors() { + public function getActorsArray() { return $this->decodeJsonData('actors'); } - public function getProductionCountries() { + public function getProductionCountriesArray() { return $this->decodeJsonData('production_countries'); }