Completed
Push — console-installer ( e2b50d...6ce748 )
by Adam
22:30
created
data/Relationships/One2MRelationship.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             );
101 101
             if (!isset($this->lhsLinkDef['name']) && isset($this->lhsLinkDef[0]))
102 102
             {
103
-              $this->lhsLinkDef = $this->lhsLinkDef[0];
103
+                $this->lhsLinkDef = $this->lhsLinkDef[0];
104 104
             }
105 105
             if (!isset($this->rhsLinkDef['name']) && isset($this->rhsLinkDef[0])) {
106 106
                 $this->rhsLinkDef = $this->rhsLinkDef[0];
@@ -128,35 +128,35 @@  discard block
 block discarded – undo
128 128
         //If the current data matches the existing data, don't do anything
129 129
         if (!$this->checkExisting($dataToInsert))
130 130
         {
131
-			// Pre-load the RHS relationship, which is used later in the add() function and expects a Bean
132
-			// and we also use it for clearing relationships in case of non self-referencing O2M relations
133
-			// (should be preloaded because when using the relate_to field for updating/saving relationships,
134
-			// only the bean id is loaded into $rhs->$rhsLinkName)
135
-			$rhsLinkName = $this->rhsLink;
136
-			$rhs->load_relationship($rhsLinkName);
131
+            // Pre-load the RHS relationship, which is used later in the add() function and expects a Bean
132
+            // and we also use it for clearing relationships in case of non self-referencing O2M relations
133
+            // (should be preloaded because when using the relate_to field for updating/saving relationships,
134
+            // only the bean id is loaded into $rhs->$rhsLinkName)
135
+            $rhsLinkName = $this->rhsLink;
136
+            $rhs->load_relationship($rhsLinkName);
137 137
         	
138
-			// If it's a One2Many self-referencing relationship
139
-        	// the positions of the default One (LHS) and Many (RHS) are swaped
140
-        	// so we should clear the links from the many (left) side
141
-        	if ($this->selfReferencing) {
142
-        		// Load right hand side relationship name
143
-	            $linkName = $this->rhsLink;
144
-	            // Load the relationship into the left hand side bean
145
-	            $lhs->load_relationship($linkName);
138
+            // If it's a One2Many self-referencing relationship
139
+            // the positions of the default One (LHS) and Many (RHS) are swaped
140
+            // so we should clear the links from the many (left) side
141
+            if ($this->selfReferencing) {
142
+                // Load right hand side relationship name
143
+                $linkName = $this->rhsLink;
144
+                // Load the relationship into the left hand side bean
145
+                $lhs->load_relationship($linkName);
146 146
 	            
147
-	            // Pick the loaded link
148
-	            $link = $lhs->$linkName;
149
-	            // Get many (LHS) side bean
150
-	            $focus = $link->getFocus();
151
-	            // Get relations
152
-	        	$related = $link->getBeans();
147
+                // Pick the loaded link
148
+                $link = $lhs->$linkName;
149
+                // Get many (LHS) side bean
150
+                $focus = $link->getFocus();
151
+                // Get relations
152
+                $related = $link->getBeans();
153 153
 	        	
154
-        		// Clear the relations from many side bean
155
-	        	foreach($related as $relBean) {
156
-	        		$this->remove($focus, $relBean);
157
-	        	}
154
+                // Clear the relations from many side bean
155
+                foreach($related as $relBean) {
156
+                    $this->remove($focus, $relBean);
157
+                }
158 158
             } else { // For non self-referencing, remove all the relationships from the many (RHS) side
159
-            	$this->removeAll($rhs->$rhsLinkName);
159
+                $this->removeAll($rhs->$rhsLinkName);
160 160
             }
161 161
             
162 162
             // Add relationship
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	        	$related = $link->getBeans();
153 153
 	        	
154 154
         		// Clear the relations from many side bean
155
-	        	foreach($related as $relBean) {
155
+	        	foreach ($related as $relBean) {
156 156
 	        		$this->remove($focus, $relBean);
157 157
 	        	}
158 158
             } else { // For non self-referencing, remove all the relationships from the many (RHS) side
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -67,13 +69,13 @@  discard block
 block discarded – undo
67 69
             if (empty($links))
68 70
             {
69 71
                 $GLOBALS['log']->fatal("No Links found for relationship {$this->name}");
70
-            }
71
-            else {
72
-                if (!is_array($links)) //Only one link for a self referencing relationship, this is very bad.
72
+            } else {
73
+                if (!is_array($links)) {
74
+                    //Only one link for a self referencing relationship, this is very bad.
73 75
                 {
74 76
                     $this->lhsLinkDef = $this->rhsLinkDef = $links;
75 77
                 }
76
-                else if (!empty($links[0]) && !empty($links[1]))
78
+                } else if (!empty($links[0]) && !empty($links[1]))
77 79
                 {
78 80
 
79 81
                     if ((!empty($links[0]['side']) && $links[0]['side'] == "right")
Please login to merge, or discard this patch.
data/Relationships/RelationshipFactory.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -213,9 +213,9 @@
 block discarded – undo
213 213
         $buildingRelCache = false;
214 214
     }
215 215
 
216
-	protected function getCacheFile() {
217
-		return sugar_cached("Relationships/relationships.cache.php");
218
-	}
216
+    protected function getCacheFile() {
217
+        return sugar_cached("Relationships/relationships.cache.php");
218
+    }
219 219
 
220 220
 
221 221
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     protected $relationships;
53 53
 
54
-    protected function __construct(){
54
+    protected function __construct() {
55 55
         //Load the relationship definitions from the cache.
56 56
         $this->loadRelationships();
57 57
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public static function deleteCache()
76 76
     {
77 77
         $file = self::getInstance()->getCacheFile();
78
-        if(sugar_is_file($file))
78
+        if (sugar_is_file($file))
79 79
         {
80 80
             unlink($file);
81 81
         }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $def = $this->relationships[$relationshipName];
99 99
 
100 100
         $type = isset($def['true_relationship_type']) ? $def['true_relationship_type'] : $def['relationship_type'];
101
-        switch($type)
101
+        switch ($type)
102 102
         {
103 103
             case "many-to-many":
104 104
                 if (isset($def['rhs_module']) && $def['rhs_module'] == 'EmailAddresses')
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             case "one-to-many":
113 113
                 require_once("data/Relationships/One2MBeanRelationship.php");
114 114
                 //If a relationship has no table or join keys, it must be bean based
115
-                if (empty($def['true_relationship_type']) || (empty($def['table']) && empty($def['join_table'])) || empty($def['join_key_rhs'])){
115
+                if (empty($def['true_relationship_type']) || (empty($def['table']) && empty($def['join_table'])) || empty($def['join_key_rhs'])) {
116 116
                     return new One2MBeanRelationship($def);
117 117
                 }
118 118
                 else {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 }
121 121
                 break;
122 122
             case "one-to-one":
123
-                if (empty($def['true_relationship_type'])){
123
+                if (empty($def['true_relationship_type'])) {
124 124
                     require_once("data/Relationships/One2OneBeanRelationship.php");
125 125
                     return new One2OneBeanRelationship($def);
126 126
                 }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 break;
132 132
         }
133 133
 
134
-        $GLOBALS['log']->fatal ("$relationshipName had an unknown type $type ");
134
+        $GLOBALS['log']->fatal("$relationshipName had an unknown type $type ");
135 135
 
136 136
         return false;
137 137
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     protected function loadRelationships()
151 151
     {
152
-        if(sugar_is_file($this->getCacheFile()))
152
+        if (sugar_is_file($this->getCacheFile()))
153 153
         {
154 154
             include($this->getCacheFile());
155 155
             $this->relationships = $relationships;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         if (empty($beanList))
170 170
             include("include/modules.php");
171 171
         //Reload ALL the module vardefs....
172
-        foreach($beanList as $moduleName => $beanName)
172
+        foreach ($beanList as $moduleName => $beanName)
173 173
         {
174 174
             VardefManager::loadVardef($moduleName, BeanFactory::getObjectName($moduleName), false, array(
175 175
                 //If relationships are not yet loaded, we can't figure out the rel_calc_fields.
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
         {
185 185
             if (!empty($def['relationships']))
186 186
             {
187
-                foreach($def['relationships'] as $relKey => $relDef)
187
+                foreach ($def['relationships'] as $relKey => $relDef)
188 188
                 {
189 189
                     if ($key == $relKey) //Relationship only entry, we need to capture everything
190 190
                         $relationships[$key] = array_merge(array('name' => $key), (array)$def, (array)$relDef);
191 191
                     else {
192 192
                         $relationships[$relKey] = array_merge(array('name' => $relKey), (array)$relDef);
193
-                        if(!empty($relationships[$relKey]['join_table']) && empty($relationships[$relKey]['fields'])
193
+                        if (!empty($relationships[$relKey]['join_table']) && empty($relationships[$relKey]['fields'])
194 194
                             && isset($dictionary[$relationships[$relKey]['join_table']]['fields'])) {
195 195
                             $relationships[$relKey]['fields'] = $dictionary[$relationships[$relKey]['join_table']]['fields'];
196 196
                         }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         }
201 201
         //Save it out
202 202
         sugar_mkdir(dirname($this->getCacheFile()), null, true);
203
-        $out = "<?php \n \$relationships = " . var_export($relationships, true) . ";";
203
+        $out = "<?php \n \$relationships = ".var_export($relationships, true).";";
204 204
         sugar_file_put_contents_atomic($this->getCacheFile(), $out);
205 205
 
206 206
         $this->relationships = $relationships;
Please login to merge, or discard this patch.
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -62,8 +64,9 @@  discard block
 block discarded – undo
62 64
      */
63 65
     public static function getInstance()
64 66
     {
65
-        if (is_null(self::$rfInstance))
66
-            self::$rfInstance = new SugarRelationshipFactory();
67
+        if (is_null(self::$rfInstance)) {
68
+                    self::$rfInstance = new SugarRelationshipFactory();
69
+        }
67 70
         return self::$rfInstance;
68 71
     }
69 72
 
@@ -114,8 +117,7 @@  discard block
 block discarded – undo
114 117
                 //If a relationship has no table or join keys, it must be bean based
115 118
                 if (empty($def['true_relationship_type']) || (empty($def['table']) && empty($def['join_table'])) || empty($def['join_key_rhs'])){
116 119
                     return new One2MBeanRelationship($def);
117
-                }
118
-                else {
120
+                } else {
119 121
                     return new One2MRelationship($def);
120 122
                 }
121 123
                 break;
@@ -123,8 +125,7 @@  discard block
 block discarded – undo
123 125
                 if (empty($def['true_relationship_type'])){
124 126
                     require_once("data/Relationships/One2OneBeanRelationship.php");
125 127
                     return new One2OneBeanRelationship($def);
126
-                }
127
-                else {
128
+                } else {
128 129
                     require_once("data/Relationships/One2OneRelationship.php");
129 130
                     return new One2OneRelationship($def);
130 131
                 }
@@ -161,13 +162,15 @@  discard block
 block discarded – undo
161 162
     protected function buildRelationshipCache()
162 163
     {
163 164
         global $beanList, $dictionary, $buildingRelCache;
164
-        if ($buildingRelCache)
165
-            return;
165
+        if ($buildingRelCache) {
166
+                    return;
167
+        }
166 168
         $buildingRelCache = true;
167 169
         include("modules/TableDictionary.php");
168 170
 
169
-        if (empty($beanList))
170
-            include("include/modules.php");
171
+        if (empty($beanList)) {
172
+                    include("include/modules.php");
173
+        }
171 174
         //Reload ALL the module vardefs....
172 175
         foreach($beanList as $moduleName => $beanName)
173 176
         {
@@ -186,9 +189,10 @@  discard block
 block discarded – undo
186 189
             {
187 190
                 foreach($def['relationships'] as $relKey => $relDef)
188 191
                 {
189
-                    if ($key == $relKey) //Relationship only entry, we need to capture everything
192
+                    if ($key == $relKey) {
193
+                        //Relationship only entry, we need to capture everything
190 194
                         $relationships[$key] = array_merge(array('name' => $key), (array)$def, (array)$relDef);
191
-                    else {
195
+                    } else {
192 196
                         $relationships[$relKey] = array_merge(array('name' => $relKey), (array)$relDef);
193 197
                         if(!empty($relationships[$relKey]['join_table']) && empty($relationships[$relKey]['fields'])
194 198
                             && isset($dictionary[$relationships[$relKey]['join_table']]['fields'])) {
Please login to merge, or discard this patch.
data/Relationships/EmailAddressRelationship.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             } else {
154 154
                 $roleCheck .= " AND $table.bean_module";
155 155
             }
156
-            $roleCheck .= " = '" . $this->getLHSModule() . "'";
156
+            $roleCheck .= " = '".$this->getLHSModule()."'";
157 157
         }
158 158
 
159 159
         return $roleCheck;
Please login to merge, or discard this patch.
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -65,8 +67,9 @@  discard block
 block discarded – undo
65 67
             return false;
66 68
         }
67 69
 
68
-            if ($lhs->$lhsLinkName->beansAreLoaded())
69
-                $lhs->$lhsLinkName->addBean($rhs);
70
+            if ($lhs->$lhsLinkName->beansAreLoaded()) {
71
+                            $lhs->$lhsLinkName->addBean($rhs);
72
+            }
70 73
 
71 74
             $this->callBeforeAdd($lhs, $rhs, $lhsLinkName);
72 75
 
@@ -75,11 +78,13 @@  discard block
 block discarded – undo
75 78
 
76 79
         $this->addRow($dataToInsert);
77 80
 
78
-        if ($this->self_referencing)
79
-            $this->addSelfReferencing($lhs, $rhs, $additionalFields);
81
+        if ($this->self_referencing) {
82
+                    $this->addSelfReferencing($lhs, $rhs, $additionalFields);
83
+        }
80 84
 
81
-            if ($lhs->$lhsLinkName->beansAreLoaded())
82
-                $lhs->$lhsLinkName->addBean($rhs);
85
+            if ($lhs->$lhsLinkName->beansAreLoaded()) {
86
+                            $lhs->$lhsLinkName->addBean($rhs);
87
+            }
83 88
 
84 89
             $this->callAfterAdd($lhs, $rhs, $lhsLinkName);
85 90
 
@@ -120,8 +125,9 @@  discard block
 block discarded – undo
120 125
 
121 126
         $this->removeRow($dataToRemove);
122 127
 
123
-        if ($this->self_referencing)
124
-            $this->removeSelfReferencing($lhs, $rhs);
128
+        if ($this->self_referencing) {
129
+                    $this->removeSelfReferencing($lhs, $rhs);
130
+        }
125 131
 
126 132
         if (empty($_SESSION['disable_workflow']) || $_SESSION['disable_workflow'] != "Yes")
127 133
         {
Please login to merge, or discard this patch.
themes/SuiteR/css/colourSelector.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
     require_once('../../../config_override.php');
11 11
 }
12 12
 
13
-if(!isset($sugar_config['theme_settings']['SuiteR'])) return;
13
+if(!isset($sugar_config['theme_settings']['SuiteR'])) {
14
+    return;
15
+}
14 16
 
15 17
 //set file type back to css from php
16 18
 header("Content-type: text/css; charset: UTF-8");
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // config|_override.php
4
-if(is_file('../../../config.php')) {
4
+if (is_file('../../../config.php')) {
5 5
     require_once('../../../config.php');
6 6
 }
7 7
 
8 8
 // load up the config_override.php file.  This is used to provide default user settings
9
-if(is_file('../../../config_override.php')) {
9
+if (is_file('../../../config_override.php')) {
10 10
     require_once('../../../config_override.php');
11 11
 }
12 12
 
13
-if(!isset($sugar_config['theme_settings']['SuiteR'])) return;
13
+if (!isset($sugar_config['theme_settings']['SuiteR'])) return;
14 14
 
15 15
 //set file type back to css from php
16 16
 header("Content-type: text/css; charset: UTF-8");
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
 /* Dashlet CSS */
34 34
 
35 35
 .dashletPanel .h3Row{
36
-background: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet'];?>;
36
+background: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet']; ?>;
37 37
 }
38 38
 
39 39
 .dashletPanel .h3Row h3{
40
-color: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet_headertext'];?> !important;
40
+color: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet_headertext']; ?> !important;
41 41
 }
42 42
 
43 43
 .dashletPanel .h3Row .dashletToolSet .icon{
44
-fill: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet_headertext'];?> !important;
44
+fill: #<?php echo $sugar_config['theme_settings']['SuiteR']['dashlet_headertext']; ?> !important;
45 45
 }
46 46
 
47 47
 /* Top navigation bar CSS */
48 48
 
49 49
 .navbar-inverse {
50
-background:#<?php echo $sugar_config['theme_settings']['SuiteR']['navbar'];?> !important;
50
+background:#<?php echo $sugar_config['theme_settings']['SuiteR']['navbar']; ?> !important;
51 51
 }
52 52
 
53 53
 .headerlinks a:link, .headerlinks a:visited, .navbar-inverse .navbar-brand, .moremenu a,  a[id^=grouptab], a[id^=moduleTab] {
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 
76 76
 #searchform .btn
77 77
 {
78
-background:#<?php echo $sugar_config['theme_settings']['SuiteR']['navbar'];?> !important;
79
-color: #<?php echo $sugar_config['theme_settings']['SuiteR']['icon'];?> !important;
78
+background:#<?php echo $sugar_config['theme_settings']['SuiteR']['navbar']; ?> !important;
79
+color: #<?php echo $sugar_config['theme_settings']['SuiteR']['icon']; ?> !important;
80 80
 }
81 81
 
82 82
 #usermenu a{
Please login to merge, or discard this patch.
themes/Suite7/css/colourSelector.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // config|_override.php
4
-if(is_file('../../../config.php')) {
4
+if (is_file('../../../config.php')) {
5 5
     require_once('../../../config.php');
6 6
 }
7 7
 
8 8
 // load up the config_override.php file.  This is used to provide default user settings
9
-if(is_file('../../../config_override.php')) {
9
+if (is_file('../../../config_override.php')) {
10 10
     require_once('../../../config_override.php');
11 11
 }
12 12
 
13
-if(!isset($sugar_config['theme_settings']['Suite7'])) return;
13
+if (!isset($sugar_config['theme_settings']['Suite7'])) return;
14 14
 
15 15
 //set file type back to css from php
16 16
 header("Content-type: text/css; charset: UTF-8");
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
     require_once('../../../config_override.php');
11 11
 }
12 12
 
13
-if(!isset($sugar_config['theme_settings']['Suite7'])) return;
13
+if(!isset($sugar_config['theme_settings']['Suite7'])) {
14
+    return;
15
+}
14 16
 
15 17
 //set file type back to css from php
16 18
 header("Content-type: text/css; charset: UTF-8");
Please login to merge, or discard this patch.
soap.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
- if(!defined('sugarEntry'))define('sugarEntry', true);
2
+    if(!defined('sugarEntry'))define('sugarEntry', true);
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 //New API is in these files
67 67
 if(!empty($administrator->settings['portal_on'])) {
68
-	require_once('soap/SoapPortalUsers.php');
68
+    require_once('soap/SoapPortalUsers.php');
69 69
 }
70 70
 
71 71
 require_once('soap/SoapSugarUsers.php');
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
 $observers = $resourceManager->getObservers();
89 89
 //Call set_soap_server for SoapResourceObserver instance(s)
90 90
 foreach($observers as $observer) {
91
-   if(method_exists($observer, 'set_soap_server')) {
92
-   	  $observer->set_soap_server($server);
93
-   }
91
+    if(method_exists($observer, 'set_soap_server')) {
92
+            $observer->set_soap_server($server);
93
+    }
94 94
 }
95 95
 
96 96
 $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
- if(!defined('sugarEntry'))define('sugarEntry', true);
2
+ if (!defined('sugarEntry'))define('sugarEntry', true);
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $server->configureWSDL('sugarsoap', $NAMESPACE, $sugar_config['site_url'].'/soap.php');
65 65
 
66 66
 //New API is in these files
67
-if(!empty($administrator->settings['portal_on'])) {
67
+if (!empty($administrator->settings['portal_on'])) {
68 68
 	require_once('soap/SoapPortalUsers.php');
69 69
 }
70 70
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 /* Begin the HTTP listener service and exit. */
79 79
 ob_clean();
80 80
 
81
-if (!isset($HTTP_RAW_POST_DATA)){
81
+if (!isset($HTTP_RAW_POST_DATA)) {
82 82
     $HTTP_RAW_POST_DATA = file_get_contents('php://input');
83 83
 }
84 84
 
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 $resourceManager->setup('Soap');
88 88
 $observers = $resourceManager->getObservers();
89 89
 //Call set_soap_server for SoapResourceObserver instance(s)
90
-foreach($observers as $observer) {
91
-   if(method_exists($observer, 'set_soap_server')) {
90
+foreach ($observers as $observer) {
91
+   if (method_exists($observer, 'set_soap_server')) {
92 92
    	  $observer->set_soap_server($server);
93 93
    }
94 94
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@
 block discarded – undo
1 1
 <?php
2
- if(!defined('sugarEntry'))define('sugarEntry', true);
3
-/*********************************************************************************
2
+ if(!defined('sugarEntry')) {
3
+     define('sugarEntry', true);
4
+ }
5
+ /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
6 8
 
Please login to merge, or discard this patch.
modules/Connectors/InstallDefaultConnectors.php 3 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -40,26 +40,26 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
 $default_modules_sources = array (
43
-  'Accounts' =>
44
-  array (
45
-     'ext_rest_insideview' => 'ext_rest_insideview',
46
-  ),
47
-  'Contacts' =>
48
-  array (
49
-     'ext_rest_insideview' => 'ext_rest_insideview',
50
-  ),
51
-  'Leads' =>
52
-  array (
53
-     'ext_rest_insideview' => 'ext_rest_insideview',
54
-  ),
55
-  'Prospects' =>
56
-  array (
43
+    'Accounts' =>
44
+    array (
45
+        'ext_rest_insideview' => 'ext_rest_insideview',
46
+    ),
47
+    'Contacts' =>
48
+    array (
49
+        'ext_rest_insideview' => 'ext_rest_insideview',
50
+    ),
51
+    'Leads' =>
52
+    array (
53
+        'ext_rest_insideview' => 'ext_rest_insideview',
54
+    ),
55
+    'Prospects' =>
56
+    array (
57 57
 
58
-  ),
59
-  'Opportunities' =>
60
-  array (
58
+    ),
59
+    'Opportunities' =>
60
+    array (
61 61
     'ext_rest_insideview' => 'ext_rest_insideview',
62
-  ),
62
+    ),
63 63
 );
64 64
 
65 65
 $previous_connectors = array();
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 }
104 104
 
105 105
 if(!file_exists('custom/modules/Connectors/metadata')) {
106
-   mkdir_recursive('custom/modules/Connectors/metadata');
106
+    mkdir_recursive('custom/modules/Connectors/metadata');
107 107
 }
108 108
 
109 109
 if(!write_array_to_file('modules_sources', $default_modules_sources, 'custom/modules/Connectors/metadata/display_config.php')) {
110
-   $GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/display_config.php');
110
+    $GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/display_config.php');
111 111
 }
112 112
 
113 113
 ?>
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -39,34 +39,34 @@  discard block
 block discarded – undo
39 39
  ********************************************************************************/
40 40
 
41 41
 
42
-$default_modules_sources = array (
42
+$default_modules_sources = array(
43 43
   'Accounts' =>
44
-  array (
44
+  array(
45 45
      'ext_rest_insideview' => 'ext_rest_insideview',
46 46
   ),
47 47
   'Contacts' =>
48
-  array (
48
+  array(
49 49
      'ext_rest_insideview' => 'ext_rest_insideview',
50 50
   ),
51 51
   'Leads' =>
52
-  array (
52
+  array(
53 53
      'ext_rest_insideview' => 'ext_rest_insideview',
54 54
   ),
55 55
   'Prospects' =>
56
-  array (
56
+  array(
57 57
 
58 58
   ),
59 59
   'Opportunities' =>
60
-  array (
60
+  array(
61 61
     'ext_rest_insideview' => 'ext_rest_insideview',
62 62
   ),
63 63
 );
64 64
 
65 65
 $previous_connectors = array();
66
-if(file_exists('custom/modules/Connectors/metadata/connectors.php')){
66
+if (file_exists('custom/modules/Connectors/metadata/connectors.php')) {
67 67
     require('custom/modules/Connectors/metadata/connectors.php');
68 68
 
69
-    foreach($connectors as $connector_array){
69
+    foreach ($connectors as $connector_array) {
70 70
         $connector_id = $connector_array['id'];
71 71
         $previous_connectors[$connector_id] = $connector_id;
72 72
     }
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
 // Merge in old modules the customer added instead of overriding it completely with defaults
76 76
 // If they have customized their connectors modules
77
-if(file_exists('custom/modules/Connectors/metadata/display_config.php')){
77
+if (file_exists('custom/modules/Connectors/metadata/display_config.php')) {
78 78
     require('custom/modules/Connectors/metadata/display_config.php');
79 79
 
80 80
     // Remove the default settings from being copied over since they already existed
81
-    foreach($default_modules_sources as $module => $sources){
82
-        foreach($sources as $source_key => $source){
83
-            foreach($previous_connectors as $previous_connector){
84
-                if(in_array($previous_connector, $default_modules_sources[$module])){
81
+    foreach ($default_modules_sources as $module => $sources) {
82
+        foreach ($sources as $source_key => $source) {
83
+            foreach ($previous_connectors as $previous_connector) {
84
+                if (in_array($previous_connector, $default_modules_sources[$module])) {
85 85
                     unset($default_modules_sources[$module][$previous_connector]);
86 86
                 }
87 87
             }
@@ -89,24 +89,24 @@  discard block
 block discarded – undo
89 89
     }
90 90
 
91 91
     // Merge in the new connector default settings with the current settings
92
-    if ( isset($modules_sources) && is_array($modules_sources) ) {
93
-        foreach($modules_sources as $module => $sources){
94
-            if(!empty($default_modules_sources[$module])){
92
+    if (isset($modules_sources) && is_array($modules_sources)) {
93
+        foreach ($modules_sources as $module => $sources) {
94
+            if (!empty($default_modules_sources[$module])) {
95 95
                 $merged = array_merge($modules_sources[$module], $default_modules_sources[$module]);
96 96
                 $default_modules_sources[$module] = $merged;
97 97
             }
98
-            else{
98
+            else {
99 99
                 $default_modules_sources[$module] = $modules_sources[$module];
100 100
             }
101 101
         }
102 102
     }
103 103
 }
104 104
 
105
-if(!file_exists('custom/modules/Connectors/metadata')) {
105
+if (!file_exists('custom/modules/Connectors/metadata')) {
106 106
    mkdir_recursive('custom/modules/Connectors/metadata');
107 107
 }
108 108
 
109
-if(!write_array_to_file('modules_sources', $default_modules_sources, 'custom/modules/Connectors/metadata/display_config.php')) {
109
+if (!write_array_to_file('modules_sources', $default_modules_sources, 'custom/modules/Connectors/metadata/display_config.php')) {
110 110
    $GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/display_config.php');
111 111
 }
112 112
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -94,8 +96,7 @@  discard block
 block discarded – undo
94 96
             if(!empty($default_modules_sources[$module])){
95 97
                 $merged = array_merge($modules_sources[$module], $default_modules_sources[$module]);
96 98
                 $default_modules_sources[$module] = $merged;
97
-            }
98
-            else{
99
+            } else{
99 100
                 $default_modules_sources[$module] = $modules_sources[$module];
100 101
             }
101 102
         }
Please login to merge, or discard this patch.
modules/Connectors/action_view_map.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,16 +38,16 @@
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 
41
-$action_view_map['retrievesource']= 'retrievesource';
42
-$action_view_map['step1']= 'step1';
43
-$action_view_map['step2']= 'step2';
41
+$action_view_map['retrievesource'] = 'retrievesource';
42
+$action_view_map['step1'] = 'step1';
43
+$action_view_map['step2'] = 'step2';
44 44
 
45 45
 //Admin main page
46 46
 $action_view_map['connectorsettings'] = 'connectorsettings';
47 47
 
48 48
 //Admin pages for the connector properties
49 49
 $action_view_map['modifyproperties'] = 'modifyproperties';
50
-$action_view_map['sourceproperties']= 'sourceproperties';
50
+$action_view_map['sourceproperties'] = 'sourceproperties';
51 51
 
52 52
 //Admin pages to enable/disable connector for modules
53 53
 $action_view_map['modifydisplay'] = 'modifydisplay';
Please login to merge, or discard this patch.
modules/AOK_KnowledgeBase/language/en_us.lang.php 2 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -38,43 +38,43 @@
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $mod_strings = array (
41
-  'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
42
-  'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
43
-  'LBL_ID' => 'ID',
44
-  'LBL_DATE_ENTERED' => 'Date Created',
45
-  'LBL_DATE_MODIFIED' => 'Date Modified',
46
-  'LBL_MODIFIED' => 'Modified By',
47
-  'LBL_MODIFIED_ID' => 'Modified By Id',
48
-  'LBL_MODIFIED_NAME' => 'Modified By Name',
49
-  'LBL_CREATED' => 'Created By',
50
-  'LBL_CREATED_ID' => 'Created By Id',
51
-  'LBL_DESCRIPTION' => 'Body',
52
-  'LBL_ADDITIONAL_INFO' => 'Resolution',
53
-  'LBL_DELETED' => 'Deleted',
54
-  'LBL_NAME' => 'Title',
55
-  'LBL_CREATED_USER' => 'Created by User',
56
-  'LBL_MODIFIED_USER' => 'Modified by User',
57
-  'LBL_LIST_NAME' => 'Name',
58
-  'LBL_EDIT_BUTTON' => 'Edit',
59
-  'LBL_REMOVE' => 'Remove',
60
-  'LBL_LIST_FORM_TITLE' => 'Knowledge Base List',
61
-  'LBL_MODULE_NAME' => 'Knowledge Base',
62
-  'LBL_MODULE_TITLE' => 'Knowledge Base',
63
-  'LBL_HOMEPAGE_TITLE' => 'My Knowledge Base',
64
-  'LNK_NEW_RECORD' => 'Create Knowledge Base',
65
-  'LNK_LIST' => 'View Knowledge Base',
66
-  'LNK_IMPORT_AOK_KNOWLEDGEBASE' => 'Import Knowledge Base',
67
-  'LBL_SEARCH_FORM_TITLE' => 'Search Knowledge Base',
68
-  'LBL_HISTORY_SUBPANEL_TITLE' => 'View History',
69
-  'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
70
-  'LBL_AOK_KNOWLEDGEBASE_SUBPANEL_TITLE' => 'Knowledge Base',
71
-  'LBL_NEW_FORM_TITLE' => 'New Knowledge Base',
72
-  'LBL_STATUS' => 'Status',
73
-  'LBL_REVISION' => 'Revision',
74
-  'LBL_AUTHOR_USER_ID' => 'Author (related User ID)',
75
-  'LBL_AUTHOR' => 'Author',
76
-  'LBL_APPROVER_USER_ID' => 'Approver (related User ID)',
77
-  'LBL_APPROVER' => 'Approver',
41
+    'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
42
+    'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
43
+    'LBL_ID' => 'ID',
44
+    'LBL_DATE_ENTERED' => 'Date Created',
45
+    'LBL_DATE_MODIFIED' => 'Date Modified',
46
+    'LBL_MODIFIED' => 'Modified By',
47
+    'LBL_MODIFIED_ID' => 'Modified By Id',
48
+    'LBL_MODIFIED_NAME' => 'Modified By Name',
49
+    'LBL_CREATED' => 'Created By',
50
+    'LBL_CREATED_ID' => 'Created By Id',
51
+    'LBL_DESCRIPTION' => 'Body',
52
+    'LBL_ADDITIONAL_INFO' => 'Resolution',
53
+    'LBL_DELETED' => 'Deleted',
54
+    'LBL_NAME' => 'Title',
55
+    'LBL_CREATED_USER' => 'Created by User',
56
+    'LBL_MODIFIED_USER' => 'Modified by User',
57
+    'LBL_LIST_NAME' => 'Name',
58
+    'LBL_EDIT_BUTTON' => 'Edit',
59
+    'LBL_REMOVE' => 'Remove',
60
+    'LBL_LIST_FORM_TITLE' => 'Knowledge Base List',
61
+    'LBL_MODULE_NAME' => 'Knowledge Base',
62
+    'LBL_MODULE_TITLE' => 'Knowledge Base',
63
+    'LBL_HOMEPAGE_TITLE' => 'My Knowledge Base',
64
+    'LNK_NEW_RECORD' => 'Create Knowledge Base',
65
+    'LNK_LIST' => 'View Knowledge Base',
66
+    'LNK_IMPORT_AOK_KNOWLEDGEBASE' => 'Import Knowledge Base',
67
+    'LBL_SEARCH_FORM_TITLE' => 'Search Knowledge Base',
68
+    'LBL_HISTORY_SUBPANEL_TITLE' => 'View History',
69
+    'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
70
+    'LBL_AOK_KNOWLEDGEBASE_SUBPANEL_TITLE' => 'Knowledge Base',
71
+    'LBL_NEW_FORM_TITLE' => 'New Knowledge Base',
72
+    'LBL_STATUS' => 'Status',
73
+    'LBL_REVISION' => 'Revision',
74
+    'LBL_AUTHOR_USER_ID' => 'Author (related User ID)',
75
+    'LBL_AUTHOR' => 'Author',
76
+    'LBL_APPROVER_USER_ID' => 'Approver (related User ID)',
77
+    'LBL_APPROVER' => 'Approver',
78 78
 );
79 79
 
80 80
 $mod_strings['LBL_AOK_KB_CATEGORIES_TITLE'] = 'Categories';
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  * @author SalesAgility <[email protected]>
23 23
  */
24 24
 
25
-$mod_strings = array (
25
+$mod_strings = array(
26 26
   'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
27 27
   'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
28 28
   'LBL_ID' => 'ID',
Please login to merge, or discard this patch.