Changeset 8232 for branches/2.5/admin/inc
- Timestamp:
- 10/08/13 16:20:46 (11 years ago)
- Location:
- branches/2.5/admin/inc
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/admin/inc/class.uiconfig.inc.php
r8176 r8232 59 59 $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir($appname)); 60 60 $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)); 63 63 $t->set_block('config','header','header'); 64 64 $t->set_block('config','body','body'); … … 73 73 } 74 74 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 99 99 if (isset($_POST['migration']) && ($_POST['migration'] == "true")){ 100 100 … … 104 104 $migratrion->calendar(); 105 105 } 106 106 107 107 } 108 108 -
branches/2.5/admin/inc/hook_admin.inc.php
r5804 r8232 85 85 $file['VoIP settings'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uivoip.edit_conf'); 86 86 } 87 88 if (! $GLOBALS['phpgw']->acl->check('site_config_access',1,'admin')) 89 { 90 $file['Calendar settings'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicalendar.edit_conf'); 91 } 87 92 88 93 89 /* Do not modify below this line */
Note: See TracChangeset
for help on using the changeset viewer.