| 312 | |
| 313 | Seguindo o fluxo existe uma verificação da obrigatoriedade da utilização de conexão segura. |
| 314 | |
| 315 | {{{ |
| 316 | #!php |
| 317 | if( @isset( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'enforce_ssl' ] ) && ! $_SERVER[ 'HTTPS' ] ) |
| 318 | { |
| 319 | Header( 'Location: https://' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'hostname' ] . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] . $_SERVER[' REQUEST_URI' ] ); |
| 320 | exit; |
| 321 | } |
| 322 | }}} |
| 323 | |
| 324 | Se for obrigatório o uso de conexão segura então todo o processo descrito até o momento será novamente executado. |
| 325 | |
| 326 | O passo seguinte é instânciar as classes '''errorlog, translation, common, hooks, auth, accounts, acl, sessions, preferences, applications'''. |
| 327 | |
| 328 | {{{ |
| 329 | #!php |
| 330 | $GLOBALS['phpgw']->log = CreateObject('phpgwapi.errorlog'); |
| 331 | $GLOBALS['phpgw']->translation = CreateObject('phpgwapi.translation'); |
| 332 | $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); |
| 333 | $GLOBALS['phpgw']->hooks = CreateObject('phpgwapi.hooks'); |
| 334 | $GLOBALS['phpgw']->auth = CreateObject('phpgwapi.auth'); |
| 335 | $GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts'); |
| 336 | $GLOBALS['phpgw']->acl = CreateObject('phpgwapi.acl'); |
| 337 | $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions'); |
| 338 | $GLOBALS['phpgw']->preferences = CreateObject('phpgwapi.preferences'); |
| 339 | $GLOBALS['phpgw']->applications = CreateObject('phpgwapi.applications'); |
| 340 | }}} |