Index: trunk/extensions/AddThis/AddThis.body.php |
— | — | @@ -21,7 +21,12 @@ |
22 | 22 | <div class="addthis_toolbox addthis_default_style" id="addthistoolbar" style="background:'.$wgAddThisBackground.'; border-color:'.$wgAddThisBorder.';"> |
23 | 23 | <a href="http://www.addthis.com/bookmark.php?v=250&pubid=ra-4eb75def4ec6488b" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'; |
24 | 24 | foreach ( $wgAddThisHServ as $n => $a ) { |
25 | | - $output .= '<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'" '.$wgAddThisHServ[$n]["attribs"].'></a>'; |
| 25 | + if (true === isset($wgAddThisHServ[$n]["attribs"])) { |
| 26 | + $output .= '<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'" '.$wgAddThisHServ[$n]["attribs"].'></a>'; |
| 27 | + } |
| 28 | + else { |
| 29 | + $output .= '<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'"></a>'; |
| 30 | + } |
26 | 31 | } |
27 | 32 | $output .='</div> |
28 | 33 | <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |
— | — | @@ -44,8 +49,13 @@ |
45 | 50 | $bar['addthis'] = '<!-- AddThis Button BEGIN --> |
46 | 51 | <div class="addthis_toolbox addthis_default_style" id="addthissidebar">'; |
47 | 52 | foreach ( $wgAddThisSBServ as $n => $a ) { |
48 | | - $bar['addthis'] .= '<a class="addthis_button_'.$wgAddThisSBServ[$n]["service"].'" '.$wgAddThisSBServ[$n]["attribs"].'></a>'; |
49 | | - } |
| 53 | + if (true === isset($wgAddThisSBServ[$n]["attribs"])) { |
| 54 | + $bar['addthis'] .= '<a class="addthis_button_'.$wgAddThisSBServ[$n]["service"].'" '.$wgAddThisSBServ[$n]["attribs"].'></a>'; |
| 55 | + } |
| 56 | + else { |
| 57 | + $bar['addthis'] .= '<a class="addthis_button_'.$wgAddThisSBServ[$n]["service"].'"></a>'; |
| 58 | + } |
| 59 | + } |
50 | 60 | $bar['addthis'] .= '</div> |
51 | 61 | <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |
52 | 62 | <!-- AddThis Button END -->'; |
— | — | @@ -81,7 +91,12 @@ |
82 | 92 | <div class="addthis_toolbox addthis_default_style" id="addthistoolbar" style="background:'.$wgAddThisBackground.'; border-color:'.$wgAddThisBorder.';"> |
83 | 93 | <a href="http://www.addthis.com/bookmark.php?v=250&pubid=ra-4eb75def4ec6488b" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'); |
84 | 94 | foreach ( $wgAddThisHServ as $n => $a ) { |
85 | | - $wgOut->addHTML('<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'" '.$wgAddThisHServ[$n]["attribs"].'></a>'); |
| 95 | + if (true === isset($wgAddThisHServ[$n]["attribs"])) { |
| 96 | + $wgOut->addHTML('<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'" '.$wgAddThisHServ[$n]["attribs"].'></a>'); |
| 97 | + } |
| 98 | + else { |
| 99 | + $wgOut->addHTML('<a class="addthis_button_'.$wgAddThisHServ[$n]["service"].'"></a>'); |
| 100 | + } |
86 | 101 | } |
87 | 102 | $wgOut->addHTML('</div> |
88 | 103 | <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |