Browse Source

Bug 529 - Fix addons.instantbird.org API for compatibility with Mozilla 2.0, r=Even.

Florian Queze 13 years ago
parent
commit
9b4782a37f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      site/app/views/api/api_addon.thtml

+ 7 - 0
site/app/views/api/api_addon.thtml

@@ -62,7 +62,14 @@
     foreach ($addon['User'] as $author) {
         $authorName = (!empty($author['nickname'])) ? $author['nickname'] : $author['firstname'].' '.$author['lastname'];
 ?>
+<?php if ($api_version < 1.5 ) { ?>
           <author><?php echo $authorName; ?></author>
+<?php } else { ?>
+          <author id="<?php echo $author['id']; ?>">
+            <name><?php echo $authorName; ?></name>
+            <link>https://addons.instantbird.org/en-US/instantbird/user/<?php echo $author['id']; ?></link>
+          </author>
+<?php } ?>
 <?php
     }
 ?>    </authors>