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