Skip to content

Commit e80f877

Browse files
author
Uncle Cheese
committed
Merge branch 'master' of github.com:/unclecheese/silverstripe-kickassets
2 parents 96067dd + d5ab760 commit e80f877

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

code/KickAssets.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function init() {
120120
Requirements::add_i18n_javascript(KICKASSETS_DIR.'/lang');
121121
$js = $this->config()->js_file;
122122

123-
Requirements::javascript(KICKASSETS_DIR."/javascript/build/$js");
123+
Requirements::javascript(KICKASSETS_DIR."/javascript/build/$js");
124124
Requirements::clear_combined_files();
125125
}
126126

@@ -166,10 +166,10 @@ public function handleFolderContents(SS_HTTPRequest $r) {
166166
);
167167

168168
$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')));
173173

174174
$totalFiles = (int) $files->count();
175175
$files = $files->limit($this->config()->folder_items_limit, $cursor);
@@ -178,18 +178,18 @@ public function handleFolderContents(SS_HTTPRequest $r) {
178178
if(!$file->canView()) continue;
179179

180180
$result['children'][] = ($file instanceof Folder) ?
181-
$this->createFolderJSON($file) :
182-
$this->createFileJSON($file, $folder);
181+
$this->createFolderJSON($file) :
182+
$this->createFileJSON($file, $folder);
183183
}
184184

185185
$cursor += $files->count();
186186
$result['cursor'] = $cursor;
187187
$result['has_more'] = ($cursor < $totalFiles);
188188
$result['total_items'] = $totalFiles;
189189

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');
193193

194194
}
195195

@@ -203,9 +203,9 @@ public function handleRecentItems(SS_HTTPRequest $r) {
203203
$result = array ();
204204

205205
$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');
209209

210210
if(!empty($fileIDs)) {
211211
$files = File::get()
@@ -216,15 +216,15 @@ public function handleRecentItems(SS_HTTPRequest $r) {
216216
if(!$file->canView()) continue;
217217

218218
$result[] = ($file instanceof Folder) ?
219-
$this->createFolderJSON($file) :
220-
$this->createFileJSON($file);
219+
$this->createFolderJSON($file) :
220+
$this->createFileJSON($file);
221221

222222
}
223223
}
224224

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');
228228
}
229229

230230
/**
@@ -737,4 +737,4 @@ protected function JSONResponse($json = null) {
737737
Convert::array2json($json)
738738
))->addHeader('Content-Type','application/json');
739739
}
740-
}
740+
}

images/screenshots/0.png

1.55 MB
Loading

0 commit comments

Comments
 (0)