/[cvs]/nfo/php/libs/org.netfrag.glib/utils/links.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/links.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Tue Apr 8 22:38:43 2003 UTC revision 1.4 by joko, Fri Apr 11 00:58:08 2003 UTC
# Line 4  Line 4 
4  ##  $Id$  ##  $Id$
5  ## -------------------------------------------------------------------------  ## -------------------------------------------------------------------------
6  ##  $Log$  ##  $Log$
7    ##  Revision 1.4  2003/04/11 00:58:08  joko
8    ##  + link::plain
9    ##  + url::viewdatanode
10    ##
11  ##  Revision 1.3  2003/04/08 22:38:43  joko  ##  Revision 1.3  2003/04/08 22:38:43  joko
12  ##  NEW: 'class url' as code container for some shortcut functions  ##  NEW: 'class url' as code container for some shortcut functions
13  ##  ##
# Line 90  class link { Line 94  class link {
94      $query_string = linkargs::action($action_name, $args);      $query_string = linkargs::action($action_name, $args);
95      return html_a($query_string, "[$action_name]");      return html_a($query_string, "[$action_name]");
96    }    }
97      
98      function plain($url, $caption = '') {
99        if (!$caption) { $caption = $url; }
100        return html_a($url, $caption);
101      }
102    
103  }  }
104    
# Line 168  class url { Line 177  class url {
177      // there you have it..      // there you have it..
178      return $url;      return $url;
179    }    }
180      
181      function viewdatanode($nodename) {
182        
183        $final = array();
184        $defaults = array( 'ap' => 'explorer', 'ecl' => 'content' );
185        $location = array( 'ecdlk' => 'rpc' );
186        $args = array( 'ecmod' => 'view', 'ect' => 'data',  );
187        $ident = array( 'ecat' => 'list', 'ecdid' => $nodename );
188        
189        $final = php::array_join_merge($final, $defaults);
190        $final = php::array_join_merge($final, $location);
191        $final = php::array_join_merge($final, $args);
192        $final = php::array_join_merge($final, $ident);
193        
194        return url::short('', $final);
195      }
196    
197  }  }
198    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed