@@ -120,7 +120,7 @@ public function init() {
120
120
Requirements::add_i18n_javascript (KICKASSETS_DIR .'/lang ' );
121
121
$ js = $ this ->config ()->js_file ;
122
122
123
- Requirements::javascript (KICKASSETS_DIR ."/javascript/build/ $ js " );
123
+ Requirements::javascript (KICKASSETS_DIR ."/javascript/build/ $ js " );
124
124
Requirements::clear_combined_files ();
125
125
}
126
126
@@ -166,10 +166,10 @@ public function handleFolderContents(SS_HTTPRequest $r) {
166
166
);
167
167
168
168
$ files = File::get ()
169
- ->filter (array (
170
- 'ParentID ' => $ folder ->ID
171
- ))
172
- ->sort ($ this ->getSortClause ($ r ->getVar ('sort ' )));
169
+ ->filter (array (
170
+ 'ParentID ' => $ folder ->ID
171
+ ))
172
+ ->sort ($ this ->getSortClause ($ r ->getVar ('sort ' )));
173
173
174
174
$ totalFiles = (int ) $ files ->count ();
175
175
$ files = $ files ->limit ($ this ->config ()->folder_items_limit , $ cursor );
@@ -178,18 +178,18 @@ public function handleFolderContents(SS_HTTPRequest $r) {
178
178
if (!$ file ->canView ()) continue ;
179
179
180
180
$ result ['children ' ][] = ($ file instanceof Folder) ?
181
- $ this ->createFolderJSON ($ file ) :
182
- $ this ->createFileJSON ($ file , $ folder );
181
+ $ this ->createFolderJSON ($ file ) :
182
+ $ this ->createFileJSON ($ file , $ folder );
183
183
}
184
184
185
185
$ cursor += $ files ->count ();
186
186
$ result ['cursor ' ] = $ cursor ;
187
187
$ result ['has_more ' ] = ($ cursor < $ totalFiles );
188
188
$ result ['total_items ' ] = $ totalFiles ;
189
189
190
- return (new SS_HTTPResponse (
191
- Convert::array2json ($ result ), 200
192
- ))->addHeader ('Content-Type ' , 'application/json ' );
190
+ return (new SS_HTTPResponse (
191
+ Convert::array2json ($ result ), 200
192
+ ))->addHeader ('Content-Type ' , 'application/json ' );
193
193
194
194
}
195
195
@@ -203,9 +203,9 @@ public function handleRecentItems(SS_HTTPRequest $r) {
203
203
$ result = array ();
204
204
205
205
$ fileIDs = File::get ()
206
- ->sort ('LastEdited ' , 'DESC ' )
207
- ->limit ($ this ->config ()->recent_items_limit )
208
- ->column ('ID ' );
206
+ ->sort ('LastEdited ' , 'DESC ' )
207
+ ->limit ($ this ->config ()->recent_items_limit )
208
+ ->column ('ID ' );
209
209
210
210
if (!empty ($ fileIDs )) {
211
211
$ files = File::get ()
@@ -216,15 +216,15 @@ public function handleRecentItems(SS_HTTPRequest $r) {
216
216
if (!$ file ->canView ()) continue ;
217
217
218
218
$ result [] = ($ file instanceof Folder) ?
219
- $ this ->createFolderJSON ($ file ) :
220
- $ this ->createFileJSON ($ file );
219
+ $ this ->createFolderJSON ($ file ) :
220
+ $ this ->createFileJSON ($ file );
221
221
222
222
}
223
223
}
224
224
225
- return (new SS_HTTPResponse (
226
- Convert::array2json ($ result ), 200
227
- ))->addHeader ('Content-Type ' , 'application/json ' );
225
+ return (new SS_HTTPResponse (
226
+ Convert::array2json ($ result ), 200
227
+ ))->addHeader ('Content-Type ' , 'application/json ' );
228
228
}
229
229
230
230
/**
@@ -737,4 +737,4 @@ protected function JSONResponse($json = null) {
737
737
Convert::array2json ($ json )
738
738
))->addHeader ('Content-Type ' ,'application/json ' );
739
739
}
740
- }
740
+ }
0 commit comments