equal
deleted
inserted
replaced
45 * |
45 * |
46 * @param string $tag_label_normalized |
46 * @param string $tag_label_normalized |
47 * @param bigint $page_id |
47 * @param bigint $page_id |
48 * @return array |
48 * @return array |
49 */ |
49 */ |
50 public static function getWikipediaInfo($tag_label_normalized, $page_id=null) |
50 public static function getWikipediaInfo($tag_label_normalized, $page_id=null, $ignore_wikipedia_error=false) |
51 { |
51 { |
52 // get ignore_wikipedia_error parameter |
52 // get ignore_wikipedia_error parameter |
53 $ignore_wikipedia_error = false; |
|
54 |
|
55 if(key_exists('kernel', $GLOBALS)) { |
|
56 $kernel = $GLOBALS['kernel']; |
|
57 $ignore_wikipedia_error = $kernel->getContainer()->getParameter('wiki_tag.ignore_wikipedia_error'); |
|
58 } |
|
59 |
|
60 |
53 |
61 $params = array('action'=>'query', 'prop'=>'info|categories|langlinks', 'inprop'=>'url', 'lllimit'=>'500', 'cllimit'=>'500', 'rvprop'=>'ids', 'format'=>'json'); |
54 $params = array('action'=>'query', 'prop'=>'info|categories|langlinks', 'inprop'=>'url', 'lllimit'=>'500', 'cllimit'=>'500', 'rvprop'=>'ids', 'format'=>'json'); |
62 if($tag_label_normalized!=null){ |
55 if($tag_label_normalized!=null){ |
63 $params['titles'] = urlencode($tag_label_normalized); |
56 $params['titles'] = urlencode($tag_label_normalized); |
64 } |
57 } |