Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
include/database/MssqlManager.php 1 patch
Switch Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -1304,24 +1304,24 @@  discard block
 block discarded – undo
1304 1304
     protected function alterSQLRep($action, array $def, $ignoreRequired, $tablename)
1305 1305
     {
1306 1306
         switch($action){
1307
-        case 'add':
1308
-             $f_def=$this->oneColumnSQLRep($def, $ignoreRequired,$tablename,false);
1309
-            return "ADD " . $f_def;
1310
-            break;
1311
-        case 'drop':
1312
-            return "DROP COLUMN " . $def['name'];
1313
-            break;
1314
-        case 'modify':
1315
-            //You cannot specify a default value for a column for MSSQL
1316
-            $f_def  = $this->oneColumnSQLRep($def, $ignoreRequired,$tablename, true);
1317
-            $f_stmt = "ALTER COLUMN ".$f_def['name'].' '.$f_def['colType'].' '.
1318
-                        $f_def['required'].' '.$f_def['auto_increment']."\n";
1319
-            if (!empty( $f_def['default']))
1320
-                $f_stmt .= " ALTER TABLE " . $tablename .  " ADD  ". $f_def['default'] . " FOR " . $def['name'];
1321
-            return $f_stmt;
1322
-            break;
1323
-        default:
1324
-            return '';
1307
+            case 'add':
1308
+                 $f_def=$this->oneColumnSQLRep($def, $ignoreRequired,$tablename,false);
1309
+                return "ADD " . $f_def;
1310
+                break;
1311
+            case 'drop':
1312
+                return "DROP COLUMN " . $def['name'];
1313
+                break;
1314
+            case 'modify':
1315
+                //You cannot specify a default value for a column for MSSQL
1316
+                $f_def  = $this->oneColumnSQLRep($def, $ignoreRequired,$tablename, true);
1317
+                $f_stmt = "ALTER COLUMN ".$f_def['name'].' '.$f_def['colType'].' '.
1318
+                            $f_def['required'].' '.$f_def['auto_increment']."\n";
1319
+                if (!empty( $f_def['default']))
1320
+                    $f_stmt .= " ALTER TABLE " . $tablename .  " ADD  ". $f_def['default'] . " FOR " . $def['name'];
1321
+                return $f_stmt;
1322
+                break;
1323
+            default:
1324
+                return '';
1325 1325
     	}
1326 1326
     }
1327 1327
 
@@ -1511,59 +1511,59 @@  discard block
 block discarded – undo
1511 1511
 
1512 1512
         switch ($type){
1513 1513
         // generic indices
1514
-        case 'index':
1515
-        case 'alternate_key':
1516
-            if ($drop)
1517
-                $sql = "DROP INDEX {$name} ON {$table}";
1518
-            else
1519
-                $sql = "CREATE INDEX {$name} ON {$table} ({$fields})";
1520
-            break;
1521
-        case 'clustered':
1522
-            if ($drop)
1523
-                $sql = "DROP INDEX {$name} ON {$table}";
1524
-            else
1525
-                $sql = "CREATE CLUSTERED INDEX $name ON $table ($fields)";
1526
-            break;
1527
-            // constraints as indices
1528
-        case 'unique':
1529
-            if ($drop)
1530
-                $sql = "ALTER TABLE {$table} DROP CONSTRAINT $name";
1531
-            else
1532
-                $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name} UNIQUE ({$fields})";
1533
-            break;
1534
-        case 'primary':
1535
-            if ($drop)
1536
-                $sql = "ALTER TABLE {$table} DROP CONSTRAINT {$name}";
1537
-            else
1538
-                $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name} PRIMARY KEY ({$fields})";
1539
-            break;
1540
-        case 'foreign':
1541
-            if ($drop)
1542
-                $sql = "ALTER TABLE {$table} DROP FOREIGN KEY ({$fields})";
1543
-            else
1544
-                $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name}  FOREIGN KEY ({$fields}) REFERENCES {$definition['foreignTable']}({$definition['foreignFields']})";
1545
-            break;
1546
-        case 'fulltext':
1547
-            if ($this->full_text_indexing_enabled() && $drop) {
1548
-                $sql = "DROP FULLTEXT INDEX ON {$table}";
1549
-            } elseif ($this->full_text_indexing_enabled()) {
1550
-                $catalog_name=$this->ftsCatalogName();
1551
-                if ( isset($definition['catalog_name']) && $definition['catalog_name'] != 'default')
1552
-                    $catalog_name = $definition['catalog_name'];
1553
-
1554
-                $language = "Language 1033";
1555
-                if (isset($definition['language']) && !empty($definition['language']))
1556
-                    $language = "Language " . $definition['language'];
1557
-
1558
-                $key_index = $definition['key_index'];
1559
-
1560
-                $change_tracking = "auto";
1561
-                if (isset($definition['change_tracking']) && !empty($definition['change_tracking']))
1562
-                    $change_tracking = $definition['change_tracking'];
1563
-
1564
-                $sql = " CREATE FULLTEXT INDEX ON $table ($fields $language) KEY INDEX $key_index ON $catalog_name WITH CHANGE_TRACKING $change_tracking" ;
1565
-            }
1566
-            break;
1514
+            case 'index':
1515
+            case 'alternate_key':
1516
+                if ($drop)
1517
+                    $sql = "DROP INDEX {$name} ON {$table}";
1518
+                else
1519
+                    $sql = "CREATE INDEX {$name} ON {$table} ({$fields})";
1520
+                break;
1521
+            case 'clustered':
1522
+                if ($drop)
1523
+                    $sql = "DROP INDEX {$name} ON {$table}";
1524
+                else
1525
+                    $sql = "CREATE CLUSTERED INDEX $name ON $table ($fields)";
1526
+                break;
1527
+                // constraints as indices
1528
+            case 'unique':
1529
+                if ($drop)
1530
+                    $sql = "ALTER TABLE {$table} DROP CONSTRAINT $name";
1531
+                else
1532
+                    $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name} UNIQUE ({$fields})";
1533
+                break;
1534
+            case 'primary':
1535
+                if ($drop)
1536
+                    $sql = "ALTER TABLE {$table} DROP CONSTRAINT {$name}";
1537
+                else
1538
+                    $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name} PRIMARY KEY ({$fields})";
1539
+                break;
1540
+            case 'foreign':
1541
+                if ($drop)
1542
+                    $sql = "ALTER TABLE {$table} DROP FOREIGN KEY ({$fields})";
1543
+                else
1544
+                    $sql = "ALTER TABLE {$table} ADD CONSTRAINT {$name}  FOREIGN KEY ({$fields}) REFERENCES {$definition['foreignTable']}({$definition['foreignFields']})";
1545
+                break;
1546
+            case 'fulltext':
1547
+                if ($this->full_text_indexing_enabled() && $drop) {
1548
+                    $sql = "DROP FULLTEXT INDEX ON {$table}";
1549
+                } elseif ($this->full_text_indexing_enabled()) {
1550
+                    $catalog_name=$this->ftsCatalogName();
1551
+                    if ( isset($definition['catalog_name']) && $definition['catalog_name'] != 'default')
1552
+                        $catalog_name = $definition['catalog_name'];
1553
+
1554
+                    $language = "Language 1033";
1555
+                    if (isset($definition['language']) && !empty($definition['language']))
1556
+                        $language = "Language " . $definition['language'];
1557
+
1558
+                    $key_index = $definition['key_index'];
1559
+
1560
+                    $change_tracking = "auto";
1561
+                    if (isset($definition['change_tracking']) && !empty($definition['change_tracking']))
1562
+                        $change_tracking = $definition['change_tracking'];
1563
+
1564
+                    $sql = " CREATE FULLTEXT INDEX ON $table ($fields $language) KEY INDEX $key_index ON $catalog_name WITH CHANGE_TRACKING $change_tracking" ;
1565
+                }
1566
+                break;
1567 1567
         }
