source: sandbox/workflow/branches/993/index.php @ 2492

Revision 2492, 1.9 KB checked in by pedroerp, 14 years ago (diff)

Ticket #993 - Trocando acessos à GLOBALS por acessos à Settings.

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3* eGroupWare                                                                       *
4* http://www.egroupware.org                                                *
5* --------------------------------------------                             *
6*  This program is free software; you can redistribute it and/or modify it *
7*  under the terms of the GNU General Public License as published by the   *
8*  Free Software Foundation; either version 2 of the License, or (at your  *
9*  option) any later version.                                              *
10\**************************************************************************/
11
12/* if the menuaction variable is set, then let the expresso index deal with it */
13if (isset($_GET['menuaction']))
14{
15        /* in case it's an Ajax call from the processes, then check for expired session */
16        if (($_GET['menuaction'] == 'workflow.run_activity.goAjax'))
17        {
18                if (empty($_SESSION['phpgw_session']['session_id']))
19                {
20                        /* the session is expired, return a NanoAjax exception */
21                        require_once dirname(__FILE__) . '/inc/nano/JSON.php';
22                        require_once dirname(__FILE__) . '/inc/nano/NanoJsonConverter.class.php';
23                        $nanoController = &Factory::newInstance('NanoController');
24                        $nanoController->throwErrorOnAllVirtualRequests('__NANOAJAX_SESSION_EXPIRED__');
25                        exit;
26                }
27        }
28        chdir('..');
29        require_once 'index.php';
30}
31else
32{
33        $phpgw_info = array();
34        $GLOBALS['phpgw_info']['flags'] = array(
35                'currentapp' => 'workflow',
36                'noheader'   => True,
37                'nonavbar'   => True
38        );
39        require_once '../header.inc.php';
40        require_once 'inc/common.inc.php';
41
42        if (isset($_GET['start_tab']))
43        {
44                $start_tab = $_GET['start_tab'];
45        }
46        else
47        {
48                $start_tab = Settings::get('workflow', 'preferences', 'startpage');
49                if (is_null($start_tab))
50                        $start_tab = 1;
51        }
52        ExecMethod('workflow.ui_userinterface.draw', $start_tab);
53}
54?>
Note: See TracBrowser for help on using the repository browser.