| @@ 604-606 (lines=3) @@ | ||
| 601 | $this->_errors = array(); |
|
| 602 | $autogenerated_handle = false; |
|
| 603 | ||
| 604 | if (!isset($fields['title']) || trim($fields['title']) === '') { |
|
| 605 | $this->_errors['title'] = __('This is a required field'); |
|
| 606 | } |
|
| 607 | ||
| 608 | if (trim($fields['type']) !== '' && preg_match('/(index|404|403)/i', $fields['type'])) { |
|
| 609 | $types = preg_split('/\s*,\s*/', strtolower($fields['type']), -1, PREG_SPLIT_NO_EMPTY); |
|
| @@ 679-682 (lines=4) @@ | ||
| 676 | } |
|
| 677 | ||
| 678 | // Check to ensure all the required section fields are filled |
|
| 679 | if (!isset($meta['navigation_group']) || strlen(trim($meta['navigation_group'])) === 0) { |
|
| 680 | $this->_errors['navigation_group'] = __('This is a required field.'); |
|
| 681 | $canProceed = false; |
|
| 682 | } |
|
| 683 | ||
| 684 | // Basic custom field checking |
|
| 685 | if (is_array($fields) && !empty($fields)) { |
|