phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php,1.3,1.4 class.l


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php,1.3,1.4 class.linkto_widget.inc.php,1.1,1.2 class.solink.inc.php,1.3,1.4 class.uiinfolog.inc.php,1.43,1.44 class.uilink.inc.php,1.3,1.4 hook_addressbook_view.inc.php,1.5,1.6
Date: Tue, 03 Sep 2002 19:08:02 -0400

Update of /cvsroot/phpgroupware/infolog/inc
In directory subversions:/tmp/cvs-serv11091

Modified Files:
        class.bolink.inc.php class.linkto_widget.inc.php 
        class.solink.inc.php class.uiinfolog.inc.php 
        class.uilink.inc.php hook_addressbook_view.inc.php 
Log Message:
link functionality is now working, the UI is not very pretty

Index: class.bolink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.bolink.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.bolink.inc.php        2 Sep 2002 21:43:10 -0000       1.3
--- class.bolink.inc.php        3 Sep 2002 23:08:00 -0000       1.4
***************
*** 21,25 ****
        /*!
        @class bolink
-       @author ralfbecker
        @author ralfbecker
        @abstract generalized linking between entries of phpGroupware apps - BO 
layer
--- 21,24 ----
***************
*** 79,88 ****
                                'query' => True,
                                'title' => True,
                        );
                }
  
                /*!
!               @function app_list
!               @syntax app_list(   )
                @author ralfbecker
                @abstrac get list/array of link-aware apps
--- 78,200 ----
                                'query' => True,
                                'title' => True,
+                               'view'  => True
                        );
                }
  
                /*!
!               @function link
!               @syntax link(  $app1,$id1,$app2,$id2='',$remark='',$user=0  )
!               @author ralfbecker
!               @abstract creats a link between $app1,$id1 and $app2,$id2 - 
$id1 does NOT need to exist yet
!               @param $app1 app of $id1
!               @param $id1 id of item to linkto or 0 if item not yet created 
or array with links of not created item
!               @param $app2 app of 2.linkend or array with links ($id2 not 
used)
!               @param $remark Remark to be saved with the link (defaults to '')
!               @param $owner Owner of the link (defaults to user)
!               @discussion Does NOT check if link already exists
!               @result db-errno or -1 (for param-error) or 0 for success
!               @result if $id1==0 or already an array: $id1 is array with links
!               */
!               function link( $app1,&$id1,$app2,$id2='',$remark='',$owner=0 )
!               {
!                       if ($this->debug)
!                       {
!                               echo 
"<p>bolink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n";
!                       }
!                       if (!$app1 || !$app2 || !$id1 && isarray($id2) || $app1 
== $app2 && $id1 == $id2)
!                       {
!                               return -1;
!                       }
!                       if (is_array($id1) || !$id1)            // create link 
only in $id1 array
!                       {
!                               if (!is_array($id1))
!                               {
!                                       $id1 = array( );
!                               }
!                               $id1["$app2:$id2"] = array(
!                                       'app' => $app2,
!                                       'id'  => $id2,
!                                       'remark' => $remark,
!                                       'owner'  => $owner,
!                                       'link_id' => "$app2:$id2"
!                               );
!                               return 0;
!                       }
!                       if (is_array($app2) && !$id2)
!                       {
!                               reset($app2);
!                               $err = 0;
!                               while (!$err && list(,$link) = each($app2))
!                               {
!                                       $err = 
solink::link($app1,$id1,$link['app'],$link['id'],$link['remark'],$link['owner']);
!                               }
!                               return $err;
!                       }
!                       return 
solink::link($app1,$id1,$app2,$id2,$remark,$owner);
!               }
! 
!               /*!
!               @function get_links
!               @syntax get_links(  
$app,$id,$only_app='',$only_name='',$order='link_lastmod DESC'  )
!               @author ralfbecker
!               @abstract returns array of links to $app,$id (reimplemented to 
deal with not yet created items)
!               @param $id id of entry in $app or array of links if entry not 
yet created
!               @param $only_app if set return only links from $only_app (eg. 
only addressbook-entries) or NOT from if $only_app[0]=='!'
!               @param $order defaults to newest links first
!               @result array of links or empty array if no matching links found
!               */
!               function get_links( $app,$id,$only_app='',$order='link_lastmod 
DESC' )
!               {
!                       if (is_array($id) || !$id)
!                       {
!                               $ids = array();
!                               if (is_array($id))
!                               {
!                                       if ($not_only = $only_app[0])
!                                       {
!                                               $only_app = substr(1,$only_app);
!                                       }
!                                       reset($id);
!                                       while (list($key,$link) = each($id))
!                                       {
!                                               if ($only_app && $not_only == 
($link['app'] == $only_app))
!                                               {
!                                                       continue;
!                                               }
!                                               $ids[$key] = $link;
!                                       }
!                               }
!                               return $ids;
!                       }
!                       return solink::get_links($app,$id,$only_app,$order);
!               }
! 
!               /*!
!       @function unlink
!       @syntax unlink( $link_id,$app='',$id='',$owner='' )
!       @author ralfbecker
!               @abstract Remove link with $link_id or all links matching given 
$app,$id
!               @param $link_id link-id to remove if > 0
!               @param $app,$id,$owner if $link_id <= 0: removes all links 
matching the non-empty params
!               @discussion Note: if $link_id != '' and $id is an array: unlink 
removes links from that array only
!               @discussion       unlink has to be called with &$id so see the 
result !!!
!               @result the number of links deleted
!               */
!               function unlink($link_id,$app='',$id='',$owner='')
!               {
!                       if ($link_id > 0 || !is_array($id))
!                       {
!                               return solink::unlink($link_id,$app,$id,$owner);
!                       }
!                       $result = isset($id[$link_id]);
! 
!                       unset($id[$link_id]);
! 
!                       return $result;
!               }
! 
!               /*!
!               @function app_list
!               @syntax app_list(   )
                @author ralfbecker
                @abstrac get list/array of link-aware apps
***************
*** 102,106 ****
                function check_method($method,&$class,&$func)
                {
!                       // Idea: check if method exist and cache the class 
                }
  
--- 214,218 ----
                function check_method($method,&$class,&$func)
                {
!                       // Idea: check if method exist and cache the class
                }
  
***************
*** 119,124 ****
                        }
                        $method = $reg['query'];
-                       echo "<p>bolink.query('$app','$pattern') => 
'$method'</p>\n";
  
                        return strchr($method,'.') ? 
ExecMethod($method,$pattern) : $this->$method($pattern);
                }
--- 231,239 ----
                        }
                        $method = $reg['query'];
  
+                       if ($this->debug)
+                       {
+                               echo "<p>bolink.query('$app','$pattern') => 
'$method'</p>\n";
+                       }
                        return strchr($method,'.') ? 
ExecMethod($method,$pattern) : $this->$method($pattern);
                }
***************
*** 133,137 ****
                function title($app,$id)
                {
!                       if ($app == '' || !is_array($reg = 
$this->app_register[$app]) || !is_set($reg['title']))
                        {
                                return array();
--- 248,252 ----
                function title($app,$id)
                {
!                       if ($app == '' || !is_array($reg = 
$this->app_register[$app]) || !isset($reg['title']))
                        {
                                return array();
***************
*** 139,143 ****
                        $method = $reg['title'];
  
!                       return strchr($method,'.') ? ExecuteMethod($method,$id) 
: $this->$method($id);
                }
  
--- 254,289 ----
                        $method = $reg['title'];
  
!                       return strchr($method,'.') ? ExecMethod($method,$id) : 
$this->$method($id);
!               }
! 
!               /*!
!               @function view
!               @syntax view( $app,$id )
!               @author ralfbecker
!               @abstract view entry $id of $app
!               @result array with name-value pairs for link to view-methode of 
$app to view $id
!               */
!               function view($app,$id)
!               {
!                       if ($app == '' || !is_array($reg = 
$this->app_register[$app]) || !isset($reg['view']) || !isset($reg['view_id']))
!                       {
!                               return array();
!                       }
!                       $view = $reg['view'];
! 
!                       $names = explode(':',$reg['view_id']);
!                       if (count($names) > 1)
!                       {
!                               $id = explode(':',$id);
!                               while (list($n,$name) = each($names))
!                               {
!                                       $view[$name] = $id[$n];
!                               }
!                       }
!                       else
!                       {
!                               $view[$reg['view_id']] = $id;
!                       }
!                       return $view;
                }
  

Index: class.linkto_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.linkto_widget.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.linkto_widget.inc.php 2 Sep 2002 21:48:37 -0000       1.1
--- class.linkto_widget.inc.php 3 Sep 2002 23:08:00 -0000       1.2
***************
*** 16,20 ****
        @class linkto_widget
        @author ralfbecker
-       @author ralfbecker
        @abstract widget that enable you to make a link to an other entry of a 
link-aware app
        @discussion This widget is independent of the UI as it only uses 
etemplate-widgets and has therefor no render-function
--- 16,19 ----
***************
*** 37,41 ****
                        $search = $value['search'] ? 1 : 0;
                        $create = $value['create'] ? 1 : 0;
!                       echo "<p>linkto_widget.preprocess: 
query='$value[query]',app='$value[app]',search=$search,create=$create</p>\n";
  
                        if ($search && count($ids = 
$this->link->query($value['app'],$value['query'])))
--- 36,40 ----
                        $search = $value['search'] ? 1 : 0;
                        $create = $value['create'] ? 1 : 0;
!                       //echo "<p>linkto_widget.preprocess: 
query='$value[query]',app='$value[app]',search=$search,create=$create</p>\n";
  
                        if ($search && count($ids = 
$this->link->query($value['app'],$value['query'])))
***************
*** 77,90 ****
                        list($value['app']) = @$value['app'];   // no 
multiselection
                        list($value['id'])  = @$value['id'];
!                       echo "<p>linkto_widget.postprocess: 
query='$value[query]',app='$value[app]',id='$value[id]', 
search=$search,create=$create</p>\n";
! 
!                       $templ->loop = $search;
  
                        if ($create)
                        {
                                $value = 
array_merge($value,$GLOBALS['phpgw_info']['etemplate']['extension_data']['linkto_widget'][$cell['name']]);
!                               // make the link
!                               echo 
"<p>linkto($value[app],$value[id],'$value[remark]')</p>\n";
                        }
                }
        }
