[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.10, 1.1.2.11 class.b
From: |
Joseph Engo <address@hidden> |
Subject: |
[Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.10, 1.1.2.11 class.base.php, 1.1.1.1.2.9, 1.1.1.1.2.10 class.lang.php, 1.1.2.8, 1.1.2.9 class.phpgw.php, 1.1.1.1.2.12, 1.1.1.1.2.13 class.prefs.php, 1.1.1.1.2.3, 1.1.1.1.2.4 |
Date: |
Wed, 29 Oct 2003 11:09:29 +0000 |
Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv13120/api
Modified Files:
Tag: proposal-branch
class.account_mgr.php class.base.php class.lang.php
class.phpgw.php class.prefs.php
Log Message:
- Added in some experimental timezone and localization support
This has NOT been fully tested with windows or all versions of PHP.
Index: class.account_mgr.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.account_mgr.php,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -d -r1.1.2.10 -r1.1.2.11
*** class.account_mgr.php 29 Oct 2003 02:19:05 -0000 1.1.2.10
--- class.account_mgr.php 29 Oct 2003 11:09:26 -0000 1.1.2.11
***************
*** 155,159 ****
$accounts =
CreateObject('api_accounts',$args);
$data = $accounts->data;
! $data['expires'] = ($date['expires'] <
2145800000 ? 'Never' :
$GLOBALS['phpgw']->prefs->get_datetime($data['expires']));
$result['view_account'] = $data;
--- 155,159 ----
$accounts =
CreateObject('api_accounts',$args);
$data = $accounts->data;
! $data['expires'] =
$GLOBALS['phpgw']->prefs->get_datetime($data['expires']);
$result['view_account'] = $data;
Index: class.lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.lang.php,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** class.lang.php 27 Oct 2003 18:54:15 -0000 1.1.2.8
--- class.lang.php 29 Oct 2003 11:09:26 -0000 1.1.2.9
***************
*** 26,34 ****
class api_lang
{
! var $messages = array();
! var $domain = 'messages';
! var $language;
! var $registered_app = 'api';
! var $envset = False;
function api_lang()
--- 26,39 ----
class api_lang
{
! var $messages = array();
! var $domain = 'messages';
! var $language;
! var $registered_app = 'api';
! var $envset = False;
! var $windows_locale = array(
! 'address@hidden' => 'DEU',
! 'fi_FI' => 'FIN',
! 'en_US' => 'USA'
! );
function api_lang()
***************
*** 204,208 ****
function switchlang()
{
! if($this->language !=
$GLOBALS['phpgw_data']['prefs']['api.lang'])
{
$this->language =
$GLOBALS['phpgw_data']['prefs']['api.lang'];
--- 209,213 ----
function switchlang()
{
! if ($this->language !=
$GLOBALS['phpgw_data']['prefs']['api.lang'])
{
$this->language =
$GLOBALS['phpgw_data']['prefs']['api.lang'];
***************
*** 210,221 ****
unset($GLOBALS['phpgw_session']['lang_cache']);
}
! if(!$this->envset)
{
putenv('LANG='.$this->language);
setlocale(LC_ALL, $this->language);
$this->envset = True;
}
}
!
function addtoxml()
{
--- 215,244 ----
unset($GLOBALS['phpgw_session']['lang_cache']);
}
!
! if (! $this->envset)
{
putenv('LANG='.$this->language);
+ putenv('TZ=' .
$GLOBALS['phpgw_data']['prefs']['api.timezone']);
setlocale(LC_ALL, $this->language);
+ if (PHP_OS == 'Windows')
+ {
+ if
($this->windows_locale[$this->langauge])
+ {
+ setlocale(LC_TIME,
$this->langauge);
+ }
+ else
+ {
+ setlocale(LC_TIME,'C');
+ }
+ }
+ else
+ {
+ setlocale(LC_TIME, $this->langauge);
+ }
+
$this->envset = True;
}
}
!
function addtoxml()
{
Index: class.base.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.base.php,v
retrieving revision 1.1.1.1.2.9
retrieving revision 1.1.1.1.2.10
diff -C2 -d -r1.1.1.1.2.9 -r1.1.1.1.2.10
*** class.base.php 28 Oct 2003 10:45:09 -0000 1.1.1.1.2.9
--- class.base.php 29 Oct 2003 11:09:26 -0000 1.1.1.1.2.10
***************
*** 25,28 ****
--- 25,29 ----
/* $Id$ */
+ /* $Source$ */
/*!
***************
*** 39,200 ****
'values' => array(
0 => array(
[...1742 lines suppressed...]
+ {
+ // If there is a value present, then
reset all "selected" values to False, to be set again
+ if
(strlen($GLOBALS['phpgw']->prefs->data[$GLOBALS['phpgw_data']['user']['id']][$args['appname']
. '.' . $result['pref_widget'][$i]['name']]))
+ {
+ $t =
count($result['pref_widget'][$i]['values']);
+ for ($j=0; $j<$t; $j++)
+ {
+
$result['pref_widget'][$i]['values'][$j]['selected'] = False;
+
+ if
($result['pref_widget'][$i]['values'][$j]['value'] ==
$GLOBALS['phpgw']->prefs->data[$GLOBALS['phpgw_data']['user']['id']][$args['appname']
. '.' . $result['pref_widget'][$i]['name']])
+ {
+
$result['pref_widget'][$i]['values'][$j]['selected'] = True;
+ }
+ }
+
+ }
+ }
+ }
return $result;
}
Index: class.prefs.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.prefs.php,v
retrieving revision 1.1.1.1.2.3
retrieving revision 1.1.1.1.2.4
diff -C2 -d -r1.1.1.1.2.3 -r1.1.1.1.2.4
*** class.prefs.php 29 Oct 2003 06:33:49 -0000 1.1.1.1.2.3
--- class.prefs.php 29 Oct 2003 11:09:26 -0000 1.1.1.1.2.4
***************
*** 162,166 ****
$args = $args->get(func_get_args(),__LINE__,__FILE__);
! return date('m/d/Y',$args['epoch']);
}
--- 162,166 ----
$args = $args->get(func_get_args(),__LINE__,__FILE__);
! return strftime('%x',$args['epoch']);
}
***************
*** 180,184 ****
$args = $args->get(func_get_args(),__LINE__,__FILE__);
! return date('m/d/Y H:i:s a',$args['epoch']);
}
}
--- 180,184 ----
$args = $args->get(func_get_args(),__LINE__,__FILE__);
! return strftime('%x',$args['epoch']) . date(' H:i:s
a',$args['epoch']);
}
}
Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.12
retrieving revision 1.1.1.1.2.13
diff -C2 -d -r1.1.1.1.2.12 -r1.1.1.1.2.13
*** class.phpgw.php 28 Oct 2003 10:13:29 -0000 1.1.1.1.2.12
--- class.phpgw.php 29 Oct 2003 11:09:26 -0000 1.1.1.1.2.13
***************
*** 297,300 ****
--- 297,301 ----
$GLOBALS['phpgw_xml_apinode']->add_node($GLOBALS['phpgw_data']['user'],'user');
$GLOBALS['phpgw_xml_apinode']->add_node($GLOBALS['phpgw_data']['prefs'],'prefs');
+ $GLOBALS['phpgw_xml_apinode']->add_node(strftime('%A,
%B %e %Y',time()),'currentdate');
/* Add the API section to the XML doc */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.10, 1.1.2.11 class.base.php, 1.1.1.1.2.9, 1.1.1.1.2.10 class.lang.php, 1.1.2.8, 1.1.2.9 class.phpgw.php, 1.1.1.1.2.12, 1.1.1.1.2.13 class.prefs.php, 1.1.1.1.2.3, 1.1.1.1.2.4,
Joseph Engo <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] addressbook/inc/import Import_from_Outlook_-_English, 1.2, 1.2.6.1
- Next by Date:
[Phpgroupware-cvs] api/db class.db_mysql.php, 1.1.1.1.2.1, 1.1.1.1.2.2 class.db_pgsql.php, 1.1.1.1.2.3, 1.1.1.1.2.4
- Previous by thread:
[Phpgroupware-cvs] addressbook/inc/import Import_from_Outlook_-_English, 1.2, 1.2.6.1
- Next by thread:
[Phpgroupware-cvs] api/db class.db_mysql.php, 1.1.1.1.2.1, 1.1.1.1.2.2 class.db_pgsql.php, 1.1.1.1.2.3, 1.1.1.1.2.4
- Index(es):