Permalink
Browse files

Ask questions first, shoot later.

  • Loading branch information...
1 parent 2e63876 commit 3e802e6d0dd4dc9c0ef773d5cc12a92702952a88 @vlad-ghita vlad-ghita committed May 17, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 data-sources/datasource.section_schema.php
@@ -146,6 +146,10 @@ public function grab(array &$param_pool=NULL) {
foreach($section_fields as $section_field){
$field = $section_field->get();
+
+ // Skip fields that have not been selected:
+ if (!in_array($field['element_name'], $this->dsParamFIELDS)) continue;
+
$f = new XMLElement($field['element_name']);
$f->setAttribute('required', $field['required']);
@@ -167,9 +171,6 @@ public function grab(array &$param_pool=NULL) {
}
}
- // Skip fields that have not been selected:
- if (!in_array($field['element_name'], $this->dsParamFIELDS)) continue;
-
// Allow a field to define its own schema XML:
if (method_exists($section_field, 'appendFieldSchema')) {
$section_field->appendFieldSchema($f);

0 comments on commit 3e802e6

Please sign in to comment.