[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: addressbook/inc hook_addaccount.inc.php,NONE,1.1
From: |
Joseph Engo <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: addressbook/inc hook_addaccount.inc.php,NONE,1.1.2.1 hook_editaccount.inc.php,NONE,1.1.2.1 class.soaddressbook.inc.php,1.14,1.14.2.1 class.uiaddressbook.inc.php,1.36.2.2,1.36.2.3 |
Date: |
Tue, 19 Feb 2002 13:48:18 -0500 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv1447/inc
Modified Files:
Tag: Version-0_9_14-branch
class.soaddressbook.inc.php class.uiaddressbook.inc.php
Added Files:
Tag: Version-0_9_14-branch
hook_addaccount.inc.php hook_editaccount.inc.php
Log Message:
- Added basic user profiles
- Still needs a way for admins to be able to override permissions
Once thats complete, I will merge with the HEAD branch
***** Error reading new file: [Errno 2] No such file or directory:
'hook_addaccount.inc.php'
***** Error reading new file: [Errno 2] No such file or directory:
'hook_editaccount.inc.php'
Index: class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -r1.14 -r1.14.2.1
*** class.soaddressbook.inc.php 9 Sep 2001 22:55:43 -0000 1.14
--- class.soaddressbook.inc.php 19 Feb 2002 18:48:15 -0000 1.14.2.1
***************
*** 136,139 ****
--- 136,141 ----
$access = $fields['access'];
$cat_id = $fields['cat_id'];
+ $tid = $fields['tid'];
+
unset($fields['owner']);
unset($fields['access']);
***************
*** 142,146 ****
unset($fields['tid']);
!
$this->contacts->update($ab_id,$owner,$fields,$access,$cat_id);
}
return;
--- 144,148 ----
unset($fields['tid']);
!
$this->contacts->update($ab_id,$owner,$fields,$access,$cat_id,$tid);
}
return;
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.2
retrieving revision 1.36.2.3
diff -C2 -r1.36.2.2 -r1.36.2.3
*** class.uiaddressbook.inc.php 17 Jan 2002 04:04:01 -0000 1.36.2.2
--- class.uiaddressbook.inc.php 19 Feb 2002 18:48:15 -0000 1.36.2.3
***************
*** 394,397 ****
--- 394,401 ----
$qfilter .= ',owner=' .
$GLOBALS['phpgw_info']['user']['account_id'];
break;
+ case 'profile':
+ // FIXME! Needs ACL check
+ $qfilter = 'tid=p,owner=' .
$GLOBALS['phpgw_info']['user']['account_id'];
+ break;
default:
$qfilter .= ',owner=' . $this->filter;
***************
*** 431,434 ****
--- 435,439 ----
$GLOBALS['filter'] = $this->filter;
+ $GLOBALS['phpgw']->nextmatchs->extra_filters[] =
array('profile','User Profiles');
$search_filter =
$GLOBALS['phpgw']->nextmatchs->show_tpl('/index.php',
$this->start,
$total_records,'&menuaction=addressbook.uiaddressbook.index&fcat_id='.$this->cat_id,'75%',
***************
*** 525,530 ****
if (1)
{
$this->template->set_var('row_view_link',$GLOBALS['phpgw']->link('/index.php',
!
'menuaction=addressbook.uiaddressbook.view&ab_id='.$entries[$i]['id']));
}
else
--- 530,542 ----
if (1)
{
+ if ($this->filter = 'profile')
+ {
+ $s = '&profile=True';
+ }
+
$this->template->set_var('row_view_link',$GLOBALS['phpgw']->link('/index.php',
!
'menuaction=addressbook.uiaddressbook.view&ab_id='.$entries[$i]['id'] . $s));
!
! unset($s);
}
else
***************
*** 539,544 ****
if
($this->contacts->check_perms($this->contacts->grants[$myowner],PHPGW_ACL_EDIT)
|| $myowner == $GLOBALS['phpgw_info']['user']['account_id'])
{
$this->template->set_var('row_edit','<a
href="' . $GLOBALS['phpgw']->link('/index.php',
!
'menuaction=addressbook.uiaddressbook.edit&ab_id='.$entries[$i]['id']) . '">' .
lang('Edit') . '</a>');
}
else
--- 551,563 ----
if
($this->contacts->check_perms($this->contacts->grants[$myowner],PHPGW_ACL_EDIT)
|| $myowner == $GLOBALS['phpgw_info']['user']['account_id'])
{
+ if ($this->filter = 'profile')
+ {
+ $s = '&profile=True';
+ }
+
$this->template->set_var('row_edit','<a
href="' . $GLOBALS['phpgw']->link('/index.php',
!
'menuaction=addressbook.uiaddressbook.edit&ab_id='.$entries[$i]['id'] . $s) .
'">' . lang('Edit') . '</a>');
!
! unset($s);
}
else
***************
*** 666,673 ****
unset($_fields['referer']);
$this->bo->update_entry($_fields);
Header('Location: '
! .
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='
. $_fields['ab_id'] . '&referer=' . $referer)
);
--- 685,702 ----
unset($_fields['referer']);
+ if ($GLOBALS['profile'])
+ {
+ $s = '&profile=True';
+ $_fields['tid'] = 'p';
+ }
+ else
+ {
+ $_fields['tid'] = 'n';
+ }
+
$this->bo->update_entry($_fields);
Header('Location: '
! .
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='
. $_fields['ab_id'] . '&referer=' . $referer . $s)
);
***************
*** 711,716 ****
if (($this->contacts->grants[$check[0]['owner']] &
PHPGW_ACL_DELETE) || $check[0]['owner'] ==
$GLOBALS['phpgw_info']['user']['account_id'])
{
! $this->template->set_var('delete_link','<form
method="POST"
action="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete')
. '">');
!
$this->template->set_var('delete_button','<input type="submit" name="delete"
value="' . lang('Delete') . '">');
}
--- 740,749 ----
if (($this->contacts->grants[$check[0]['owner']] &
PHPGW_ACL_DELETE) || $check[0]['owner'] ==
$GLOBALS['phpgw_info']['user']['account_id'])
{
! // Profiles are *ONLY* deleted when the account
is deleted
! if (! $GLOBALS['profile'])
! {
!
$this->template->set_var('delete_link','<form method="POST"
action="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.delete')
. '">');
!
$this->template->set_var('delete_button','<input type="submit" name="delete"
value="' . lang('Delete') . '">');
! }
}
***************
*** 979,984 ****
}
$this->template->set_var('edit_button',$this->html_1button_form('edit','Edit',
!
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id='
.$ab_id)));
}
$this->template->set_var('copy_button',$this->html_1button_form('submit','copy',
--- 1012,1024 ----
}
+ if ($GLOBALS['profile'])
+ {
+ $s = '&profile=True';
+ }
+
$this->template->set_var('edit_button',$this->html_1button_form('edit','Edit',
!
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.edit&ab_id='
.$ab_id . $s)));
!
! unset($s);
}
$this->template->set_var('copy_button',$this->html_1button_form('submit','copy',
***************
*** 1535,1539 ****
if ($action)
{
! echo '<FORM action="' .
$GLOBALS['phpgw']->link('/index.php', $action .
'&referer='.urlencode($referer)).'" method="post">';
}
--- 1575,1584 ----
if ($action)
{
! if ($GLOBALS['profile'])
! {
! $s = '&profile=True';
! }
! echo '<FORM action="' .
$GLOBALS['phpgw']->link('/index.php', $action . '&referer='.urlencode($referer)
. $s).'" method="post">';
! unset($s);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: addressbook/inc hook_addaccount.inc.php,NONE,1.1.2.1 hook_editaccount.inc.php,NONE,1.1.2.1 class.soaddressbook.inc.php,1.14,1.14.2.1 class.uiaddressbook.inc.php,1.36.2.2,1.36.2.3,
Joseph Engo <address@hidden> <=