Ignore:
Timestamp:
10/08/13 16:20:46 (11 years ago)
Author:
douglas
Message:

Ticket #0000 - Copiadas as alterações do Trunk. Versão final 2.5.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/admin/inc/class.uiconfig.inc.php

    r8176 r8232  
    5959                        $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir($appname)); 
    6060                        $t->set_unknowns('keep'); 
    61                         $template_file = $config_appname == "migra" ? 'migra.tpl' : 'config.tpl';         
    62                         $t->set_file(array('config' => $template_file));  
     61                        $template_file = $config_appname == "migra" ? 'migra.tpl' : 'config.tpl';        
     62                        $t->set_file(array('config' => $template_file)); 
    6363                        $t->set_block('config','header','header'); 
    6464                        $t->set_block('config','body','body'); 
     
    7373                        } 
    7474         
    75                 if($appname === "expressoCalendar"){  
    76   
    77             if($config_appname == 'expressoCalendar' )  
    78             {  
    79                 $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname));  
    80   
    81             };  
    82   
    83             if($_POST['newsettings']['expressoCalendar_autoImportCalendars'] == 'true')  
    84             {  
    85                 $db = $GLOBALS['phpgw']->db;  
    86                 $calendars = array();  
    87                 $db->query('SELECT calendar_signature.user_uidnumber as "user",calendar.id as "calendar" FROM calendar,calendar_signature WHERE calendar.id = calendar_signature.calendar_id AND calendar.type = 0 AND calendar_signature.is_owner = 1 AND (SELECT id from module_preference WHERE user_uidnumber = calendar_signature.user_uidnumber AND module_preference.module = \'expressoCalendar\' AND module_preference.name = \'dafaultImportCalendar\'  ) IS NULL');  
    88                 while( $db->next_record() )  
    89                 {  
    90                     $calendars[] = $db->row();  
    91                 }  
    92   
    93                 foreach($calendars as $v)  
    94                 {  
    95                     $db->query('INSERT INTO module_preference ("user_uidnumber","value","name","module") VALUES ( \''.$v['user'].'\' , \''.$v['calendar'].'\',\'dafaultImportCalendar\' , \'expressoCalendar\')');  
    96                 }  
    97             }  
    98   
     75                if($appname === "expressoCalendar"){ 
     76 
     77            if($config_appname == 'expressoCalendar' ) 
     78            { 
     79                $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)); 
     80 
     81            }; 
     82 
     83            if($_POST['newsettings']['expressoCalendar_autoImportCalendars'] == 'true') 
     84            { 
     85                $db = $GLOBALS['phpgw']->db; 
     86                $calendars = array(); 
     87                $db->query('SELECT calendar_signature.user_uidnumber as "user",calendar.id as "calendar" FROM calendar,calendar_signature WHERE calendar.id = calendar_signature.calendar_id AND calendar.type = 0 AND calendar_signature.is_owner = 1 AND (SELECT id from module_preference WHERE user_uidnumber = calendar_signature.user_uidnumber AND module_preference.module = \'expressoCalendar\' AND module_preference.name = \'dafaultImportCalendar\'  ) IS NULL'); 
     88                while( $db->next_record() ) 
     89                { 
     90                    $calendars[] = $db->row(); 
     91                } 
     92 
     93                foreach($calendars as $v) 
     94                { 
     95                    $db->query('INSERT INTO module_preference ("user_uidnumber","value","name","module") VALUES ( \''.$v['user'].'\' , \''.$v['calendar'].'\',\'dafaultImportCalendar\' , \'expressoCalendar\')'); 
     96                } 
     97            } 
     98 
    9999                        if (isset($_POST['migration']) && ($_POST['migration']  == "true")){ 
    100100                         
     
    104104                                $migratrion->calendar(); 
    105105                        } 
    106   
     106 
    107107                } 
    108108 
Note: See TracChangeset for help on using the changeset viewer.