[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php |
Date: |
Mon, 28 Aug 2006 07:00:49 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/08/28 07:00:49
Modified files:
inc : class.contacts_sql.inc.php
Log message:
make orgs work again, fixes bug #17384, and some other clean ups along
the way
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.contacts_sql.inc.php?cvsroot=phpgwapi&r1=1.28&r2=1.29
Patches:
Index: class.contacts_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.contacts_sql.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- class.contacts_sql.inc.php 16 Aug 2006 15:02:31 -0000 1.28
+++ class.contacts_sql.inc.php 28 Aug 2006 07:00:48 -0000 1.29
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage contacts
- * @version $Id: class.contacts_sql.inc.php,v 1.28 2006/08/16 15:02:31
skwashd Exp $
+ * @version $Id: class.contacts_sql.inc.php,v 1.29 2006/08/28 07:00:48
skwashd Exp $
* @internal Development of this application was funded by
http://www.sogrp.com
*/
@@ -587,6 +587,12 @@
'tel_video' => array('Video', 'phone'),
'email' => array('Bussiness', 'email'),
'email_home' => array('Home', 'email'));
+
+ /**
+ * @var array $contact_type the types of contacts available
(person/org)
+ */
+ var $contact_type = array();
+
/**
* Describe the type of contact, this var know the type of
contact.
* @access private
@@ -616,6 +622,8 @@
$this->LDAPSyncEnabled = true;
$this->LDAPResource =
$GLOBALS['phpgw']->common->ldapConnect($GLOBALS['phpgw_info']['server']['ldap_contact_host'],
$GLOBALS['phpgw_info']['server']['ldap_contact_dn'],
$GLOBALS['phpgw_info']['server']['ldap_contact_pw']);
}
+ $this->_contact_person = 'Persons';
+ $this->_contact_org = 'Organizations';
}
/**
@@ -691,8 +699,6 @@
$this->contact_type =
$this->get_contact_types();
$this->contact_type_flag = 'cache';
}
- $this->_contact_person = 'Persons';
- $this->_contact_org = 'Organizations';
}
/**
@@ -2936,12 +2942,13 @@
*/
function get_records($line, $file)
{
+ $records = array();
$this->execute_query($this->get_sql(),$line,$file);
while ($this->db->next_record())
{
- $record[] = $this->db->resultSet->fetchRow();
+ $records[] = $this->db->Record;
}
- return $record;
+ return $records;
}
/**
@@ -2973,7 +2980,7 @@
*/
function execute_query($query, $line=__LINE__, $file=__FILE__)
{
- if (is_null($this->db))
+ if ( !isset($this->db) )
{
$this->db = &$GLOBALS['phpgw']->db;
}
@@ -3429,11 +3436,11 @@
{
if(is_array($this->$catalog))
{
- foreach ($this->$catalog as $key => $value)
+ foreach ($this->$catalog as $values)
{
- if ($value[$field_to_search] ==
$value_to_search)
+ if ($values[$field_to_search] ==
$value_to_search)
{
- return $value[$field];
+ return $values[$field];
}
}
}