1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * eGroupWare * |
---|
4 | * http://www.egroupware.org * |
---|
5 | * The file written by Mário César Kolling <mario.kolling@serpro.gov.br> * |
---|
6 | * -------------------------------------------- * |
---|
7 | * This program is free software; you can redistribute it and/or modify it * |
---|
8 | * under the terms of the GNU General Public License as published by the * |
---|
9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
10 | * option) any later version. * |
---|
11 | \**************************************************************************/ |
---|
12 | |
---|
13 | /*******************************************\ |
---|
14 | * Define a aplicação mobile preferencial * |
---|
15 | \*******************************************/ |
---|
16 | //TODO: Ler do banco do expresso as preferências do usuário e definir a aplicação móvel padrão |
---|
17 | // por enquanto isto será hardcoded para mobilemail. |
---|
18 | $GLOBALS['phpgw_info']['flags']['currentapp'] = 'ac'; |
---|
19 | $GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'mobilemail'; // mobilecalendar, mobilecc ou mobilemail |
---|
20 | |
---|
21 | /* |
---|
22 | * @function start_prefered_app |
---|
23 | * @abstract Função que chama a aplicação móvel preferencial. |
---|
24 | * @author Mário César Kolling <mario.kolling@serpro.gov.br> |
---|
25 | */ |
---|
26 | function start_prefered_app(){ |
---|
27 | //TODO: Determinar qual a aplicação móvel preferida e iniciá-la. |
---|
28 | switch($GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app']){ |
---|
29 | case mobilemail: |
---|
30 | $link = "ui_mobilemail.mail_list"; |
---|
31 | break; |
---|
32 | case mobilecalendar: |
---|
33 | $link = "ui_mobilecalendar.index"; |
---|
34 | break; |
---|
35 | case mobilecc: |
---|
36 | $link = "ui_mobilecc.contacts_list"; |
---|
37 | break; |
---|
38 | default: |
---|
39 | break; |
---|
40 | } |
---|
41 | $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link("index.php?menuaction=ac.".$link)); |
---|
42 | } |
---|
43 | ?> |
---|