--- 76,91 ----
                        list($value['app']) = @$value['app'];   // no 
multiselection
                        list($value['id'])  = @$value['id'];
!                       //echo "<p>linkto_widget.postprocess: 
query='$value[query]',app='$value[app]',id='$value[id]', 
search=$search,create=$create</p>\n";
  
                        if ($create)
                        {
                                $value = 
array_merge($value,$GLOBALS['phpgw_info']['etemplate']['extension_data']['linkto_widget'][$cell['name']]);
!                               if ($value['to_app'])                           
                // make the link
!                               {
!                                       
$this->link->link($value['to_app'],$value['to_id'],$value['app'],$value['id'],$value['remark']);
!                                       echo 
"<p>linkto($value[app],$value[id],'$value[remark]')</p>\n";
!                               }
                        }
+                       $templ->loop = $search || $create;
                }
        }

Index: class.solink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.solink.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.solink.inc.php        2 Sep 2002 21:46:11 -0000       1.3
--- class.solink.inc.php        3 Sep 2002 23:08:00 -0000       1.4
***************
*** 15,20 ****
        /*!
        @class solink
!       @author ralfbecker
!       @author ralfbecker
        @abstract generalized linking between entries of phpGroupware apps - DB 
layer
        @discussion This class is to access the links in the DB
--- 15,19 ----
        /*!
        @class solink
!       @author ralfbecker
        @abstract generalized linking between entries of phpGroupware apps - DB 
layer
        @discussion This class is to access the links in the DB
***************
*** 32,36 ****
                        'chown'     => True
                );
!               var $db,$db2;
                var $user;
                var $db_name = 'phpgw_links';
--- 31,35 ----
                        'chown'     => True
                );
!               var $db;
                var $user;
                var $db_name = 'phpgw_links';
***************
*** 38,43 ****
  
                /*!
!               @function solink
!               @syntax solink(   )
                @author ralfbecker
                @abstract constructor
--- 37,42 ----
  
                /*!
!               @function solink
!               @syntax solink(   )
                @author ralfbecker
                @abstract constructor
***************
*** 50,57 ****
  
                /*!
!               @function link
!               @syntax link(  
$app1,$name1,$id1,$app2,$name2,$id2,$remark='',$user=0  )
                @author ralfbecker
!               @abstract creats a link between $app1,$name1,$id1 and 
$app2,$name2,$id2
                @param $remark Remark to be saved with the link (defaults to '')
                @param $owner Owner of the link (defaults to user)
--- 49,56 ----
  
                /*!
!               @function link
!               @syntax link(  $app1,$id1,$app2,$id2,$remark='',$user=0  )
                @author ralfbecker
!               @abstract creats a link between $app1,$id1 and $app2,$id2
                @param $remark Remark to be saved with the link (defaults to '')
                @param $owner Owner of the link (defaults to user)
***************
*** 62,67 ****
                {
                        if ($this->debug)
!                               echo 
"<p>solink.link($app1,$id1,$app2,$id2,'$remark',$owner)</p>\n";
! 
                        if ($app1 == $app2 && $id1 == $id2 ||
                            $id1 == '' || $id2 == '' || $app1 == '' || $app2 == 
'')
--- 61,67 ----
                {
                        if ($this->debug)
!                       {
!                               echo 
"<p>solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n";
!                       }
                        if ($app1 == $app2 && $id1 == $id2 ||
                            $id1 == '' || $id2 == '' || $app1 == '' || $app2 == 
'')
***************
*** 89,97 ****
  
                /*!
!               @function get_links
!               @syntax get_links(  
$app,$name,$id,$only_app='',$only_name='',$order='link_lastmod DESC'  )
                @author ralfbecker
!               @abstract returns array of links to $app,$name,$id
!               @param $only_app if set return only links from $only_app (eg. 
only addressbook-entries)
                @param $order defaults to newest links first
                @result array of links or empty array if no matching links found
--- 89,97 ----
  
                /*!
!               @function get_links
!               @syntax get_links(  
$app,$id,$only_app='',$only_name='',$order='link_lastmod DESC'  )
                @author ralfbecker
!               @abstract returns array of links to $app,$id
!               @param $only_app if set return only links from $only_app (eg. 
only addressbook-entries) or NOT from if $only_app[0]=='!'
                @param $order defaults to newest links first
                @result array of links or empty array if no matching links found
***************
*** 112,115 ****
--- 112,119 ----
                        $this->db->query($sql);
  
+                       if ($not_only = $only_app[0] == '!')
+                       {
+                               $only_app = substr($only_app,1);
+                       }
                        while ($this->db->next_record())
                        {
***************
*** 130,134 ****
                                        );
                                }
!                               if ($only_app != '' && $link['app'] != 
$only_app)
                                {
                                        continue;
--- 134,138 ----
                                        );
                                }
!                               if ($only_app && $not_only == ($link['app'] == 
$only_app))
                                {
                                        continue;
***************
*** 145,150 ****
  
                /*!
!       @function unlink
!       @syntax unlink( $link_id,$app='',$id='',$owner='' )
        @author ralfbecker
                @abstract Remove link with $link_id or all links matching given 
params
--- 149,154 ----
  
                /*!
!       @function unlink
!       @syntax unlink( $link_id,$app='',$id='',$owner='' )
        @author ralfbecker
                @abstract Remove link with $link_id or all links matching given 
params
***************
*** 192,197 ****
  
                /*!
!       @function chown
!       @syntax chown( $owner,$new_owner )
        @author ralfbecker
                @abstract Changes ownership of all links from $owner to 
$new_owner
--- 196,201 ----
  
                /*!
!       @function chown
!       @syntax chown( $owner,$new_owner )
        @author ralfbecker
                @abstract Changes ownership of all links from $owner to 
$new_owner

Index: class.uiinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.uiinfolog.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** class.uiinfolog.inc.php     2 Sep 2002 21:50:29 -0000       1.43
--- class.uiinfolog.inc.php     3 Sep 2002 23:08:00 -0000       1.44
***************
*** 712,730 ****
                        }
  
                        $linkto = get_var('linkto',Array('POST'));
!                       if (is_array($linkto) && $linkto['create'])
                        {
!                               switch ($linkto['app'])
!                               {
!                                       case 'addressbook':
!                                               $id_addr = $linkto['id'];
!                                               break;
!                                       case 'projects':
!                                               $id_project = $linkto['id'];
!                                               break;
!                                       case 'calendar':
!                                               $id_event = $linkto['id'];
!                                               break;
!                               }
                        }
                        // check wether to write dates or not
--- 712,720 ----
                        }
  
+                       $app2var = array('addressbook' => 'id_addr','projects' 
=> 'id_project','calendar' => 'id_event' );
                        $linkto = get_var('linkto',Array('POST'));
!                       if (is_array($linkto) && $linkto['create'] && ($var = 
$app2var[$linkto['app']]))
                        {
!                               $$var = $linkto['id'];
                        }
                        // check wether to write dates or not
***************
*** 898,903 ****
                        
$GLOBALS['phpgw']->template->set_block('info_edit_t','info_edit');
  
!                       
$GLOBALS['phpgw']->template->set_var('linkto',$this->link->getEntry('linkto'));
! 
                        if (is_array($error))
                        {
--- 888,893 ----
                        
$GLOBALS['phpgw']->template->set_block('info_edit_t','info_edit');
  
!                       
$GLOBALS['phpgw']->template->set_var('linkto',$this->link->getEntry('linkto','infolog',&$info_id).
!                                                                     
$this->link->showLinks('links','infolog',$info_id));
                        if (is_array($error))
                        {

Index: class.uilink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.uilink.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uilink.inc.php        2 Sep 2002 21:44:24 -0000       1.3
--- class.uilink.inc.php        3 Sep 2002 23:08:00 -0000       1.4
***************
*** 21,25 ****
        /*!
        @class uilink
-       @author ralfbecker
        @author ralfbecker
        @abstract generalized linking between entries of phpGroupware apps - 
HTML UI layer
--- 21,24 ----
***************
*** 36,40 ****
                        $this->public_functions += array(       // extend 
public_functions
                                'getEntry' => True,
!                               'show'     => True
                        );
                }
--- 35,39 ----
                        $this->public_functions += array(       // extend 
public_functions
                                'getEntry' => True,
!                               'showLinks' => True
                        );
                }
***************
*** 46,52 ****
                @abstract HTML UI to query user for one side of a link: an 
entry of a supported app
                @param $name base-name of the input-fields
!               @result html for query
                */
