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 'callback-function'
53 function doXmlCallbackFunction ($resource, $attributes) {
54 // There are two attributes, by default
55 if (count($attributes) != 2) {
56 // Not the right count
57 reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
58 } elseif (!isset($attributes['TYPE'])) {
60 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
61 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
63 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
64 } elseif (!isset($attributes['VALUE'])) {
66 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
67 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
68 // Not valid/verifyable
69 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
72 // Add the function name and no attributes by default
73 $GLOBALS['__XML_CALLBACKS']['callbacks'][] = __FUNCTION__;
74 $GLOBALS['__XML_CALLBACKS']['functions'][__FUNCTION__][] = $attributes['VALUE'];
75 $GLOBALS['__XML_ARGUMENTS'][__FUNCTION__] = array();
76 $GLOBALS['__COLUMN_INDEX'][__FUNCTION__] = 'column';
79 // Handles the XML node 'database-table'
80 function doXmlDatabaseTable ($resource, $attributes) {
81 // There are three attributes, by default
82 if (count($attributes) != 3) {
83 // Not the right count
84 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
85 } elseif (!isset($attributes['NAME'])) {
87 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
88 } elseif (!isset($attributes['TYPE'])) {
90 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
91 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
93 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
94 } elseif (!isset($attributes['VALUE'])) {
96 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
97 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
98 // Not valid/verifyable
99 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
100 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
101 // doXmlCallbackFunction is missing
102 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
105 // Add the entry to the list
106 addXmlValueToCallbackAttributes('database_table', $attributes);
109 // Handles the XML node 'database-column-list'
110 function doXmlDatabaseColumnList ($resource, $attributes) {
111 // There should be no attributes
112 if (count($attributes) > 0) {
113 // Please don't add any attributes to foo-list nodes
114 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
118 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'] = array();
121 // Handles the XML node 'database-column-list-entry'
122 function doXmlDatabaseColumnListEntry ($resource, $attributes) {
123 // There are three attributes, by default
124 if (count($attributes) != 6) {
125 // Not the right count
126 reportBug(__FUNCTION__, __LINE__, 'Expected 6 attributes, got ' . count($attributes));
127 } elseif (!isset($attributes['NAME'])) {
129 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
130 } elseif (!isset($attributes['TYPE'])) {
132 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
133 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
135 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
136 } elseif (!isset($attributes['TABLE'])) {
138 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
139 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE'])) {
140 // Not valid/verifyable
141 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TYPE=' . $attributes['TYPE'] . ',TABLE=' . $attributes['TABLE']);
142 } elseif (!isset($attributes['ALIAS'])) {
144 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
145 } elseif (!isset($attributes['FUNCTION'])) {
146 // 'FUNCTION' not found
147 reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
148 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
149 // 'ALIAS' not valid/verifyable
150 reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
151 } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
152 // 'FUNCTION' not valid/verifyable
153 reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
154 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'])) {
155 // doXmlCallbackFunction is missing
156 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.');
159 // Add the entry to the list
160 addXmlValueToCallbackAttributes('column_list', $attributes);
163 // Handles the XML node 'callback-function-list'
164 function doXmlCallbackFunctionList ($resource, $attributes) {
165 // There should be no attributes
166 if (count($attributes) > 0) {
167 // Please don't add any attributes to foo-list nodes
168 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
172 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'] = array();
175 // Handles the XML node 'callback-function-list-entry'
176 function doXmlCallbackFunctionListEntry ($resource, $attributes) {
177 // There are three attributes, by default
178 if (count($attributes) != 3) {
179 // Not the right count
180 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
181 } elseif (!isset($attributes['NAME'])) {
183 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
184 } elseif (!isset($attributes['TYPE'])) {
186 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
187 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
189 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
190 } elseif (!isset($attributes['VALUE'])) {
192 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
193 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
194 // Not valid/verifyable
195 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
196 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'])) {
197 // doXmlCallbackFunction is missing
198 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.');
201 // Add the entry to the list
202 addXmlValueToCallbackAttributes('callback_list', $attributes);
205 // Handles the XML node 'extra-parameter-list'
206 function doXmlExtraParameterList ($resource, $attributes) {
207 // There should be no attributes
208 if (count($attributes) > 0) {
209 // Please don't add any attributes to foo-list nodes
210 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
214 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'] = array();
217 // Handles the XML node 'extra-parameter-list-entry'
218 function doXmlExtraParameterListEntry ($resource, $attributes) {
219 // There are three attributes, by default
220 if (count($attributes) != 3) {
221 // Not the right count
222 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
223 } elseif (!isset($attributes['NAME'])) {
225 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
226 } elseif (!isset($attributes['TYPE'])) {
228 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
229 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
231 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
232 } elseif (!isset($attributes['VALUE'])) {
234 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
235 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
236 // Not valid/verifyable
237 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
238 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'])) {
239 // doXmlCallbackFunction is missing
240 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
243 // Add the entry to the list
244 addXmlValueToCallbackAttributes('extra_list', $attributes);
247 // Handles the XML node 'time-columns-list'
248 function doXmlTimeColumnsList ($resource, $attributes) {
249 // There should be no attributes
250 if (count($attributes) > 0) {
251 // Please don't add any attributes to foo-list nodes
252 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
256 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'] = array();
259 // Handles the XML node 'time-columns-list-entry'
260 function doXmlTimeColumnsListEntry ($resource, $attributes) {
261 // There are three attributes, by default
262 if (count($attributes) != 3) {
263 // Not the right count
264 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
265 } elseif (!isset($attributes['NAME'])) {
267 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
268 } elseif (!isset($attributes['TYPE'])) {
270 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
271 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
273 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
274 } elseif (!isset($attributes['VALUE'])) {
276 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
277 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
278 // Not valid/verifyable
279 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
280 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'])) {
281 // doXmlCallbackFunction is missing
282 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
285 // Add the entry to the list
286 addXmlValueToCallbackAttributes('time_columns', $attributes);
289 // Handles the XML node 'extra-parameter-member-list'
290 function doXmlExtraParameterMemberList ($resource, $attributes) {
291 // There should be no attributes
292 if (count($attributes) > 0) {
293 // Please don't add any attributes to foo-list nodes
294 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
295 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
296 // This list should be created already
297 reportBug(__FUNCTION__, __LINE__, 'member_list should be already created.');
301 // Handles the XML node 'extra-parameter-reload-list'
302 function doXmlExtraParameterReloadList ($resource, $attributes) {
303 // There should be no attributes
304 if (count($attributes) > 0) {
305 // Please don't add any attributes to foo-list nodes
306 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
307 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
308 // This list should be created already
309 reportBug(__FUNCTION__, __LINE__, 'reload_list should be already created.');
313 // Handles the XML node 'extra-parameter-member-list-entry'
314 function doXmlExtraParameterMemberListEntry ($resource, $attributes) {
315 // There are three attributes, by default
316 if (count($attributes) != 3) {
317 // Not the right count
318 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
319 } elseif (!isset($attributes['NAME'])) {
321 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
322 } elseif (!isset($attributes['TYPE'])) {
324 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
325 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
327 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
328 } elseif (!isset($attributes['VALUE'])) {
330 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
331 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
332 // Not valid/verifyable
333 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
334 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
335 // doXmlCallbackFunction is missing
336 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.');
339 // Add the entry to the list
340 addXmlValueToCallbackAttributes('extra_list', $attributes, 'member_list');
343 // Handles the XML node 'extra-parameter-reload-list-entry'
344 function doXmlExtraParameterReloadListEntry ($resource, $attributes) {
345 // There are three attributes, by default
346 if (count($attributes) != 3) {
347 // Not the right count
348 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
349 } elseif (!isset($attributes['NAME'])) {
351 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
352 } elseif (!isset($attributes['TYPE'])) {
354 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
355 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
357 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
358 } elseif (!isset($attributes['VALUE'])) {
360 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
361 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
362 // Not valid/verifyable
363 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
364 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
365 // doXmlCallbackFunction is missing
366 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/reload-list not included around this node. Please fix your XML.');
369 // Add the entry to the list
370 addXmlValueToCallbackAttributes('extra_list', $attributes, 'reload_list');
373 // Handles the XML node 'extra-parameter-added-list'
374 function doXmlExtraParameterAddedList ($resource, $attributes) {
375 // There should be no attributes
376 if (count($attributes) > 0) {
377 // Please don't add any attributes to foo-list nodes
378 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
379 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
380 // This list should be created already
381 reportBug(__FUNCTION__, __LINE__, 'added_list should be already created.');
385 // Handles the XML node 'extra-parameter-added-list-entry'
386 function doXmlExtraParameterAddedListEntry ($resource, $attributes) {
387 // There are three attributes, by default
388 if (count($attributes) != 3) {
389 // Not the right count
390 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
391 } elseif (!isset($attributes['NAME'])) {
393 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
394 } elseif (!isset($attributes['TYPE'])) {
396 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
397 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
399 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
400 } elseif (!isset($attributes['VALUE'])) {
402 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
403 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
404 // Not valid/verifyable
405 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
406 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
407 // doXmlCallbackFunction is missing
408 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/added-list not included around this node. Please fix your XML.');
411 // Add the entry to the list
412 addXmlValueToCallbackAttributes('extra_list', $attributes, 'added_list');
415 // Handles the XML node 'extra-parameter-created-list'
416 function doXmlExtraParameterCreatedList ($resource, $attributes) {
417 // There should be no attributes
418 if (count($attributes) > 0) {
419 // Please don't add any attributes to foo-list nodes
420 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
421 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
422 // This list should be created already
423 reportBug(__FUNCTION__, __LINE__, 'created_list should be already created.');
427 // Handles the XML node 'extra-parameter-created-list-entry'
428 function doXmlExtraParameterCreatedListEntry ($resource, $attributes) {
429 // There are three attributes, by default
430 if (count($attributes) != 3) {
431 // Not the right count
432 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
433 } elseif (!isset($attributes['NAME'])) {
435 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
436 } elseif (!isset($attributes['TYPE'])) {
438 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
439 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
441 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
442 } elseif (!isset($attributes['VALUE'])) {
444 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
445 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
446 // Not valid/verifyable
447 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
448 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
449 // doXmlCallbackFunction is missing
450 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/created-list not included around this node. Please fix your XML.');
453 // Add the entry to the list
454 addXmlValueToCallbackAttributes('extra_list', $attributes, 'created_list');
457 // Handles the XML node 'status-change-column'
458 function doXmlStatusChangeColumn ($resource, $attributes) {
459 // There are three attributes, by default
460 if (count($attributes) != 3) {
461 // Not the right count
462 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
463 } elseif (!isset($attributes['NAME'])) {
465 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
466 } elseif (!isset($attributes['TYPE'])) {
468 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
469 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
471 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
472 } elseif (!isset($attributes['VALUE'])) {
474 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
475 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
476 // Not valid/verifyable
477 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
478 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
479 // doXmlCallbackFunction is missing
480 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
483 // Add the entry to the list
484 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'][$attributes['VALUE']] = array();
487 // Handles the XML node 'status-change-list'
488 function doXmlStatusChangeList ($resource, $attributes) {
489 // There should be no attributes
490 if (count($attributes) > 0) {
491 // Please don't add any attributes to foo-list nodes
492 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
493 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
494 // doXmlCallbackFunction is missing
495 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.');
499 // Handles the XML node 'status-change-list-entry'
500 function doXmlStatusChangeListEntry ($resource, $attributes) {
501 // There are for attributes, by default
502 if (count($attributes) != 4) {
503 // Not the right count
504 reportBug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes));
505 } elseif (!isset($attributes['NAME'])) {
507 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
508 } elseif (!isset($attributes['TYPE'])) {
510 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
511 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
513 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
514 } elseif (!isset($attributes['VALUE'])) {
516 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
517 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['OLD'])) {
518 // Not valid/verifyable
519 reportBug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']);
520 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
521 // Not valid/verifyable
522 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
523 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
524 // doXmlCallbackFunction is missing
525 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/change-list not included around this node. Please fix your XML.');
528 // Add the entry to the list
529 addXmlValueToCallbackAttributes('status_list', $attributes, $attributes['NAME'], 'OLD');
532 // Handles the XML node 'enable-modify-entries'
533 function doXmlEnableModifyEntries ($resource, $attributes) {
534 // There are three attributes, by default
535 if (count($attributes) != 3) {
536 // Not the right count
537 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
538 } elseif (!isset($attributes['NAME'])) {
540 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
541 } elseif (!isset($attributes['TYPE'])) {
543 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
544 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
546 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
547 } elseif (!isset($attributes['VALUE'])) {
549 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
550 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
551 // Not valid/verifyable
552 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
553 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
554 // doXmlCallbackFunction is missing
555 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
558 // Add the entry to the list
559 addXmlValueToCallbackAttributes('enable_modify_entries', $attributes);
562 // Handles the XML node 'table-id-column'
563 function doXmlTableIdColumn ($resource, $attributes) {
564 // There are three attributes, by default
565 if (count($attributes) != 3) {
566 // Not the right count
567 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
568 } elseif (!isset($attributes['NAME'])) {
570 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
571 } elseif (!isset($attributes['TYPE'])) {
573 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
574 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
576 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
577 } elseif (!isset($attributes['VALUE'])) {
579 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
580 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
581 // Not valid/verifyable
582 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
583 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
584 // doXmlCallbackFunction is missing
585 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
588 // Add the entry to the array
589 addXmlValueToCallbackAttributes('table_id_column', $attributes);
592 // Handles the XML node 'table-userid-column'
593 function doXmlTableUseridColumn ($resource, $attributes) {
594 // There are three attributes, by default
595 if (count($attributes) != 3) {
596 // Not the right count
597 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
598 } elseif (!isset($attributes['NAME'])) {
600 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
601 } elseif (!isset($attributes['TYPE'])) {
603 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
604 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
606 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
607 } elseif (!isset($attributes['VALUE'])) {
609 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
610 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
611 // Not valid/verifyable
612 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
613 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
614 // doXmlCallbackFunction is missing
615 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
618 // Add the entry to the array
619 addXmlValueToCallbackAttributes('table_userid_column', $attributes);
622 // Handles the XML node 'raw-userid-column-key'
623 function doXmlRawUseridColumnKey ($resource, $attributes) {
624 // There are three attributes, by default
625 if (count($attributes) != 3) {
626 // Not the right count
627 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
628 } elseif (!isset($attributes['NAME'])) {
630 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
631 } elseif (!isset($attributes['TYPE'])) {
633 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
634 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
636 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
637 } elseif (!isset($attributes['VALUE'])) {
639 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
640 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
641 // Not valid/verifyable
642 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
643 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
644 // doXmlCallbackFunction is missing
645 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
648 // Add the entry to the array
649 addXmlValueToCallbackAttributes('raw_userid_column_key', $attributes);
652 // Handles the XML node 'cache-file'
653 function doXmlCacheFile ($resource, $attributes) {
654 // There are three attributes, by default
655 if (count($attributes) != 3) {
656 // Not the right count
657 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
658 } elseif (!isset($attributes['NAME'])) {
660 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
661 } elseif (!isset($attributes['TYPE'])) {
663 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
664 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
666 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
667 } elseif (!isset($attributes['VALUE'])) {
669 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
670 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
671 // Not valid/verifyable
672 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
673 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
674 // doXmlCallbackFunction is missing
675 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
678 // Add the entry to the array
679 addXmlValueToCallbackAttributes('cache_file', $attributes);
682 //-----------------------------------------------------------------------------
683 // Call-back functions for listing of data in admin area
684 //-----------------------------------------------------------------------------
686 // Handles the XML node 'admin-list-data'
687 function doXmlAdminListData ($resource, $attributes) {
688 // There should be no attributes
689 if (count($attributes) > 0) {
690 // Please don't add any attributes to foo-list nodes
691 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
695 // Handles the XML node 'data-tables'
696 function doXmlDataTables ($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 'data-table'
705 function doXmlDataTable ($resource, $attributes) {
706 // There are three attributes, by default
707 if (count($attributes) != 3) {
708 // Not the right count
709 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
710 } elseif (!isset($attributes['VALUE'])) {
712 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
713 } elseif (!isset($attributes['TYPE'])) {
715 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
716 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
718 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
719 } elseif (!isset($attributes['ALIAS'])) {
721 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
722 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
723 // Not valid/verifyable
724 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
725 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
726 // Not valid/verifyable
727 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']);
728 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
729 // doXmlCallbackFunction is missing
730 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
733 // Add the entry to the array
734 addXmlValueToCallbackAttributes('data_table', $attributes);
737 // Handles the XML node 'select-data-from-list'
738 function doXmlSelectDataFromList ($resource, $attributes) {
739 // There should be no attributes
740 if (count($attributes) > 0) {
741 // Please don't add any attributes to foo-list nodes
742 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
743 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
744 // doXmlCallbackFunction is missing
745 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
749 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'] = array();
752 // Handles the XML node 'select-data-from-list-entry'
753 function doXmlSelectDataFromListEntry ($resource, $attributes) {
754 // There are five attributes, by default
755 if (count($attributes) != 5) {
756 // Not the right count
757 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
758 } elseif (!isset($attributes['VALUE'])) {
760 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
761 } elseif (!isset($attributes['TYPE'])) {
763 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
764 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
766 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
767 } elseif (!isset($attributes['ALIAS'])) {
769 reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
770 } elseif (!isset($attributes['FUNCTION'])) {
771 // 'FUNCTION' not found
772 reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
773 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
774 // 'VALUE' not valid/verifyable
775 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
776 } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
777 // 'ALIAS' not valid/verifyable
778 reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
779 } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
780 // 'FUNCTION' not valid/verifyable
781 reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
782 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
783 // doXmlCallbackFunction is missing
784 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.');
787 // Add the entry to the array
788 addXmlValueToCallbackAttributes('data_column_list', $attributes);
791 // Handles the XML node 'where-select-from-list'
792 function doXmlWhereSelectFromList ($resource, $attributes) {
793 // There should be no attributes
794 if (count($attributes) > 0) {
795 // Please don't add any attributes to foo-list nodes
796 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
797 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
798 // doXmlCallbackFunction is missing
799 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
803 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['where_select_list'] = array();
806 // Handles the XML node 'where-select-from-list-entry'
807 function doXmlWhereSelectFromListEntry ($resource, $attributes) {
808 // There are five attributes, by default
809 if (count($attributes) != 5) {
810 // Not the right count
811 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
812 } elseif (!isset($attributes['TYPE'])) {
814 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
815 } elseif (!isset($attributes['TABLE'])) {
817 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
818 } elseif (!isset($attributes['VALUE'])) {
820 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
821 } elseif (!isset($attributes['CONDITION'])) {
822 // 'CONDITION' not found
823 reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
824 } elseif (!isset($attributes['LOOK-FOR'])) {
825 // 'LOOK-FOR' not found
826 reportBug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.');
827 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
829 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
830 } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
831 // 'TABLE' not valid/verifyable
832 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
833 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
834 // 'VALUE' not valid/verifyable
835 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
836 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
837 // 'CONDITION' not valid/verifyable
838 reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
839 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['LOOK-FOR'])) {
840 // 'LOOK-FOR' not valid/verifyable
841 reportBug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']);
842 } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
843 // 'CONDITION' is not known
844 reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
845 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
846 // doXmlCallbackFunction is missing
847 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
850 // Add the entry to the array
851 addXmlValueToCallbackAttributes('where_select_list', $attributes);
854 // Handles the XML node 'where-condition'
855 function doXmlWhereCondition ($resource, $attributes) {
856 // There are two attributes, by default
857 if (count($attributes) != 3) {
858 // Please don't add any attributes to foo-list nodes
859 reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes because this is a where-condition node, got ' . count($attributes));
860 } elseif (!isset($attributes['TYPE'])) {
862 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
863 } elseif (!isset($attributes['CONDITION'])) {
864 // 'CONDITION' not found
865 reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
866 } elseif (!isset($attributes['NAME'])) {
868 reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
869 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
870 // doXmlCallbackFunction is missing
871 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
875 addXmlValueToCallbackAttributes('where_condition', $attributes);
878 // Handles the XML node 'order-by-list'
879 function doXmlOrderByList ($resource, $attributes) {
880 // There should be no attributes
881 if (count($attributes) > 0) {
882 // Please don't add any attributes to foo-list nodes
883 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
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 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['order_by_list'] = array();
893 // Handles the XML node 'order-by-list-entry'
894 function doXmlOrderByListEntry ($resource, $attributes) {
895 // There are four attributes, by default
896 if (count($attributes) != 4) {
897 // Not the right count
898 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
899 } elseif (!isset($attributes['ORDER'])) {
901 reportBug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.');
902 } elseif (!isset($attributes['TYPE'])) {
904 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
905 } elseif (!isset($attributes['TABLE'])) {
907 reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
908 } elseif (!isset($attributes['VALUE'])) {
910 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
911 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
913 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
914 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['ORDER'])) {
915 // 'ORDER' not valid/verifyable
916 reportBug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']);
917 } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
918 // 'TABLE' not valid/verifyable
919 reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
920 } elseif ((trim($attributes['VALUE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) {
921 // 'VALUE' not valid/verifyable
922 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
923 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
924 // doXmlCallbackFunction is missing
925 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
928 // Add the entry to the array
929 addXmlValueToCallbackAttributes('order_by_list', $attributes);
932 // Handles the XML node 'list-template'
933 function doXmlListTemplate ($resource, $attributes) {
934 // There are two attributes, by default
935 if (count($attributes) != 2) {
936 // Not the right count
937 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
938 } elseif (!isset($attributes['VALUE'])) {
940 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
941 } elseif (!isset($attributes['TYPE'])) {
943 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
944 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
946 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
947 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
948 // Not valid/verifyable
949 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
950 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
951 // doXmlCallbackFunction is missing
952 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
955 // Add the entry to the array
956 addXmlValueToCallbackAttributes('list_template', $attributes);
959 // Handles the XML node 'list-row-template'
960 function doXmlListRowTemplate ($resource, $attributes) {
961 // There are two attributes, by default
962 if (count($attributes) != 2) {
963 // Not the right count
964 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
965 } elseif (!isset($attributes['VALUE'])) {
967 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
968 } elseif (!isset($attributes['TYPE'])) {
970 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
971 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
973 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
974 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
975 // Not valid/verifyable
976 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
977 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
978 // doXmlCallbackFunction is missing
979 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
982 // Add the entry to the array
983 addXmlValueToCallbackAttributes('list_row_template', $attributes);
986 // Handles the XML node 'column-callback-list'
987 function doXmlColumnCallbackList ($resource, $attributes) {
988 // There should be no attributes
989 if (count($attributes) > 0) {
990 // Please don't add any attributes to foo-list nodes
991 reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
992 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
993 // doXmlCallbackFunction is missing
994 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
998 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'] = array();
1001 // Handles the XML node 'column-callback-list-entry'
1002 function doXmlColumnCallbackListEntry ($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']['column_callback_list'])) {
1008 // doXmlCallbackFunction is missing
1009 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.');
1013 // Handles the XML node 'column-callback-data'
1014 function doXmlColumnCallbackData ($resource, $attributes) {
1015 // There are three attributes, by default
1016 if (count($attributes) != 3) {
1017 // Not the right count
1018 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
1019 } elseif (!isset($attributes['VALUE'])) {
1020 // 'VALUE' not found
1021 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1022 } elseif (!isset($attributes['TYPE'])) {
1024 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1025 } elseif (!isset($attributes['CALLBACK'])) {
1026 // 'CALLBACK' not found
1027 reportBug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.');
1028 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1030 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1031 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1032 // Not valid/verifyable
1033 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1034 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
1035 // doXmlCallbackFunction is missing
1036 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
1037 } elseif ((trim($attributes['CALLBACK']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['CALLBACK']))) {
1038 // 'CALLBACK' not valid/verifyable
1039 reportBug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']);
1042 // Add the entry to the array
1043 addXmlValueToCallbackAttributes('column_callback_list', $attributes);
1046 // Handles the XML node 'callback-extra-parameter-list'
1047 function doXmlCallbackExtraParameterList ($resource, $attributes) {
1048 // There should be no attributes
1049 if (count($attributes) > 0) {
1050 // Please don't add any attributes to foo-list nodes
1051 reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes));
1052 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
1053 // doXmlCallbackFunction is missing
1054 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.');
1055 } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
1056 // Abort silently here, no one wants to kill this array
1060 // Add an empty list
1061 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'] = array();
1064 // Handles the XML node 'callback-extra-parameter-list-entry'
1065 function doXmlCallbackExtraParameterListEntry ($resource, $attributes) {
1066 // There are three attributes, by default
1067 if (count($attributes) != 3) {
1068 // Not the right count
1069 reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
1070 } elseif (!isset($attributes['COLUMN'])) {
1071 // 'COLUMN' not found
1072 reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
1073 } elseif (!isset($attributes['TYPE'])) {
1075 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1076 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1078 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1079 } elseif (!isset($attributes['VALUE'])) {
1080 // 'VALUE' not found
1081 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1082 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1083 // 'VALUE' not valid/verifyable
1084 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1085 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
1086 // doXmlCallbackFunction is missing
1087 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.');
1090 // Add the entry to the array
1091 addXmlValueToCallbackAttributes('__EXTRA_PARAMETER', $attributes);
1094 // Handles the XML node 'no-entry-found-message'
1095 function doXmlNoEntryFoundMessage ($resource, $attributes) {
1096 // There are two attributes, by default
1097 if (count($attributes) != 2) {
1098 // Not the right count
1099 reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
1100 } elseif (!isset($attributes['VALUE'])) {
1101 // 'VALUE' not found
1102 reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
1103 } elseif (!isset($attributes['TYPE'])) {
1105 reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
1106 } elseif (!isInvalidXmlType($attributes['TYPE'])) {
1108 reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
1109 } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
1110 // Not valid/verifyable
1111 reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
1112 } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
1113 // doXmlCallbackFunction is missing
1114 reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
1117 // Add the entry to the array
1118 addXmlValueToCallbackAttributes('no_entry_message_id', $attributes);
1121 //-----------------------------------------------------------------------------
1122 // XML type validation
1123 //-----------------------------------------------------------------------------
1125 // Checks for string without any added extra data
1126 function isXmlTypeString ($value) {
1127 // Just let SQL_ESCAPE() do the job
1128 return ($value == SQL_ESCAPE($value));
1131 // Fake-check for array type
1132 function isXmlTypeArray ($value) {
1133 // This value is always a string
1134 return (is_string($value));
1137 // Check for boolean type
1138 function isXmlTypeBool ($value) {
1140 $value = trim($value);
1142 // This value is always a string
1143 return (($value == 'true') || ($value == 'false'));
1146 // Check for integer type
1147 function isXmlTypeInt ($value) {
1149 $value = trim($value);
1151 // This value is always a string
1152 return (bigintval($value) == $value);
1155 // Check for callback type
1156 function isXmlTypeCallback ($value) {
1158 $value = trim($value);
1160 // This value is always a string
1161 return (function_exists($value));
1164 //-----------------------------------------------------------------------------
1165 // Private XML functions
1166 //-----------------------------------------------------------------------------
1168 // Adds given attribut to element
1169 function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $key = '') {
1170 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - ENTERED!');
1171 // Is it boolean type?
1172 if (($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
1173 // Then convert VALUE
1174 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CONVERTING!');
1175 $attributes['VALUE'] = convertStringToBoolean($attributes['VALUE']);
1176 } elseif ($attributes['TYPE'] == 'callback') {
1177 // It is a simple call-back type
1178 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CALLING!');
1179 $attributes['VALUE'] = call_user_func($attributes['VALUE']);
1182 // What do we need to add?
1183 if ($attributes['TYPE'] == 'array') {
1184 // Another nested array
1185 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element);
1186 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE'] . '_list'] = array();
1187 } elseif (!empty($extraKey)) {
1188 // Sub-array (one level only)
1189 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ' - ANALYSING...');
1190 if (trim($attributes['NAME']) == '') {
1192 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
1193 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][] = $attributes['VALUE'];
1194 } elseif (!empty($key)) {
1196 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - KEY! (key=' . $attributes[$key] . ')');
1197 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][$attributes[$key]] = $attributes['VALUE'];
1200 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME! (NAME=' . $attributes['NAME'] . ')');
1201 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][$attributes['NAME']] = $attributes['VALUE'];
1203 } elseif ((isset($attributes['FUNCTION'])) && (isset($attributes['ALIAS']))) {
1205 * ALIAS and FUNCTION detected? This may happen with SQL queries
1206 * like: UNIX_TIMESTAMP(`foo_timestamp`) AS `foo_timestamp`
1209 // Fix missing 'NAME'
1210 if (!isset($attributes['NAME'])) {
1211 $attributes['NAME'] = '';
1216 'column' => trim($attributes['VALUE']),
1217 'alias' => trim($attributes['ALIAS']),
1218 'function' => trim($attributes['FUNCTION']),
1219 'table' => trim($attributes['TABLE']),
1220 'name' => trim($attributes['NAME'])
1224 //* 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'] . ')');
1225 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
1226 } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['LOOK-FOR']))) {
1227 // CONDITION/LOOK-FOR detected
1230 'column' => trim($attributes['VALUE']),
1231 'table' => trim($attributes['TABLE']),
1232 'condition' => convertXmlContion(trim($attributes['CONDITION'])),
1233 'look_for' => trim($attributes['LOOK-FOR'])
1236 //* 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'] . ')');
1237 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
1238 } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) {
1239 // CONDITION/NAME detected
1240 //* 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!');
1241 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION'];
1242 } elseif (isset($attributes['CALLBACK'])) {
1243 // CALLBACK/VALUE detected
1244 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')');
1245 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE']] = $attributes['CALLBACK'];
1246 } elseif (isset($attributes['ORDER'])) {
1247 // ORDER/TABLE detected
1248 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ORDER[' . gettype($attributes['ORDER']) . ']=' . $attributes['ORDER'] . ' - ORDER! (VALUE=' . $attributes['VALUE'] . ')');
1249 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['ORDER']][$attributes['TABLE']] = $attributes['VALUE'];
1250 } elseif (isset($attributes['COLUMN'])) {
1251 // COLUMN/VALUE detected
1252 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN!');
1253 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][] = $attributes['VALUE'];
1254 } elseif ((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) {
1256 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
1257 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE'];
1258 } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) {
1260 reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, true) . '</pre>');
1263 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!');
1264 $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['VALUE'];
1266 //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - EXIT!');
1269 //-----------------------------------------------------------------------------
1270 // Execute call-back functions
1271 //-----------------------------------------------------------------------------
1273 // Execute function for doXmlCallbackFunction()
1274 function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) {
1275 // Is 'id_index' set and form sent?
1276 if ((isset($args['id_index'])) && (isFormSent())) {
1277 // Prepare 'id_index'
1278 $args['id_index'] = postRequestElement($args['id_index']);
1282 //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=<pre>'.print_r($args, true).'</pre>');
1283 call_user_func_array($callbackName, $args);