1568 1568
         return $sql;
1569 1569
     }
Please login to merge, or discard this patch.
include/database/MysqlManager.php 1 patch
Switch Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -825,33 +825,33 @@  discard block
 block discarded – undo
825 825
 			$fields = $index['fields'];
826 826
 
827 827
 		switch ($type) {
828
-		case 'unique':
829
-			$columns[] = " UNIQUE $name ($fields)";
830
-			break;
831
-		case 'primary':
832
-			$columns[] = " PRIMARY KEY ($fields)";
833
-			break;
834
-		case 'index':
835
-		case 'foreign':
836
-		case 'clustered':
837
-		case 'alternate_key':
838
-			/**
828
+		    case 'unique':
829
+			    $columns[] = " UNIQUE $name ($fields)";
830
+			    break;
831
+		    case 'primary':
832
+			    $columns[] = " PRIMARY KEY ($fields)";
833
+			    break;
834
+		    case 'index':
835
+		    case 'foreign':
836
+		    case 'clustered':
837
+		    case 'alternate_key':
838
+			    /**
839 839
 				* @todo here it is assumed that the primary key of the foreign
840 840
 				* table will always be named 'id'. It must be noted though
841 841
 				* that this can easily be fixed by referring to db dictionary
842 842
 				* to find the correct primary field name
843 843
 				*/
844
-			if ( $alter_table )
845
-				$columns[] = " INDEX $name ($fields)";
846
-			else
847
-				$columns[] = " KEY $name ($fields)";
848
-			break;
849
-		case 'fulltext':
850
-			if ($this->full_text_indexing_installed())
851
-				$columns[] = " FULLTEXT ($fields)";
852
-			else
853
-				$GLOBALS['log']->debug('MYISAM engine is not available/enabled, full-text indexes will be skipped. Skipping:',$name);
854
-			break;
844
+			    if ( $alter_table )
845
+				    $columns[] = " INDEX $name ($fields)";
846
+			    else
847
+				    $columns[] = " KEY $name ($fields)";
848
+			    break;
849
+		    case 'fulltext':
850
+			    if ($this->full_text_indexing_installed())
851
+				    $columns[] = " FULLTEXT ($fields)";
852
+			    else
853
+				    $GLOBALS['log']->debug('MYISAM engine is not available/enabled, full-text indexes will be skipped. Skipping:',$name);
854
+			    break;
855 855
 		}
856 856
 	}
857 857
 	$columns = implode(", $alter_action ", $columns);
@@ -935,33 +935,33 @@  discard block
 block discarded – undo
935 935
 
