source: sandbox/jabberit_messenger/trophy_expresso/inc/preferences.php @ 2696

Revision 2696, 1.4 KB checked in by alexandrecorreia, 14 years ago (diff)

Ticket #986 - Implementado a parte de preferencias, autoStatus e conectar automaticamente.

  • Property svn:executable set to *
Line 
1<?php
2
3  /***************************************************************************\
4  *  Expresso - Expresso Messenger                                            *
5  *     - Alexandre Correia / Rodrigo Souza                                                               *
6  *     - JETI - http://jeti-im.org/                                                                              *
7  * ------------------------------------------------------------------------- *
8  *  This program is free software; you can redistribute it and/or modify it  *
9  *  under the terms of the GNU General Public License as published by the    *
10  *  Free Software Foundation; either version 2 of the License, or (at your   *
11  *  option) any later version.                                               *
12  \***************************************************************************/
13
14        $GLOBALS['phpgw_info']['flags'] = array(
15                                                                                        'currentapp' => 'jabberit_messenger',
16                                                                                        'noheader'   => True,
17                                                                                        'nonavbar'   => True
18                                                                                        );
19        if( is_dir('../phpgwapi/inc') )
20                require_once("../header.inc.php");
21        else
22                require_once("../../header.inc.php");                   
23
24        function setPreferences($pArgs)
25        {
26                if( $GLOBALS['phpgw_info']['user']['preferences']['jabberit_messenger']['preferences'] )
27                        $GLOBALS['phpgw']->preferences->change('jabberit_messenger','preferences',$pArgs);
28                else
29                        $GLOBALS['phpgw']->preferences->add('jabberit_messenger','preferences',$pArgs);
30
31                if ( $GLOBALS['phpgw']->preferences->save_repository() )
32                        return "true";
33                else
34                        return "false";
35        }       
36
37?>
Note: See TracBrowser for help on using the repository browser.