You are here

private function CCKFeedsMapperLocationTestCase::flattenPostData in Location Feeds 6

Helper function to flatten post data

1 call to CCKFeedsMapperLocationTestCase::flattenPostData()
CCKFeedsMapperLocationTestCase::_location_cck_fields in tests/location_feeds.cck.test
Helper function to add the location CCK fields

File

tests/location_feeds.cck.test, line 213

Class

CCKFeedsMapperLocationTestCase

Code

private function flattenPostData(&$edit) {
  do {
    $edit_flattened = TRUE;
    foreach ($edit as $k => $v) {
      if (is_array($v)) {
        $edit_flattened = FALSE;
        foreach ($v as $kk => $vv) {
          $edit["{$k}[{$kk}]"] = $vv;
        }
        unset($edit[$k]);
      }
    }
  } while (!$edit_flattened);
}