Completed
Push — 16.1 ( 74433c...7a42e7 )
by Nathan
14:21
created
calendar/setup/tables_update.inc.php 1 patch
Braces   +18 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1429,13 +1429,18 @@  discard block
 block discarded – undo
1429 1429
 function calendar_upgrade1_0_1_008()
1430 1430
 {
1431 1431
 	$config_data = Api\Config::read('calendar');
1432
-	if (isset($config_data['fields']))	// old custom fields
1432
+	if (isset($config_data['fields']))
1433
+	{
1434
+		// old custom fields
1433 1435
 	{
1434 1436
 		$customfields = array();
1437
+	}
1435 1438
 		$order = 0;
1436 1439
 		foreach($config_data['fields'] as $name => $data)
1437 1440
 		{
1438
-			if ($name{0} == '#' && !$data['disabled'])	// real not-disabled custom field
1441
+			if ($name{0} == '#' && !$data['disabled'])
1442
+			{
1443
+				// real not-disabled custom field
1439 1444
 			{
1440 1445
 				$customfields[substr($name,1)] = array(
1441 1446
 					'type'  => 'text',
@@ -1444,6 +1449,7 @@  discard block
 block discarded – undo
1444 1449
 					'order' => ($order += 10),
1445 1450
 				);
1446 1451
 			}
1452
+			}
1447 1453
 		}
1448 1454
 		if (count($customfields))
1449 1455
 		{
@@ -2584,9 +2590,12 @@  discard block
 block discarded – undo
2584 2590
 			'cal_recur_date' => $row['cal_recur_date'],
2585 2591
 			'cal_user_type' => 'e',
2586 2592
 			$email.'='.$GLOBALS['egw_setup']->db->quote($row['email']),
2587
-		), __LINE__, __FILE__, false, 'ORDER BY cal_status', 'calendar') as $user)	// order A, T, U, X
2593
+		), __LINE__, __FILE__, false, 'ORDER BY cal_status', 'calendar') as $user)
2594
+		{
2595
+			// order A, T, U, X
2588 2596
 		{
2589 2597
 			if (strpos($user['email'], '@') !== false && !$n++) continue;
2598
+		}
2590 2599
 			$GLOBALS['egw_setup']->db->delete('egw_cal_user',
2591 2600
 				array_intersect_key($user, array_flip(array('cal_id','cal_recur_date','cal_user_type','cal_user_id','cal_status'))),
2592 2601
 				__LINE__, __FILE__, 'calendar');
@@ -2736,8 +2745,12 @@  discard block
 block discarded – undo
2736 2745
 function calendar_upgrade16_1_002()
2737 2746
 {
2738 2747
 	// Explicitly add months as showing list of events, no times
2739
-	$change = function($attr, $old_value, $owner) {
2740
-		if($owner == Api\Preferences::FORCED_ID) return;
2748
+	$change = function($attr, $old_value, $owner)
2749
+	{
2750
+		if($owner == Api\Preferences::FORCED_ID)
2751
+		{
2752
+			return;
2753
+		}
2741 2754
 		if(is_array($old_value) && !in_array('month', $old_value))
2742 2755
 		{
2743 2756
 			$old_value[] = 'month';
Please login to merge, or discard this patch.