diff -r 989d9e117586 -r e7384fb35f7a Controller/WikiTagController.php --- a/Controller/WikiTagController.php Mon Dec 26 22:53:50 2011 +0100 +++ b/Controller/WikiTagController.php Mon Jan 23 00:48:55 2012 +0100 @@ -201,7 +201,7 @@ } // We create the new tag or get the already existing tag. $tag, $revision_id, $created try { - $ar = $this->getDoctrine()->getRepository('WikiTagBundle:Tag')->getOrCreateTag($tag_label, $this->container->getParameter('wiki_tag.ignore_wikipedia_error')); + $ar = $this->getDoctrine()->getRepository('WikiTagBundle:Tag')->getOrCreateTag($tag_label, $this->container->getParameter('wiki_tag.ignore_wikipedia_error'), $this->container->get('logger')); } catch (\Exception $e){ return new Response(json_encode(array('error' => 'wikipedia_request_failed', 'message' => $e->getMessage())),400); @@ -252,9 +252,7 @@ $doc->setManualOrder(false); $this->getDoctrine()->getEntityManager()->persist($doc); - $search_service = $this->get('wiki_tag.search'); - - $search_service->reorderTagsForDocument($doc); + $doc_service = $this->get('wiki_tag.document')->reorderTags($doc); $this->getDoctrine()->getEntityManager()->flush(); @@ -563,7 +561,7 @@ if($tag!=null && $label!=null){ // We get the Wikipedia informations for the sent label $tag_label_normalized = WikiTagUtils::normalizeTag($label); - $wp_response = WikiTagUtils::getWikipediaInfo($tag_label_normalized, null, $this->container->getParameter('wiki_tag.ignore_wikipedia_error')); + $wp_response = WikiTagUtils::getWikipediaInfo($tag_label_normalized, null, $this->container->getParameter('wiki_tag.ignore_wikipedia_error'), $this->container->get('logger')); $tag->setWikipediaInfo($wp_response); // Save datas. $em = $this->getDoctrine()->getEntityManager();