2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 07/08/2011 *
4 * =================== Last change: 07/08/2011 *
6 * -------------------------------------------------------------------- *
7 * File : callback-functions.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Call-back functions for XML templates *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Call-Back-Funktionen fuer XML-Templates *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2012 by Mailer Developer Team *
20 * For more information visit: http://mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
43 // Handles the XML node 'admin-entry-meta-data'
44 function doXmlAdminEntryMetaData ($resource, $attributes) {
45 // There should be no attributes
46 if (count($attributes) > 0) {
47 // Please don't add any attributes to foo-list nodes
48 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
52 // Handles the XML node 'member-entry-meta-data'
53 function doXmlMemberEntryMetaData ($resource, $attributes) {
54 // There should be no attributes
55 if (count($attributes) > 0) {
56 // Please don't add any attributes to foo-list nodes
57 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
61 // Handles the XML node 'callback-function'
62 function doXmlCallbackFunction ($resource, $attributes) {
63 // There are two attributes, by default
64 if (count($attributes) != 2) {
65 // Not the right count
66 reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
67 } elseif (!isset($attributes['TYPE'])) {
69 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
70 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
72 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
73 } elseif (!isset($attributes['VALUE'])) {
75 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
76 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
77 // Not valid/verifyable
78 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
81 // Add the function name and no attributes by default
82 $GLOBALS['__XML_CALLBACKS']['callbacks'][] = __FUNCTION__;
83 $GLOBALS['__XML_CALLBACKS']['functions'][__FUNCTION__][] = $attributes['VALUE'];
84 $GLOBALS['__XML_ARGUMENTS'][__FUNCTION__] = array();
85 $GLOBALS['__COLUMN_INDEX'][__FUNCTION__] = 'column';
88 // Handles the XML node 'database-table'
89 function doXmlDatabaseTable ($resource, $attributes) {
90 // There are three attributes, by default
91 if (count($attributes) != 3) {
92 // Not the right count
93 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
94 } elseif (!isset($attributes['NAME'])) {
96 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
97 } elseif (!isset($attributes['TYPE'])) {
99 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
100 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
102 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
103 } elseif (!isset($attributes['VALUE'])) {
105 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
106 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
107 // Not valid/verifyable
108 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
109 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
110 // doXmlCallbackFunction is missing
111 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
114 // Add the entry to the list
115 addXmlValueToCallbackAttributes('database_table', $attributes);
118 // Handles the XML node 'database-column-list'
119 function doXmlDatabaseColumnList ($resource, $attributes) {
120 // There should be no attributes
121 if (count($attributes) > 0) {
122 // Please don't add any attributes to foo-list nodes
123 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
127 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'] = array();
130 // Handles the XML node 'database-column-list-entry'
131 function doXmlDatabaseColumnListEntry ($resource, $attributes) {
132 // There are three attributes, by default
133 if (count($attributes) != 6) {
134 // Not the right count
135 reportBug(__FUNCTION__, __LINE__, 'Expected 6 attributes, got ' . count($attributes));
136 } elseif (!isset($attributes['NAME'])) {
138 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
139 } elseif (!isset($attributes['TYPE'])) {
141 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
142 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
144 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
145 } elseif (!isset($attributes['TABLE'])) {
147 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
148 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE'])) {
149 // Not valid/verifyable
150 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TYPE=' . $attributes['TYPE'] . ',TABLE=' . $attributes['TABLE']);
151 } elseif (!isset($attributes['ALIAS'])) {
153 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
154 } elseif (!isset($attributes['FUNCTION'])) {
155 // 'FUNCTION' not found
156 reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
157 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
158 // 'ALIAS' not valid/verifyable
159 reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
160 } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
161 // 'FUNCTION' not valid/verifyable
162 reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
163 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'])) {
164 // doXmlCallbackFunction is missing
165 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.');
168 // Add the entry to the list
169 addXmlValueToCallbackAttributes('column_list', $attributes);
172 // Handles the XML node 'callback-function-list'
173 function doXmlCallbackFunctionList ($resource, $attributes) {
174 // There should be no attributes
175 if (count($attributes) > 0) {
176 // Please don't add any attributes to foo-list nodes
177 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
181 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'] = array();
184 // Handles the XML node 'callback-function-list-entry'
185 function doXmlCallbackFunctionListEntry ($resource, $attributes) {
186 // There are three attributes, by default
187 if (count($attributes) != 3) {
188 // Not the right count
189 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
190 } elseif (!isset($attributes['NAME'])) {
192 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
193 } elseif (!isset($attributes['TYPE'])) {
195 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
196 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
198 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
199 } elseif (!isset($attributes['VALUE'])) {
201 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
202 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
203 // Not valid/verifyable
204 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
205 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'])) {
206 // doXmlCallbackFunction is missing
207 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.');
210 // Add the entry to the list
211 addXmlValueToCallbackAttributes('callback_list', $attributes);
214 // Handles the XML node 'extra-parameter-list'
215 function doXmlExtraParameterList ($resource, $attributes) {
216 // There should be no attributes
217 if (count($attributes) > 0) {
218 // Please don't add any attributes to foo-list nodes
219 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
223 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'] = array();
226 // Handles the XML node 'extra-parameter-list-entry'
227 function doXmlExtraParameterListEntry ($resource, $attributes) {
228 // There are three attributes, by default
229 if (count($attributes) != 3) {
230 // Not the right count
231 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
232 } elseif (!isset($attributes['NAME'])) {
234 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
235 } elseif (!isset($attributes['TYPE'])) {
237 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
238 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
240 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
241 } elseif (!isset($attributes['VALUE'])) {
243 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
244 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
245 // Not valid/verifyable
246 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
247 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'])) {
248 // doXmlCallbackFunction is missing
249 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
252 // Add the entry to the list
253 addXmlValueToCallbackAttributes('extra_list', $attributes);
256 // Handles the XML node 'time-columns-list'
257 function doXmlTimeColumnsList ($resource, $attributes) {
258 // There should be no attributes
259 if (count($attributes) > 0) {
260 // Please don't add any attributes to foo-list nodes
261 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
265 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'] = array();
268 // Handles the XML node 'time-columns-list-entry'
269 function doXmlTimeColumnsListEntry ($resource, $attributes) {
270 // There are three attributes, by default
271 if (count($attributes) != 3) {
272 // Not the right count
273 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
274 } elseif (!isset($attributes['NAME'])) {
276 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
277 } elseif (!isset($attributes['TYPE'])) {
279 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
280 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
282 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
283 } elseif (!isset($attributes['VALUE'])) {
285 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
286 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
287 // Not valid/verifyable
288 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
289 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'])) {
290 // doXmlCallbackFunction is missing
291 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
294 // Add the entry to the list
295 addXmlValueToCallbackAttributes('time_columns', $attributes);
298 // Handles the XML node 'extra-parameter-member-list'
299 function doXmlExtraParameterMemberList ($resource, $attributes) {
300 // There should be no attributes
301 if (count($attributes) > 0) {
302 // Please don't add any attributes to foo-list nodes
303 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
304 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
305 // This list should be created already
306 reportBug(__FUNCTION__, __LINE__, 'member_list should be already created.');
310 // Handles the XML node 'extra-parameter-reload-list'
311 function doXmlExtraParameterReloadList ($resource, $attributes) {
312 // There should be no attributes
313 if (count($attributes) > 0) {
314 // Please don't add any attributes to foo-list nodes
315 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
316 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
317 // This list should be created already
318 reportBug(__FUNCTION__, __LINE__, 'reload_list should be already created.');
322 // Handles the XML node 'extra-parameter-member-list-entry'
323 function doXmlExtraParameterMemberListEntry ($resource, $attributes) {
324 // There are three attributes, by default
325 if (count($attributes) != 3) {
326 // Not the right count
327 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
328 } elseif (!isset($attributes['NAME'])) {
330 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
331 } elseif (!isset($attributes['TYPE'])) {
333 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
334 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
336 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
337 } elseif (!isset($attributes['VALUE'])) {
339 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
340 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
341 // Not valid/verifyable
342 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
343 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
344 // doXmlCallbackFunction is missing
345 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.');
348 // Add the entry to the list
349 addXmlValueToCallbackAttributes('extra_list', $attributes, 'member_list');
352 // Handles the XML node 'extra-parameter-reload-list-entry'
353 function doXmlExtraParameterReloadListEntry ($resource, $attributes) {
354 // There are three attributes, by default
355 if (count($attributes) != 3) {
356 // Not the right count
357 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
358 } elseif (!isset($attributes['NAME'])) {
360 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
361 } elseif (!isset($attributes['TYPE'])) {
363 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
364 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
366 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
367 } elseif (!isset($attributes['VALUE'])) {
369 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
370 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
371 // Not valid/verifyable
372 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
373 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
374 // doXmlCallbackFunction is missing
375 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/reload-list not included around this node. Please fix your XML.');
378 // Add the entry to the list
379 addXmlValueToCallbackAttributes('extra_list', $attributes, 'reload_list');
382 // Handles the XML node 'extra-parameter-added-list'
383 function doXmlExtraParameterAddedList ($resource, $attributes) {
384 // There should be no attributes
385 if (count($attributes) > 0) {
386 // Please don't add any attributes to foo-list nodes
387 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
388 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
389 // This list should be created already
390 reportBug(__FUNCTION__, __LINE__, 'added_list should be already created.');
394 // Handles the XML node 'extra-parameter-added-list-entry'
395 function doXmlExtraParameterAddedListEntry ($resource, $attributes) {
396 // There are three attributes, by default
397 if (count($attributes) != 3) {
398 // Not the right count
399 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
400 } elseif (!isset($attributes['NAME'])) {
402 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
403 } elseif (!isset($attributes['TYPE'])) {
405 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
406 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
408 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
409 } elseif (!isset($attributes['VALUE'])) {
411 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
412 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
413 // Not valid/verifyable
414 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
415 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
416 // doXmlCallbackFunction is missing
417 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/added-list not included around this node. Please fix your XML.');
420 // Add the entry to the list
421 addXmlValueToCallbackAttributes('extra_list', $attributes, 'added_list');
424 // Handles the XML node 'extra-parameter-created-list'
425 function doXmlExtraParameterCreatedList ($resource, $attributes) {
426 // There should be no attributes
427 if (count($attributes) > 0) {
428 // Please don't add any attributes to foo-list nodes
429 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
430 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
431 // This list should be created already
432 reportBug(__FUNCTION__, __LINE__, 'created_list should be already created.');
436 // Handles the XML node 'extra-parameter-created-list-entry'
437 function doXmlExtraParameterCreatedListEntry ($resource, $attributes) {
438 // There are three attributes, by default
439 if (count($attributes) != 3) {
440 // Not the right count
441 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
442 } elseif (!isset($attributes['NAME'])) {
444 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
445 } elseif (!isset($attributes['TYPE'])) {
447 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
448 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
450 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
451 } elseif (!isset($attributes['VALUE'])) {
453 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
454 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
455 // Not valid/verifyable
456 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
457 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
458 // doXmlCallbackFunction is missing
459 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/created-list not included around this node. Please fix your XML.');
462 // Add the entry to the list
463 addXmlValueToCallbackAttributes('extra_list', $attributes, 'created_list');
466 // Handles the XML node 'status-change-column'
467 function doXmlStatusChangeColumn ($resource, $attributes) {
468 // There are three attributes, by default
469 if (count($attributes) != 3) {
470 // Not the right count
471 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
472 } elseif (!isset($attributes['NAME'])) {
474 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
475 } elseif (!isset($attributes['TYPE'])) {
477 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
478 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
480 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
481 } elseif (!isset($attributes['VALUE'])) {
483 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
484 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
485 // Not valid/verifyable
486 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
487 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
488 // doXmlCallbackFunction is missing
489 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
492 // Add the entry to the list
493 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'][$attributes['VALUE']] = array();
496 // Handles the XML node 'status-change-list'
497 function doXmlStatusChangeList ($resource, $attributes) {
498 // There should be no attributes
499 if (count($attributes) > 0) {
500 // Please don't add any attributes to foo-list nodes
501 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
502 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
503 // doXmlCallbackFunction is missing
504 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.');
508 // Handles the XML node 'status-change-list-entry'
509 function doXmlStatusChangeListEntry ($resource, $attributes) {
510 // There are for attributes, by default
511 if (count($attributes) != 4) {
512 // Not the right count
513 reportBug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes));
514 } elseif (!isset($attributes['NAME'])) {
516 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
517 } elseif (!isset($attributes['TYPE'])) {
519 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
520 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
522 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
523 } elseif (!isset($attributes['VALUE'])) {
525 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
526 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['OLD'])) {
527 // Not valid/verifyable
528 reportBug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']);
529 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
530 // Not valid/verifyable
531 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
532 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
533 // doXmlCallbackFunction is missing
534 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/change-list not included around this node. Please fix your XML.');
537 // Add the entry to the list
538 addXmlValueToCallbackAttributes('status_list', $attributes, $attributes['NAME'], 'OLD');
541 // Handles the XML node 'enable-modify-entries'
542 function doXmlEnableModifyEntries ($resource, $attributes) {
543 // There are three attributes, by default
544 if (count($attributes) != 3) {
545 // Not the right count
546 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
547 } elseif (!isset($attributes['NAME'])) {
549 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
550 } elseif (!isset($attributes['TYPE'])) {
552 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
553 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
555 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
556 } elseif (!isset($attributes['VALUE'])) {
558 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
559 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
560 // Not valid/verifyable
561 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
562 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
563 // doXmlCallbackFunction is missing
564 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
567 // Add the entry to the list
568 addXmlValueToCallbackAttributes('enable_modify_entries', $attributes);
571 // Handles the XML node 'table-id-column'
572 function doXmlTableIdColumn ($resource, $attributes) {
573 // There are three attributes, by default
574 if (count($attributes) != 3) {
575 // Not the right count
576 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
577 } elseif (!isset($attributes['NAME'])) {
579 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
580 } elseif (!isset($attributes['TYPE'])) {
582 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
583 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
585 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
586 } elseif (!isset($attributes['VALUE'])) {
588 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
589 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
590 // Not valid/verifyable
591 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
592 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
593 // doXmlCallbackFunction is missing
594 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
597 // Add the entry to the array
598 addXmlValueToCallbackAttributes('table_id_column', $attributes);
601 // Handles the XML node 'table-userid-column'
602 function doXmlTableUseridColumn ($resource, $attributes) {
603 // There are three attributes, by default
604 if (count($attributes) != 3) {
605 // Not the right count
606 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
607 } elseif (!isset($attributes['NAME'])) {
609 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
610 } elseif (!isset($attributes['TYPE'])) {
612 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
613 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
615 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
616 } elseif (!isset($attributes['VALUE'])) {
618 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
619 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
620 // Not valid/verifyable
621 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
622 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
623 // doXmlCallbackFunction is missing
624 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
627 // Add the entry to the array
628 addXmlValueToCallbackAttributes('table_userid_column', $attributes);
631 // Handles the XML node 'raw-userid-column-key'
632 function doXmlRawUseridColumnKey ($resource, $attributes) {
633 // There are three attributes, by default
634 if (count($attributes) != 3) {
635 // Not the right count
636 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
637 } elseif (!isset($attributes['NAME'])) {
639 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
640 } elseif (!isset($attributes['TYPE'])) {
642 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
643 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
645 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
646 } elseif (!isset($attributes['VALUE'])) {
648 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
649 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
650 // Not valid/verifyable
651 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
652 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
653 // doXmlCallbackFunction is missing
654 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
657 // Add the entry to the array
658 addXmlValueToCallbackAttributes('raw_userid_column_key', $attributes);
661 // Handles the XML node 'cache-file'
662 function doXmlCacheFile ($resource, $attributes) {
663 // There are three attributes, by default
664 if (count($attributes) != 3) {
665 // Not the right count
666 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
667 } elseif (!isset($attributes['NAME'])) {
669 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
670 } elseif (!isset($attributes['TYPE'])) {
672 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
673 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
675 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
676 } elseif (!isset($attributes['VALUE'])) {
678 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
679 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
680 // Not valid/verifyable
681 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
682 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
683 // doXmlCallbackFunction is missing
684 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
687 // Add the entry to the array
688 addXmlValueToCallbackAttributes('cache_file', $attributes);
691 //-----------------------------------------------------------------------------
692 // Call-back functions for listing of data in admin area
693 //-----------------------------------------------------------------------------
695 // Handles the XML node 'admin-list-data'
696 function doXmlAdminListData ($resource, $attributes) {
697 // There should be no attributes
698 if (count($attributes) > 0) {
699 // Please don't add any attributes to foo-list nodes
700 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
704 // Handles the XML node 'member-list-data'
705 function doXmlMemberListData ($resource, $attributes) {
706 // There should be no attributes
707 if (count($attributes) > 0) {
708 // Please don't add any attributes to foo-list nodes
709 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
713 // Handles the XML node 'data-tables'
714 function doXmlDataTables ($resource, $attributes) {
715 // There should be no attributes
716 if (count($attributes) > 0) {
717 // Please don't add any attributes to foo-list nodes
718 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
722 // Handles the XML node 'data-table'
723 function doXmlDataTable ($resource, $attributes) {
724 // There are three attributes, by default
725 if (count($attributes) != 3) {
726 // Not the right count
727 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
728 } elseif (!isset($attributes['VALUE'])) {
730 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
731 } elseif (!isset($attributes['TYPE'])) {
733 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
734 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
736 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
737 } elseif (!isset($attributes['ALIAS'])) {
739 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
740 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
741 // Not valid/verifyable
742 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
743 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
744 // Not valid/verifyable
745 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']);
746 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
747 // doXmlCallbackFunction is missing
748 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
751 // Add the entry to the array
752 addXmlValueToCallbackAttributes('data_table', $attributes);
755 // Handles the XML node 'select-data-from-list'
756 function doXmlSelectDataFromList ($resource, $attributes) {
757 // There should be no attributes
758 if (count($attributes) > 0) {
759 // Please don't add any attributes to foo-list nodes
760 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
761 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
762 // doXmlCallbackFunction is missing
763 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
767 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'] = array();
770 // Handles the XML node 'select-data-from-list-entry'
771 function doXmlSelectDataFromListEntry ($resource, $attributes) {
772 // There are five attributes, by default
773 if (count($attributes) != 5) {
774 // Not the right count
775 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
776 } elseif (!isset($attributes['VALUE'])) {
778 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
779 } elseif (!isset($attributes['TYPE'])) {
781 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
782 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
784 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
785 } elseif (!isset($attributes['ALIAS'])) {
787 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
788 } elseif (!isset($attributes['FUNCTION'])) {
789 // 'FUNCTION' not found
790 reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
791 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
792 // 'VALUE' not valid/verifyable
793 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
794 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
795 // 'ALIAS' not valid/verifyable
796 reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
797 } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
798 // 'FUNCTION' not valid/verifyable
799 reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
800 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
801 // doXmlCallbackFunction is missing
802 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.');
805 // Add the entry to the array
806 addXmlValueToCallbackAttributes('data_column_list', $attributes);
809 // Handles the XML node 'where-select-from-list'
810 function doXmlWhereSelectFromList ($resource, $attributes) {
811 // There should be no attributes
812 if (count($attributes) > 0) {
813 // Please don't add any attributes to foo-list nodes
814 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
815 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
816 // doXmlCallbackFunction is missing
817 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
821 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['where_select_list'] = array();
824 // Handles the XML node 'where-select-from-list-entry'
825 function doXmlWhereSelectFromListEntry ($resource, $attributes) {
826 // There are five attributes, by default
827 if (count($attributes) != 5) {
828 // Not the right count
829 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
830 } elseif (!isset($attributes['TYPE'])) {
832 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
833 } elseif (!isset($attributes['TABLE'])) {
835 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
836 } elseif (!isset($attributes['VALUE'])) {
838 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
839 } elseif (!isset($attributes['CONDITION'])) {
840 // 'CONDITION' not found
841 reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
842 } elseif (!isset($attributes['LOOK-FOR'])) {
843 // 'LOOK-FOR' not found
844 reportBug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.');
845 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
847 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
848 } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
849 // 'TABLE' not valid/verifyable
850 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
851 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
852 // 'VALUE' not valid/verifyable
853 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
854 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
855 // 'CONDITION' not valid/verifyable
856 reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
857 } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
858 // 'CONDITION' is not known
859 reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
860 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
861 // doXmlCallbackFunction is missing
862 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
865 // Add the entry to the array
866 addXmlValueToCallbackAttributes('where_select_list', $attributes);
869 // Handles the XML node 'where-condition'
870 function doXmlWhereCondition ($resource, $attributes) {
871 // There are two attributes, by default
872 if (count($attributes) != 3) {
873 // Please don't add any attributes to foo-list nodes
874 reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes because this is a where-condition node, got ' . count($attributes));
875 } elseif (!isset($attributes['TYPE'])) {
877 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
878 } elseif (!isset($attributes['CONDITION'])) {
879 // 'CONDITION' not found
880 reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
881 } elseif (!isset($attributes['NAME'])) {
883 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
884 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
885 // doXmlCallbackFunction is missing
886 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
890 addXmlValueToCallbackAttributes('where_condition', $attributes);
893 // Handles the XML node 'order-by-list'
894 function doXmlOrderByList ($resource, $attributes) {
895 // There should be no attributes
896 if (count($attributes) > 0) {
897 // Please don't add any attributes to foo-list nodes
898 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
899 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
900 // doXmlCallbackFunction is missing
901 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
905 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['order_by_list'] = array();
908 // Handles the XML node 'order-by-list-entry'
909 function doXmlOrderByListEntry ($resource, $attributes) {
910 // There are four attributes, by default
911 if (count($attributes) != 4) {
912 // Not the right count
913 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
914 } elseif (!isset($attributes['ORDER'])) {
916 reportBug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.');
917 } elseif (!isset($attributes['TYPE'])) {
919 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
920 } elseif (!isset($attributes['TABLE'])) {
922 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
923 } elseif (!isset($attributes['VALUE'])) {
925 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
926 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
928 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
929 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['ORDER'])) {
930 // 'ORDER' not valid/verifyable
931 reportBug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']);
932 } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
933 // 'TABLE' not valid/verifyable
934 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
935 } elseif ((trim($attributes['VALUE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) {
936 // 'VALUE' not valid/verifyable
937 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
938 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
939 // doXmlCallbackFunction is missing
940 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
943 // Add the entry to the array
944 addXmlValueToCallbackAttributes('order_by_list', $attributes);
947 // Handles the XML node 'list-template'
948 function doXmlListTemplate ($resource, $attributes) {
949 // There are two attributes, by default
950 if (count($attributes) != 2) {
951 // Not the right count
952 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
953 } elseif (!isset($attributes['VALUE'])) {
955 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
956 } elseif (!isset($attributes['TYPE'])) {
958 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
959 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
961 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
962 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
963 // Not valid/verifyable
964 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
965 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
966 // doXmlCallbackFunction is missing
967 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
970 // Add the entry to the array
971 addXmlValueToCallbackAttributes('list_template', $attributes);
974 // Handles the XML node 'list-row-template'
975 function doXmlListRowTemplate ($resource, $attributes) {
976 // There are two attributes, by default
977 if (count($attributes) != 2) {
978 // Not the right count
979 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
980 } elseif (!isset($attributes['VALUE'])) {
982 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
983 } elseif (!isset($attributes['TYPE'])) {
985 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
986 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
988 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
989 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
990 // Not valid/verifyable
991 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
992 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
993 // doXmlCallbackFunction is missing
994 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
997 // Add the entry to the array
998 addXmlValueToCallbackAttributes('list_row_template', $attributes);
1001 // Handles the XML node 'column-callback-list'
1002 function doXmlColumnCallbackList ($resource, $attributes) {
1003 // There should be no attributes
1004 if (count($attributes) > 0) {
1005 // Please don't add any attributes to foo-list nodes
1006 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
1007 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
1008 // doXmlCallbackFunction is missing
1009 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
1012 // Add an empty list
1013 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'] = array();
1016 // Handles the XML node 'column-callback-list-entry'
1017 function doXmlColumnCallbackListEntry ($resource, $attributes) {
1018 // There should be no attributes
1019 if (count($attributes) > 0) {
1020 // Please don't add any attributes to foo-list nodes
1021 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
1022 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
1023 // doXmlCallbackFunction is missing
1024 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.');
1028 // Handles the XML node 'column-callback-data'
1029 function doXmlColumnCallbackData ($resource, $attributes) {
1030 // There are three attributes, by default
1031 if (count($attributes) != 3) {
1032 // Not the right count
1033 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
1034 } elseif (!isset($attributes['VALUE'])) {
1035 // 'VALUE' not found
1036 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1037 } elseif (!isset($attributes['TYPE'])) {
1039 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1040 } elseif (!isset($attributes['CALLBACK'])) {
1041 // 'CALLBACK' not found
1042 reportBug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.');
1043 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1045 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1046 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1047 // Not valid/verifyable
1048 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1049 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
1050 // doXmlCallbackFunction is missing
1051 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
1052 } elseif ((trim($attributes['CALLBACK']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['CALLBACK']))) {
1053 // 'CALLBACK' not valid/verifyable
1054 reportBug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']);
1057 // Add the entry to the array
1058 addXmlValueToCallbackAttributes('column_callback_list', $attributes);
1061 // Handles the XML node 'callback-extra-parameter-list'
1062 function doXmlCallbackExtraParameterList ($resource, $attributes) {
1063 // There should be no attributes
1064 if (count($attributes) > 0) {
1065 // Please don't add any attributes to foo-list nodes
1066 reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes));
1067 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
1068 // doXmlCallbackFunction is missing
1069 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.');
1070 } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
1071 // Abort silently here, no one wants to kill this array
1075 // Add an empty list
1076 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'] = array();
1079 // Handles the XML node 'callback-extra-parameter-list-entry'
1080 function doXmlCallbackExtraParameterListEntry ($resource, $attributes) {
1081 // There are three attributes, by default
1082 if (count($attributes) != 3) {
1083 // Not the right count
1084 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
1085 } elseif (!isset($attributes['COLUMN'])) {
1086 // 'COLUMN' not found
1087 reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
1088 } elseif (!isset($attributes['TYPE'])) {
1090 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1091 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1093 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1094 } elseif (!isset($attributes['VALUE'])) {
1095 // 'VALUE' not found
1096 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1097 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1098 // 'VALUE' not valid/verifyable
1099 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1100 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
1101 // doXmlCallbackFunction is missing
1102 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.');
1105 // Add the entry to the array
1106 addXmlValueToCallbackAttributes('__EXTRA_PARAMETER', $attributes);
1109 // Handles the XML node 'no-entry-found-message'
1110 function doXmlNoEntryFoundMessage ($resource, $attributes) {
1111 // There are two attributes, by default
1112 if (count($attributes) != 2) {
1113 // Not the right count
1114 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
1115 } elseif (!isset($attributes['VALUE'])) {
1116 // 'VALUE' not found
1117 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1118 } elseif (!isset($attributes['TYPE'])) {
1120 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1121 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1123 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1124 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1125 // Not valid/verifyable
1126 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1127 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
1128 // doXmlCallbackFunction is missing
1129 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
1132 // Add the entry to the array
1133 addXmlValueToCallbackAttributes('no_entry_message_id', $attributes);
1136 //-----------------------------------------------------------------------------
1137 // XML type validation
1138 //-----------------------------------------------------------------------------
1140 // Checks for string without any added extra data
1141 function isXmlTypeString ($value) {
1142 // Just let SQL_ESCAPE() do the job
1143 return ($value == SQL_ESCAPE($value));
1146 // Fake-check for array type
1147 function isXmlTypeArray ($value) {
1148 // This value is always a string
1149 return (is_string($value));
1152 // Check for boolean type
1153 function isXmlTypeBool ($value) {
1155 $value = trim($value);
1157 // This value is always a string
1158 return (($value == 'true') || ($value == 'false'));
1161 // Check for integer type
1162 function isXmlTypeInt ($value) {
1164 $value = trim($value);
1166 // This value is always a string
1167 return (bigintval($value) == $value);
1170 // Check for callback type
1171 function isXmlTypeCallback ($value) {
1173 $value = trim($value);
1175 // This value is always a string
1176 return (function_exists($value));
1179 //-----------------------------------------------------------------------------
1180 // Private XML functions
1181 //-----------------------------------------------------------------------------
1183 // Adds given attribut to element
1184 function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $key = '') {
1185 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - ENTERED!');
1186 // Is it boolean type?
1187 if (($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
1188 // Then convert VALUE
1189 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CONVERTING!');
1190 $attributes['VALUE'] = convertStringToBoolean($attributes['VALUE']);
1191 } elseif ($attributes['TYPE'] == 'callback') {
1192 // It is a simple call-back type
1193 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CALLING!');
1194 $attributes['VALUE'] = call_user_func($attributes['VALUE']);
1197 // What do we need to add?
1198 if ($attributes['TYPE'] == 'array') {
1199 // Another nested array
1200 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element);
1201 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE'] . '_list'] = array();
1202 } elseif (!empty($extraKey)) {
1203 // Sub-array (one level only)
1204 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ' - ANALYSING...');
1205 if (trim($attributes['NAME']) == '') {
1207 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
1208 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][] = $attributes['VALUE'];
1209 } elseif (!empty($key)) {
1211 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - KEY! (key=' . $attributes[$key] . ')');
1212 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][$attributes[$key]] = $attributes['VALUE'];
1215 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME! (NAME=' . $attributes['NAME'] . ')');
1216 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][$attributes['NAME']] = $attributes['VALUE'];
1218 } elseif ((isset($attributes['FUNCTION'])) && (isset($attributes['ALIAS']))) {
1220 * ALIAS and FUNCTION detected? This may happen with SQL queries
1221 * like: UNIX_TIMESTAMP(`foo_timestamp`) AS `foo_timestamp`
1224 // Fix missing 'NAME'
1225 if (!isset($attributes['NAME'])) {
1226 $attributes['NAME'] = '';
1231 'column' => trim($attributes['VALUE']),
1232 'alias' => trim($attributes['ALIAS']),
1233 'function' => trim($attributes['FUNCTION']),
1234 'table' => trim($attributes['TABLE']),
1235 'name' => trim($attributes['NAME'])
1239 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS'] . ',FUNCTION[' . gettype($attributes['FUNCTION']) . ']=' . $attributes['FUNCTION'] . ' - FUNCTION! (VALUE=' . $attributes['VALUE'] . ')');
1240 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
1241 } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['LOOK-FOR']))) {
1242 // CONDITION/LOOK-FOR detected
1245 'column' => trim($attributes['VALUE']),
1246 'table' => trim($attributes['TABLE']),
1247 'condition' => convertXmlContion(trim($attributes['CONDITION'])),
1248 'look_for' => trim($attributes['LOOK-FOR'])
1251 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',LOOK-FOR[' . gettype($attributes['LOOK-FOR']) . ']=' . $attributes['LOOK-FOR'] . ' - CONDITION! (VALUE=' . $attributes['VALUE'] . ')');
1252 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
1253 } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) {
1254 // CONDITION/NAME detected
1255 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION!');
1256 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION'];
1257 } elseif (isset($attributes['CALLBACK'])) {
1258 // CALLBACK/VALUE detected
1259 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')');
1260 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE']] = $attributes['CALLBACK'];
1261 } elseif (isset($attributes['ORDER'])) {
1262 // ORDER/TABLE detected
1263 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ORDER[' . gettype($attributes['ORDER']) . ']=' . $attributes['ORDER'] . ' - ORDER! (VALUE=' . $attributes['VALUE'] . ')');
1264 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['ORDER']][$attributes['TABLE']] = $attributes['VALUE'];
1265 } elseif (isset($attributes['COLUMN'])) {
1266 // COLUMN/VALUE detected
1267 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN!');
1268 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][] = $attributes['VALUE'];
1269 } elseif ((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) {
1271 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
1272 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE'];
1273 } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) {
1275 reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, TRUE) . '</pre>');
1278 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!');
1279 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['VALUE'];
1281 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - EXIT!');
1284 //-----------------------------------------------------------------------------
1285 // Execute call-back functions
1286 //-----------------------------------------------------------------------------
1288 // Execute function for doXmlCallbackFunction()
1289 function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) {
1290 // Is 'id_index' set and form sent?
1291 if ((isset($args['id_index'])) && (isFormSent())) {
1292 // Prepare 'id_index'
1293 $args['id_index'] = postRequestElement($args['id_index']);
1297 //* DEBUG: */ die(__FUNCTION__.':callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=<pre>'.print_r($args, TRUE).'</pre>');
1298 call_user_func_array($callbackName, $args);