source: branches/2.0/workflow/index.php @ 2585

Revision 2585, 2.1 KB checked in by viani, 14 years ago (diff)

Ticket #1045 - Corrigindo bug de sessão na index.php do workflow

  • 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/* Including common stuff to prepare workflow to run. A session start is needed */
13require_once 'inc/common.inc.php';
14
15/* if the menuaction variable is set, then let the expresso index deal with it */
16if (isset($_GET['menuaction']))
17{
18        /* in case it's an Ajax call from the processes, then check for expired session */
19        if (($_GET['menuaction'] == 'workflow.run_activity.goAjax'))
20        {
21                if (empty($_SESSION['phpgw_session']['session_id']))
22                {
23                        /* the session is expired, return a NanoAjax exception */
24                        require_once dirname(__FILE__) . '/inc/nano/JSON.php';
25                        require_once dirname(__FILE__) . '/inc/nano/NanoJsonConverter.class.php';
26                        require_once dirname(__FILE__) . '/inc/nano/NanoController.class.php';
27                        $nanoController = new NanoController();
28                        $nanoController->throwErrorOnAllVirtualRequests('__NANOAJAX_SESSION_EXPIRED__');
29                        exit;
30                }
31        }
32        chdir('..');
33        require_once 'index.php';
34}
35else
36{
37        $phpgw_info = array();
38        $GLOBALS['phpgw_info']['flags'] = array(
39                'currentapp' => 'workflow',
40                'noheader'   => True,
41                'nonavbar'   => True
42        );
43        require_once '../header.inc.php';
44
45        if (isset($_GET['start_tab']))
46        {
47                $start_tab = $_GET['start_tab'];
48        }
49        else
50        {
51                $GLOBALS['phpgw']->preferences->read_repository();
52                $start_tab = $GLOBALS['phpgw_info']['user']['preferences']['workflow']['startpage'];
53                if (is_null($start_tab))
54                        $start_tab = 1;
55        }
56        ExecMethod('workflow.ui_userinterface.draw', $start_tab);
57}
58?>
Note: See TracBrowser for help on using the repository browser.