@@ -199,10 +199,12 @@ function _os2web_edoc_esdh_mm_import_meeting_agenda_item($meeting, $xml) {
199
199
$ xml_item ['number ' ] = (int ) $ xml ->AgendaItemNumber ;
200
200
$ xml_item ['pdf ' ] = (string ) $ xml ->PDFDocument ;
201
201
$ xml_item_document = $ xml ->Document ;
202
+ $ xml_item_bullet = $ xml_item_document ->AgendaItems ;
203
+ $ xml_item_fulltext = (string ) $ xml ->FullText ;
202
204
$ xml_item ['name ' ] = (string ) $ xml_item_document ->NeutralTitle ;
203
205
$ xml_item ['document_type ' ] = (string ) $ xml_item_document ->PublishingType ;
204
-
205
- # error_log(print_r($meeting, 1));
206
+ // error_log(print_r("FullText => ".$xml_item_bullet, 1));
207
+ // error_log(print_r($meeting, 1));
206
208
$ item = array (
207
209
'id ' => $ xml_item ['number ' ],
208
210
'title ' => 'Punkt ' . $ xml_item ['number ' ] . ' ' . $ xml_item ['name ' ],
@@ -213,29 +215,28 @@ function _os2web_edoc_esdh_mm_import_meeting_agenda_item($meeting, $xml) {
213
215
'uri ' => implode ('/ ' , array (
214
216
trim ($ meeting ['uri ' ], "/ " ),
215
217
$ xml_item ['pdf ' ])),
216
- 'title ' => $ xml_item ['name ' ],
218
+ // 'title' => $xml_item['name'],
219
+ // 'body' => $xml_item_fulltext,
217
220
),
218
221
);
219
222
220
223
// Deny closed content.
221
224
if ($ item ['access ' ] === 'SKAL PUBLICERES ' ) {
222
225
// Process attachments.
223
- // foreach ($xml->xpath("table[@name='bullet']") as $bullet_xml) {
224
- // if (($bullet = _os2web_edoc_esdh_import_bullet($info, $bullet_xml)) !== FALSE) {
225
- // if (is_int($bullet['sort']) && $bullet['sort'] > 0) {
226
- // $item['bullets'][$bullet['sort'] - 1] = $bullet;
227
- // }
228
- // else {
229
- // $item['bullets'][] = $bullet;
230
- // }
231
- // }
232
- // }
226
+ foreach ($ xml_item_bullet ->AgendaItem as $ bullet_xml ) {
227
+
228
+ $ item ['bullets ' ][] = array (
229
+ 'title ' => (string ) $ bullet_xml ->Name ,
230
+ 'body ' => $ xml_item_fulltext ,
231
+ );
232
+ #error_log(print_r("FullText => ".$item['bullets'], 1));
233
+ }
233
234
// Process attachments.
234
235
#error_log(print_r($xml_item_document->Attachments, 1 ));
235
236
foreach ($ xml_item_document ->Attachments as $ enclosures ) {
236
- #error_log(print_r($enclosure , 1 ));
237
+ #error_log(print_r($encliosure , 1 ));
237
238
foreach ($ enclosures ->Attachment as $ enclosure ) {
238
- # error_log(print_r($enclosure, 1 ));
239
+ // error_log(print_r("Fulltext -- > : ". $enclosure->FullText , 1 ));
239
240
$ enclosure_item ['filename_in ' ] = (string ) $ enclosure ->PDFDocument ;
240
241
$ enclosure_item ['access ' ] = (string ) $ enclosure ->PublishingType ;
241
242
if (strlen ($ enclosure_item ['filename_in ' ]) > 0 && $ enclosure_item ['access ' ] === 'SKAL PUBLICERES ' ) {
@@ -246,8 +247,15 @@ function _os2web_edoc_esdh_mm_import_meeting_agenda_item($meeting, $xml) {
246
247
'title ' => trim ((string ) $ enclosure ->NeutralTitle ),
247
248
'access ' => TRUE ,
248
249
);
250
+ /* $item['bullets'][] = array(
251
+ 'title' => trim((string) $enclosure->NeutralTitle),
252
+ 'body' => $enclosure->FullText,
253
+
254
+ );*/
255
+ // error_log(print_r(" Bullet 0 => ".$item['bullets'][0]['title'], 1));
249
256
}
250
257
}
258
+
251
259
}
252
260
}
253
261
#error_log(print_r($item, 1));
@@ -302,7 +310,7 @@ function _os2web_edoc_esdh_mm_order_addenums($drush = FALSE) {
302
310
return ;
303
311
}
304
312
$ nodes = $ nodes_result ['node ' ];
305
- error_log (print_r ($ nodes , 1 ));
313
+ // error_log(print_r($nodes, 1));
306
314
// Load necessary fields into the node object.
307
315
$ fields = field_info_instances ('node ' , 'meeting ' );
308
316
field_attach_load ('node ' , $ nodes , FIELD_LOAD_CURRENT , array ('field_id ' => $ fields ['field_os2web_meetings_addendum ' ]['field_id ' ]));
0 commit comments