Index: class.select_widget.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/etemplate/inc/class.select_widget.inc.php,v retrieving revision 1.8.2.2 diff -u -w -b -i -r1.8.2.2 class.select_widget.inc.php --- class.select_widget.inc.php 7 Sep 2003 01:26:41 -0000 1.8.2.2 +++ class.select_widget.inc.php 8 Apr 2004 09:05:37 -0000 @@ -357,6 +358,8 @@ 'WY' => 'Wyoming' ); + var $account_cache = array(); + function select_widget($ui) { foreach($this->monthnames as $k => $name) @@ -450,7 +453,10 @@ 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 + if ( count($this->account_cache) == 0 ) { + $this->account_cache = $GLOBALS['phpgw']->accounts->get_list(empty($type) ? 'accounts' : $type); // default is accounts + } + $accs = &$this->account_cache; while (list(,$acc) = each($accs)) { if ($acc['account_type'] == 'g')