936 936
 		switch ($type){
937 937
 		// generic indices
938
-		case 'index':
939
-		case 'alternate_key':
940
-		case 'clustered':
941
-			if ($drop)
942
-				$sql = "ALTER TABLE {$table} DROP INDEX {$name} ";
943
-			else
944
-				$sql = "ALTER TABLE {$table} ADD INDEX {$name} ({$fields})";
945
-			break;
946
-		// constraints as indices
947
-		case 'unique':
948
-			if ($drop)
949
-				$sql = "ALTER TABLE {$table} DROP INDEX $name";
950
-			else
951
-				$sql = "ALTER TABLE {$table} ADD CONSTRAINT UNIQUE {$name} ({$fields})";
952
-			break;
953
-		case 'primary':
954
-			if ($drop)
955
-				$sql = "ALTER TABLE {$table} DROP PRIMARY KEY";
956
-			else
957
-				$sql = "ALTER TABLE {$table} ADD CONSTRAINT PRIMARY KEY ({$fields})";
958
-			break;
959
-		case 'foreign':
960
-			if ($drop)
961
-				$sql = "ALTER TABLE {$table} DROP FOREIGN KEY ({$fields})";
962
-			else
963
-				$sql = "ALTER TABLE {$table} ADD CONSTRAINT FOREIGN KEY {$name} ({$fields}) REFERENCES {$definition['foreignTable']}({$definition['foreignField']})";
964
-			break;
938
+		    case 'index':
939
+		    case 'alternate_key':
940
+		    case 'clustered':
941
+			    if ($drop)
942
+				    $sql = "ALTER TABLE {$table} DROP INDEX {$name} ";
943
+			    else
944
+				    $sql = "ALTER TABLE {$table} ADD INDEX {$name} ({$fields})";
945
+			    break;
946
+		    // constraints as indices
947
+		    case 'unique':
948
+			    if ($drop)
949
+				    $sql = "ALTER TABLE {$table} DROP INDEX $name";
950
+			    else
951
+				    $sql = "ALTER TABLE {$table} ADD CONSTRAINT UNIQUE {$name} ({$fields})";
952
+			    break;
953
+		    case 'primary':
954
+			    if ($drop)
955
+				    $sql = "ALTER TABLE {$table} DROP PRIMARY KEY";
956
+			    else
957
+				    $sql = "ALTER TABLE {$table} ADD CONSTRAINT PRIMARY KEY ({$fields})";
958
+			    break;
959
+		    case 'foreign':
960
+			    if ($drop)
961
+				    $sql = "ALTER TABLE {$table} DROP FOREIGN KEY ({$fields})";
962
+			    else
963
+				    $sql = "ALTER TABLE {$table} ADD CONSTRAINT FOREIGN KEY {$name} ({$fields}) REFERENCES {$definition['foreignTable']}({$definition['foreignField']})";
964
+			    break;
965 965
 		}
966 966
 		return $sql;
967 967
 	}
Please login to merge, or discard this patch.
include/MVC/View/SugarView.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1387,18 +1387,18 @@
 block discarded – undo
1387 1387
 		//$params = array();
1388 1388
         if (isset($this->action)){
1389 1389
             switch ($this->action) {
1390
-            case 'EditView':
1391
-                if(!empty($this->bean->id) && (empty($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] === 'false')) {
1392
-                    $params[] = "<a href='index.php?module={$this->module}&action=DetailView&record={$this->bean->id}'>".$this->bean->get_summary_text()."</a>";
1393
-                    $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
1394
-                }
1395
-                else
1396
-                    $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
1397
-                break;
1398
-            case 'DetailView':
1399
-                $beanName = $this->bean->get_summary_text();
1400
-                $params[] = $beanName;
1401
-                break;
1390
+                case 'EditView':
1391
+                    if(!empty($this->bean->id) && (empty($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] === 'false')) {
1392
+                        $params[] = "<a href='index.php?module={$this->module}&action=DetailView&record={$this->bean->id}'>".$this->bean->get_summary_text()."</a>";
1393
+                        $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
1394
+                    }
1395
+                    else
1396
+                        $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
1397
+                    break;
1398
+                case 'DetailView':
1399
+                    $beanName = $this->bean->get_summary_text();
1400
+                    $params[] = $beanName;
1401
+                    break;
1402 1402
             }
1403 1403
         }
1404 1404
 
Please login to merge, or discard this patch.
modules/Import/maps/ImportMapOutlook.php 1 patch
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -78,19 +78,19 @@
 block discarded – undo
