Index: admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/Attic/admin.php,v
retrieving revision 1.1.6.1
diff -u -r1.1.6.1 admin.php
--- admin.php	8 Sep 2003 13:26:35 -0000	1.1.6.1
+++ admin.php	12 Mar 2004 07:39:20 -0000
@@ -25,9 +25,9 @@
 
 	$phpgw->config->read_repository();
 
-	if ($submit)
+	if ($submit) // $submit is undefined
 	{
-		if ($usecountrylist)
+		if ($usecountrylist) // $usecountrylist is undefined
 		{
 			$phpgw->config->config_data['countrylist'] = True;
 		}
@@ -48,7 +48,7 @@
 
 	$t->set_var('action_url',$phpgw->link('/addressbook/admin.php'));
 
-	$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
+	$tr_color = $phpgw->nextmatchs->alternate_row_color();
 	$t->set_var('tr_color',$tr_color);
 
 	$t->set_var('lang_countrylist',lang('Use Country List'));
Index: csv_import.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/csv_import.php,v
retrieving revision 1.4.2.6.2.4
diff -u -r1.4.2.6.2.4 csv_import.php
--- csv_import.php	26 Oct 2003 04:50:42 -0000	1.4.2.6.2.4
+++ csv_import.php	12 Mar 2004 07:39:20 -0000
@@ -47,6 +47,7 @@
 
 	function dump_array($arr)
 	{
+	    $ret = '';
 		while(is_array($arr) && (list($key,$val) = each($arr)))
 		{
 			$ret .= ($ret ? ',' : '(') . "'$key' => '$val'\n";
@@ -295,6 +296,7 @@
 								// echo "'$val'</p>";
 
 								$reg = $CPreReg.'([a-zA-Z_0-9]+)'.$CPosReg;
+								$vars = array();
 								while(ereg($reg,$val,$vars))
 								{	// expand all CSV fields
 									$val = str_replace($CPre . $vars[1] . $CPos, $val[0] == '@' ? "'"
@@ -391,7 +393,7 @@
 	function get_categories()
 	{
 		$cat = CreateObject('phpgwapi.categories');
-		$cats_link = $cat->formated_list('select','all',$cat_id,True);
+		$cats_link = $cat->formated_list('select','all',$cat_id,True); // $cat_id is undefined
 		return $cats_link;
 	}
 
@@ -410,7 +412,7 @@
 			foreach($account_list as $entry)
 			{
 				$user_list .= '<option value="' . $entry['account_id'] . '"'
-					. $selected . '>'
+					. $selected . '>' // $selected is undefined
 					. $GLOBALS['phpgw']->common->display_fullname(
 						$entry['account_lid'],
 						$entry['account_firstname'],
Index: help/index.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/help/Attic/index.php,v
retrieving revision 1.2.6.1
diff -u -r1.2.6.1 index.php
--- help/index.php	8 Sep 2003 13:26:36 -0000	1.2.6.1
+++ help/index.php	12 Mar 2004 07:39:20 -0000
@@ -21,6 +21,6 @@
 ?>
 <img src="<?php echo $phpgw->common->image($appname,'navbar.gif'); ?>" border="0"><p/>
 <font face="<?php echo $phpgw_info['theme']['font']; ?>" size="2">
-Version: <b><?php echo $setup_info[$appname]['version']; ?></b>
+Version: <b><?php echo $GLOBALS['setup_info'][$appname]['version']; ?></b>
 </font>
 <?php $phpgw->common->phpgw_footer(); ?>
Index: inc/class.boXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boXport.inc.php,v
retrieving revision 1.7.4.4
diff -u -r1.7.4.4 class.boXport.inc.php
--- inc/class.boXport.inc.php	24 Feb 2004 19:03:30 -0000	1.7.4.4
+++ inc/class.boXport.inc.php	12 Mar 2004 07:39:20 -0000
@@ -208,7 +208,7 @@
 					elseif ($name && $value)
 					{
 						reset($contacts->import);
-						while ( list($fname,$fvalue) = each($contacts->import) )
+						while ( list($fname,) = each($contacts->import) )
 						{
 							if ( strstr(strtolower($name), $contacts->import[$fname]) )
 							{
@@ -239,7 +239,7 @@
 			{
 				// Read in user custom fields, if any
 				$customfields = array();
-				while (list($col,$descr) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
+				while (list($col,) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
 				{
 				if ( substr($col,0,6) == 'extra_' )
 					{
@@ -271,14 +271,13 @@
 				// Here, buffer becomes a string suitable for printing
 				$buffer = $contacts->export_end_file($buffer);
 
-				$tsvfilename = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $tsvfilename;
+				// $tsvfilename = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP /*. $tsvfilename*/;
 
 			}
 			else // this is the openoffice section
 			{
 				//echo "<pre>here1  $both_types $sub_cats</pre>";
-				$tsvfilename = $contacts->do_it($both_types,$sub_cats);
-				$buffer = $tsvfilename;
+				$buffer = $contacts->do_it($both_types,$sub_cats);
 			}
 			
 			return $buffer;
Index: inc/class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.21.2.2.2.26
diff -u -r1.21.2.2.2.26 class.boaddressbook.inc.php
--- inc/class.boaddressbook.inc.php	2 Mar 2004 19:04:05 -0000	1.21.2.2.2.26
+++ inc/class.boaddressbook.inc.php	12 Mar 2004 07:39:20 -0000
@@ -103,7 +103,7 @@
 			$_sort    = get_var('sort',Array('GET','POST'));
 			$_order   = get_var('order',Array('GET','POST'));
 			$_filter  = get_var('filter',Array('GET','POST'));
-			$_cat_id  = get_var('cat_id',Array('GET','POST'));
+			// $_cat_id  = get_var('cat_id',Array('GET','POST'));
 			$_fcat_id = get_var('fcat_id',Array('GET','POST'));
 
 			if(!empty($_start) || ($_start == '0') || ($_start == 0))
@@ -111,11 +111,11 @@
 				if($this->debug) { echo '<br>overriding $start: "' . $this->start . '" now "' . $_start . '"'; }
 				$this->start = $_start;
 			}
-			if($_limit)
+/*			if($_limit)
 			{
 				$this->limit  = $_limit;
 			}
-			if((empty($_query) && !empty($this->query)) || !empty($_query))
+*/			if((empty($_query) && !empty($this->query)) || !empty($_query))
 			{
 				if($this->debug) { echo '<br>overriding $query: "' . $this->query . '" now "' . urldecode(addslashes($_query)) . '"'; }
 				if($this->query != urldecode(addslashes($_query)))
@@ -751,7 +751,7 @@
 			if (is_array($prefs))
 			{
 				/* _debug_array($prefs);exit; */
-				while (list($pref,$x) = each($qfields))
+				while (list($pref,) = each($qfields))
 				{
 					/* echo '<br>checking: ' . $pref . '=' . $prefs[$pref]; */
 					if ($prefs[$pref] == 'on')
Index: inc/class.catalog_manager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/class.catalog_manager.inc.php,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 class.catalog_manager.inc.php
--- inc/class.catalog_manager.inc.php	5 Oct 2003 05:17:24 -0000	1.1.2.2
+++ inc/class.catalog_manager.inc.php	12 Mar 2004 07:39:20 -0000
@@ -112,7 +112,7 @@
 
 			if($button)
 			{
-				$this->template->set_var('caption_detail', $title);
+				$this->template->set_var('caption_detail', $title); // $title is undefined
 				$this->template->set_var('add_button', $add_button);
 			}
 			else
@@ -139,7 +139,7 @@
                         {
                                 foreach($this->$array_name as $k => $v)
 				{
-					$id = $v[$idx];	
+					// $id = $v[$idx];	
 					$this->array_value = $v;
 
 					$tr_color = $this->nextmatchs->alternate_row_color($tr_color);
Index: inc/class.ipc_addressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/class.ipc_addressbook.inc.php,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 class.ipc_addressbook.inc.php
--- inc/class.ipc_addressbook.inc.php	24 Feb 2004 18:01:35 -0000	1.1.2.1
+++ inc/class.ipc_addressbook.inc.php	12 Mar 2004 07:39:20 -0000
@@ -169,7 +169,7 @@
 			{
 				// locations[loc_id][type] is work or home
 				// loc_id is not  interested here, but the type is important!
-				while ( list($loc_id, $loc_data) = each($fieldlist['locations']) )
+				while (list(,$loc_data) = each($fieldlist['locations']))
 				{
 					$loc_type_id = $this->contacts->search_location_type($loc_data['type']);
 					switch($loc_type_id)
@@ -210,13 +210,13 @@
 			$fields['email_home']           = $fieldlist['comm_media']['home email'];
 			$fields['url']                  = $fieldlist['comm_media']['website'];
 
-			$email = $fields['email'];
+			// $email = $fields['email'];
 			$emailtype = $fields['email_type'];
 			if (!$emailtype)
 			{
 				$fields['email_type'] = 'INTERNET';
 			}
-			$hemail       = $fields['email_home'];
+			// $hemail       = $fields['email_home'];
 			$hemailtype   = $fields['email_home_type'];
 			if (!$hemailtype)
 			{
@@ -231,7 +231,7 @@
 			{
 				if ($myexport[$name] && ($value != "") )
 				{
-					//echo '<br>'.$name."=".$fields[$name]."\n";
+					//echo '<br />'.$name."=".$fields[$name]."\n";
 					$buffer[$myexport[$name]] = $value;
 				}
 			}
@@ -291,7 +291,7 @@
 					'WHERE owner = '.$owner.' '.
 					'ORDER BY contact_id';
 			}
-			$contacts = $this->contacts->db->query($sql,__LINE__,__FILE__);
+			$this->contacts->db->query($sql,__LINE__,__FILE__);
 			while ($this->contacts->db->next_record())
 			{
 				$idList[] = $this->contacts->db->Record['contact_id'];
Index: inc/class.pdb.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.pdb.inc.php,v
retrieving revision 1.3.6.1
diff -u -r1.3.6.1 class.pdb.inc.php
--- inc/class.pdb.inc.php	8 Sep 2003 13:26:37 -0000	1.3.6.1
+++ inc/class.pdb.inc.php	12 Mar 2004 07:39:20 -0000
@@ -200,8 +200,8 @@
 			fwrite($fd, $this->int4(0));
 
 			// Number of text records
-			$full_tr	= (int)($content_length / $this->record_size);
-			$notfull_tr	= $content_length % $this->record_size;
+			$full_tr	= (int)($content_length / $this->record_size); // $content_length is undefined!
+			$notfull_tr	= $content_length % $this->record_size; // $content_length is undefined!
 			$num_records = $full_tr;
 			if ($notfull_tr != 0)
 			{
@@ -232,7 +232,7 @@
 			// ====== Write record 0 ============
 			fwrite($fd, $this->int2(1));				// Version
 			fwrite($fd, $this->int2(0));				// Reserved1
-			fwrite($fd, $this->int4($content_length));	// doc size
+			fwrite($fd, $this->int4($content_length));	// doc size    // $content_length is undefined!
 			fwrite($fd, $this->int2($num_records));	// num records
 			fwrite($fd, $this->int2($this->record_size));	// record size
 			fwrite($fd, $this->int4(0));				// Reserved2
@@ -245,10 +245,10 @@
 		function read($fd)
 		{
 			// Read header
-			$header = $this->read_header($fd);
+			/*$header =*/ $this->read_header($fd);
 
 			// Read content
-			$content = fread($fd);
+			/*$content =*/ fread($fd);
 
 			// And flushes all
 			flush($fd);
Index: inc/class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14.2.3.2.23
diff -u -r1.14.2.3.2.23 class.soaddressbook.inc.php
--- inc/class.soaddressbook.inc.php	2 Mar 2004 19:04:05 -0000	1.14.2.3.2.23
+++ inc/class.soaddressbook.inc.php	12 Mar 2004 07:39:20 -0000
@@ -379,7 +379,7 @@
 			
 			$principal['cat_id'] = $cats;
 			$person = array_merge($fields['tab_person_data'], $fields['tab_extra']);
-			$orgs = $fields['edit_orgs'];
+			// $orgs = $fields['edit_orgs'];
 			$orgs['preferred_org'] = $fields['tab_orgs']['preferred_org'];
 			$queries = $fields['transactions'];
 
@@ -546,7 +546,7 @@
 		//used
 		function add_person($fields)
 		{			
-			$principal = array_merge($fields['tab_person_data'], $fields['tab_extra']);
+			array_merge($fields['tab_person_data'], $fields['tab_extra']);
 			
 			if(!is_array($fields['tab_comms']['comm_data']))
 			{
Index: inc/class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiXport.inc.php,v
retrieving revision 1.6.2.4.2.5
diff -u -r1.6.2.4.2.5 class.uiXport.inc.php
--- inc/class.uiXport.inc.php	24 Feb 2004 21:35:15 -0000	1.6.2.4.2.5
+++ inc/class.uiXport.inc.php	12 Mar 2004 07:39:20 -0000
@@ -84,7 +84,7 @@
 					if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL' )
 					{
 						// filename, default application/octet-stream, length of file, default nocache True
-						$GLOBALS['phpgw']->browser->content_header($tsvfilename,'',strlen($buffer));
+						$GLOBALS['phpgw']->browser->content_header($tsvfilename,'',strlen($buffer)); // $tsvfilenameis undefined!
 						echo $buffer;
 					}
 					else
@@ -163,7 +163,7 @@
 			global $convert,$tsvfilename,$fcat_id,$download,$conv_type,$both_types,$sub_cats;
 			
 			// get the data to create the sql query used by the addressbook display 
-			$export_vars = $GLOBALS['phpgw']->session->appsession('export_vars','addressbook');
+			$GLOBALS['phpgw']->session->appsession('export_vars','addressbook');
 			//echo "<pre>Export_vars: "; print_r($export_vars); echo "</pre>\n";
 			
 			//$entries = $this->bo->$get_data_function($fields, $this->limit, $this->start, $this->order, $this->sort, '', $criteria);
Index: inc/class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.52
diff -u -r1.36.2.15.2.52 class.uiaddressbook.inc.php
--- inc/class.uiaddressbook.inc.php	9 Mar 2004 16:35:30 -0000	1.36.2.15.2.52
+++ inc/class.uiaddressbook.inc.php	12 Mar 2004 07:39:30 -0000
@@ -375,7 +375,6 @@
 				'menuaction=addressbook.uiaddressbook.index&section='.$this->section,
 				'90%', $GLOBALS['phpgw_info']['theme']['th_bg'],
 				$search_obj,1,True,array('filter'=>$this->filter,'yours'=>1),$this->cat_id);
-			$query = $filter = '';
 			
 			if($this->query)
 			{
@@ -398,7 +397,7 @@
 			$this->template->set_var('lang_edit',lang('Edit'));
 			$this->template->set_var('lang_owner',lang('Owner'));
 
-			$this->template->set_var('searchreturn',$noprefs . ' ' . $searchreturn);
+			$this->template->set_var('searchreturn',$noprefs . ' ' . $searchreturn); // $searchreturn is undefined
 			$this->template->set_var('lang_showing',$lang_showing);
 			$this->template->set_var('search_filter',$search_filter);
 			$this->template->set_var('cats',lang('Category'));
@@ -443,7 +442,7 @@
 			$this->template->set_var('query',$this->query);
 			$this->template->set_var('cat_id',$this->cat_id);
 
-			$this->template->set_var('qfield',$qfield);
+			$this->template->set_var('qfield',$qfield); // $qfield is undefined!
 			$this->template->set_var('cols',$cols);
 
 			$this->template->pparse('out','addressbook_header');
@@ -456,7 +455,7 @@
 			foreach($entries as $entry)
 			{
 				$this->template->set_var('columns','');
-				$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
+				$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color();
 				$this->template->set_var('row_tr_color',$tr_color);
 				$myid    = $entry['contact_id'];
 				$myowner = $entry['owner'];
@@ -1118,13 +1117,10 @@
 			{
 			case $this->tab_person_data:
 				return $this->person_form($fields);
-				break;
 			case $this->tab_extra:
 				return $this->person_extra($fields);
-				break;
 			case $this->tab_org_data:
 				return $this->org_form($fields);
-				break;
 			case $this->tab_orgs:
 				$my_orgs_name='entry[my_orgs][]';
 				$all_orgs_name='entry[all_orgs][]';
@@ -1138,7 +1134,6 @@
 					'my_orgs_data', 'my_orgs_array', $fields['preferred_org'],
 					$section, $fields);
 
-				break;
 			case $this->tab_cats:
 				$my_cats_name='entry[my_cats][]';
 				$all_cats_name='entry[all_cats][]';
@@ -1151,7 +1146,6 @@
 					$my_cats_name, '', 'all_cats_data', 
 					'my_cats_data', 'my_cats_array', '',
 					$section, $fields);
-				break;
 			case $this->tab_persons:
 				$my_person_name='entry[my_person][]';
 				$all_person_name='entry[all_person][]';
@@ -1164,17 +1158,13 @@
 					$my_person_name, '', 'all_person_data',
 					'my_person_data', 'my_person_array', '',
 					$section, $fields);
-				break;
 			case $this->tab_comms:
 				return $this->comm_form($fields);
-				break;	
 			case $this->tab_address:
 				return $this->address_form($fields);
-				break;
 			case $this->tab_others:
 				return $this->others_form($fields);
 				//return $this->custom_fields_form($fields);
-				break;
 			default:
 				return $this->person_form($fields);
 			}
@@ -1577,7 +1567,7 @@
 
 			if($button)
 			{
-				$this->template->set_var('caption_detail', $title);
+				$this->template->set_var('caption_detail', $title); // $title is undefined
 				$this->template->set_var('add_button', $add_button);
 			}
 			else
@@ -1604,7 +1594,7 @@
                         {
                                 foreach($this->$array_name as $k => $v)
 				{
-					$id = $v[$idx];	
+					// $id = $v[$idx];	
 					$this->array_value = $v;
 
 					$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
@@ -2662,7 +2652,7 @@
 
 				$GLOBALS['phpgw']->common->phpgw_header();
 				echo parse_navbar();
-				(count($this->bo->negative_responses) >1) ? $plur='s' : $plur='';
+				// $plur = (count($this->bo->negative_responses) >1) ? 's' : '';
 				$this->template->set_file(array('cant_delete_apps' =>
 							'cannot_delete.tpl')
 						);
@@ -2915,7 +2905,7 @@
 			$this->template->set_var('done_button',$this->html_1button_form('DoneForm','Done',
 				$referer ? $referer : $GLOBALS['phpgw']->link('/index.php',
 					'menuaction=addressbook.uiaddressbook.index&section='.$contact_type)));
-			$this->template->set_var('access_link',$access_link);
+			$this->template->set_var('access_link',$access_link); // $access_link undefined
 
 			$this->template->pparse('out','view_t');
 
@@ -3095,7 +3085,7 @@
 
 		function get_cats($fields_to_search, $current_cats)
 		{
-			$cats = $this->cat->return_array('all',$start,False,$query,$sort,$order,True);
+			$cats = $this->cat->return_array('all',$start,False,$query,$sort,$order,True); // $start,$query,$sort,$order are undefined!
 			if ($cats)
 			{
 				foreach ($cats as $k => $v)
Index: inc/class.uiaddressbook_prefs.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/class.uiaddressbook_prefs.inc.php,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 class.uiaddressbook_prefs.inc.php
--- inc/class.uiaddressbook_prefs.inc.php	30 Sep 2003 19:27:31 -0000	1.1.2.3
+++ inc/class.uiaddressbook_prefs.inc.php	12 Mar 2004 07:39:30 -0000
@@ -179,7 +179,7 @@
 			if(is_array($ar))
 			{
 				reset($ar);
-				while(list($k,$v)=each($ar))
+				while(list(,$v)=each($ar))
 				{
 					if(!is_array($v))
 					{
@@ -201,7 +201,7 @@
 				}
 				else
 				{
-					return $false;
+					return false;
 				}
 			}
 			return $tmp;
@@ -360,7 +360,7 @@
 			//now go translating each field
 			reset($this->contacts->stock_contact_fields);
 			//Constructing simple 'showable' fields
-			while(list($falsefield,$english)=each($this->contacts->stock_contact_fields))
+			while(list($falsefield,)=each($this->contacts->stock_contact_fields))
 			{
 				//If it in selected_fields, then it has been selected, and it doesnt go into
 				//the fields_show_selectbox array
@@ -397,7 +397,7 @@
 			//Constructing commtype descriptions
 			}
 			$possible_comtypes=$this->linearize_query($this->contacts->get_contact_comm_descr(),'comm_description');
-			while(list($k,$v)=each($possible_comtypes))
+			while(list(,$v)=each($possible_comtypes))
 			{
 				if(!$this->selected_fields[$this->org_or_person]['comm_types'][$v])
 				{
@@ -583,6 +583,7 @@
 		//first, build the selectbox, select where needed
 		$this->show_selectbox();
 		//Obviously Not first time,  fields have been selected
+		// $org_or_person is undefined!
 		if( (is_array($this->selected_fields[$org_or_person])) || (is_array($this->cached_selected_fields[$this->org_or_person])) && !$this->cache_is_empty())
 		{
 
@@ -656,6 +657,7 @@
 	
 		
 	}
+
 	function current_columns_value_is_forced($commtypes=false)
 	{
 		switch($this->org_or_person)
@@ -698,7 +700,7 @@
 					}
 					else
 					{
-						while(list($k,$description)=each($lang))
+						while(list(,$description)=each($lang))
 						{
 							$this->template->set_var('lang_comtype_field',$description);
 							$this->template->set_var('commtype_description',$description);
@@ -776,7 +778,7 @@
 
 			while(list($k,$v)=each($arrays))
 			{
-				while(list($ok,$ov)=each($v))
+				while(list($ok,)=each($v))
 				{
 					if($removelink)
 					{
@@ -954,8 +956,4 @@
 				$this->map_tpl_to_real['final_admin_tabs']=$GLOBALS['phpgw']->common->create_tabs($tabs,$selected);
 			}
 		}
-
-		
-
-}
-
+}
\ No newline at end of file
Index: inc/class.uicategorize_contacts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/class.uicategorize_contacts.inc.php,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 class.uicategorize_contacts.inc.php
--- inc/class.uicategorize_contacts.inc.php	2 Feb 2004 21:42:35 -0000	1.1.2.4
+++ inc/class.uicategorize_contacts.inc.php	12 Mar 2004 07:39:30 -0000
@@ -81,7 +81,7 @@
 		{
 			$delete = $persons['delete'];
 			$insert = $persons['insert'];
-			$edit = $persons['edit'];
+			//$edit = $persons['edit'];
 			
 			if($selected_cat==-1)
 			{
@@ -156,7 +156,7 @@
 
 		function get_categories()
 		{
-			$cats = $this->cat->return_array($type,$start,$limit,$query,$sort,$order,False);
+			$cats = $this->cat->return_array($type,$start,$limit,$query,$sort,$order,False); // $type,$start,$limit,$query,$sort,$order are undefined
 			$categories[-1] = 'Select one...';
 			if(is_array($cats))
 			{
Index: inc/class.uifields.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uifields.inc.php,v
retrieving revision 1.3.2.3.2.8
diff -u -r1.3.2.3.2.8 class.uifields.inc.php
--- inc/class.uifields.inc.php	12 Mar 2004 00:04:58 -0000	1.3.2.3.2.8
+++ inc/class.uifields.inc.php	12 Mar 2004 07:39:30 -0000
@@ -11,7 +11,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: class.uifields.inc.php,v 1.3.2.3.2.8 2004/03/12 00:04:58 jarg Exp $ */
+  /* $Id: class.uifields.inc.php,v 1.3.2.3.2.7 2004/01/08 22:13:41 jarg Exp $ */
 
 	class uifields
 	{
@@ -50,13 +50,13 @@
 			$query  = $GLOBALS['HTTP_POST_VARS']['query'] ? $GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
 			$sort   = $GLOBALS['HTTP_POST_VARS']['sort']  ? $GLOBALS['HTTP_POST_VARS']['sort']  : $GLOBALS['HTTP_GET_VARS']['sort'];
 
-			$common_hidden_vars =
+/*			$common_hidden_vars =
 				'<input type="hidden" name="sort"   value="' . $sort   . '">' . "\n"
-				. '<input type="hidden" name="order"  value="' . $order  . '">' . "\n"
+				. '<input type="hidden" name="order"  value="' . $order  . '">' . "\n" // $order is undefined
 				. '<input type="hidden" name="query"  value="' . $query  . '">' . "\n"
 				. '<input type="hidden" name="start"  value="' . $start  . '">' . "\n"
-				. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n";
-
+				. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n"; // $filter is undefined
+*/
 			$GLOBALS['phpgw']->template->set_var('lang_action',lang('Custom Fields'));
 			$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.add'));
 			$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
@@ -76,7 +76,7 @@
 				$sort = 'ASC';
 			}
 
-			$fields = $this->read_custom_fields($start,$limit,$query,$sort);
+			$fields = $this->read_custom_fields($start,$limit,$query,$sort); // $limit is undefined
 			$total_records = count($fields);
 
 			$GLOBALS['phpgw']->common->phpgw_header();
@@ -88,13 +88,13 @@
 			$GLOBALS['phpgw']->template->set_var('lang_showing',$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$start));
 
 			$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
-			$GLOBALS['phpgw']->template->set_var('sort_field',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'name',$order,'/index.php',lang('Name')),'menuaction=addressbook.uifields.index');
+			$GLOBALS['phpgw']->template->set_var('sort_field',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'name',$order,'/index.php',lang('Name')),'menuaction=addressbook.uifields.index'); // $order is undefined
 			$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
 			$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
 
 			for($i=0;$i<count($fields);$i++)
 			{
-				$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
+				$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color();
 				$GLOBALS['phpgw']->template->set_var(tr_color,$tr_color);
 
 				$field = $fields[$i]['name'];
@@ -110,8 +110,8 @@
 					'start'      => $start,
 					'query'      => $query,
 					'sort'       => $sort,
-					'order'      => $order,
-					'filter'     => $filter
+					'order'      => $order, // $order is undefined
+					'filter'     => $filter // $filter is undefined
 				);
 				$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$params));
 				$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
@@ -140,8 +140,8 @@
 			$field_name = stripslashes($GLOBALS['HTTP_POST_VARS']['field_name']);
 			$apply_for  = stripslashes($GLOBALS['HTTP_POST_VARS']['apply_for']);
 			$start      = $GLOBALS['HTTP_POST_VARS']['start'];
-			$query      = $GLOBALS['HTTP_POST_VARS']['query'];
-			$sort       = $GLOBALS['HTTP_POST_VARS']['sort'];
+			// $query      = $GLOBALS['HTTP_POST_VARS']['query'];
+			// $sort       = $GLOBALS['HTTP_POST_VARS']['sort'];
 			$submit     = $GLOBALS['HTTP_POST_VARS']['submit'];
 
 			$GLOBALS['phpgw']->template->set_file(array('form' => 'field_form.tpl'));
@@ -157,7 +157,7 @@
 					$error[$errorcount++] = lang('Please enter a name for that field !');
 				}
 
-				$fields = $this->read_custom_fields($start,$limit,$field_name);
+				$fields = $this->read_custom_fields($start,$limit,$field_name); // $limit is undefined
 				if($fields[0]['name'])
 				{
 					$error[$errorcount++] = lang('That field name has been used already !');
@@ -281,7 +281,7 @@
 			}
 			else
 			{
-				$fields = $this->read_custom_fields($start,$limit,$field);
+				$fields = $this->read_custom_fields($start,$limit,$field); // $limit is undefined
 				$field  = $fields[0]['title'];
 				$fn = $fields[0]['name'];
 			}
@@ -339,14 +339,14 @@
 				$GLOBALS['phpgw']->common->phpgw_exit();
 			}
 
-			$field = stripslashes(get_var('field'));
-			$field_name = stripslashes(get_var('field_name'));
-			$apply_for  = stripslashes(get_var('apply_for'));
-
+			$field    = $GLOBALS['HTTP_POST_VARS']['field'] ? $GLOBALS['HTTP_POST_VARS']['field'] : $GLOBALS['HTTP_GET_VARS']['field'];
+			$field_id = $GLOBALS['HTTP_POST_VARS']['field_id'] ? $GLOBALS['HTTP_POST_VARS']['field_id'] : $GLOBALS['HTTP_GET_VARS']['field_id'];
 			$start    = $GLOBALS['HTTP_POST_VARS']['start'] ? $GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start'];
 			$query    = $GLOBALS['HTTP_POST_VARS']['query'] ? $GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
 			$sort     = $GLOBALS['HTTP_POST_VARS']['sort']  ? $GLOBALS['HTTP_POST_VARS']['sort']  : $GLOBALS['HTTP_GET_VARS']['sort'];
 
+			$field = stripslashes($field);
+			
 			if(!$field)
 			{
 				Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'));
@@ -354,7 +354,7 @@
 
 			if($GLOBALS['HTTP_POST_VARS']['confirm'])
 			{
-				$this->save_custom_field($field, '', $apply_for);
+				$this->save_custom_field($field);
 				Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',"menuaction=addressbook.uifields.index&start=$start&query=$query&sort=$sort"));
 			}
 			else
@@ -363,7 +363,7 @@
 				echo parse_navbar();
 
 				$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
-					. '<input type="hidden" name="order" value="' . $order .'">' . "\n"
+					. '<input type="hidden" name="order" value="' . $order .'">' . "\n" // $order is undefined
 					. '<input type="hidden" name="query" value="' . $query .'">' . "\n"
 					. '<input type="hidden" name="start" value="' . $start .'">' . "\n"
 					. '<input type="hidden" name="field" value="' . $field .'">' . "\n";
@@ -585,12 +585,15 @@
 			}
 			
 			$this->config->save_repository();
-			
+
 			if($edit_contacts)
 			{
 				$contacts = CreateObject('phpgwapi.contacts');
-				$contacts->edit_other_by_owner($GLOBALS['phpgw_info']['server']['addressmaster'],
-						       $new, $old_field, 'other_name');
+				$contacts->change_other_name($new, 
+							     $old_field, 
+							     sql_criteria::_equal(
+								     'contact_owner',
+								     sql::integer($GLOBALS['phpgw_info']['server']['addressmaster'])));
 			}
 		}
 	}
Index: inc/class.uivcard.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uivcard.inc.php,v
retrieving revision 1.5.2.1.2.4
diff -u -r1.5.2.1.2.4 class.uivcard.inc.php
--- inc/class.uivcard.inc.php	24 Feb 2004 19:03:29 -0000	1.5.2.1.2.4
+++ inc/class.uivcard.inc.php	12 Mar 2004 07:39:30 -0000
@@ -61,8 +61,8 @@
 			$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.boaddressbook.add_vcard'));
 			$this->template->set_var('lang_access',lang('Access'));
 			$this->template->set_var('lang_groups',lang('Which groups'));
-			$this->template->set_var('access_option',$access_option);
-			$this->template->set_var('group_option',$group_option);
+			$this->template->set_var('access_option',$access_option); // $access_option is undefined
+			$this->template->set_var('group_option',$group_option); // $group_option is undefined
 
 			$this->template->pparse('out','vcardin');
 
@@ -132,7 +132,7 @@
 			{
 				// locations[loc_id][type] is work or home
 				// loc_id is not  interested here, but the type is important!
-				while ( list($loc_id, $loc_data) = each($fieldlist['locations']) )
+				while ( list(,$loc_data) = each($fieldlist['locations']) )
 				{
 					$loc_type_id = $this->contacts->search_location_type($loc_data['type']);
 					switch($loc_type_id)
@@ -248,7 +248,7 @@
 				echo lang("This person's first name was not in the address book.") .'<br>';
 				echo lang('Vcards require a first name entry.') . '<br><br>';
 				echo '<a href="' . $GLOBALS['phpgw']->link('/addressbook/index.php',
-					"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
+					"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>'; // $order,$start,$filter,$query,$sort,$cat_id are undefined
 				echo '</center>';
 			}
 
@@ -258,7 +258,7 @@
 				echo lang("This person's last name was not in the address book.") . '<br>';
 				echo lang('Vcards require a last name entry.') . '<br><br>';
 				echo '<a href="' . $GLOBALS['phpgw']->link('/addressbook/index.php',
-					"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>';
+					"order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id") . '">' . lang('OK') . '</a>'; // $order,$start,$filter,$query,$sort,$cat_id are undefined
 				echo '</center>';
 			}
 
Index: inc/functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/functions.inc.php,v
retrieving revision 1.101.2.1.2.1
diff -u -r1.101.2.1.2.1 functions.inc.php
--- inc/functions.inc.php	8 Sep 2003 13:26:37 -0000	1.101.2.1.2.1
+++ inc/functions.inc.php	12 Mar 2004 07:39:30 -0000
@@ -126,7 +126,7 @@
 		}
 		else
 		{
-			return;
+			return false;
 		}
 	}
 
@@ -135,7 +135,7 @@
 		$i = 0; $j = 0;
 		$fields = array();
 		@reset($GLOBALS['phpgw_info']['user']['preferences']['addressbook']);
-		while (list($col,$descr) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
+		while (list($col,) = @each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
 		{
 			if ( substr($col,0,6) == 'extra_' )
 			{
@@ -143,7 +143,7 @@
 				$fields[$j]['name'] = ereg_replace(' ','_',$fields[$j]['name']);
 				$fields[$j]['id'] = $i;
 
-				if ($query && ($fields[$j]['name'] != $query))
+				if ($query && ($fields[$j]['name'] != $query)) // $query is undefined
 				{
 					unset($fields[$j]['name']);
 					unset($fields[$j]['id']);
Index: inc/hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/hook_admin.inc.php,v
retrieving revision 1.9.2.2.2.4
diff -u -r1.9.2.2.2.4 hook_admin.inc.php
--- inc/hook_admin.inc.php	8 Jan 2004 00:27:30 -0000	1.9.2.2.2.4
+++ inc/hook_admin.inc.php	12 Mar 2004 07:39:30 -0000
@@ -14,7 +14,7 @@
 	// $Source: /cvsroot/phpgroupware/addressbook/inc/hook_admin.inc.php,v $
 
 	// Only Modify the $file and $title variables.....
-	$title = $appname;
+	$title = $appname; // $appname undefined
 	$file = Array(
 		'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
 		'Edit custom fields' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'),
Index: inc/hook_manual.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/hook_manual.inc.php,v
retrieving revision 1.4.8.1
diff -u -r1.4.8.1 hook_manual.inc.php
--- inc/hook_manual.inc.php	8 Sep 2003 13:26:37 -0000	1.4.8.1
+++ inc/hook_manual.inc.php	12 Mar 2004 07:39:30 -0000
@@ -15,5 +15,5 @@
 // Only Modify the $file variable.....
 	$file = Array();
 //Do not modify below this line
-	display_manual_section($appname,$file);
+	display_manual_section($appname,$file); // $appname undefined
 ?>
Index: inc/hook_preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/hook_preferences.inc.php,v
retrieving revision 1.21.6.1
diff -u -r1.21.6.1 hook_preferences.inc.php
--- inc/hook_preferences.inc.php	8 Sep 2003 13:26:37 -0000	1.21.6.1
+++ inc/hook_preferences.inc.php	12 Mar 2004 07:39:30 -0000
@@ -13,7 +13,7 @@
   /* $Id: hook_preferences.inc.php,v 1.21.6.1 2003/09/08 13:26:37 skwashd Exp $ */
 {
 // Only Modify the $file and $title variables.....
-	$title = $appname;
+	$title = $appname; // $appname is undefined
 	$file = Array(
 		'Preferences'   => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'addressbook.uiaddressbook_prefs.index')),
 		'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
Index: inc/hook_sidebox_menu.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/Attic/hook_sidebox_menu.inc.php,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 hook_sidebox_menu.inc.php
--- inc/hook_sidebox_menu.inc.php	9 Jan 2004 00:09:38 -0000	1.1.2.3
+++ inc/hook_sidebox_menu.inc.php	12 Mar 2004 07:39:30 -0000
@@ -1,5 +1,5 @@
 <?php
-	$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
+	$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); // $appname is undefined
 
 $file = Array(
 		array('text'  => 'New Person',
