[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.bojsaddressbook.inc.php, 1.1.2.3,
From: |
Alejandro Borges (lex) <address@hidden> |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.bojsaddressbook.inc.php, 1.1.2.3, 1.1.2.4 class.contacts_sql.inc.php, 1.17.2.2.2.38, 1.17.2.2.2.39 class.uijsaddressbook.inc.php, 1.1.2.3, 1.1.2.4 |
Date: |
Tue, 02 Dec 2003 22:49:55 +0000 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv3651/inc
Modified Files:
Tag: Version-0_9_16-branch
class.bojsaddressbook.inc.php class.contacts_sql.inc.php
class.uijsaddressbook.inc.php
Log Message:
Fixes jsaddressbook further....
Index: class.contacts_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.contacts_sql.inc.php,v
retrieving revision 1.17.2.2.2.38
retrieving revision 1.17.2.2.2.39
diff -C2 -d -r1.17.2.2.2.38 -r1.17.2.2.2.39
*** class.contacts_sql.inc.php 1 Dec 2003 23:07:30 -0000 1.17.2.2.2.38
--- class.contacts_sql.inc.php 2 Dec 2003 22:49:52 -0000 1.17.2.2.2.39
***************
*** 1499,1505 ****
function get_email($contacts_id, $action=PHPGW_SQL_RUN_SQL)
{
! $this->request(array('contact_id', 'email',
'comm_contact_id'));
$this->criteria(array('comm_descr' =>
$this->search_comm_descr('work email'), 'comm_contact_id' => $contacts_id));
! return $this->get_query($action, __LINE__, __FILE__);
}
--- 1499,1506 ----
function get_email($contacts_id, $action=PHPGW_SQL_RUN_SQL)
{
! $this->request(array('comm_data'));
$this->criteria(array('comm_descr' =>
$this->search_comm_descr('work email'), 'comm_contact_id' => $contacts_id));
! $email = $this->get_records_by_field('comm_data',
__LINE__, __FILE__);
! return $email[0];
}
***************
*** 1513,1519 ****
function get_phone($contacts_id, $action=PHPGW_SQL_RUN_SQL)
{
! $this->request(array('contact_id', 'comm_data',
'comm_contact_id'));
$this->criteria(array('comm_descr' =>
$this->search_comm_descr('work phone'), 'comm_contact_id' => $contacts_id));
! return $this->get_query($action, __LINE__, __FILE__);
}
--- 1514,1521 ----
function get_phone($contacts_id, $action=PHPGW_SQL_RUN_SQL)
{
! $this->request(array('comm_data'));
$this->criteria(array('comm_descr' =>
$this->search_comm_descr('work phone'), 'comm_contact_id' => $contacts_id));
! $phone = $this->get_records_by_field('comm_data',
__LINE__, __FILE__);
! return $phone[0];
}
***************
*** 1570,1574 ****
return $comms;
}
!
/**
* @access private
--- 1572,1599 ----
return $comms;
}
!
! /* This function get the contact name.
! *
! * @param integer $contact_id id The contact what you want
! * return string The name of the contact
! */
! function get_contact_name($contact_id)
! {
! $type =
$this->search_contact_type_id($this->get_type_contact($contact_id));
! if($type == $this->_contact_person)
! {
! $field_name = 'per_full_name';
! }
! elseif($type == $this->_contact_org)
! {
! $field_name = 'org_name';
! }
!
! $this->request(array($field_name));
! $this->criteria(array('contact_id' => $contact_id));
! $contact_name =
$this->get_records_by_field($field_name, __LINE__, __FILE__);
! return $contact_name[0];
! }
!
/**
* @access private
***************
*** 2027,2030 ****
--- 2052,2067 ----
}
+ /**
+ * Allow to change the current cat_id by the new
+ * @param integer $cid The contact_id what you want to edit
+ * @param array $categories The new categories
+ */
+ function edit_category($cid, $categories=array(),
$action=PHPGW_SQL_RETURN_SQL)
+ {
+ $contact = CreateObject('phpgwapi.contact_central');
+ $principal['cat_id'] =
$this->get_categories($categories);
+ return $contact->update($principal,
sql_criteria::_equal('contact_id',sql::integer($cid)), $action);
+ }
+
/*************************************************************\
* Add contact section *
***************
*** 2672,2684 ****
{
$this->request('cat_id');
- $this->request('cat_name');
$this->criteria(array('person_id' => $person_id));
! $sql = $this->get_sql();
! $this->db->query($sql, __LINE__, __FILE__);
! while ($this->db->next_record())
{
! $cats = &$this->db->Record;
}
! return $cats;
}
--- 2709,2724 ----
{
$this->request('cat_id');
$this->criteria(array('person_id' => $person_id));
! $cats = $this->get_records_by_field('cat_id', __LINE__,
__FILE__);
! if($cats[0])
{
! $cats_array = explode(',', $cats[0]);
}
! else
! {
! $cats_array=array();
! }
!
! return $cats_array;
}
***************
*** 2686,2698 ****
{
$this->request('cat_id');
- $this->request('cat_name');
$this->criteria(array('org_id' => $person_id));
! $sql = $this->get_sql();
! $this->db->query($sql, __LINE__, __FILE__);
! while ($this->db->next_record())
{
! $cats = &$this->db->Record;
}
! return $cats;
}
--- 2726,2740 ----
{
$this->request('cat_id');
$this->criteria(array('org_id' => $person_id));
! $cats = $this->get_records_by_field('cat_id', __LINE__,
__FILE__);
! if($cats[0])
{
! $cats_array = explode(',', $cats[0]);
}
! else
! {
! $cats_array=array();
! }
! return $cats_array;
}
***************
*** 2870,2874 ****
function is_user($contact_id)
{
! $account_id =
$this->$GLOBALS['phpgw']->accounts->search_person($contact['person_id']);
if($account_id == 0)
{
--- 2912,2917 ----
function is_user($contact_id)
{
! $account_id =
$GLOBALS['phpgw']->accounts->search_person($contact_id);
!
if($account_id == 0)
{
***************
*** 2970,2974 ****
{
$contact = $this->db->Record;
! $contact['account_id'] =
$this->$GLOBALS['phpgw']->accounts->search_person($contact['person_id']);
$contacts[] = $contact;
}
--- 3013,3017 ----
{
$contact = $this->db->Record;
! $contact['account_id'] =
$GLOBALS['phpgw']->accounts->search_person($contact['person_id']);
$contacts[] = $contact;
}
***************
*** 3592,3596 ****
$attributes['sn'][] =
utf8_encode($person[0]['per_full_name']);
/* Optional attributes */
! $attributes['uid'][] = $uid;
if($person[0]['org_name'])
{
--- 3635,3639 ----
$attributes['sn'][] =
utf8_encode($person[0]['per_full_name']);
/* Optional attributes */
! $attributes['uid'][] =
utf8_encode($uid);
if($person[0]['org_name'])
{
***************
*** 3679,3683 ****
}
}
! }
ldap_add($this->LDAPResource, $dn, $attributes);
--- 3722,3726 ----
}
}
! }
ldap_add($this->LDAPResource, $dn, $attributes);
Index: class.uijsaddressbook.inc.php
===================================================================
RCS file:
/cvsroot/phpgroupware/phpgwapi/inc/Attic/class.uijsaddressbook.inc.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** class.uijsaddressbook.inc.php 4 Oct 2003 23:42:36 -0000 1.1.2.3
--- class.uijsaddressbook.inc.php 2 Dec 2003 22:49:52 -0000 1.1.2.4
***************
*** 1,1004 ****
! <?php
!
/**************************************************************************\
! * phpGroupWare - Addressbook Chooser
*
! * http://www.phpgroupware.org
*
! * Written by Alex Borges <address@hidden> *
! * Inherited some code from the addressbook.php file
! * Low Level Design also by Dave Hall address@hidden
*
! * UI Design and market research by Gerardo Ramirez address@hidden
! *-----------------------------------------------
*
! * This program is free software; you can redistribute it and/or modify
it *
[...1996 lines suppressed...]
! //As you can see, its prepared to accept some js in its
! //innerstring parameter to be inserted in the middle of script
tags
! //Also, it accepts a string that is supposed to be the
javascript call to the frameset function
! //that tells the js framework we have outputed the data it
queried for.
! function final_js($innerstring,$functioncall)
! {
! $retstr="<html>
! <head>
! <script language=\"javascript\">";
!
! $close="</script>
! </head>
! <body onLoad=\"$functioncall\">
! </body>
! </html>";
! return $retstr.''.$innerstring.''.$close;
!
! }
! }
! ?>
Index: class.bojsaddressbook.inc.php
===================================================================
RCS file:
/cvsroot/phpgroupware/phpgwapi/inc/Attic/class.bojsaddressbook.inc.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** class.bojsaddressbook.inc.php 4 Oct 2003 23:42:36 -0000 1.1.2.3
--- class.bojsaddressbook.inc.php 2 Dec 2003 22:49:52 -0000 1.1.2.4
***************
*** 1,553 ****
! <?php
! /**************************************************************************\
! * phpGroupWare - Todo list *
! * http://www.phpgroupware.org *
! * Written by Alex Borges <address@hidden> *
! * Low Level Design also by Dave Hall address@hidden
*
! * UI Design and market research by Gerardo Ramirez address@hidden
! *----------------------------------------------- *
! * This program is free software; you can redistribute it and/or modify it *
! * under the terms of the GNU General Public License as published by the *
[...1029 lines suppressed...]
! //@discussion
! //The location field behaves like the one described in
save_sessiondata
! function read_sessiondata($location="")
! {
! $data =
$GLOBALS['phpgw']->session->appsession('session_data','jsbook_'.($location ?
'_'.$location :""));
! if($this->debug)
! {
! echo '<br>Read: ';
! _debug_array($data);
! }
! return $data;
! }
! //@function display_name
! //Changes a false addressbook field into the correct string in
the current language
! function display_name($fieldname)
! {
! $this->contactsobject->display_name($fieldname);
! }
! }
! ?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.bojsaddressbook.inc.php, 1.1.2.3, 1.1.2.4 class.contacts_sql.inc.php, 1.17.2.2.2.38, 1.17.2.2.2.39 class.uijsaddressbook.inc.php, 1.1.2.3, 1.1.2.4,
Alejandro Borges (lex) <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] phpgwapi/templates/default addressbook-js-frameset.tpl, 1.1.2.1, 1.1.2.2
- Next by Date:
[Phpgroupware-cvs] phpgwapi/inc class.schema_proc_array.inc.php, 1.2.2.2, 1.2.2.3 class.schema_proc_pgsql.inc.php, 1.5.2.6, 1.5.2.7
- Previous by thread:
[Phpgroupware-cvs] phpgwapi/templates/default addressbook-js-frameset.tpl, 1.1.2.1, 1.1.2.2
- Next by thread:
[Phpgroupware-cvs] phpgwapi/inc class.schema_proc_array.inc.php, 1.2.2.2, 1.2.2.3 class.schema_proc_pgsql.inc.php, 1.5.2.6, 1.5.2.7
- Index(es):