[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/class.contact_addr.inc.php, 1.1.2.11
From: |
nomail |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/class.contact_addr.inc.php, 1.1.2.11 |
Date: |
Mon, 21 Jun 2004 09:49:45 +0200 |
Update of /phpgwapi/inc
Modified Files:
Branch: Version-0_9_16-branch
class.contact_addr.inc.php
date: 2004/06/21 07:49:45; author: powerstat; state: Exp; lines: +60 -46
Log Message:
partly phpdoc update for contacts backend - still not finished.
=====================================================================
Index: phpgwapi/inc/class.contact_addr.inc.php
diff -u phpgwapi/inc/class.contact_addr.inc.php:1.1.2.10
phpgwapi/inc/class.contact_addr.inc.php:1.1.2.11
--- phpgwapi/inc/class.contact_addr.inc.php:1.1.2.10 Thu Feb 26 23:50:37 2004
+++ phpgwapi/inc/class.contact_addr.inc.php Mon Jun 21 07:49:45 2004
@@ -239,7 +239,7 @@
'field'
=> 'preferred'));
var $primary_set;
var $secondary_set;
-
+
function contact_addr ($ali = '', $field = '', $criteria = '')
{
@@ -247,8 +247,8 @@
if($field)
{
$this->add_select($field);
-
- }
+
+ }
if($criteria)
{
$this->add_criteria($criteria);
@@ -256,62 +256,73 @@
$this->set_ilinks('addr_contact_id',
'phpgwapi.contact_central','contact_id');
$this->set_elinks('addr_type',
'phpgwapi.contact_addr_type','addr_type_id');
}
- /*
- @function select_addr_address
- @discussion addr_address false field is a concatenation of add1
and add2
- therefore, we use the || standard concatenation operator for
select
+
+ /**
+ *
+ *
+ * @param mixed $element Unused
+ * @internal addr_address false field is a concatenation of add1
and add2 therefore, we use the || standard concatenation operator for select
*/
- function select_addr_address($element)
+ function select_addr_address($element)
{
$this->field_list['addr_address'] =
sql::concat_null(array($this->put_alias('add1'), $this->put_alias('add2'),
$this->put_alias('add3')));
}
- /*
- @function select_addr_address
- @discussion addr_address false field is a concatenation of add1
and add2
- therefore, we use the || standard concatenation operator for
select
+
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal addr_address false field is a concatenation of add1
and add2 therefore, we use the || standard concatenation operator for select
*/
function select_adr_one_street($element)
{
$this->set_primary_address($element);
$this->field_list['adr_one_street']=sql::concat_null(array($this->put_alias('add1'),
$this->put_alias('add2'), $this->put_alias('add3')));
-
+
}
- /*
- @function select_primary
- @discussion Generic select builder for adr_one fields that need
to be limited to
- criteria precedence=1 but map 1 to 1 to real fields
(city,country,postalcode) */
+
+ /**
+ *
+ *
+ * @param mixed $element Unused
+ * @internal Generic select builder for adr_one fields that need
to be limited to criteria precedence=1 but map 1 to 1 to real fields
(city,country,postalcode)
+ */
function select_primary($element)
{
$this->set_primary_address($element);
$this->field_list[$element['field']] =
$this->put_alias($element['real_field']);
}
- /*
- @function select_adr_two_street
- @discussion Street address as asked for by the adr_*_street
false fields are actually
- concatenations of add1 and add2, therefore that needs its own
handler
+
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal Street address as asked for by the adr_*_street
false fields are actually concatenations of add1 and add2, therefore that needs
its own handler
*/
function select_adr_two_street($element)
{
$this->set_secondary_address($element);
$this->field_list['adr_one_street']=sql_criteria::concat_null(array($this->put_alias('add1'),
$this->put_alias('add2'), $this->put_alias('add3')));
}
- /*
- @function select_secondary
- @discussion Generic select builder for adr_two fields that need
to be limited to
- criteria precedence=2 but map 1 to 1 to real fields
(city,country,postalcode)
+
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal Generic select builder for adr_two fields that need
to be limited to criteria precedence=2 but map 1 to 1 to real fields
(city,country,postalcode)
*/
function select_secondary($element)
{
$this->set_secondary_address($element);
$this->field_list[$element['field']] =
$this->put_alias(sql::string($element['real_field']));
}
-
+
//Backwards compatibility for adr_one adr_two when asked to
SEARCH CRITERIA (where clause)
- /*
- @function criteria_adr_one_street
- @discussion in this case, searching in the adr_one_street false
field should
- look for the value in add1 and add2 since adr_one_street is
defined to be the
- concatenation of this two fields
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal In this case, searching in the adr_one_street false
field should look for the value in add1 and add2 since adr_one_street is
defined to be the concatenation of this two fields
*/
function criteria_adr_one_street($element)
{
@@ -320,12 +331,12 @@
sql_criteria::has($this->put_alias('add2'),$element['value']));
$this->_add_criteria($criteria);
}
- /*
- @function criteria_primary
- @discussion
- Generic criteria builder for adr_one type fields. They need an
extra precedence and
- then are a LIKE clause which is given by sql_criteria::has().
So, if the user asks for
- adr_one_country, the resulting query will be tablename.country
= %%value%%
+
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal Generic criteria builder for adr_one type fields.
They need an extra precedence and then are a LIKE clause which is given by
sql_criteria::has(). So, if the user asks for adr_one_country, the resulting
query will be tablename.country = %%value%%
*/
function criteria_primary($element)
{
@@ -333,19 +344,22 @@
$criteria=sql_criteria::has($this->put_alias($element['real_field']),sql::string($element['value']));
$this->add_criteria($criteria);
}
- /*
- @function criteria_adr_two_street
- @discussion Same as criteria_adr_one_street but with precedence
2
+
+ /**
+ *
+ *
+ * @param mixed $element
+ * @internal Same as criteria_adr_one_street but with precedence
2
*/
function criteria_adr_two_street($element)
{
$this->set_secondary_address($element);
$criteria=sql_criteria::or_(sql_criteria::has($this->put_alias('add1'),sql::string($element['value'])),
sql_criteria::has($this->put_alias('add2'),sql::string($element['value'])));
-
$this->_add_criteria($criteria);
-
+
}
+
function criteria_secondary($element)
{
$this->set_secondary_address($element);
@@ -361,9 +375,9 @@
$this->_add_criteria($criteria);
$this->primary_set='primary';
}
-
+
}
-
+
function set_secondary_address($element)
{
if($this->secondary_set != 'secondary')
@@ -372,7 +386,7 @@
$this->_add_criteria($criteria);
$this->secondary_set='secondary';
}
-
+
}
function criteria_addr_pref_val($element)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc/class.contact_addr.inc.php, 1.1.2.11,
nomail <=