[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php,1.2,1.3
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php,1.2,1.3 |
Date: |
Mon, 02 Sep 2002 17:43:12 -0400 |
Update of /cvsroot/phpgroupware/infolog/inc
In directory subversions:/tmp/cvs-serv31557
Modified Files:
class.bolink.inc.php
Log Message:
added app_list and debuged the other functions
Index: class.bolink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.bolink.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bolink.inc.php 2 Sep 2002 11:14:30 -0000 1.2
--- class.bolink.inc.php 2 Sep 2002 21:43:10 -0000 1.3
***************
*** 22,25 ****
--- 22,26 ----
@class bolink
@author ralfbecker
+ @author ralfbecker
@abstract generalized linking between entries of phpGroupware apps - BO
layer
@discussion This class is the BO-layer of the links
***************
*** 31,43 ****
{
var $app_register = array( // this should be
setup/extended by setup
- 'infolog' => array(
- 'query' => 'infolog.boinfolog.link_query',
- 'title' => 'infolog.boinfolog.link_title',
- 'view' => array(
- 'menuaction' =>
'infolog.uiinfolog.get_list',
- 'action' => 'sp'
- ),
- 'view_id' => 'info_id',
- ),
'addressbook' => array(
'query' => 'addressbook_query',
--- 32,35 ----
***************
*** 60,67 ****
'title' => 'calendar_title',
'view' => array (
! 'menuaction' =>
'calendar.uicalendar.view
),
'view_id' => 'cal_id'
! ) /*,
'email' => array(
'view' => array(
--- 52,59 ----
'title' => 'calendar_title',
'view' => array (
! 'menuaction' =>
'calendar.uicalendar.view'
),
'view_id' => 'cal_id'
! ), /*
'email' => array(
'view' => array(
***************
*** 69,84 ****
),
'view_id' => 'msgball[acctnum:folder:msgnum]'
// id is a tupple/array, fields separated by ':'
! ) */
);
function bolink( )
{
! solink( );
// call constructor of derived class
$this->public_functions += array( // extend the
public_functions of solink
! 'query' => True,
'title' => True,
);
}
function check_method($method,&$class,&$func)
{
--- 61,103 ----
),
'view_id' => 'msgball[acctnum:folder:msgnum]'
// id is a tupple/array, fields separated by ':'
! ), */
! 'infolog' => array(
! 'query' => 'infolog.boinfolog.link_query',
! 'title' => 'infolog.boinfolog.link_title',
! 'view' => array(
! 'menuaction' =>
'infolog.uiinfolog.get_list',
! 'action' => 'sp'
! ),
! 'view_id' => 'info_id',
! )
);
function bolink( )
{
! $this->solink( );
// call constructor of derived class
$this->public_functions += array( // extend the
public_functions of solink
! 'query' => True,
'title' => True,
);
}
+ /*!
+ @function app_list
+ @syntax app_list( )
+ @author ralfbecker
+ @abstrac get list/array of link-aware apps
+ @result array( $app => lang($app), ... )
+ */
+ function app_list( )
+ {
+ reset ($this->app_register);
+ $apps = array();
+ while (list($app,$reg) = each($this->app_register))
+ {
+ $apps[$app] = lang($app);
+ }
+ return $apps;
+ }
+
function check_method($method,&$class,&$func)
{
***************
*** 87,92 ****
/*!
! @function query
! @syntax query( $app,$pattern )
@author ralfbecker
@abstract Searches for a $pattern in the entries of $app
--- 106,111 ----
/*!
! @function query
! @syntax query( $app,$pattern )
@author ralfbecker
@abstract Searches for a $pattern in the entries of $app
***************
*** 95,110 ****
function query($app,$pattern)
{
! if ($app == '' || !is_array($reg =
$this->app_register[$app]) || !is_set[$reg['query']])
{
return array();
}
$method = $reg['query'];
! return strchr('.',$method) ?
ExecuteMethod($method,$pattern) : $this->$method($pattern);
}
/*!
! @function title
! @syntax title( $app,$id )
@author ralfbecker
@abstract returns the title (short description) of entry $id
and $app
--- 114,130 ----
function query($app,$pattern)
{
! if ($app == '' || !is_array($reg =
$this->app_register[$app]) || !isset($reg['query']))
{
return array();
}
$method = $reg['query'];
+ echo "<p>bolink.query('$app','$pattern') =>
'$method'</p>\n";
! return strchr($method,'.') ?
ExecMethod($method,$pattern) : $this->$method($pattern);
}
/*!
! @function title
! @syntax title( $app,$id )
@author ralfbecker
@abstract returns the title (short description) of entry $id
and $app
***************
*** 113,117 ****
function title($app,$id)
{
! if ($app == '' || !is_array($reg =
$this->app_register[$app]) || !is_set[$reg['title']])
{
return array();
--- 133,137 ----
function title($app,$id)
{
! if ($app == '' || !is_array($reg =
$this->app_register[$app]) || !is_set($reg['title']))
{
return array();
***************
*** 119,128 ****
$method = $reg['title'];
! return strchr('.',$method) ? ExecuteMethod($method,$id)
: $this->$method($id);
}
/*!
! @function calendar_title
! @syntax calendar_title( $id )
@author ralfbecker
@abstract get title for an event, should be moved to
bocalendar.link_title
--- 139,148 ----
$method = $reg['title'];
! return strchr($method,'.') ? ExecuteMethod($method,$id)
: $this->$method($id);
}
/*!
! @function calendar_title
! @syntax calendar_title( $id )
@author ralfbecker
@abstract get title for an event, should be moved to
bocalendar.link_title
***************
*** 150,155 ****
/*!
! @function calendar_query
! @syntax calendar_query( $pattern )
@author ralfbecker
@abstract query calendar for an event $matching pattern, should
be moved to bocalendar.link_query
--- 170,175 ----
/*!
! @function calendar_query
! @syntax calendar_query( $pattern )
@author ralfbecker
@abstract query calendar for an event $matching pattern, should
be moved to bocalendar.link_query
***************
*** 161,165 ****
$this->bocal =
createobject('calendar.bocalendar');
}
! $event_ids = $this->bocal->search_keywords($query_name);
$content = array( );
--- 181,185 ----
$this->bocal =
createobject('calendar.bocalendar');
}
! $event_ids = $this->bocal->search_keywords($pattern);
$content = array( );
***************
*** 172,177 ****
/*!
! @function addressbook_title
! @syntax addressbook_title( $id )
@author ralfbecker
@abstract get title for an address, should be moved to
boaddressbook.link_title
--- 192,197 ----
/*!
! @function addressbook_title
! @syntax addressbook_title( $id )
@author ralfbecker
@abstract get title for an address, should be moved to
boaddressbook.link_title
***************
*** 207,212 ****
/*!
! @function addressbook_query
! @syntax addressbook_query( $pattern )
@author ralfbecker
@abstract query addressbook for $pattern, should be moved to
boaddressbook.link_query
--- 227,232 ----
/*!
! @function addressbook_query
! @syntax addressbook_query( $pattern )
@author ralfbecker
@abstract query addressbook for $pattern, should be moved to
boaddressbook.link_query
***************
*** 218,222 ****
$this->contacts =
createobject('phpgwapi.contacts');
}
! $addrs = $contacts->read(
0,0,'',$query_name,'','DESC','org_name,n_family,n_given' );
$content = array( );
while ($addrs && list( $key,$addr ) = each( $addrs ))
--- 238,242 ----
$this->contacts =
createobject('phpgwapi.contacts');
}
! $addrs = $this->contacts->read(
0,0,'',$pattern,'','DESC','org_name,n_family,n_given' );
$content = array( );
while ($addrs && list( $key,$addr ) = each( $addrs ))
***************
*** 224,232 ****
$content[$addr['id']] =
$this->addressbook_title( $addr );
}
}
/*!
! @function projects_title
! @syntax projects_title( $id )
@author ralfbecker
@abstract get title for a project, should be moved to
boprojects.link_title
--- 244,253 ----
$content[$addr['id']] =
$this->addressbook_title( $addr );
}
+ return $content;
}
/*!
! @function projects_title
! @syntax projects_title( $id )
@author ralfbecker
@abstract get title for a project, should be moved to
boprojects.link_title
***************
*** 242,246 ****
if (!is_array($proj))
{
! $proj = $this->boprojects->read_single_project(
$proj ))
}
return $proj['title'];
--- 263,267 ----
if (!is_array($proj))
{
! $proj = $this->boprojects->read_single_project(
$proj );
}
return $proj['title'];
***************
*** 248,257 ****
/*!
! @function projects_query
! @syntax projects_query( $pattern )
@author ralfbecker
@abstract query for projects matching $pattern, should be moved
to boprojects.link_query
*/
! function projects_title( $pattern )
{
if (!is_object($this->boprojects))
--- 269,278 ----
/*!
! @function projects_query
! @syntax projects_query( $pattern )
@author ralfbecker
@abstract query for projects matching $pattern, should be moved
to boprojects.link_query
*/
! function projects_query( $pattern )
{
if (!is_object($this->boprojects))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php,1.2,1.3,
Ralf Becker <address@hidden> <=