78 78
     {
79 79
         $return_array = parent::getMapping($module);
80 80
         switch ($module) {
81
-        case 'Contacts':
82
-        case 'Leads':
83
-            return $return_array + array(
84
-                "Job Title"=>"title",
85
-                "Home Country"=>"alt_address_country",
86
-                "E-mail 2 Address"=>"email2",
87
-                );
88
-            break;
89
-        case 'Accounts':
90
-            return $return_array;
91
-            break;
92
-        default:
93
-            return $return_array;
81
+            case 'Contacts':
82
+            case 'Leads':
83
+                return $return_array + array(
84
+                    "Job Title"=>"title",
85
+                    "Home Country"=>"alt_address_country",
86
+                    "E-mail 2 Address"=>"email2",
87
+                    );
88
+                break;
89
+            case 'Accounts':
90
+                return $return_array;
91
+                break;
92
+            default:
93
+                return $return_array;
94 94
         }
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
modules/Import/maps/ImportMapSalesforce.php 1 patch
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -78,76 +78,76 @@
 block discarded – undo
78 78
     {
79 79
         $return_array = parent::getMapping($module);
80 80
         switch ($module) {
81
-        case 'Contacts':
82
-        case 'Leads':
83
-            return $return_array + array(
84
-                "Description"=>"description",
85
-                "Birthdate"=>"birthdate",
86
-                "Lead Source"=>"lead_source",
87
-                "Assistant"=>"assistant",
88
-                "Asst. Phone"=>"assistant_phone",
89
-                "Mailing Street"=>"primary_address_street",
90
-                "Mailing Address Line1"=>"primary_address_street_2",
91
-                "Mailing Address Line2"=>"primary_address_street_3",
92
-                "Mailing Address Line3"=>"primary_address_street_4",
93
-                "Mailing City"=>"primary_address_city",
94
-                "Mailing State"=>"primary_address_state",
95
-                "Mailing Zip/Postal Code"=>"primary_address_postalcode",
96
-                "Mailing Country"=>"primary_address_country",
97
-                "Other Street"=>"alt_address_street",
98
-                "Other Address Line 1"=>"alt_address_street_2",
99
-                "Other Address Line 2"=>"alt_address_street_3",
100
-                "Other Address Line 3"=>"alt_address_street_4",
101
-                "Other City"=>"alt_address_city",
102
-                "Other State"=>"alt_address_state",
103
-                "Other Zip/Postal Code"=>"alt_address_postalcode",
104
-                "Other Country"=>"alt_address_country",
105
-                "Phone"=>"phone_work",
106
-                "Mobile"=>"phone_mobile",
107
-                "Home Phone"=>"phone_home",
108
-                "Other Phone"=>"phone_other",
109
-                "Fax"=>"phone_fax",
110
-                "Email"=>"email1",
111
-                "Email Opt Out"=>"email_opt_out",
112
-                "Do Not Call"=>"do_not_call",
113
-                "Account Name"=>"account_name",
114
-                );
115
-            break;
116
-        case 'Accounts':
117
-            return array(
118
-                "Account Name"=>"name",
119
-                "Annual Revenue"=>"annual_revenue",
120
-                "Type"=>"account_type",
121
-                "Ticker Symbol"=>"ticker_symbol",
122
-                "Rating"=>"rating",
123
-                "Industry"=>"industry",
124
-                "SIC Code"=>"sic_code",
125
-                "Ownership"=>"ownership",
126
-                "Employees"=>"employees",
127
-                "Description"=>"description",
128
-                "Billing Street"=>"billing_address_street",
129
-                "Billing Address Line1"=>"billing_address_street_2",
130
-                "Billing Address Line2"=>"billing_address_street_3",
131
-                "Billing City"=>"billing_address_city",
132
-                "Billing State"=>"billing_address_state",
133
-                "Billing State/Province"=>"billing_address_state",
134
-                "Billing Zip/Postal Code"=>"billing_address_postalcode",
135
-                "Billing Country"=>"billing_address_country",
136
-                "Shipping Street"=>"shipping_address_street",
137
-                "Shipping Address Line1"=>"shipping_address_street_2",
138
-                "Shipping Address Line2"=>"shipping_address_street_3",
139
-                "Shipping City"=>"shipping_address_city",
140
-                "Shipping State"=>"shipping_address_state",
141
-                "Shipping Zip/Postal Code"=>"shipping_address_postalcode",
142
-                "Shipping Country"=>"shipping_address_country",
143
-                "Phone"=>"phone_office",
144
-                "Fax"=>"phone_fax",
145
-                "Website"=>"website",
146
-                "Created Date"=>"date_entered",
147
-                );
148
-            break;
149
-        default:
150
-            return $return_array;
81
+            case 'Contacts':
82
+            case 'Leads':
83
+                return $return_array + array(
84
+                    "Description"=>"description",
85
+                    "Birthdate"=>"birthdate",
86
+                    "Lead Source"=>"lead_source",
87
+                    "Assistant"=>"assistant",
88
+                    "Asst. Phone"=>"assistant_phone",
89
+                    "Mailing Street"=>"primary_address_street",
90
+                    "Mailing Address Line1"=>"primary_address_street_2",
91
+                    "Mailing Address Line2"=>"primary_address_street_3",
92
+                    "Mailing Address Line3"=>"primary_address_street_4",
93
+                    "Mailing City"=>"primary_address_city",
94
+                    "Mailing State"=>"primary_address_state",
95
+                    "Mailing Zip/Postal Code"=>"primary_address_postalcode",
96
+                    "Mailing Country"=>"primary_address_country",
97
+                    "Other Street"=>"alt_address_street",
98
+                    "Other Address Line 1"=>"alt_address_street_2",
99
+                    "Other Address Line 2"=>"alt_address_street_3",
100
+                    "Other Address Line 3"=>"alt_address_street_4",
101
+                    "Other City"=>"alt_address_city",
102
+                    "Other State"=>"alt_address_state",
103
+                    "Other Zip/Postal Code"=>"alt_address_postalcode",
104
+                    "Other Country"=>"alt_address_country",
105
+                    "Phone"=>"phone_work",
106
+                    "Mobile"=>"phone_mobile",
107
+                    "Home Phone"=>"phone_home",
108
+                    "Other Phone"=>"phone_other",
109
+                    "Fax"=>"phone_fax",
110
+                    "Email"=>"email1",
111
+                    "Email Opt Out"=>"email_opt_out",
112
+                    "Do Not Call"=>"do_not_call",
113
+                    "Account Name"=>"account_name",
114
+                    );
115
+                break;
116
+            case 'Accounts':
117
+                return array(
118
+                    "Account Name"=>"name",
119
+                    "Annual Revenue"=>"annual_revenue",
120
+                    "Type"=>"account_type",
121
+                    "Ticker Symbol"=>"ticker_symbol",
122
+                    "Rating"=>"rating",
123
+                    "Industry"=>"industry",
124
+                    "SIC Code"=>"sic_code",
125
+                    "Ownership"=>"ownership",
126
+                    "Employees"=>"employees",
127
+                    "Description"=>"description",
128
+                    "Billing Street"=>"billing_address_street",
129
+                    "Billing Address Line1"=>"billing_address_street_2",
130
+                    "Billing Address Line2"=>"billing_address_street_3",
131
+                    "Billing City"=>"billing_address_city",
132
+                    "Billing State"=>"billing_address_state",
133
+                    "Billing State/Province"=>"billing_address_state",
134
+                    "Billing Zip/Postal Code"=>"billing_address_postalcode",
135
+                    "Billing Country"=>"billing_address_country",
136
+                    "Shipping Street"=>"shipping_address_street",
137
+                    "Shipping Address Line1"=>"shipping_address_street_2",
138
+                    "Shipping Address Line2"=>"shipping_address_street_3",
139
+                    "Shipping City"=>"shipping_address_city",
140
+                    "Shipping State"=>"shipping_address_state",
141
+                    "Shipping Zip/Postal Code"=>"shipping_address_postalcode",
142
+                    "Shipping Country"=>"shipping_address_country",
143
+                    "Phone"=>"phone_office",
144
+                    "Fax"=>"phone_fax",
145
+                    "Website"=>"website",
146
+                    "Created Date"=>"date_entered",
147
+                    );
148
+                break;
149
+            default:
150
+                return $return_array;
151 151
         }
152 152
     }
153 153
 	
Please login to merge, or discard this patch.
modules/Import/maps/ImportMapOther.php 1 patch
Switch Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -75,70 +75,70 @@
 block discarded – undo
75 75
         )
