Bug 682027 - Make returned fields in XPIProvider.getVisibleAddons consistent; r=Mossop
authorGregory Szorc <gps@mozilla.com>
Fri, 26 Aug 2011 12:40:57 -0700
changeset 76303 459aa245e7f052196e60e935edf35c23b98b6b87
parent 76302 52ee9fe9c3e9b290878c817dffe437435c1ccf78
child 76304 298e7535687c453f49f4185ded4011afa3fdfb3f
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersMossop
bugs682027
milestone9.0a1
Bug 682027 - Make returned fields in XPIProvider.getVisibleAddons consistent; r=Mossop
toolkit/mozapps/extensions/XPIProvider.jsm
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -4942,17 +4942,18 @@ var XPIDatabase = {
    *         A callback to pass the array of DBAddonInternals to
    */
   getVisibleAddons: function XPIDB_getVisibleAddons(aTypes, aCallback) {
     let stmt = null;
     if (!aTypes || aTypes.length == 0) {
       stmt = this.getStatement("getVisibleAddons");
     }
     else {
-      let sql = "SELECT * FROM addon WHERE visible=1 AND type IN (";
+      let sql = "SELECT " + FIELDS_ADDON + " FROM addon WHERE visible=1 AND " +
+                "type IN (";
       for (let i = 1; i <= aTypes.length; i++) {
         sql += "?" + i;
         if (i < aTypes.length)
           sql += ",";
       }
       sql += ")";
 
       // Note that binding to index 0 sets the value for the ?1 parameter