--- a/Entity/TagRepository.php Mon Dec 26 22:53:50 2011 +0100
+++ b/Entity/TagRepository.php Mon Jan 23 00:48:55 2012 +0100
@@ -28,6 +28,11 @@
return $query->getResult();
}
+ /**
+ * returns a list of tags label containing the given seed.
+ * The seed is either at the beggining, the end of the label or at the beggining of a word.
+ * @param string $seed
+ */
public function getCompletion($seed)
{
$qb = $this->getEntityManager()->createQueryBuilder();
@@ -73,7 +78,7 @@
* @param $doctrine
* @return multitype:boolean Ambigous <NULL, \IRI\Bundle\WikiTagBundle\Entity\Tag> Ambigous <NULL, unknown, mixed, string> (array(\IRI\Bundle\WikiTagBundle\Model\TagInterface, revision_id=int, created:Boolean))
*/
- public function getOrCreateTag($tag_label, $ignore_wikipedia_info=false)
+ public function getOrCreateTag($tag_label, $ignore_wikipedia_info=false, $logger=null)
{
$tag_label_normalized = WikiTagUtils::normalizeTag($tag_label);
// We get the wikipedia references for the tag_label
@@ -103,7 +108,7 @@
if($created==true || $tag->getUrlStatus()===Tag::$TAG_URL_STATUS_DICT['null_result']) {
if($wp_request_done==false) {
- $wp_response = WikiTagUtils::getWikipediaInfo($tag_label_normalized, null, $ignore_wikipedia_info);
+ $wp_response = WikiTagUtils::getWikipediaInfo($tag_label_normalized, null, $ignore_wikipedia_info, $logger);
}
$tag->setWikipediaInfo($wp_response);
@@ -116,7 +121,7 @@
}
elseif($tag!=null && $tag->getWikipediaPageId()!=null) {
- $wp_response = WikiTagUtils::getWikipediaInfo(null, $tag->getWikipediaPageId(), $ignore_wikipedia_info);
+ $wp_response = WikiTagUtils::getWikipediaInfo(null, $tag->getWikipediaPageId(), $ignore_wikipedia_info, $logger);
$wikipedia_revision_id = $wp_response['revision_id'];
}
else {