76 76
     {
77 77
         switch ($module) {
78
-        case 'Contacts':
79
-        case 'Leads':
80
-            return array(
81
-                "Salutation"=>"salutation",
82
-                "Full Name"=>"full_name",
83
-                "Company"=>"company",
84
-                "First Name"=>"first_name",
85
-                "Last Name"=>"last_name",
86
-                "Title"=>"title",
87
-                "Department"=>"department",
88
-                "Birthday"=>"birthdate",
89
-                "Home Phone"=>"phone_home",
90
-                "Mobile Phone"=>"phone_mobile",
91
-                "Business Phone"=>"phone_work",
92
-                "Other Phone"=>"phone_other",
93
-                "Business Fax"=>"phone_fax",
94
-                "E-mail Address"=>"email1",
95
-                "E-mail 2"=>"email2",
96
-                "Assistant's Name"=>"assistant",
97
-                "Assistant's Phone"=>"assistant_phone",
98
-                "Business Street"=>"primary_address_street",
99
-                "Business Street 2"=>"primary_address_street_2",
100
-                "Business Street 3"=>"primary_address_street_3",
101
-                "Business City"=>"primary_address_city",
102
-                "Business State"=>"primary_address_state",
103
-                "Business Postal Code"=>"primary_address_postalcode",
104
-                "Business Country/Region"=>"primary_address_country",
105
-                "Home Street"=>"alt_address_street",
106
-                "Home Street 2"=>"alt_address_street_2",
107
-                "Home Street 3"=>"alt_address_street_3",
108
-                "Home City"=>"alt_address_city",
109
-                "Home State"=>"alt_address_state",
110
-                "Home Postal Code"=>"alt_address_postalcode",
111
-                "Home Country/Region"=>"alt_address_country",
112
-                );
113
-            break;
114
-        case 'Accounts':
115
-            return array(
116
-                "Company"=>"name",
117
-                "Business Street"=>"billing_address_street",
118
-                "Business City"=>"billing_address_city",
119
-                "Business State"=>"billing_address_state",
120
-                "Business Country"=>"billing_address_country",
121
-                "Business Postal Code"=>"billing_address_postalcode",
122
-                "Business Fax"=>"phone_fax",
123
-                "Company Main Phone"=>"phone_office",
124
-                "Web Page"=>"website",
125
-                );
126
-            break;
127
-        case 'Opportunities':
128
-            return array(
129
-                "Opportunity Name"=>"name" ,
130
-                "Type"=>"opportunity_type",
131
-                "Lead Source"=>"lead_source",
132
-                "Amount"=>"amount",
133
-                "Created Date"=>"date_entered",
134
-                "Close Date"=>"date_closed",
135
-                "Next Step"=>"next_step",
136
-                "Stage"=>"sales_stage",
137
-                "Probability (%)"=>"probability",
138
-                "Account Name"=>"account_name");
139
-            break;
140
-        default:
141
-            return array();
78
+            case 'Contacts':
79
+            case 'Leads':
80
+                return array(
81
+                    "Salutation"=>"salutation",
82
+                    "Full Name"=>"full_name",
83
+                    "Company"=>"company",
84
+                    "First Name"=>"first_name",
85
+                    "Last Name"=>"last_name",
86
+                    "Title"=>"title",
87
+                    "Department"=>"department",
88
+                    "Birthday"=>"birthdate",
89
+                    "Home Phone"=>"phone_home",
90
+                    "Mobile Phone"=>"phone_mobile",
91
+                    "Business Phone"=>"phone_work",
92
+                    "Other Phone"=>"phone_other",
93
+                    "Business Fax"=>"phone_fax",
94
+                    "E-mail Address"=>"email1",
95
+                    "E-mail 2"=>"email2",
96
+                    "Assistant's Name"=>"assistant",
97
+                    "Assistant's Phone"=>"assistant_phone",
98
+                    "Business Street"=>"primary_address_street",
99
+                    "Business Street 2"=>"primary_address_street_2",
100
+                    "Business Street 3"=>"primary_address_street_3",
101
+                    "Business City"=>"primary_address_city",
102
+                    "Business State"=>"primary_address_state",
103
+                    "Business Postal Code"=>"primary_address_postalcode",
104
+                    "Business Country/Region"=>"primary_address_country",
105
+                    "Home Street"=>"alt_address_street",
106
+                    "Home Street 2"=>"alt_address_street_2",
107
+                    "Home Street 3"=>"alt_address_street_3",
108
+                    "Home City"=>"alt_address_city",
109
+                    "Home State"=>"alt_address_state",
110
+                    "Home Postal Code"=>"alt_address_postalcode",
111
+                    "Home Country/Region"=>"alt_address_country",
112
+                    );
113
+                break;
114
+            case 'Accounts':
115
+                return array(
116
+                    "Company"=>"name",
117
+                    "Business Street"=>"billing_address_street",
118
+                    "Business City"=>"billing_address_city",
119
+                    "Business State"=>"billing_address_state",
120
+                    "Business Country"=>"billing_address_country",
121
+                    "Business Postal Code"=>"billing_address_postalcode",
122
+                    "Business Fax"=>"phone_fax",
123
+                    "Company Main Phone"=>"phone_office",
124
+                    "Web Page"=>"website",
125
+                    );
126
+                break;
127
+            case 'Opportunities':
128
+                return array(
129
+                    "Opportunity Name"=>"name" ,
130
+                    "Type"=>"opportunity_type",
131
+                    "Lead Source"=>"lead_source",
132
+                    "Amount"=>"amount",
133
+                    "Created Date"=>"date_entered",
134
+                    "Close Date"=>"date_closed",
135
+                    "Next Step"=>"next_step",
136
+                    "Stage"=>"sales_stage",
137
+                    "Probability (%)"=>"probability",
138
+                    "Account Name"=>"account_name");
139
+                break;
140
+            default:
141
+                return array();
142 142
         }
143 143
     }