!               function getEntry($name)
                {
                        $value = get_var($name,array('POST'));
--- 45,51 ----
                @abstract HTML UI to query user for one side of a link: an 
entry of a supported app
                @param $name base-name of the input-fields
!               @result html: table-row(s) with 4 cols
                */
!               function getEntry($name,$app='',$id=0)
                {
                        $value = get_var($name,array('POST'));
***************
*** 55,59 ****
                                $value = array();
                        }
!                       echo "<p>$name = "; _debug_array($value);
                        if ($value['search'] && count($ids = 
$this->query($value['app'],$value['query'])))
                        {
--- 54,65 ----
                                $value = array();
                        }
!                       if ($this->debug)
!                       {
!                               echo "<p>uilink.getEntry('$name','$app',$id): 
$name = "; _debug_array($value);
!                       }
!                       if ($value['create'] && $value['app'] && $value['id'] 
&& $app)
!                       {
!                               
$this->link($app,&$id,$value['app'],$value['id'],$value['remark']);
!                       }
                        if ($value['search'] && count($ids = 
$this->query($value['app'],$value['query'])))
                        {
***************
*** 83,94 ****
  
                /*!
!               @function show
!               @syntax show( $app,$id )
                @author ralfbecker
!               @abstract HTML UI to show & delete existing links to $app,$id 
and to make new links
!               @discussion this should be called by each link-supporting app 
at the bottom of its view-entry-page
                */
!               function show($app,$id)
                {
                }
        }
--- 89,167 ----
  
                /*!
!               @function showLinks
!               @syntax showLinks( 
$name,$app,$id,$only_app='',$show_unlink=True )
                @author ralfbecker
!               @abstract HTML UI to show & delete existing links to $app,$id
!               @param $name base-name of the input-fields
!               @param $only_app if set return only links from $only_app (eg. 
only addressbook-entries) or NOT from if $only_app[0]=='!'
!               @param $show_unlink boolean show unlink button for each link 
(default true)
!               @result html: table-row(s) with 4 cols
                */
!               function 
showLinks($name,$app,$id,$only_app='',$show_unlink=True)
                {
+                       $value = get_var($name,array('POST'));
+                       if (!is_array($value))
+                       {
+                               $value = array();
+                       }
+                       list($unlink) = @each($value['unlink']);
+                       if ($this->debug)
+                       {
+                               echo "<p>uilink.showLinks: app='$app',id='$id', 
unlink=$unlink, $name = "; _debug_array($value);
+                       }
+                       if ($unlink)
+                       {
+                               $this->unlink($unlink,$app,$id);
+                               //echo "<p>$unlink unlinked</p>\n";
+                       }
+                       $etemplate = 
CreateObject('etemplate.etemplate','infolog.linklist_widget');
+                       $links = $this->get_links($app,$id,$only_app);
+                       $value = array();
+                       for($row=$etemplate->rows-1; list(,$link) = 
each($links); ++$row)
+                       {
+                               $value[$row] = $link;
+                               $value[$row]['title'] = 
$this->title($link['app'],$link['id']);
+                       }
+                       $value['app']   = $app;
+                       $value['id']    = $id;
+                       $value['title'] = $this->title($app,$id);
+ 
+                       $out = $etemplate->show($value,'','',$name);
+ 
+                       $out = str_replace('[]','',$out);
+                       return eregi_replace('[</]*table[^>]*>','',$out);
+               }
+ 
+               /*!
+               @function viewLink
+               @syntax viewLink( $app,$id,$content='' )
+               @author ralfbecker
+               @abstract link to view entry $id of $app
+               @param $content if set result will be like "<a 
href=[link]>$content</a>"
+               @result link to view $id in $app or False if no link for $app 
registered or $id==''
+               */
+               function viewLink($app,$id,$html='')
+               {
+                       $view = $this->view($app,$id);
+                       if (!count($view))
+                       {
+                               return False;
+                       }
+                       $html = CreateObject('infolog.html');
+                       return $content == '' ? $html->link('/index.php',$view) 
: $html->a_href($content,'/index.php',$view);
+               }
+ 
+               /*!
+               @function linkBox
+               @syntax linkBox( $app,$id,$only_app='',$show_unlink=True )
+               @author ralfbecker
+               @abstract HTML UI to show, delete & add links to $app,$id
+               @param $only_app if set return only links from $only_app (eg. 
only addressbook-entries) or NOT from if $only_app[0]=='!'
+               @param $show_unlink boolean show unlink button for each link 
(default true)
+               @result html: table-row(s) with 4 cols
+               */
+               function linkBox($app,$id,$only_app='',$show_unlink=True)
+               {
+ 
                }
        }

