phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc hook_settings.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc hook_settings.inc.php
Date: Sat, 13 Oct 2007 22:53:15 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   07/10/13 22:53:15

Modified files:
        inc            : hook_settings.inc.php 

Log message:
        clean up code

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/hook_settings.inc.php?cvsroot=phpgroupware&r1=1.17&r2=1.18

Patches:
Index: hook_settings.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/hook_settings.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- hook_settings.inc.php       23 Aug 2007 13:29:35 -0000      1.17
+++ hook_settings.inc.php       13 Oct 2007 22:53:15 -0000      1.18
@@ -24,10 +24,10 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage core
-       * @version $Id: hook_settings.inc.php,v 1.17 2007/08/23 13:29:35 
sigurdne Exp $
+       * @version $Id: hook_settings.inc.php,v 1.18 2007/10/13 22:53:15 
sigurdne Exp $
        */
 
-       $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+       $this->currentapp       = & 
$GLOBALS['phpgw_info']['flags']['currentapp'];
 
        $select_property_filter = array(
                ''      => lang('Owner type'),
@@ -56,16 +56,20 @@
 
        $acc = CreateObject('phpgwapi.accounts');
        $group_list = $acc->get_list('groups');
-       while (list($key,$entry) = each($group_list))
+       foreach ( $group_list as $entry )
        {
                $_groups[$entry['account_id']] = $entry['account_lid'];
        }
        create_select_box('Default group TTS','groupdefault',$_groups,'The 
default group to assign a ticket in Helpdesk-submodule');
 
-       $account_list = $acc->get_list('accounts');
-       while (list($key,$entry) = each($account_list))
+       $account_list = $acc->get_list('accounts',-1,'ASC','account_lastname');
+
+       foreach ( $account_list as $entry )
+       {
+               if($entry['account_status'] == 'A')
        {
-               $_accounts[$entry['account_id']] = $entry['account_lid'];
+                       $_accounts[$entry['account_id']] = 
$entry['account_firstname'] . ' ' . $entry['account_lastname'];
+               }
        }
        create_select_box('Default assign to 
TTS','assigntodefault',$_accounts,'The default user to assign a ticket in 
Helpdesk-submodule');
 
@@ -96,7 +100,7 @@
 
        if (is_array($category_tts))
        {
-               while (list($key,$entry) = each($category_tts))
+               foreach ( $category_tts as $entry )
                {
                        $_categories_tts[$entry['id']] = $entry['name'];
                }
@@ -141,21 +145,21 @@
 
        if ($status_list)
        {
-               while (list($key,$entry) = each($status_list))
+               foreach ( $status_list as $entry )
                {
                        $_status[$entry['id']] = $entry['name'];
                }
        }
        if ($category_list)
        {
-               while (list($key,$entry) = each($category_list))
+               foreach ( $category_list as $entry )
                {
                        $_categories[$entry['id']] = $entry['name'];
                }
        }
        if ($district_list)
        {
-               while (list($key,$entry) = each($district_list))
+               foreach ( $district_list as $entry )
                {
                        $_districts[$entry['id']] = $entry['name'];
                }
@@ -187,7 +191,7 @@
 
        if (is_array($cat_list))
        {
-               while (list($key,$entry) = each($cat_list))
+               foreach ( $cat_list as $entry )
                {
                        $_categories_vendor[$entry['cat_id']] = $entry['name'];
                }




reply via email to

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