fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6469] merge 6465:6468 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6469] merge 6465:6468 from trunk
Date: Mon, 11 Oct 2010 11:28:53 +0000

Revision: 6469
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6469
Author:   sigurdne
Date:     2010-10-11 11:28:53 +0000 (Mon, 11 Oct 2010)
Log Message:
-----------
merge 6465:6468 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-1_0-branch/setup/manageheader.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:6439-6441,6443,6445-6447,6449-6464
   + /trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php  
2010-10-11 11:25:35 UTC (rev 6468)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php  
2010-10-11 11:28:53 UTC (rev 6469)
@@ -58,13 +58,13 @@
                */
                public function __construct($reset = false)
                {
-                       $lang = 
isset($GLOBALS['phpgw_info']['server']['default_lang']) && 
$GLOBALS['phpgw_info']['server']['default_lang']? 
$GLOBALS['phpgw_info']['server']['default_lang'] : 'en';
+                       $userlang = 
isset($GLOBALS['phpgw_info']['server']['default_lang']) && 
$GLOBALS['phpgw_info']['server']['default_lang']? 
$GLOBALS['phpgw_info']['server']['default_lang'] : 'en';
                        if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) )
                        {
-                               $lang = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+                               $userlang = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
                        }
 
-                       $this->set_userlang($lang);
+                       $this->set_userlang($userlang);
 
                        if ( 
isset($GLOBALS['phpgw_info']['server']['collect_missing_translations']) 
                                && 
$GLOBALS['phpgw_info']['server']['collect_missing_translations'])
@@ -272,7 +272,11 @@
                                $this->lang = array();
                        }
 
-                       $userlang = 'en';
+                       if ( !$userlang = $this->userlang )
+                       {
+                               $userlang = 'en';
+                       }
+
                        if ( 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] )
                        {
                                $userlang = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];

Modified: branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php  2010-10-11 
11:25:35 UTC (rev 6468)
+++ branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php  2010-10-11 
11:28:53 UTC (rev 6469)
@@ -403,15 +403,18 @@
                }
                list(,$GLOBALS['phpgw_info']['user']['domain']) = 
explode('@',$GLOBALS['login']);
        }
-       else    // on "normal" pageview
+       else if (phpgw::get_var('domain', 'string', 'REQUEST', false))
        {
-//             $GLOBALS['phpgw_info']['user']['domain'] = 
phpgw::get_var('domain', 'string', 'REQUEST', false);
-
+               // on "normal" pageview
                if(!$GLOBALS['phpgw_info']['user']['domain'] = 
phpgw::get_var('domain', 'string', 'REQUEST', false))
                {
                        $GLOBALS['phpgw_info']['user']['domain'] = 
phpgw::get_var('domain', 'string', 'COOKIE', false);
                }
        }
+       else
+       {
+               $GLOBALS['phpgw_info']['user']['domain'] = 
phpgw::get_var('last_domain', 'string', 'COOKIE', false);
+       }
 
        if 
(isset($GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]))
        {

Modified: branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php  
2010-10-11 11:25:35 UTC (rev 6468)
+++ branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php  
2010-10-11 11:28:53 UTC (rev 6469)
@@ -198,7 +198,23 @@
 
                function phpgw_display_login($variables)
                {
-                       
+                       // If the lastloginid cookies isn't set, we will 
default to default_lang - then to english.
+                       // Change this if you need.
+
+                       
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = 
isset($GLOBALS['phpgw_info']['server']['default_lang']) && 
$GLOBALS['phpgw_info']['server']['default_lang']? 
$GLOBALS['phpgw_info']['server']['default_lang'] : 'en';
+                       if (isset($_COOKIE['last_loginid']))
+                       {
+                               $accounts = CreateObject('phpgwapi.accounts');
+                               $prefs = CreateObject('phpgwapi.preferences', 
$accounts->name2id($_COOKIE['last_loginid']));
+
+                               if ($prefs->account_id)
+                               {
+                                       
$GLOBALS['phpgw_info']['user']['preferences'] = $prefs->read();
+                               }
+                               #print 'LANG:' . 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>';
+                               
$GLOBALS['phpgw']->translation->set_userlang($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],
 $reset = true);
+                       }
+
                        $lang = array
                        (
                                'domain'        => lang('domain'),
@@ -221,7 +237,6 @@
                        }
                
                        $this->tmpl->set_file(array('login_form'  => 
'login.tpl'));
-                       $this->tmpl->set_var('charset', lang('charset'));
 
                        $this->tmpl->set_block('login_form', 'message_block', 
'message_blocks');
                        $this->tmpl->set_block('login_form', 'domain_option', 
'domain_options');
@@ -280,27 +295,6 @@
                                
                        }
 
-                       if (isset($_COOKIE['last_loginid']))
-                       {
-                               $accounts = CreateObject('phpgwapi.accounts');
-                               $prefs = CreateObject('phpgwapi.preferences', 
$accounts->name2id($_COOKIE['last_loginid']));
-
-                               if (! $prefs->account_id)
-                               {
-                                       
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = 'en';
-                               }
-                               else
-                               {
-                                       
$GLOBALS['phpgw_info']['user']['preferences'] = $prefs->read();
-                               }
-                               #print 'LANG:' . 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>';
-                       }
-                       else
-                       {
-                               // If the lastloginid cookies isn't set, we 
will default to english.
-                               // Change this if you need.
-                               
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = 'en';
-                       }
                        $GLOBALS['phpgw']->translation->add_app('login');
                        $GLOBALS['phpgw']->translation->add_app('loginscreen');
                        if ( ($login_msg = lang('loginscreen_message') ) != 
'!loginscreen_message')
@@ -423,7 +417,7 @@
                                $this->tmpl->set_var('lang_login', 
$variables['lang_login']);
                        }
 
