Bug 562916: Display contribute button for add-ons that have contributions enabled. r=Unfocused, a=blocking-final
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 09 Sep 2010 19:17:08 -0700
changeset 52389 cf67fe78af8b1f31970f418e451166a00001e5ca
parent 52388 e522e8bf352417ce391b4725cb9dff6757474b9f
child 52390 e736b967e199b84fbcf7fd638f71666f91849dff
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersUnfocused, blocking-final
bugs562916
milestone2.0b6pre
Bug 562916: Display contribute button for add-ons that have contributions enabled. r=Unfocused, a=blocking-final
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/test/browser/browser_details.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -879,20 +879,20 @@ var gViewController = {
         }
       }
     },
 
     cmd_contribute: {
       isEnabled: function(aAddon) {
         if (!aAddon)
           return false;
-        return ("contributeURL" in aAddon && aAddon.contributeURL);
+        return ("contributionURL" in aAddon && aAddon.contributionURL);
       },
       doCommand: function(aAddon) {
-        openURL(aAddon.contributeURL);
+        openURL(aAddon.contributionURL);
       }
     }
   },
 
   supportsCommand: function(aCommand) {
     return (aCommand in this.commands);
   },
 
@@ -1736,17 +1736,17 @@ var gDetailView = {
       screenshot.hidden = true;
     }
 
     var desc = document.getElementById("detail-desc");
     desc.textContent = aAddon.fullDescription ? aAddon.fullDescription
                                               : aAddon.description;
 
     var contributions = document.getElementById("detail-contributions");
-    if ("contributeURL" in aAddon && aAddon.contributeURL) {
+    if ("contributionURL" in aAddon && aAddon.contributionURL) {
       contributions.hidden = false;
       var amount = document.getElementById("detail-contrib-suggested");
       amount.value = gStrings.ext.formatStringFromName("contributionAmount",
                                                        [aAddon.contributionAmount],
                                                        1);
     } else {
       contributions.hidden = true;
     }
--- a/toolkit/mozapps/extensions/test/browser/browser_details.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_details.js
@@ -50,17 +50,17 @@ function test() {
     id: "addon1@tests.mozilla.org",
     name: "Test add-on 1",
     version: "2.1",
     description: "Short description",
     fullDescription: "Longer description",
     type: "extension",
     iconURL: "chrome://foo/skin/icon.png",
     icon64URL: "chrome://foo/skin/icon64.png",
-    contributeURL: "http://foo.com",
+    contributionURL: "http://foo.com",
     contributionAmount: "$0.99",
     sourceURI: Services.io.newURI("http://example.com/foo", null, null),
     averageRating: 4,
     reviewCount: 5,
     reviewURL: "http://example.com/reviews",
     homepageURL: "http://example.com/addon1",
     applyBackgroundUpdates: true
   }, {