phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] etemplate/inc class.select_widget.inc.php, 1.8.2.3


From: skwashd
Subject: [Phpgroupware-cvs] etemplate/inc class.select_widget.inc.php, 1.8.2.3
Date: Tue, 6 Dec 2005 16:08:00 +0100

Update of etemplate/inc

Modified Files:
     Branch: Version-0_9_16-branch
            class.select_widget.inc.php lines: +11 -8

Log Message:
performance improvenment

====================================================
Index: etemplate/inc/class.select_widget.inc.php
diff -u etemplate/inc/class.select_widget.inc.php:1.8.2.2 
etemplate/inc/class.select_widget.inc.php:1.8.2.3
--- etemplate/inc/class.select_widget.inc.php:1.8.2.2   Sun Sep  7 01:26:41 2003
+++ etemplate/inc/class.select_widget.inc.php   Tue Dec  6 15:08:25 2005
@@ -359,6 +359,8 @@

                function select_widget($ui)
                {
+               $this->firsttime = true;
+
                        foreach($this->monthnames as $k => $name)
                        {
                                if ($name)
@@ -450,16 +452,17 @@
                                        break;

                                case 'select-account':  // options: 
#rows,{accounts(default)|both|groups},{0(=lid)|1(default=name)|2(=lid+name))}
-                                       $accs = 
$GLOBALS['phpgw']->accounts->get_list(empty($type) ? 'accounts' : $type); // 
default is accounts
-                                       while (list(,$acc) = each($accs))
+                                       if ($this->firsttime)
                                        {
-                                               if ($acc['account_type'] == 'g')
-                                                       
$cell['sel_options'][$acc['account_id']] = 
$this->accountInfo($acc['account_id'],$acc,$type2,$type=='both');
+                                               $this->firsttime = False;
+                                               $tmp_type = ( empty($type) ) ? 
'accounts' : $type;
+                                               $this->accs = 
$GLOBALS['phpgw']->accounts->get_list($tmp_type); // default is accounts
                                        }
-                                       reset($accs);
-                                       while (list(,$acc) = each($accs))
+
+                                       reset($this->accs);
+                                       while (list(,$acc) = each($this->accs))
                                        {
-                                               if ($acc['account_type'] == 'u')
+                                               if ($acc['account_type'] == 'g' 
|| $acc['account_type'] == 'u')
                                                        
$cell['sel_options'][$acc['account_id']] = 
$this->accountInfo($acc['account_id'],$acc,$type2,$type=='both');
                                        }
                                        $cell['no_lang'] = True;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]