-                       $this->tmpl->set_var('lang_testjs', lang('Your browser 
does not support javascript and/or css, please use a modern standards compliant 
browser.  If you have disabled either of these features please enable them for 
this site.') );
+       //              $this->tmpl->set_var('lang_testjs', lang('Your browser 
does not support javascript and/or css, please use a modern standards compliant 
browser.  If you have disabled either of these features please enable them for 
this site.') );
 
                        if(isset($variables['lang_additional_url']) && 
isset($variables['additional_url']))
                        {

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2010-10-11 11:25:35 UTC (rev 6468)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2010-10-11 11:28:53 UTC (rev 6469)
@@ -1156,7 +1156,10 @@
 
                                                if 
(isset($receipt['notice_owner']) && is_array($receipt['notice_owner']) )
                                                {
-                                                       
if($this->account!=$values['coordinator'] && 
$config->config_data['mailnotification'])
+                                                       
if($this->account!=$values['coordinator']
+                                                        && 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner']
+//                                                      && 
$config->config_data['mailnotification']
+                                                         )
                                                        {
                                                                
$prefs_coordinator = 
$this->bocommon->create_preferences('property',$values['coordinator']);
                                                                $to = 
$prefs_coordinator['email'];

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2010-10-11 11:25:35 UTC (rev 6468)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2010-10-11 11:28:53 UTC (rev 6469)
@@ -1046,8 +1046,9 @@
                                        
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uiworkorder.view', 'id'=>$id));
                                }
                                if (isset($receipt['notice_owner']) && 
is_array($receipt['notice_owner'])
-                                && $config->config_data['mailnotification'])
-//                              && 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
+//                                             && 
$config->config_data['mailnotification'])
+                                               && 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner']
+                                       )
                                {
                                        
if($this->account!=$project['coordinator'] && 
$config->config_data['workorder_approval'])
                                        {

Modified: branches/Version-1_0-branch/setup/manageheader.php
===================================================================
--- branches/Version-1_0-branch/setup/manageheader.php  2010-10-11 11:25:35 UTC 
(rev 6468)
+++ branches/Version-1_0-branch/setup/manageheader.php  2010-10-11 11:28:53 UTC 
(rev 6469)
@@ -291,23 +291,23 @@
                        $detected .= $request_order;
 
                        $supported_db = array();
-                       if (extension_loaded('mysql') || 
function_exists('mysql_connect'))
+                       if (extension_loaded('pgsql') || 
function_exists('pg_connect'))
                        {
-                               $detected .= '<li>' . lang('You appear to have 
MySQL support enabled') . "</li>\n";
-                               $supported_db[] = 'mysql';
+                               $detected .= '<li>' . lang('You appear to have 
Postgres-DB support enabled') . "</li>\n";
+                               $supported_db[]  = 'postgres';
                        }
                        else
                        {
-                               $detected .= '<li class="warn">' . lang('No 
MySQL support found. Disabling') . "</li>\n";
+                               $detected .= '<li class="warn">' . lang('No 
Postgres-DB support found. Disabling') . "</li>\n";
                        }
-                       if (extension_loaded('pgsql') || 
function_exists('pg_connect'))
+                       if (extension_loaded('mysql') || 
function_exists('mysql_connect'))
                        {
-                               $detected .= '<li>' . lang('You appear to have 
Postgres-DB support enabled') . "</li>\n";
-                               $supported_db[]  = 'postgres';
+                               $detected .= '<li>' . lang('You appear to have 
MySQL support enabled') . "</li>\n";
+                               $supported_db[] = 'mysql';
                        }
                        else
                        {
-                               $detected .= '<li class="warn">' . lang('No 
Postgres-DB support found. Disabling') . "</li>\n";
+                               $detected .= '<li class="warn">' . lang('No 
MySQL support found. Disabling') . "</li>\n";
                        }
                        if (extension_loaded('mssql') || 
function_exists('mssql_connect'))
                        {
@@ -623,7 +623,7 @@
                        $setup_tpl->set_var('include_root', 
$GLOBALS['phpgw_info']['server']['include_root']);
                        $setup_tpl->set_var('header_admin_password', 
isset($GLOBALS['phpgw_info']['server']['header_admin_password']) ? 
$GLOBALS['phpgw']->crypto->decrypt($GLOBALS['phpgw_info']['server']['header_admin_password'])
 : '');
 //                     $setup_tpl->set_var('header_admin_password', 
isset($GLOBALS['phpgw_info']['server']['header_admin_password']) ? 
$GLOBALS['phpgw_info']['server']['header_admin_password'] : '');
-                       $setup_tpl->set_var('system_name', 
isset($GLOBALS['phpgw_info']['server']['system_name']) ? 
$GLOBALS['phpgw_info']['server']['system_name'] : 'phpGroupWare');
+                       $setup_tpl->set_var('system_name', 
isset($GLOBALS['phpgw_info']['server']['system_name']) ? 
$GLOBALS['phpgw_info']['server']['system_name'] : 'Portico Estate');
                        $setup_tpl->set_var('default_lang', 
isset($GLOBALS['phpgw_info']['server']['default_lang']) ? 
$GLOBALS['phpgw_info']['server']['default_lang'] : phpgw::get_var('ConfigLang', 
'string', 'POST'));
 
                        if ( 
isset($GLOBALS['phpgw_info']['server']['db_persistent']) && 
$GLOBALS['phpgw_info']['server']['db_persistent'] )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]