File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 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 ) {
90
+ function generateHtml ( users ) {
93
91
html = templates . parse ( html , {
94
92
active_users : users ,
95
93
relative_path : nconf . get ( 'relative_path' )
96
94
} ) ;
97
- return html ;
98
- }
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 ;
You can’t perform that action at this time.
0 commit comments