}
});
app.author = authors.join(', ');
+ } else if (typeof app.author !== 'string') {
+ app.author = app.author['@value'];
}
var html = template(app);
// Author Name
apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) {
+ var authors = [];
if (_.isArray(app.author)) {
- var authors = [];
_.each(app.author, function (author) {
if (typeof author === 'string') {
authors.push(author);
}
});
return OC.Settings.Apps._search(authors.join(' '), query);
+ } else if (typeof app.author !== 'string') {
+ authors.push(app.author['@value']);
+ if (!_.isUndefined(app.author['@attributes']['homepage'])) {
+ authors.push(app.author['@attributes']['homepage']);
+ }
+ if (!_.isUndefined(app.author['@attributes']['mail'])) {
+ authors.push(app.author['@attributes']['mail']);
+ }
+ return OC.Settings.Apps._search(authors.join(' '), query);
}
return OC.Settings.Apps._search(app.author, query);
}));