[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] addressbook/inc class.boaddressbook.inc.php, 1.21.2.2
From: |
Alejandro Borges (lex) <address@hidden> |
Subject: |
[Phpgroupware-cvs] addressbook/inc class.boaddressbook.inc.php, 1.21.2.2.2.16, 1.21.2.2.2.17 class.uiaddressbook.inc.php, 1.36.2.15.2.27, 1.36.2.15.2.28 |
Date: |
Sun, 26 Oct 2003 03:13:43 +0000 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv3124
Modified Files:
Tag: Version-0_9_16-branch
class.boaddressbook.inc.php class.uiaddressbook.inc.php
Log Message:
Changes to accomodate the addressbook_delete hook
Index: class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.21.2.2.2.16
retrieving revision 1.21.2.2.2.17
diff -C2 -d -r1.21.2.2.2.16 -r1.21.2.2.2.17
*** class.boaddressbook.inc.php 15 Oct 2003 17:16:30 -0000 1.21.2.2.2.16
--- class.boaddressbook.inc.php 26 Oct 2003 03:13:40 -0000 1.21.2.2.2.17
***************
*** 351,354 ****
--- 351,355 ----
function delete_entry($ab_id)
{
+
return $this->so->delete_entry($ab_id);
}
***************
*** 733,737 ****
return $this->so->get_type_contact($contact_id);
}
!
function delete($contact_id, $contact_type)
{
--- 734,758 ----
return $this->so->get_type_contact($contact_id);
}
! function can_delete_hooks($hook_response)
! {
! $negative_apps=false;
! foreach($hook_response as $application => $response)
! {
! if(is_array($response))
! {
! if(!$response['can_delete'])
! {
!
$negative_apps[$application]=$response['reason'];
! }
! }
! }
! if(!$negative_apps)
! {
! return true;
! }
!
! $this->negative_responses=$negative_apps;
!
! }
function delete($contact_id, $contact_type)
{
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.27
retrieving revision 1.36.2.15.2.28
diff -C2 -d -r1.36.2.15.2.27 -r1.36.2.15.2.28
*** class.uiaddressbook.inc.php 15 Oct 2003 20:23:47 -0000 1.36.2.15.2.27
--- class.uiaddressbook.inc.php 26 Oct 2003 03:13:40 -0000 1.36.2.15.2.28
***************
*** 2479,2483 ****
'menuaction=addressbook.uiaddressbook.index§ion='.$contact_type));
}
!
$this->template->set_file(array('delete' =>
'delete.tpl'));
--- 2479,2528 ----
'menuaction=addressbook.uiaddressbook.index§ion='.$contact_type));
}
! //LEX: Calling the delete_addressbook hook to make
! //shure we are allowed to delete this contacts by the
! //other applications
!
! $response= $GLOBALS['phpgw']->hooks->process(array(
! 'location' =>
'delete_addressbook',
! 'contact_id' =>
$contact_id )
! );
!
! if(!$this->bo->can_delete_hooks($response))
! {
!
! $GLOBALS['phpgw']->common->phpgw_header();
! echo parse_navbar();
! (count($this->bo->negative_responses) >1) ?
$plur='s' : $plur='';
!
$this->template->set_file(array('cant_delete_apps' =>
! 'cannot_delete.tpl')
! );
!
! $this->template->set_var('lang_maynot_delete',
! lang("The following
application(s) have
! requested for
this contact to be
! protected from
deletion:")
! );
!
$this->template->set_var('lang_application',lang('applications'));
!
$this->template->set_var('lang_reason',lang('reason'));
!
$this->template->set_var('lang_go_back',lang('Go back'));
! $this->template->set_var('link_go_back',
!
$GLOBALS['phpgw']->link('/index.php',
!
'menuaction=addressbook.uiaddressbook.index§ion='.$contact_type));
! $this->template->set_block('cant_delete_apps',
! 'apps',
! 'apps_l');
! foreach($this->bo->negative_responses as
$appname => $reason)
! {
!
$this->template->set_var('appname',$appname);
!
$this->template->set_var('reason',$reason);
!
$this->template->parse('apps_l','apps',True);
! }
!
!
$this->template->pparse('out','cant_delete_apps');
! $GLOBALS['phpgw']->common->phpgw_exit();
!
! return;
! }
!
$this->template->set_file(array('delete' =>
'delete.tpl'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] addressbook/inc class.boaddressbook.inc.php, 1.21.2.2.2.16, 1.21.2.2.2.17 class.uiaddressbook.inc.php, 1.36.2.15.2.27, 1.36.2.15.2.28,
Alejandro Borges (lex) <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] addressbook/templates/default cannot_delete.tpl, NONE, 1.1.2.1
- Next by Date:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.48.2.2.2.18, 1.48.2.2.2.19 class.contacts_sql.inc.php, 1.17.2.2.2.25, 1.17.2.2.2.26
- Previous by thread:
[Phpgroupware-cvs] addressbook/templates/default cannot_delete.tpl, NONE, 1.1.2.1
- Next by thread:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.48.2.2.2.18, 1.48.2.2.2.19 class.contacts_sql.inc.php, 1.17.2.2.2.25, 1.17.2.2.2.26
- Index(es):