phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgroupware index.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgroupware index.php
Date: Wed, 16 Aug 2006 02:47:53 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    phpgroupware
Changes by:     Dave Hall <skwashd>     06/08/16 02:47:52

Modified files:
        .              : index.php 

Log message:
        little cleanup

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/index.php?cvsroot=phpgroupware&r1=1.126&r2=1.127

Patches:
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgroupware/index.php,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -b -r1.126 -r1.127
--- index.php   6 Aug 2006 10:03:24 -0000       1.126
+++ index.php   16 Aug 2006 02:47:52 -0000      1.127
@@ -6,7 +6,7 @@
        * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgroupware
-       * @version $Id: index.php,v 1.126 2006/08/06 10:03:24 skwashd Exp $
+       * @version $Id: index.php,v 1.127 2006/08/16 02:47:52 skwashd Exp $
        */
 
        $phpgw_info = array();
@@ -19,10 +19,10 @@
        /**
        * @global string $GLOBALS['sessionid']
        */
-       $GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] 
: $_COOKIE['sessionid'];
+       $GLOBALS['sessionid'] = $_REQUEST['sessionid'];
 
        // This is the preliminary menuaction driver for the new multi-layered 
design
-       if (@isset($_GET['menuaction']))
+       if (isset($_GET['menuaction']))
        {
                list($app,$class,$method) = explode('.',$_GET['menuaction']);
                if (! $app || ! $class || ! $method)
@@ -66,18 +66,18 @@
                $app = 'phpgwapi';
        }
 
-       /**
-       * @global object $GLOBALS['obj']
-       */
-       $GLOBALS['obj'] = CreateObject(sprintf('%s.%s',$app,$class));
+       $GLOBALS[$class] = CreateObject("{$app}.{$class}");
+
+       if ( !$invalid_data 
+               && is_object($GLOBALS[$class])
+               && isset($GLOBALS[$class]->public_functions) 
+               && is_array($GLOBALS[$class]->public_functions) 
+               && isset($GLOBALS[$class]->public_functions[$method])
+               && $GLOBALS[$class]->public_functions[$method] )
 
-       $GLOBALS[$class] = $GLOBALS['obj'];
-       if ((is_array($GLOBALS[$class]->public_functions) && 
$GLOBALS[$class]->public_functions[$method]) && ! $invalid_data)
        {
-//             eval("\$GLOBALS['obj']->$method();");
-               execmethod($_GET['menuaction']);
+               $GLOBALS[$class]->$method();
                unset($app);
-               unset($obj);
                unset($class);
                unset($method);
                unset($invalid_data);
@@ -85,6 +85,7 @@
        }
        else
        {
+               //FIXME make this handle invalid data better
                if (! $app || ! $class || ! $method)
                {
                        $GLOBALS['phpgw']->log->message(array(
@@ -107,10 +108,6 @@
                $GLOBALS['phpgw']->log->commit();
 
                $GLOBALS['phpgw']->redirect_link('/home.php');
-               /*
-               $_obj = CreateObject('home.home');
-               $_obj->get_list();
-               */
        }
 
        if (! $GLOBALS['phpgw_info']['nofooter'])




reply via email to

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