Skip to content

Commit

Permalink
Modpack Build optimizations
Browse files Browse the repository at this point in the history
- Changed default min_memory value from '' to 0. Fixes TechnicPack#453
- Updated modpack.build.view blade template
  - Better display handling for min_java/min_memory
- Fixed a bug where minecraft versions for builds were being improperly set
  • Loading branch information
GenPage committed Sep 6, 2015
1 parent 621f9fa commit d75a54b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/controllers/ModpackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function anyBuild($build_id = null)

$minecraft = Input::get('minecraft');

$build->minecraft = $minecraft[0];
$build->minecraft = $minecraft;
$build->min_java = Input::get('java-version');
$build->min_memory = Input::get('memory-enabled') ? Input::get('memory') : '';
$build->save();
Expand Down Expand Up @@ -143,9 +143,9 @@ public function postAddBuild($modpack_id)

$minecraft = Input::get('minecraft');

$build->minecraft = $minecraft[0];
$build->minecraft = $minecraft;
$build->min_java = Input::get('java-version');
$build->min_memory = Input::get('memory-enabled') ? Input::get('memory') : '';
$build->min_memory = Input::get('memory-enabled') ? Input::get('memory') : 0;
$build->save();
Cache::forget('modpack.' . $modpack->slug);
if (!empty($clone))
Expand Down
4 changes: 2 additions & 2 deletions app/views/modpack/build/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<label>Minecraft Version: <span class="label label-default">{{ $build->minecraft }}</span></label><br>
</div>
<div class="col-md-6">
<label>Java Version: <span class="label label-default">{{ $build->min_java }}</span></label><br>
<label>Memory (<i>in MB</i>): <span class="label label-default">{{ $build->min_memory }}</span></label>
<label>Java Version: <span class="label label-default">{{ !empty($build->min_java) ? $build->min_java : 'Not Required' }}</span></label><br>
<label>Memory (<i>in MB</i>): <span class="label label-default">{{ $build->min_memory != 0 ? $build->min_memory : 'Not Required' }}</span></label>
</div>
</div>
</div>
Expand Down

0 comments on commit d75a54b

Please sign in to comment.