Index: hook_addressbook_view.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/hook_addressbook_view.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** hook_addressbook_view.inc.php       1 May 2002 17:16:27 -0000       1.5
--- hook_addressbook_view.inc.php       3 Sep 2002 23:08:00 -0000       1.6
***************
*** 19,24 ****
        /* echo "<p>hook_addressbook_view(ab_id=$ab_id)</p>"; */
  
        $infolog = CreateObject('infolog.uiinfolog');
        $infolog->get_list(True,'addr',$GLOBALS['ab_id']);
  
!       $GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app; 
--- 19,31 ----
        /* echo "<p>hook_addressbook_view(ab_id=$ab_id)</p>"; */
  
+       $link = CreateObject('infolog.uilink');
+       $out = 
'<table>'.$link->getEntry('entry','addressbook',$GLOBALS['ab_id'])."\n".
+                        
$link->showLinks('links','addressbook',$GLOBALS['ab_id'],'!infolog')."</table>\n";
+       $html = CreateObject('infolog.html');
+       $out = 
$html->form($out,'','/index.php',array('menuaction'=>'addressbook.uiaddressbook.view','ab_id'=>$GLOBALS['ab_id']));
+       $GLOBALS['phpgw']->template->set_var('phpgw_body',$out,True);
+ 
        $infolog = CreateObject('infolog.uiinfolog');
        $infolog->get_list(True,'addr',$GLOBALS['ab_id']);
  
!       $GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]