aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-11 14:11:19 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-11 14:11:19 +0100
commitac2135560fcac13b08744388e24c498433ba5297 (patch)
tree8b8c2c19773de26c477d2c47b4e194d9b501bcf2 /settings
parentc53d7d59f7bd35ccf27e8c56e364337fa0416ee7 (diff)
downloadnextcloud-server-ac2135560fcac13b08744388e24c498433ba5297.tar.gz
nextcloud-server-ac2135560fcac13b08744388e24c498433ba5297.zip
Fix single author with details
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings')
-rw-r--r--settings/js/apps.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 654756af531..451becc67a0 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -189,6 +189,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
});
app.author = authors.join(', ');
+ } else if (typeof app.author !== 'string') {
+ app.author = app.author['@value'];
}
var html = template(app);
@@ -539,8 +541,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
// 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);
@@ -555,6 +557,15 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
});
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);
}));