Merge pull request #598 from experty/L5

Use APC cache for Docker and fix bug with changing component sort order
This commit is contained in:
Joe Cohen
2015-05-07 10:44:21 -05:00
7 changed files with 55 additions and 54 deletions
+2 -4
View File
@@ -46,11 +46,9 @@ class ApiController extends AbstractController
public function postUpdateComponentOrder()
{
$componentData = Binput::all();
unset($componentData['component'][0]); // Remove random 0 index.
foreach ($componentData['component'] as $componentId => $order) {
foreach ($componentData['ids'] as $order => $componentId) {
$component = Component::find($componentId);
$component->update(['order' => $order]);
$component->update(['order' => $order + 1]); // Ordering should be 1-based, data comes in 0-based
}
return $componentData;