| 15 |
* $Id$ |
* $Id$ |
| 16 |
* |
* |
| 17 |
* $Log$ |
* $Log$ |
| 18 |
|
* Revision 1.18 2003/04/11 00:55:49 joko |
| 19 |
|
* updated 'datasource_handler_buildoptions': action dispatcher now aware of 'delete' |
| 20 |
|
* |
| 21 |
|
* Revision 1.17 2003/04/09 02:07:33 joko |
| 22 |
|
* CHANGE: renamed key 'classname' through 'nodename' |
| 23 |
|
* |
| 24 |
* Revision 1.16 2003/04/08 17:55:20 joko |
* Revision 1.16 2003/04/08 17:55:20 joko |
| 25 |
* CHANGE: renamed property 'datasource' to 'transport' |
* CHANGE: renamed property 'datasource' to 'transport' |
| 26 |
* NEW: new case 'method' in 'function datasource_handler_buildoptions' |
* NEW: new case 'method' in 'function datasource_handler_buildoptions' |
| 720 |
$query_args = array(); |
$query_args = array(); |
| 721 |
switch ($this->_query[abstract_type]) { |
switch ($this->_query[abstract_type]) { |
| 722 |
case 'list': |
case 'list': |
| 723 |
if (!$this->_query[classname]) { |
if (!$this->_query[nodename]) { |
| 724 |
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
$msg = "_query[vartype] == 'objects' requires _query[nodename]"; |
| 725 |
user_error("DataSource::Generic: query_data() - failed: " . $msg); |
user_error("DataSource::Generic: query_data() - failed: " . $msg); |
| 726 |
} |
} |
| 727 |
//array_push($query_args, $this->_query[classname]); |
//array_push($query_args, $this->_query[nodename]); |
| 728 |
$query_args[classname] = $this->_query[classname]; |
$query_args[nodename] = $this->_query[nodename]; |
| 729 |
break; |
break; |
| 730 |
case 'item': |
case 'item': |
| 731 |
if (!$this->_query[classname]) { |
if (!$this->_query[nodename]) { |
| 732 |
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
$msg = "_query[vartype] == 'objects' requires _query[nodename]"; |
| 733 |
user_error("DataSource::Generic: query_data() - failed: " . $msg); |
user_error("DataSource::Generic: query_data() - failed: " . $msg); |
| 734 |
} |
} |
| 735 |
$query_args[guid] = $this->_query[ident]; |
$query_args[guid] = $this->_query[ident]; |
| 736 |
$query_args[classname] = $this->_query[classname]; |
$query_args[nodename] = $this->_query[nodename]; |
| 737 |
break; |
break; |
| 738 |
} |
} |
| 739 |
if($this->_query[action] == 'write') { |
|
| 740 |
|
// dispatch action |
| 741 |
|
if ($this->_query[action] == 'write') { |
| 742 |
$query_args[action] = $this->_query[action]; |
$query_args[action] = $this->_query[action]; |
| 743 |
$query_args[data] = $this->_query[data]; |
$query_args[data] = $this->_query[data]; |
| 744 |
|
} elseif ($this->_query[action] == 'delete') { |
| 745 |
|
$query_args[action] = $this->_query[action]; |
| 746 |
} |
} |
| 747 |
$args = array( |
$args = array( |
| 748 |
'data_type' => $this->_query[abstract_type], |
'data_type' => $this->_query[abstract_type], |