4 |
## $Id$ |
## $Id$ |
5 |
## ------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.5 2003/04/16 16:23:31 joko |
8 |
|
## + modified viewdatanode |
9 |
|
## + new: function view_as |
10 |
|
## |
11 |
|
## Revision 1.4 2003/04/11 00:58:08 joko |
12 |
|
## + link::plain |
13 |
|
## + url::viewdatanode |
14 |
|
## |
15 |
## Revision 1.3 2003/04/08 22:38:43 joko |
## Revision 1.3 2003/04/08 22:38:43 joko |
16 |
## NEW: 'class url' as code container for some shortcut functions |
## NEW: 'class url' as code container for some shortcut functions |
17 |
## |
## |
98 |
$query_string = linkargs::action($action_name, $args); |
$query_string = linkargs::action($action_name, $args); |
99 |
return html_a($query_string, "[$action_name]"); |
return html_a($query_string, "[$action_name]"); |
100 |
} |
} |
101 |
|
|
102 |
|
function plain($url, $caption = '') { |
103 |
|
if (!$caption) { $caption = $url; } |
104 |
|
return html_a($url, $caption); |
105 |
|
} |
106 |
|
|
107 |
} |
} |
108 |
|
|
181 |
// there you have it.. |
// there you have it.. |
182 |
return $url; |
return $url; |
183 |
} |
} |
184 |
|
|
185 |
|
function viewdatanode($nodename, $additional = array()) { |
186 |
|
|
187 |
|
$final = array(); |
188 |
|
$defaults = array( 'ap' => 'explorer', 'ecl' => 'content' ); |
189 |
|
$location = array( 'ecdlk' => 'rpc' ); |
190 |
|
$args = array( 'ecmod' => 'view', 'ect' => 'data', ); |
191 |
|
$ident = array( 'ecat' => 'list', 'ecdid' => $nodename ); |
192 |
|
|
193 |
|
$final = php::array_join_merge($final, $defaults); |
194 |
|
$final = php::array_join_merge($final, $location); |
195 |
|
$final = php::array_join_merge($final, $args); |
196 |
|
$final = php::array_join_merge($final, $ident); |
197 |
|
|
198 |
|
$final = php::array_join_merge($final, $additional); |
199 |
|
|
200 |
|
return url::short('', $final); |
201 |
|
} |
202 |
|
|
203 |
|
function view_as($type) { |
204 |
|
//return url::short('', array( ecat => $type ) ); |
205 |
|
// HACK: (like in Data::Lift::hash::auto::TopicTree) |
206 |
|
$parent_identifier = $_GET[ecdid]; |
207 |
|
return url::viewdatanode($type, array( ecat => $type, ecdid => $parent_identifier )); |
208 |
|
} |
209 |
|
|
210 |
} |
} |
211 |
|
|