Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Fix show_in_menu field, was always saving as 1
Browse files Browse the repository at this point in the history
  • Loading branch information
CraigChilds94 committed Mar 1, 2016
1 parent e230a3a commit 3336da8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anchor/routes/pages.php
Expand Up @@ -132,7 +132,7 @@
// encode title
$input['title'] = e($input['title'], ENT_COMPAT);

$input['show_in_menu'] = is_null($input['show_in_menu']) ? 0 : 1;
$input['show_in_menu'] = is_null($input['show_in_menu']) || empty($input['show_in_menu']) ? 0 : 1;

$input['html'] = parse($input['markdown']);

Expand Down Expand Up @@ -228,7 +228,7 @@
$input['name'] = $input['title'];
}

$input['show_in_menu'] = is_null($input['show_in_menu']) ? 0 : 1;
$input['show_in_menu'] = is_null($input['show_in_menu']) || empty($input['show_in_menu']) ? 0 : 1;

$input['html'] = parse($input['markdown']);

Expand Down

0 comments on commit 3336da8

Please sign in to comment.