Changeset 1239 for branches/2.0
- Timestamp:
- 07/31/09 15:48:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/workflow/inc/class.ui_userinterface.inc.php
r795 r1239 27 27 'printArea' => true 28 28 ); 29 29 30 30 /** 31 31 * Constructor … … 36 36 37 37 } 38 38 39 39 /** 40 40 * Draw the user interface 41 * @param int $tabIndex 41 * @param int $tabIndex 42 42 */ 43 43 function draw($tabIndex = null) 44 44 { 45 $this->set_wf_session();46 47 if (is_null($tabIndex))48 $tabIndex = 1;49 50 45 $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title']; 51 46 $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 52 47 $smarty = CreateObject('workflow.workflow_smarty'); 48 49 // Check if workflow config is ok 50 if (count($errors = $this->_checkWorkflowConfig())) 51 { 52 $smarty->assign('header', $smarty->expressoHeader); 53 $smarty->assign('footer', $smarty->expressoFooter); 54 $smarty->assign('errors', $errors); 55 $smarty->display('notworking.tpl'); 56 return false; 57 } 58 59 $this->set_wf_session(); 60 61 if (is_null($tabIndex)) 62 $tabIndex = 1; 53 63 54 64 $javaScripts = $this->get_common_js(); … … 89 99 $smarty->assign('tabs', $tabs); 90 100 $smarty->assign('startTab', $tabIndex); 101 91 102 $smarty->display('userinterface.tpl'); 103 } 104 105 /** 106 * Check if workflow config is ok 107 * @param void 108 * @access private 109 * @return array Errors that were found 110 */ 111 private function _checkWorkflowConfig() 112 { 113 $errors = array(); 114 115 // Get a connection to db workflow and galaxia (module) 116 if ($GLOBALS['workflow']['workflowObjects']->getDBWorkflow()->Error) 117 $errors[] = 'Unable to connect to database Workflow'; 118 119 if ($errormsg = $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Error) 120 $errors[] = 'Unable to connect to database Galaxia'; 121 122 return $errors; 92 123 } 93 124
Note: See TracChangeset
for help on using the changeset viewer.