[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.bocommon.inc.php inc/class.b...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.bocommon.inc.php inc/class.b... |
Date: |
Thu, 22 Mar 2007 10:35:28 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 07/03/22 10:35:28
Modified files:
inc : class.bocommon.inc.php class.boinvoice.inc.php
class.soinvoice.inc.php class.uiproject.inc.php
class.uiworkorder.inc.php
templates/base : user_lid_filter.xsl user_lid_select.xsl
Log message:
tuning
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boinvoice.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soinvoice.inc.php?cvsroot=phpgroupware&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/user_lid_filter.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/user_lid_select.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: inc/class.bocommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- inc/class.bocommon.inc.php 18 Mar 2007 22:48:57 -0000 1.65
+++ inc/class.bocommon.inc.php 22 Mar 2007 10:35:27 -0000 1.66
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.bocommon.inc.php,v 1.65 2007/03/18 22:48:57
sigurdne Exp $
+ * @version $Id: class.bocommon.inc.php,v 1.66 2007/03/22 10:35:27
sigurdne Exp $
*/
/**
@@ -406,15 +406,38 @@
}
- function
get_user_list_right($right='',$selected='',$acl_location='')
+ function
get_user_list_right($right='',$selected='',$acl_location='',$extra='',$default='')
{
- if(!$employees =
$this->socommon->fm_cache('acl_userlist_'. $right . '_' . $acl_location))
+ if(!$selected && $default)
{
-
$employees=$this->socommon->get_user_list_right($right,$acl_location);
- $this->socommon->fm_cache('acl_userlist_'.
$right . '_' . $acl_location,$employees);
+ $selected = $default;
+ }
+
+ if (is_array($extra))
+ {
+ foreach($extra as $extra_user)
+ {
+ $users_extra[]=array
+ (
+ 'account_lid' => $extra_user,
+ 'account_firstname' =>
lang($extra_user)
+ );
+ }
}
- while (is_array($employees) && list(,$user) =
each($employees))
+ if(!$users = $this->socommon->fm_cache('acl_userlist_'.
$right . '_' . $acl_location))
+ {
+
$users=$this->socommon->get_user_list_right($right,$acl_location);
+ $this->socommon->fm_cache('acl_userlist_'.
$right . '_' . $acl_location,$users);
+ }
+
+ if (is_array($users_extra) && is_array($users))
+ {
+ $users = $users_extra + $users;
+ }
+
+
+ while (is_array($users) && list(,$user) = each($users))
{
if ($user['account_lid']==$selected)
{
Index: inc/class.boinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- inc/class.boinvoice.inc.php 26 Jan 2007 14:53:46 -0000 1.26
+++ inc/class.boinvoice.inc.php 22 Mar 2007 10:35:28 -0000 1.27
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.boinvoice.inc.php,v 1.26 2007/01/26 14:53:46
sigurdne Exp $
+ * @version $Id: class.boinvoice.inc.php,v 1.27 2007/03/22 10:35:28
sigurdne Exp $
*/
/**
@@ -313,51 +313,8 @@
$GLOBALS['phpgw']->xslttpl->add_file(array('user_lid_filter'));
break;
}
-
- if (is_array($extra))
- {
- foreach($extra as $extra_user)
- {
- $users_extra[]=array
- (
- 'account_lid' => $extra_user,
- 'account_firstname' =>
lang($extra_user)
- );
- }
- }
-
- $users= $this->so->get_invoice_user_list();
- if (is_array($users_extra) && is_array($users))
- {
- $users = $users_extra + $users;
- }
-
- while (is_array($users) && list(,$user) = each($users))
- {
- $sel_user = '';
- if ($user['account_lid']==$selected)
- {
- $sel_user = 'selected';
- }
-
- $user_list[] = array
- (
- 'user_lid' => $user['account_lid'],
- 'name' =>
$user['account_lastname'].' '.$user['account_firstname'],
- 'selected' => $sel_user
- );
- }
-
- for ($i=0;$i<count($user_list);$i++)
- {
- if ($user_list[$i]['selected'] != 'selected')
- {
- unset($user_list[$i]['selected']);
- }
- }
-
-//_debug_array($user_list);
- return $user_list;
+
$users=$this->bocommon->get_user_list_right(1,$selected,'.invoice',$extra,$default);
+ return $users;
}
function get_type_list($selected='')
Index: inc/class.soinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- inc/class.soinvoice.inc.php 26 Jan 2007 14:53:46 -0000 1.32
+++ inc/class.soinvoice.inc.php 22 Mar 2007 10:35:28 -0000 1.33
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.soinvoice.inc.php,v 1.32 2007/01/26 14:53:46
sigurdne Exp $
+ * @version $Id: class.soinvoice.inc.php,v 1.33 2007/03/22 10:35:28
sigurdne Exp $
*/
/**
@@ -922,33 +922,6 @@
return $tax_code_list;
}
- function get_invoice_user_list()
- {
-
- $sql = "SELECT * FROM phpgw_acl $this->join
phpgw_accounts on phpgw_accounts.account_id=phpgw_acl.acl_account where
acl_location ='.invoice' and account_type='u' order by account_lastname";
- $this->db->query($sql,__LINE__,__FILE__);
-
- $employees[] = Array(
- 'account_lid' => 'all',
- 'account_lastname' => lang('All')
- );
-
- while ($this->db->next_record())
- {
- $employees[] = Array(
- 'account_id' =>
$this->db->f('account_id'),
- 'account_lid' =>
$this->db->f('account_lid'),
- 'account_type' =>
$this->db->f('account_type'),
- 'account_firstname' =>
$this->db->f('account_firstname'),
- 'account_lastname' =>
$this->db->f('account_lastname'),
- 'account_status' =>
$this->db->f('account_status'),
- 'account_expires' =>
$this->db->f('account_expires')
- );
- }
-//_debug_array($employees);
- return $employees;
- }
-
function select_account_class()
{
$sql = "SELECT id from fm_b_account_category order by
id";
Index: inc/class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- inc/class.uiproject.inc.php 20 Mar 2007 12:57:35 -0000 1.54
+++ inc/class.uiproject.inc.php 22 Mar 2007 10:35:28 -0000 1.55
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiproject.inc.php,v 1.54 2007/03/20 12:57:35
sigurdne Exp $
+ * @version $Id: class.uiproject.inc.php,v 1.55 2007/03/22 10:35:28
sigurdne Exp $
*/
/**
@@ -426,7 +426,7 @@
'lang_user_statustext' => lang('Select
the user the project belongs to. To do not use a category select NO USER'),
'select_user_name' => 'filter',
'lang_no_user' => lang('No
user'),
- 'user_list' =>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl_location),
+ 'user_list' =>
$this->bocommon->get_user_list_right2('filter',2,$this->filter,$this->acl_location),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_statustext' => lang('Submit
the search string'),
Index: inc/class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- inc/class.uiworkorder.inc.php 20 Mar 2007 10:56:12 -0000 1.41
+++ inc/class.uiworkorder.inc.php 22 Mar 2007 10:35:28 -0000 1.42
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiworkorder.inc.php,v 1.41 2007/03/20 10:56:12
sigurdne Exp $
+ * @version $Id: class.uiworkorder.inc.php,v 1.42 2007/03/22 10:35:28
sigurdne Exp $
*/
/**
@@ -466,7 +466,7 @@
'lang_user_statustext' =>
lang('Select the user the workorder belongs to. To do not use a category select
NO USER'),
'select_user_name'
=> 'filter',
'lang_no_user'
=> lang('No user'),
- 'user_list'
=>
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl_location),
+ 'user_list'
=>
$this->bocommon->get_user_list_right2($group_filters,2,$this->filter,$this->acl_location),
'lang_searchvendor_statustext' => lang('Enter
the vendor name to search for'),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
Index: templates/base/user_lid_filter.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/user_lid_filter.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/user_lid_filter.xsl 17 Jan 2005 10:03:18 -0000 1.1
+++ templates/base/user_lid_filter.xsl 22 Mar 2007 10:35:28 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: user_lid_filter.xsl,v 1.1 2005/01/17 10:03:18 sigurdne Exp $ -->
+<!-- $Id: user_lid_filter.xsl,v 1.2 2007/03/22 10:35:28 sigurdne Exp $ -->
<xsl:template name="user_lid_filter">
<xsl:variable name="select_action"><xsl:value-of
select="select_action"/></xsl:variable>
@@ -22,13 +22,13 @@
</xsl:template>
<xsl:template match="user_list">
- <xsl:variable name="user_lid"><xsl:value-of
select="user_lid"/></xsl:variable>
+ <xsl:variable name="lid"><xsl:value-of select="lid"/></xsl:variable>
<xsl:choose>
<xsl:when test="selected">
- <option value="{$user_lid}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
+ <option value="{$lid}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="firstname"/> <xsl:text> </xsl:text><xsl:value-of
select="lastname"/></option>
</xsl:when>
<xsl:otherwise>
- <option value="{$user_lid}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
+ <option value="{$lid}"><xsl:value-of
disable-output-escaping="yes" select="firstname"/><xsl:text>
</xsl:text><xsl:value-of select="lastname"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Index: templates/base/user_lid_select.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/user_lid_select.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/user_lid_select.xsl 17 Jan 2005 10:03:18 -0000 1.1
+++ templates/base/user_lid_select.xsl 22 Mar 2007 10:35:28 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: user_lid_select.xsl,v 1.1 2005/01/17 10:03:18 sigurdne Exp $ -->
+<!-- $Id: user_lid_select.xsl,v 1.2 2007/03/22 10:35:28 sigurdne Exp $ -->
<xsl:template name="user_lid_select">
<xsl:variable name="lang_user_statustext"><xsl:value-of
select="lang_user_statustext"/></xsl:variable>
@@ -10,13 +10,13 @@
</xsl:template>
<xsl:template match="user_list">
- <xsl:variable name="user_lid"><xsl:value-of
select="user_lid"/></xsl:variable>
+ <xsl:variable name="lid"><xsl:value-of select="lid"/></xsl:variable>
<xsl:choose>
<xsl:when test="selected">
- <option value="{$user_lid}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
+ <option value="{$lid}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="firstname"/> <xsl:text> </xsl:text><xsl:value-of
select="lastname"/></option>
</xsl:when>
<xsl:otherwise>
- <option value="{$user_lid}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
+ <option value="{$lid}"><xsl:value-of
disable-output-escaping="yes" select="firstname"/><xsl:text>
</xsl:text><xsl:value-of select="lastname"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:template>