phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.applications.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.applications.inc.php
Date: Sun, 07 Jan 2007 02:18:41 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     07/01/07 02:18:41

Modified files:
        inc            : class.applications.inc.php 

Log message:
        code clean up

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.applications.inc.php?cvsroot=phpgwapi&r1=1.57&r2=1.58

Patches:
Index: class.applications.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.applications.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- class.applications.inc.php  2 Oct 2006 10:25:37 -0000       1.57
+++ class.applications.inc.php  7 Jan 2007 02:18:41 -0000       1.58
@@ -7,7 +7,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage application
-       * @version $Id: class.applications.inc.php,v 1.57 2006/10/02 10:25:37 
Caeies Exp $
+       * @version $Id: class.applications.inc.php,v 1.58 2007/01/07 02:18:41 
skwashd Exp $
        */
 
        /**
@@ -100,21 +100,24 @@
                                $this->read_installed_apps();
                        }
                        $this->data = Array();
-                       if($this->account_id == False) { return False; }
+                       if ( $this->account_id == False )
+                       {
+                               return array();
+                       }
+
                        $apps = 
$GLOBALS['phpgw']->acl->get_user_applications($this->account_id);
-                       reset($GLOBALS['phpgw_info']['apps']);
-                       while ($app = each($GLOBALS['phpgw_info']['apps']))
+                       foreach ( $GLOBALS['phpgw_info']['apps'] as $app )
                        {
-//                             $check = 
$GLOBALS['phpgw']->acl->check('run',1,$app[0]);
-                               $check = 
(isset($apps[$app[0]])?$apps[$app[0]]:False);
+                               //$check = 
$GLOBALS['phpgw']->acl->check('run',1,$app[0]);
+                               $check = isset($apps[$app['name']]) ? 
$apps[$app['name']] : False;
                                if ($check)
                                {
-                                       $this->data[$app[0]] = array(
-                                               'title'   => 
$GLOBALS['phpgw_info']['apps'][$app[0]]['title'],
-                                               'name'    => $app[0],
+                                       $this->data[$app['name']] = array(
+                                               'title'   => 
$GLOBALS['phpgw_info']['apps'][$app['name']]['title'],
+                                               'name'    => $app['name'],
                                                'enabled' => True,
-                                               'status'  => 
$GLOBALS['phpgw_info']['apps'][$app[0]]['status'],
-                                               'id'      => 
$GLOBALS['phpgw_info']['apps'][$app[0]]['id']
+                                               'status'  => 
$GLOBALS['phpgw_info']['apps'][$app['name']]['status'],
+                                               'id'      => 
$GLOBALS['phpgw_info']['apps'][$app['name']]['id']
                                        );
                                } 
                        }




reply via email to

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