144 144
 	
Please login to merge, or discard this patch.
modules/Administration/UpgradeWizard_commit.php 1 patch
Switch Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -305,50 +305,50 @@  discard block
 block discarded – undo
305 305
 }
306 306
 
307 307
 switch( $install_type ){
308
-    case "langpack":
309
-        if( !isset($_REQUEST['new_lang_name']) || ($_REQUEST['new_lang_name'] == "") ){
310
-            die($mod_strings['ERR_UW_NO_LANG']);
311
-        }
312
-        if( !isset($_REQUEST['new_lang_desc']) || ($_REQUEST['new_lang_desc'] == "") ){
313
-            die($mod_strings['ERR_UW_NO_LANG_DESC']);
314
-        }
308
+        case "langpack":
309
+            if( !isset($_REQUEST['new_lang_name']) || ($_REQUEST['new_lang_name'] == "") ){
310
+                die($mod_strings['ERR_UW_NO_LANG']);
311
+            }
312
+            if( !isset($_REQUEST['new_lang_desc']) || ($_REQUEST['new_lang_desc'] == "") ){
313
+                die($mod_strings['ERR_UW_NO_LANG_DESC']);
314
+            }
315 315
 
316
-        if( $mode == "Install" || $mode=="Enable" ){
317
-            $sugar_config['languages'] = $sugar_config['languages'] + array( $_REQUEST['new_lang_name'] => $_REQUEST['new_lang_desc'] );
318
-        }
319
-        else if( $mode == "Uninstall" || $mode=="Disable" ){
320
-            $new_langs = array();
321
-            $old_langs = $sugar_config['languages'];
322
-            foreach( $old_langs as $key => $value ){
323
-                if( $key != $_REQUEST['new_lang_name'] ){
324
-                    $new_langs += array( $key => $value );
316
+            if( $mode == "Install" || $mode=="Enable" ){
317
+                $sugar_config['languages'] = $sugar_config['languages'] + array( $_REQUEST['new_lang_name'] => $_REQUEST['new_lang_desc'] );
318
+            }
319
+            else if( $mode == "Uninstall" || $mode=="Disable" ){
320
+                $new_langs = array();
321
+                $old_langs = $sugar_config['languages'];
322
+                foreach( $old_langs as $key => $value ){
323
+                    if( $key != $_REQUEST['new_lang_name'] ){
324
+                        $new_langs += array( $key => $value );
325
+                    }
325 326
                 }
327
+			    $sugar_config['languages'] = $new_langs;
328
+
329
+	            $default_sugar_instance_lang = 'en_us';
330
+	            if($current_language == $_REQUEST['new_lang_name']){
331
+	        	    $_SESSION['authenticated_user_language'] =$default_sugar_instance_lang;
332
+	        	    $lang_changed_string = $mod_strings['LBL_CURRENT_LANGUAGE_CHANGE'].$sugar_config['languages'][$default_sugar_instance_lang].'<br/>';
333
+	            }
334
+
335
+	            if($sugar_config['default_language'] == $_REQUEST['new_lang_name']){
336
+	        	    $cfg = new Configurator();
337
+             	    $cfg->config['languages'] = $new_langs;
338
+				    $cfg->config['default_language'] = $default_sugar_instance_lang;
339
+				    $cfg->handleOverride();
340
+	        	    $lang_changed_string .= $mod_strings['LBL_DEFAULT_LANGUAGE_CHANGE'].$sugar_config['languages'][$default_sugar_instance_lang].'<br/>';
341
+	            }
326 342
             }
327
-			$sugar_config['languages'] = $new_langs;
328
-
329
-	        $default_sugar_instance_lang = 'en_us';
330
-	        if($current_language == $_REQUEST['new_lang_name']){
331
-	        	$_SESSION['authenticated_user_language'] =$default_sugar_instance_lang;
332
-	        	$lang_changed_string = $mod_strings['LBL_CURRENT_LANGUAGE_CHANGE'].$sugar_config['languages'][$default_sugar_instance_lang].'<br/>';
333
-	        }
334
-
335
-	        if($sugar_config['default_language'] == $_REQUEST['new_lang_name']){
336
-	        	$cfg = new Configurator();
337
-             	$cfg->config['languages'] = $new_langs;
338
-				$cfg->config['default_language'] = $default_sugar_instance_lang;
339
-				$cfg->handleOverride();
340
-	        	$lang_changed_string .= $mod_strings['LBL_DEFAULT_LANGUAGE_CHANGE'].$sugar_config['languages'][$default_sugar_instance_lang].'<br/>';
341
-	        }
342
-        }
343
-        ksort( $sugar_config );
344
-        if( !write_array_to_file( "sugar_config", $sugar_config, "config.php" ) ){
345
-            die($mod_strings['ERR_UW_CONFIG_FAILED']);
346
-        }
347
-        break;
348
-    case "module":
349
-        require_once( "ModuleInstall/ModuleInstaller.php" );
350
-        $mi = new ModuleInstaller();
351
-        switch( $mode ){
343
+            ksort( $sugar_config );
344
+            if( !write_array_to_file( "sugar_config", $sugar_config, "config.php" ) ){
345
+                die($mod_strings['ERR_UW_CONFIG_FAILED']);
346
+            }
347
+            break;
348
+        case "module":
349
+            require_once( "ModuleInstall/ModuleInstaller.php" );
350
+            $mi = new ModuleInstaller();
351
+            switch( $mode ){
352 352
             case "Install":
353 353
             //here we can determine if this is an upgrade or a new version
354 354
             	if(!empty($previous_version)){
@@ -388,14 +388,14 @@  discard block
 block discarded – undo
388 388
                 break;
389 389
             default:
390 390
                 break;
391
-        }
391
+            }
392 392
         $current_user->incrementETag("mainMenuETag");
393 393
         break;
394
-    case "full":
395
-        // purposely flow into "case: patch"
396
-    case "patch":
397
- 		switch($mode)
398
- 		{
394
+        case "full":
395
+            // purposely flow into "case: patch"
396
+        case "patch":
397
+ 		    switch($mode)
398
+ 		    {
399 399
  			case 'Install':
400 400
  				$file = "$unzip_dir/" . constant('SUGARCRM_POST_INSTALL_FILE');
401 401
 				if(is_file($file))
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
  				break;
425 425
  			default:
426 426
  				break;
427
- 		}
427
+ 		    }
428 428
 
429 429
 		require( "sugar_version.php" );
430 430
 		$sugar_config['sugar_version'] = $sugar_version;
@@ -435,8 +435,8 @@  discard block
 block discarded – undo
435 435
 			die($mod_strings['ERR_UW_UPDATE_CONFIG']);
436 436
 		}
437 437
         break;
438
-    default:
439
-        break;
438
+        default:
439
+            break;
440 440
 }
441 441
 
442 442
 switch( $mode ){
Please login to merge, or discard this patch.
modules/Administration/UpgradeWizard_prepare.php 1 patch
Switch Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -164,58 +164,58 @@  discard block
 block discarded – undo
164 164
 	}//fi
165 165
 }
166 166
 switch( $install_type ){
167
-	case "full":
168
-	case "patch":
169
-		if( !is_writable( "config.php" ) ){
170
-			die( $mod_strings['ERR_UW_CONFIG'] );
171
-		}
172
-		break;
173
-	case "theme":
174
-		break;
175
-	case "langpack":
176
-		// find name of language pack: find single file in include/language/xx_xx.lang.php
177
-		$d = dir( "$unzip_dir/$zip_from_dir/include/language" );
178
-		while( $f = $d->read() ){
179
-			if( $f == "." || $f == ".." ){
180
-				continue;
181
-			}
182
-			else if( preg_match("/(.*)\.lang\.php\$/", $f, $match) ){
183
-				$new_lang_name = $match[1];
184
-			}
185
-		}
186
-		if( $new_lang_name == "" ){
187
-			die( $mod_strings['ERR_UW_NO_LANGPACK'].$install_file );
188
-		}
189
-		$hidden_fields .= "<input type=hidden name=\"new_lang_name\" value=\"$new_lang_name\"/>";
190
-
191
-		$new_lang_desc = getLanguagePackName( "$unzip_dir/$zip_from_dir/include/language/$new_lang_name.lang.php" );
192
-		if( $new_lang_desc == "" ){
193
-			die( $mod_strings['ERR_UW_NO_LANG_DESC_1']."include/language/$new_lang_name.lang.php".$mod_strings['ERR_UW_NO_LANG_DESC_2']."$install_file." );
194
-		}
195
-		$hidden_fields .= "<input type=hidden name=\"new_lang_desc\" value=\"$new_lang_desc\"/>";
196
-
197
-		if( !is_writable( "config.php" ) ){
198
-			die( $mod_strings['ERR_UW_CONFIG'] );
199
-		}
200
-		break;
201
-	case "module":
202
-		$previous_install = array();
203
-		if(!empty($id_name) & !empty($version))
204
-		$previous_install = $uh->determineIfUpgrade($id_name, $version);
205
-		$previous_version = (empty($previous_install['version'])) ? '' : $previous_install['version'];
206
-		$previous_id = (empty($previous_install['id'])) ? '' : $previous_install['id'];
207
-		$show_files = false;
208
-		//rrs pull out unique_key
209
-		$hidden_fields .= "<input type=hidden name=\"author\" value=\"$author\"/>";
210
-		$hidden_fields .= "<input type=hidden name=\"name\" value=\"$name\"/>";
211
-		$hidden_fields .= "<input type=hidden name=\"description\" value=\"$description\"/>";
212
-		$hidden_fields .= "<input type=hidden name=\"is_uninstallable\" value=\"$is_uninstallable\"/>";
213
-		$hidden_fields .= "<input type=hidden name=\"id_name\" value=\"$id_name\"/>";
214
-		$hidden_fields .= "<input type=hidden name=\"previous_version\" value=\"$previous_version\"/>";
215
-		$hidden_fields .= "<input type=hidden name=\"previous_id\" value=\"$previous_id\"/>";
216
-		break;
217
-	default:
218
-		die( $mod_strings['ERR_UW_WRONG_TYPE'].$install_type );
167
+	    case "full":
168
+	    case "patch":
169
+		    if( !is_writable( "config.php" ) ){
170
+			    die( $mod_strings['ERR_UW_CONFIG'] );
171
+		    }
172
+		    break;
173
+	    case "theme":
174
+		    break;
175
+	    case "langpack":
176
+		    // find name of language pack: find single file in include/language/xx_xx.lang.php
177
+		    $d = dir( "$unzip_dir/$zip_from_dir/include/language" );
178
+		    while( $f = $d->read() ){
179
+			    if( $f == "." || $f == ".." ){
180
+				    continue;
181
+			    }
182
+			    else if( preg_match("/(.*)\.lang\.php\$/", $f, $match) ){
183
+				    $new_lang_name = $match[1];
184
+			    }
185
+		    }
186
+		    if( $new_lang_name == "" ){
187
+			    die( $mod_strings['ERR_UW_NO_LANGPACK'].$install_file );
188
+		    }
189
+		    $hidden_fields .= "<input type=hidden name=\"new_lang_name\" value=\"$new_lang_name\"/>";
190
+
191
+		    $new_lang_desc = getLanguagePackName( "$unzip_dir/$zip_from_dir/include/language/$new_lang_name.lang.php" );
192
+		    if( $new_lang_desc == "" ){
193
+			    die( $mod_strings['ERR_UW_NO_LANG_DESC_1']."include/language/$new_lang_name.lang.php".$mod_strings['ERR_UW_NO_LANG_DESC_2']."$install_file." );
194
+		    }
195
+		    $hidden_fields .= "<input type=hidden name=\"new_lang_desc\" value=\"$new_lang_desc\"/>";
196
+
197
+		    if( !is_writable( "config.php" ) ){
198
+			    die( $mod_strings['ERR_UW_CONFIG'] );
199
+		    }
200
+		    break;
201
+	    case "module":
202
+		    $previous_install = array();
203
+		    if(!empty($id_name) & !empty($version))
204
+		    $previous_install = $uh->determineIfUpgrade($id_name, $version);
205
+		    $previous_version = (empty($previous_install['version'])) ? '' : $previous_install['version'];
206
+		    $previous_id = (empty($previous_install['id'])) ? '' : $previous_install['id'];
207
+		    $show_files = false;
208
+		    //rrs pull out unique_key
209
+		    $hidden_fields .= "<input type=hidden name=\"author\" value=\"$author\"/>";
210
+		    $hidden_fields .= "<input type=hidden name=\"name\" value=\"$name\"/>";
211
+		    $hidden_fields .= "<input type=hidden name=\"description\" value=\"$description\"/>";
212
+		    $hidden_fields .= "<input type=hidden name=\"is_uninstallable\" value=\"$is_uninstallable\"/>";
213
+		    $hidden_fields .= "<input type=hidden name=\"id_name\" value=\"$id_name\"/>";
214
+		    $hidden_fields .= "<input type=hidden name=\"previous_version\" value=\"$previous_version\"/>";
215
+		    $hidden_fields .= "<input type=hidden name=\"previous_id\" value=\"$previous_id\"/>";
216
+		    break;
217
+	    default:
218
+		    die( $mod_strings['ERR_UW_WRONG_TYPE'].$install_type );
219 219
 }
220 220
 
221 221
 
@@ -317,33 +317,33 @@  discard block
 block discarded – undo
317 317
 }
