[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [19109] notices fixes
From: |
Caeies |
Subject: |
[Phpgroupware-cvs] [19109] notices fixes |
Date: |
Wed, 11 Mar 2009 18:31:14 +0000 |
Revision: 19109
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19109
Author: Caeies
Date: 2009-03-11 18:31:14 +0000 (Wed, 11 Mar 2009)
Log Message:
-----------
notices fixes
Modified Paths:
--------------
core/trunk/addressbook/inc/class.soaddressbook.inc.php
core/trunk/addressbook/inc/class.uiaddressbook.inc.php
Modified: core/trunk/addressbook/inc/class.soaddressbook.inc.php
===================================================================
--- core/trunk/addressbook/inc/class.soaddressbook.inc.php 2009-03-11
18:29:39 UTC (rev 19108)
+++ core/trunk/addressbook/inc/class.soaddressbook.inc.php 2009-03-11
18:31:14 UTC (rev 19109)
@@ -712,7 +712,7 @@
{
$fields['tab_comms']['comm_data']=array();
}
-
+ $comms = array();
foreach($fields['tab_comms']['comm_data'] as
$type_descr => $data)
{
if($data)
@@ -725,7 +725,10 @@
if(is_array($fields['addr_data']))
{
-
$fields['addr_data'][$fields['tab_address']['addr_preferred']]['addr_preferred']='Y';
+
if(isset($fields['tab_address']['addr_preferred']))
+ {
+
$fields['addr_data'][$fields['tab_address']['addr_preferred']]['addr_preferred']='Y';
+ }
$addr = $fields['addr_data'];
}
@@ -739,9 +742,9 @@
$others = $fields['others_data'];
$persons = $fields['tab_persons']['my_person'];
-
- $cats = $fields['tab_cats']['my_cats'];
+ $cats = isset($fields['tab_cats']['my_cats']) ?
$fields['tab_cats']['my_cats'] : '';
+
$type =
$this->contacts->search_contact_type($this->contacts->get_org_name());
$c_id = $this->contacts->add_contact($type, $principal,
$comms, $addr, $cats, $others, $persons);
return $c_id;
Modified: core/trunk/addressbook/inc/class.uiaddressbook.inc.php
===================================================================
--- core/trunk/addressbook/inc/class.uiaddressbook.inc.php 2009-03-11
18:29:39 UTC (rev 19108)
+++ core/trunk/addressbook/inc/class.uiaddressbook.inc.php 2009-03-11
18:31:14 UTC (rev 19109)
@@ -1216,7 +1216,7 @@
//$defaul_person_name='entry[current_person]';
$fields_to_search=array('contact_id',
'per_full_name');
- $this->get_persons($fields_to_search,
$fields['my_person']);
+ $this->get_persons($fields_to_search,
isset($fields['my_person']) ? $fields['my_person'] : '');
return
$this->many_actions_form($this->tab_persons, $all_person_name,
$my_person_name, '',
'all_person_data',
@@ -1247,13 +1247,13 @@
function person_form($fields)
{
$userformat =&
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- if($userformat != $this->bo->bday_internformat)
+ if($userformat != $this->bo->bday_internformat &&
isset($fields['per_birthday']))
{
$fields['per_birthday'] =
phpgwapi_datetime::convertDate($fields['per_birthday'],
$this->bo->bday_internformat, $userformat);
}
- $bday =
$this->jscal->input('entry[per_birthday]',$fields['per_birthday']);
+ $bday =
$this->jscal->input('entry[per_birthday]',isset($fields['per_birthday']) ?
$fields['per_birthday'] : '');
- if ($fields['ispublic']=='private')
+ if (isset($fields['ispublic']) &&
$fields['ispublic']=='private')
{
$access_check = '<input type="checkbox"
name="entry[access]" checked>';
}
@@ -1266,12 +1266,12 @@
$this->template->set_var('lang_general_data', lang('General
Data'));
$this->set_form_fields(array
(
- 1 => array('Prefix', 'entry[per_prefix]',
$fields['per_prefix']),
- 2 => array('First Name',
'entry[per_first_name]', $fields['per_first_name']),
- 3 => array('Middle Name',
'entry[per_middle_name]', $fields['per_middle_name']),
- 4 => array('Last Name',
'entry[per_last_name]', $fields['per_last_name']),
- 5 => array('Title', 'entry[per_title]',
$fields['per_title']),
- 6 => array('Department',
'entry[per_department]', $fields['per_department']),
+ 1 => array('Prefix', 'entry[per_prefix]',
isset($fields['per_prefix']) ? $fields['per_prefix'] : ''),
+ 2 => array('First Name',
'entry[per_first_name]', isset($fields['per_first_name']) ?
$fields['per_first_name'] : ''),
+ 3 => array('Middle Name',
'entry[per_middle_name]', isset($fields['per_middle_name']) ?
$fields['per_middle_name'] : ''),
+ 4 => array('Last Name',
'entry[per_last_name]', isset($fields['per_last_name']) ?
$fields['per_last_name'] : ''),
+ 5 => array('Title', 'entry[per_title]',
isset($fields['per_title']) ? $fields['per_title'] : ''),
+ 6 => array('Department',
'entry[per_department]', isset($fields['per_department']) ?
$fields['per_department'] : ''),
7 => array('Email', 'entry[email]',
isset($fields['email']) ? $fields['email'] : ''),
8 => array('Phone', 'entry[wphone]',
isset($fields['wphone']) ? $fields['wphone'] : ''),
9 => array('Private', $access_check,
'special'),
@@ -1289,7 +1289,7 @@
*/
function org_form($fields)
{
- if ($fields['ispublic']=='private')
+ if (isset($fields['ispublic']) && $fields['ispublic'] ==
'private')
{
$access_check = '<input type="checkbox"
name="entry[access]" checked>';
}
@@ -1302,7 +1302,7 @@
$this->template->set_var('lang_general_data',
lang('Organizations Data'));
- $this->set_form_fields(array(1 => array('Name',
'entry[org_name]', $fields['org_name']),
+ $this->set_form_fields(array(1 => array('Name',
'entry[org_name]', isset($fields['org_name']) ? $fields['org_name'] : ''),
2 => array('Phone', 'entry[wphone]',
$fields['wphone']),
3 => array('Private', $access_check,
'special'),
4 => array('','','special')));
@@ -2042,11 +2042,19 @@
}
else
{
+ $entry['ispublic'] =
isset($entry['access']) ? $entry['access'] : '';
$entry =
$GLOBALS['phpgw']->session->appsession('tab_org_data', 'addressbook');
$entry =
$this->stripslashes_from_array($entry);
}
$comms =
$this->read_tab_session($this->tab_comms);
- $entry['wphone'] = $comms['comm_data']['work
phone'];
+ if(isset($comms['comm_data']) &&
isset($comms['comm_data']['work phone']))
+ {
+ $entry['wphone'] =
$comms['comm_data']['work phone'];
+ }
+ else
+ {
+ $entry['wphone'] = '';
+ }
//$this->record_name = $entry['org_name'];
break;
case $this->tab_persons:
@@ -3201,6 +3209,8 @@
$criteria =
$this->bo->criteria_contacts(PHPGW_CONTACTS_ALL,PHPGW_CONTACTS_CATEGORIES_ALL,array(),'',$fields_to_search);
$persons =
$this->bo->get_persons($fields_to_search,'','','first_name','','',$criteria);
+ $this->my_person_data = isset($this->my_person_data) ?
$this->my_person_data : '';
+ $this->all_person_data = isset($this->all_person_data) ?
$this->all_person_data : '';
if ($persons)
{
foreach ($persons as $k => $v)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [19109] notices fixes,
Caeies <=