Skip to content

Commit 49e3946

Browse files
committed
Remove old zipcode from sagstitel
1 parent bd86fb7 commit 49e3946

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

os2web_cp_service.module

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,12 @@ function os2web_cp_service_create_case(array $data) {
220220

221221
switch ($field_info['type']) {
222222
case 'text':
223-
$node->{$field_name}[LANGUAGE_NONE][0]['value'] = (string) $data['fields'][$field['label']];
223+
if ($field['label'] === 'Sagstitel') {
224+
$node->{$field_name}[LANGUAGE_NONE][0]['value'] = (string) preg_replace('/\s\(\d{4}\)/', '', $data['fields']['Sagstitel']);
225+
}
226+
else {
227+
$node->{$field_name}[LANGUAGE_NONE][0]['value'] = (string) $data['fields'][$field['label']];
228+
}
224229
break;
225230

226231
case 'taxonomy_term_reference':

0 commit comments

Comments
 (0)