318 318
 
319 319
 switch( $mode ){
320
-	case "Install":
321
-		if( $install_type == "langpack") {
322
-			print( $mod_strings['LBL_UW_LANGPACK_READY'] );
323
-			echo '<br><br>';
324
-		}
325
-		break;
326
-	case "Uninstall":
327
-		if( $install_type == "langpack" ){
328
-			print( $mod_strings['LBL_UW_LANGPACK_READY_UNISTALL'] );
329
-			echo '<br><br>';
330
-		}
331
-		else if($install_type != "module"){
332
-			print( $mod_strings['LBL_UW_FILES_REMOVED'] );
333
-		}
334
-		break;
335
-	case "Disable":
336
-		if( $install_type == "langpack" ){
337
-			print( $mod_strings['LBL_UW_LANGPACK_READY_DISABLE'] );
338
-			echo '<br><br>';
339
-		}
340
-		break;
341
-	case "Enable":
342
-		if( $install_type == "langpack" ){
343
-			print( $mod_strings['LBL_UW_LANGPACK_READY_ENABLE'] );
344
-			echo '<br><br>';
345
-		}
346
-		break;
320
+	    case "Install":
321
+		    if( $install_type == "langpack") {
322
+			    print( $mod_strings['LBL_UW_LANGPACK_READY'] );
323
+			    echo '<br><br>';
324
+		    }
325
+		    break;
326
+	    case "Uninstall":
327
+		    if( $install_type == "langpack" ){
328
+			    print( $mod_strings['LBL_UW_LANGPACK_READY_UNISTALL'] );
329
+			    echo '<br><br>';
330
+		    }
331
+		    else if($install_type != "module"){
332
+			    print( $mod_strings['LBL_UW_FILES_REMOVED'] );
333
+		    }
334
+		    break;
335
+	    case "Disable":
336
+		    if( $install_type == "langpack" ){
337
+			    print( $mod_strings['LBL_UW_LANGPACK_READY_DISABLE'] );
338
+			    echo '<br><br>';
339
+		    }
340
+		    break;
341
+	    case "Enable":
342
+		    if( $install_type == "langpack" ){
343
+			    print( $mod_strings['LBL_UW_LANGPACK_READY_ENABLE'] );
344
+			    echo '<br><br>';
345
+		    }
346
+		    break;
347 347
 }
348 348
 
349 349
 
Please login to merge, or discard this patch.