|
58 | 58 | callback(null, widget.data.html); |
59 | 59 | }; |
60 | 60 |
|
61 | | - Widget.render |
62 | | - |
63 | 61 | Widget.renderTextWidget = function(widget, callback) { |
64 | 62 | var parseAsPost = !!widget.data.parseAsPost, |
65 | 63 | text = widget.data.text; |
66 | | - |
| 64 | + |
67 | 65 | if (parseAsPost) { |
68 | 66 | plugins.fireHook('filter:parse.raw', text, callback); |
69 | 67 | } else { |
|
89 | 87 | }; |
90 | 88 |
|
91 | 89 | Widget.renderActiveUsersWidget = function(widget, callback) { |
92 | | - function generateHtml(users) { |
93 | | - html = templates.parse(html, { |
94 | | - active_users: users, |
95 | | - relative_path: nconf.get('relative_path') |
96 | | - }); |
97 | | - return html; |
98 | | - } |
| 90 | + function generateHtml(users) { |
| 91 | + html = templates.parse(html, { |
| 92 | + active_users: users, |
| 93 | + relative_path: nconf.get('relative_path') |
| 94 | + }); |
| 95 | + return html; |
| 96 | + } |
99 | 97 |
|
100 | 98 | function getUserData(err, uids) { |
101 | 99 | if (err) { |
|
109 | 107 | return callback(err); |
110 | 108 | } |
111 | 109 |
|
112 | | - html = generateHtml(users); |
| 110 | + html = generateHtml(users); |
113 | 111 |
|
114 | 112 | callback(err, html); |
115 | 113 | }); |
|
138 | 136 | } |
139 | 137 |
|
140 | 138 | results.users = results.users.map(function(a) { |
141 | | - return {'uid': a.uid, 'username': a.username, 'userslug': a.userslug, 'picture': a.picture}; |
142 | | - }); |
| 139 | + return {'uid': a.uid, 'username': a.username, 'userslug': a.userslug, 'picture': a.picture}; |
| 140 | + }); |
143 | 141 |
|
144 | | - html = generateHtml(results.users); |
| 142 | + html = generateHtml(results.users); |
145 | 143 |
|
146 | | - callback(null, html); |
| 144 | + callback(null, html); |
147 | 145 | }); |
148 | 146 | } else if (widget.data.cid) { |
149 | 147 | cidOrtid = widget.data.cid; |
|
0 commit comments