Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/Administration/updateTimezonePrefs.php 3 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
48 48
 $prompt_users = 'checked';
49 49
 if(isset($_POST['preview']) && !isset($_POST['prompt_users'])){
50
-	$prompt_users = '';
50
+    $prompt_users = '';
51 51
 }
52 52
 
53 53
 
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 $execute = false;
56 56
 // loop through user preferences and check for "bad" elements; rebuild preferences array and update database
57 57
 if(isset($_POST['execute'])){
58
-	$execute = true;
58
+    $execute = true;
59 59
 }
60 60
 $serverTimeZone = lookupTimezone(0);
61 61
 while ($row = $db->fetchByAssoc($result)) {
62
-	$adjustment = 'none';
62
+    $adjustment = 'none';
63 63
 
64
-	if(isset($_POST[$row['id'].'adjust'])){
65
-		$adjustment = $_POST[$row['id'].'adjust'];
66
-	}
64
+    if(isset($_POST[$row['id'].'adjust'])){
65
+        $adjustment = $_POST[$row['id'].'adjust'];
66
+    }
67 67
 	
68
-		$string = "Preview";
69
-		if($execute)$string = "Updating";
68
+        $string = "Preview";
69
+        if($execute)$string = "Updating";
70 70
         echo "<tr><td> $string timezone preferences for user <b>{$row['user_name']}</b>...</td><td>";
71 71
 		
72 72
         
@@ -76,84 +76,84 @@  discard block
 block discarded – undo
76 76
         $prefs = unserialize(base64_decode($row['user_preferences']));
77 77
         $setTo = '';
78 78
         $alreadySet = '';
79
-		if(!empty($prefs)){
79
+        if(!empty($prefs)){
80 80
 			
81
-	        foreach ($prefs as $key => $val) {
82
-	               if ($key == 'timez') {
83
-	                	if(empty($prefs['timezone']) && $val != ''){
84
-		                	$hourAdjust = $adjustment;
85
-		                	if($hourAdjust == 'none'){
86
-								$hourAdjust = 0;
87
-							}
88
-	                		$selectedZone = lookupTimezone($prefs['timez'] + $hourAdjust);
81
+            foreach ($prefs as $key => $val) {
82
+                    if ($key == 'timez') {
83
+                        if(empty($prefs['timezone']) && $val != ''){
84
+                            $hourAdjust = $adjustment;
85
+                            if($hourAdjust == 'none'){
86
+                                $hourAdjust = 0;
87
+                            }
88
+                            $selectedZone = lookupTimezone($prefs['timez'] + $hourAdjust);
89 89
 	                	
90
-	                	if(!empty($selectedZone)){
91
-	                   	 	$newprefs['timezone'] = $selectedZone;   
92
-	                   	 	$newprefs['timez']  = $val;
93
-	                   	 	$setTo = $selectedZone;
94
-	                   	 	if(empty($prompt_users)){
95
-	                   			$newprefs['ut']=1;
96
-	                   	 	}else{
97
-	                   	 		$newprefs['ut']=0;
98
-	                   	 	}
99
-	                	}else{
100
-	                		$newprefs['timezone'] = $serverTimeZone;   
101
-	                   	 	$newprefs['timez']  = $val;
102
-	                   	 	$setTo = $serverTimeZone;
103
-	                   	 	if(empty($prompt_users)){
104
-	                   			$newprefs['ut']=1;
105
-	                   	 	}else{
106
-	                   	 		$newprefs['ut']=0;
107
-	                   	 	}
108
-	                	}
109
-	                }else{
110
-	                	$newprefs[$key] = $val;
111
-	                	if(!empty($prefs['timezone'])){
112
-	                		$alreadySet = 'Previously Set - '. $prefs['timezone'];	
113
-	                	}
114
-	                }
90
+                        if(!empty($selectedZone)){
91
+                                $newprefs['timezone'] = $selectedZone;   
92
+                                $newprefs['timez']  = $val;
93
+                                $setTo = $selectedZone;
94
+                                if(empty($prompt_users)){
95
+                                    $newprefs['ut']=1;
96
+                                }else{
97
+                                    $newprefs['ut']=0;
98
+                                }
99
+                        }else{
100
+                            $newprefs['timezone'] = $serverTimeZone;   
101
+                                $newprefs['timez']  = $val;
102
+                                $setTo = $serverTimeZone;
103
+                                if(empty($prompt_users)){
104
+                                    $newprefs['ut']=1;
105
+                                }else{
106
+                                    $newprefs['ut']=0;
107
+                                }
108
+                        }
109
+                    }else{
110
+                        $newprefs[$key] = $val;
111
+                        if(!empty($prefs['timezone'])){
112
+                            $alreadySet = 'Previously Set - '. $prefs['timezone'];	
113
+                        }
114
+                    }
115 115
 	                
116 116
 	         
117
-	                }else{
118
-	                	$newprefs[$key] = $val;
119
-	                }
120
-	        }
121
-	        	if($execute){
122
-        			$newstr = mysql_real_escape_string(base64_encode(serialize($newprefs)));
123
-       				$db->query("UPDATE users SET user_preferences = '{$newstr}' WHERE id = '{$row['id']}'");
124
-	        	}
125
-	        }
126
-		if(!empty($setTo)){
127
-			echo $setTo;
128
-		}else{
129
-			if(!empty($alreadySet)){
130
-				echo $alreadySet;
131
-			}else{
132
-				echo $serverTimeZone;
133
-				$prefs['timezone'] = $serverTimeZone;
134
-			}
135
-		}
117
+                    }else{
118
+                        $newprefs[$key] = $val;
119
+                    }
120
+            }
121
+                if($execute){
122
+                    $newstr = mysql_real_escape_string(base64_encode(serialize($newprefs)));
123
+                        $db->query("UPDATE users SET user_preferences = '{$newstr}' WHERE id = '{$row['id']}'");
124
+                }
125
+            }
126
+        if(!empty($setTo)){
127
+            echo $setTo;
128
+        }else{
129
+            if(!empty($alreadySet)){
130
+                echo $alreadySet;
131
+            }else{
132
+                echo $serverTimeZone;
133
+                $prefs['timezone'] = $serverTimeZone;
134
+            }
135
+        }
136 136
         echo "</td><td>";
137 137
         if(!empty($setTo)){
138
-        	echo "Adjust: ";
138
+            echo "Adjust: ";
139 139
         if($execute){
140
-			if(isset($_POST[$row['id'].'adjust'])){
141
-				echo  $adjustment;
142
-			}
143
-		}else{
144
-			echo "<select name='{$row['id']}adjust'>";
140
+            if(isset($_POST[$row['id'].'adjust'])){
141
+                echo  $adjustment;
142
+            }
143
+        }else{
144
+            echo "<select name='{$row['id']}adjust'>";
145 145
 			
146
-			echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
147
-			echo '</select>';
146
+            echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
147
+            echo '</select>';
148 148
 
149
-		}
150
-		echo ' hour';
151 149
         }
152
-		echo ' </td><td>';
150
+        echo ' hour';
151
+        }
152
+        echo ' </td><td>';
153 153
         echo "</tr>";
154 154
 
155
-		$the_old_prefs[] = $prefs;
156
-		$the_new_prefs[] = $newprefs;
155
+        $the_old_prefs[] = $prefs;
156
+        $the_new_prefs[] = $newprefs;
157 157
 
158 158
         unset($prefs);
159 159
         unset($newprefs);
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 echo "</table>";
164 164
 
165 165
 if($execute){
166
-	echo "<br>All timezone preferences updated!<br><br>";
166
+    echo "<br>All timezone preferences updated!<br><br>";
167 167
 	
168 168
 }else{
169
-	echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170
-	echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
169
+    echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170
+    echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
171 171
 	
172 172
 }
173 173
 echo "&nbsp;<input class='button' type='button' name='Done' value='Done' onclick='document.location.href=\"index.php?action=DstFix&module=Administration\"'>";
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
 <table>
46 46
 <?php
47
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
47
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
48 48
 $prompt_users = 'checked';
49
-if(isset($_POST['preview']) && !isset($_POST['prompt_users'])){
49
+if (isset($_POST['preview']) && !isset($_POST['prompt_users'])) {
50 50
 	$prompt_users = '';
51 51
 }
52 52
 
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
 $result = $db->query("SELECT id, user_preferences, user_name FROM users");
55 55
 $execute = false;
56 56
 // loop through user preferences and check for "bad" elements; rebuild preferences array and update database
57
-if(isset($_POST['execute'])){
57
+if (isset($_POST['execute'])) {
58 58
 	$execute = true;
59 59
 }
60 60
 $serverTimeZone = lookupTimezone(0);
61 61
 while ($row = $db->fetchByAssoc($result)) {
62 62
 	$adjustment = 'none';
63 63
 
64
-	if(isset($_POST[$row['id'].'adjust'])){
64
+	if (isset($_POST[$row['id'].'adjust'])) {
65 65
 		$adjustment = $_POST[$row['id'].'adjust'];
66 66
 	}
67 67
 	
68 68
 		$string = "Preview";
69
-		if($execute)$string = "Updating";
69
+		if ($execute)$string = "Updating";
70 70
         echo "<tr><td> $string timezone preferences for user <b>{$row['user_name']}</b>...</td><td>";
71 71
 		
72 72
         
@@ -76,71 +76,71 @@  discard block
 block discarded – undo
76 76
         $prefs = unserialize(base64_decode($row['user_preferences']));
77 77
         $setTo = '';
78 78
         $alreadySet = '';
79
-		if(!empty($prefs)){
79
+		if (!empty($prefs)) {
80 80
 			
81 81
 	        foreach ($prefs as $key => $val) {
82 82
 	               if ($key == 'timez') {
83
-	                	if(empty($prefs['timezone']) && $val != ''){
83
+	                	if (empty($prefs['timezone']) && $val != '') {
84 84
 		                	$hourAdjust = $adjustment;
85
-		                	if($hourAdjust == 'none'){
85
+		                	if ($hourAdjust == 'none') {
86 86
 								$hourAdjust = 0;
87 87
 							}
88 88
 	                		$selectedZone = lookupTimezone($prefs['timez'] + $hourAdjust);
89 89
 	                	
90
-	                	if(!empty($selectedZone)){
90
+	                	if (!empty($selectedZone)) {
91 91
 	                   	 	$newprefs['timezone'] = $selectedZone;   
92
-	                   	 	$newprefs['timez']  = $val;
92
+	                   	 	$newprefs['timez'] = $val;
93 93
 	                   	 	$setTo = $selectedZone;
94
-	                   	 	if(empty($prompt_users)){
95
-	                   			$newprefs['ut']=1;
96
-	                   	 	}else{
97
-	                   	 		$newprefs['ut']=0;
94
+	                   	 	if (empty($prompt_users)) {
95
+	                   			$newprefs['ut'] = 1;
96
+	                   	 	} else {
97
+	                   	 		$newprefs['ut'] = 0;
98 98
 	                   	 	}
99
-	                	}else{
99
+	                	} else {
100 100
 	                		$newprefs['timezone'] = $serverTimeZone;   
101
-	                   	 	$newprefs['timez']  = $val;
101
+	                   	 	$newprefs['timez'] = $val;
102 102
 	                   	 	$setTo = $serverTimeZone;
103
-	                   	 	if(empty($prompt_users)){
104
-	                   			$newprefs['ut']=1;
105
-	                   	 	}else{
106
-	                   	 		$newprefs['ut']=0;
103
+	                   	 	if (empty($prompt_users)) {
104
+	                   			$newprefs['ut'] = 1;
105
+	                   	 	} else {
106
+	                   	 		$newprefs['ut'] = 0;
107 107
 	                   	 	}
108 108
 	                	}
109
-	                }else{
109
+	                } else {
110 110
 	                	$newprefs[$key] = $val;
111
-	                	if(!empty($prefs['timezone'])){
112
-	                		$alreadySet = 'Previously Set - '. $prefs['timezone'];	
111
+	                	if (!empty($prefs['timezone'])) {
112
+	                		$alreadySet = 'Previously Set - '.$prefs['timezone'];	
113 113
 	                	}
114 114
 	                }
115 115
 	                
116 116
 	         
117
-	                }else{
117
+	                } else {
118 118
 	                	$newprefs[$key] = $val;
119 119
 	                }
120 120
 	        }
121
-	        	if($execute){
121
+	        	if ($execute) {
122 122
         			$newstr = mysql_real_escape_string(base64_encode(serialize($newprefs)));
123 123
        				$db->query("UPDATE users SET user_preferences = '{$newstr}' WHERE id = '{$row['id']}'");
124 124
 	        	}
125 125
 	        }
126
-		if(!empty($setTo)){
126
+		if (!empty($setTo)) {
127 127
 			echo $setTo;
128
-		}else{
129
-			if(!empty($alreadySet)){
128
+		} else {
129
+			if (!empty($alreadySet)) {
130 130
 				echo $alreadySet;
131
-			}else{
131
+			} else {
132 132
 				echo $serverTimeZone;
133 133
 				$prefs['timezone'] = $serverTimeZone;
134 134
 			}
135 135
 		}
136 136
         echo "</td><td>";
137
-        if(!empty($setTo)){
137
+        if (!empty($setTo)) {
138 138
         	echo "Adjust: ";
139
-        if($execute){
140
-			if(isset($_POST[$row['id'].'adjust'])){
139
+        if ($execute) {
140
+			if (isset($_POST[$row['id'].'adjust'])) {
141 141
 				echo  $adjustment;
142 142
 			}
143
-		}else{
143
+		} else {
144 144
 			echo "<select name='{$row['id']}adjust'>";
145 145
 			
146 146
 			echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
@@ -162,10 +162,10 @@  discard block
 block discarded – undo
162 162
 
163 163
 echo "</table>";
164 164
 
165
-if($execute){
165
+if ($execute) {
166 166
 	echo "<br>All timezone preferences updated!<br><br>";
167 167
 	
168
-}else{
168
+} else {
169 169
 	echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170 170
 	echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
171 171
 	
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
 <table>
46 46
 <?php
47
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
47
+if(!defined('sugarEntry') || !sugarEntry) {
48
+    die('Not A Valid Entry Point');
49
+}
48 50
 $prompt_users = 'checked';
49 51
 if(isset($_POST['preview']) && !isset($_POST['prompt_users'])){
50 52
 	$prompt_users = '';
@@ -66,7 +68,9 @@  discard block
 block discarded – undo
66 68
 	}
67 69
 	
68 70
 		$string = "Preview";
69
-		if($execute)$string = "Updating";
71
+		if($execute) {
72
+		    $string = "Updating";
73
+		}
70 74
         echo "<tr><td> $string timezone preferences for user <b>{$row['user_name']}</b>...</td><td>";
71 75
 		
72 76
         
@@ -93,20 +97,20 @@  discard block
 block discarded – undo
93 97
 	                   	 	$setTo = $selectedZone;
94 98
 	                   	 	if(empty($prompt_users)){
95 99
 	                   			$newprefs['ut']=1;
96
-	                   	 	}else{
100
+	                   	 	} else{
97 101
 	                   	 		$newprefs['ut']=0;
98 102
 	                   	 	}
99
-	                	}else{
103
+	                	} else{
100 104
 	                		$newprefs['timezone'] = $serverTimeZone;   
101 105
 	                   	 	$newprefs['timez']  = $val;
102 106
 	                   	 	$setTo = $serverTimeZone;
103 107
 	                   	 	if(empty($prompt_users)){
104 108
 	                   			$newprefs['ut']=1;
105
-	                   	 	}else{
109
+	                   	 	} else{
106 110
 	                   	 		$newprefs['ut']=0;
107 111
 	                   	 	}
108 112
 	                	}
109
-	                }else{
113
+	                } else{
110 114
 	                	$newprefs[$key] = $val;
111 115
 	                	if(!empty($prefs['timezone'])){
112 116
 	                		$alreadySet = 'Previously Set - '. $prefs['timezone'];	
@@ -114,7 +118,7 @@  discard block
 block discarded – undo
114 118
 	                }
115 119
 	                
116 120
 	         
117
-	                }else{
121
+	                } else{
118 122
 	                	$newprefs[$key] = $val;
119 123
 	                }
120 124
 	        }
@@ -125,10 +129,10 @@  discard block
 block discarded – undo
125 129
 	        }
126 130
 		if(!empty($setTo)){
127 131
 			echo $setTo;
128
-		}else{
132
+		} else{
129 133
 			if(!empty($alreadySet)){
130 134
 				echo $alreadySet;
131
-			}else{
135
+			} else{
132 136
 				echo $serverTimeZone;
133 137
 				$prefs['timezone'] = $serverTimeZone;
134 138
 			}
@@ -140,7 +144,7 @@  discard block
 block discarded – undo
140 144
 			if(isset($_POST[$row['id'].'adjust'])){
141 145
 				echo  $adjustment;
142 146
 			}
143
-		}else{
147
+		} else{
144 148
 			echo "<select name='{$row['id']}adjust'>";
145 149
 			
146 150
 			echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
@@ -165,7 +169,7 @@  discard block
 block discarded – undo
165 169
 if($execute){
166 170
 	echo "<br>All timezone preferences updated!<br><br>";
167 171
 	
168
-}else{
172
+} else{
169 173
 	echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170 174
 	echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
171 175
 	
Please login to merge, or discard this patch.
modules/InboundEmail/AOPInboundEmail.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1 1
 <?php
2
- /**
3
- * 
4
- * 
5
- * @package 
6
- * @copyright SalesAgility Ltd http://www.salesagility.com
7
- * 
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
10
- * the Free Software Foundation; either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
19
- * along with this program; if not, see http://www.gnu.org/licenses
20
- * or write to the Free Software Foundation,Inc., 51 Franklin Street,
21
- * Fifth Floor, Boston, MA 02110-1301  USA
22
- *
23
- * @author Salesagility Ltd <[email protected]>
24
- */
2
+    /**
3
+     * 
4
+     * 
5
+     * @package 
6
+     * @copyright SalesAgility Ltd http://www.salesagility.com
7
+     * 
8
+     * This program is free software; you can redistribute it and/or modify
9
+     * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
10
+     * the Free Software Foundation; either version 3 of the License, or
11
+     * (at your option) any later version.
12
+     *
13
+     * This program is distributed in the hope that it will be useful,
14
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+     * GNU General Public License for more details.
17
+     *
18
+     * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
19
+     * along with this program; if not, see http://www.gnu.org/licenses
20
+     * or write to the Free Software Foundation,Inc., 51 Franklin Street,
21
+     * Fifth Floor, Boston, MA 02110-1301  USA
22
+     *
23
+     * @author Salesagility Ltd <[email protected]>
24
+     */
25 25
 require_once 'modules/InboundEmail/InboundEmail.php';
26 26
 require_once 'include/clean.php';
27 27
 class AOPInboundEmail extends InboundEmail {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             }
74 74
             if($email->description_html) {
75 75
                 $c->description = $this->processImageLinks(SugarCleaner::cleanHtml($email->description_html),$noteIds);
76
-            }else{
76
+            } else{
77 77
                 $c->description = $email->description;
78 78
             }
79 79
             $c->assigned_user_id = $userId;
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
      * @param $noteIds A whitelist of note ids to replace
33 33
      * @return mixed
34 34
      */
35
-    function processImageLinks($string, $noteIds){
35
+    function processImageLinks($string, $noteIds) {
36 36
         global $sugar_config;
37
-        if(!$noteIds){
37
+        if (!$noteIds) {
38 38
             return $string;
39 39
         }
40 40
         $matches = array();
41
-        preg_match('/cid:([[:alnum:]-]*)/',$string,$matches);
42
-        if(!$matches){
41
+        preg_match('/cid:([[:alnum:]-]*)/', $string, $matches);
42
+        if (!$matches) {
43 43
             return $string;
44 44
         }
45 45
         array_shift($matches);
46 46
         $matches = array_unique($matches);
47
-        foreach($matches as $match){
48
-            if(in_array($match,$noteIds)){
49
-                $string = str_replace('cid:'.$match,$sugar_config['site_url']."/index.php?entryPoint=download&id={$match}&type=Notes&",$string);
47
+        foreach ($matches as $match) {
48
+            if (in_array($match, $noteIds)) {
49
+                $string = str_replace('cid:'.$match, $sugar_config['site_url']."/index.php?entryPoint=download&id={$match}&type=Notes&", $string);
50 50
             }
51 51
         }
52 52
         return $string;
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
             $email->retrieve($email->id);
67 67
             $c = new aCase();
68 68
 
69
-            $notes = $email->get_linked_beans('notes','Notes');
69
+            $notes = $email->get_linked_beans('notes', 'Notes');
70 70
             $noteIds = array();
71
-            foreach($notes as $note){
71
+            foreach ($notes as $note) {
72 72
                 $noteIds[] = $note->id;
73 73
             }
74
-            if($email->description_html) {
75
-                $c->description = $this->processImageLinks(SugarCleaner::cleanHtml($email->description_html),$noteIds);
76
-            }else{
74
+            if ($email->description_html) {
75
+                $c->description = $this->processImageLinks(SugarCleaner::cleanHtml($email->description_html), $noteIds);
76
+            } else {
77 77
                 $c->description = $email->description;
78 78
             }
79 79
             $c->assigned_user_id = $userId;
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
             $c->status = 'New';
82 82
             $c->priority = 'P1';
83 83
 
84
-            if(!empty($email->reply_to_email)) {
84
+            if (!empty($email->reply_to_email)) {
85 85
                 $contactAddr = $email->reply_to_email;
86 86
             } else {
87 87
                 $contactAddr = $email->from_addr;
88 88
             }
89 89
 
90
-            $GLOBALS['log']->debug('finding related accounts with address ' . $contactAddr);
91
-            if($accountIds = $this->getRelatedId($contactAddr, 'accounts')) {
90
+            $GLOBALS['log']->debug('finding related accounts with address '.$contactAddr);
91
+            if ($accountIds = $this->getRelatedId($contactAddr, 'accounts')) {
92 92
                 if (sizeof($accountIds) == 1) {
93 93
                     $c->account_id = $accountIds[0];
94 94
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 } // if
99 99
             } // if
100 100
             $contactIds = $this->getRelatedId($contactAddr, 'contacts');
101
-            if(!empty($contactIds)) {
101
+            if (!empty($contactIds)) {
102 102
                 $c->contact_created_by_id = $contactIds[0];
103 103
             }
104 104
 
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
             $caseId = $c->id;
107 107
             $c = new aCase();
108 108
             $c->retrieve($caseId);
109
-            if($c->load_relationship('emails')) {
109
+            if ($c->load_relationship('emails')) {
110 110
                 $c->emails->add($email->id);
111 111
             } // if
112
-                if(!empty($contactIds) && $c->load_relationship('contacts')) {
112
+                if (!empty($contactIds) && $c->load_relationship('contacts')) {
113 113
                     if (!$accountIds && count($contactIds) == 1) {
114 114
                         $contact = BeanFactory::getBean('Contacts', $contactIds[0]);
115 115
                         if ($contact->load_relationship('accounts')) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                     }
122 122
                     $c->contacts->add($contactIds);
123 123
                 } // if
124
-            foreach($notes as $note){
124
+            foreach ($notes as $note) {
125 125
                 //Link notes to case also
126 126
                 $newNote = BeanFactory::newBean('Notes');
127 127
                 $newNote->name = $note->name;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 $newNote->save();
133 133
                 $srcFile = "upload://{$note->id}";
134 134
                 $destFile = "upload://{$newNote->id}";
135
-                copy($srcFile,$destFile);
135
+                copy($srcFile, $destFile);
136 136
 
137 137
             }
138 138
 
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
             $email->parent_id = $caseId;
142 142
             // assign the email to the case owner
143 143
             $email->assigned_user_id = $c->assigned_user_id;
144
-            $email->name = str_replace('%1', $c->case_number, $c->getEmailSubjectMacro()) . " ". $email->name;
144
+            $email->name = str_replace('%1', $c->case_number, $c->getEmailSubjectMacro())." ".$email->name;
145 145
             $email->save();
146 146
             $GLOBALS['log']->debug('InboundEmail created one case with number: '.$c->case_number);
147 147
             $createCaseTemplateId = $this->get_stored_options('create_case_email_template', "");
148
-            if(!empty($this->stored_options)) {
148
+            if (!empty($this->stored_options)) {
149 149
                 $storedOptions = unserialize(base64_decode($this->stored_options));
150 150
             }
151
-            if(!empty($createCaseTemplateId)) {
151
+            if (!empty($createCaseTemplateId)) {
152 152
                 $fromName = "";
153 153
                 $fromAddress = "";
154 154
                 if (!empty($this->stored_options)) {
155 155
                     $fromAddress = $storedOptions['from_addr'];
156 156
                     $fromName = from_html($storedOptions['from_name']);
157
-                    $replyToName = (!empty($storedOptions['reply_to_name']))? from_html($storedOptions['reply_to_name']) :$fromName ;
157
+                    $replyToName = (!empty($storedOptions['reply_to_name'])) ? from_html($storedOptions['reply_to_name']) : $fromName;
158 158
                     $replyToAddr = (!empty($storedOptions['reply_to_addr'])) ? $storedOptions['reply_to_addr'] : $fromAddress;
159 159
                 } // if
160 160
                 $defaults = $current_user->getPreferredEmail();
@@ -163,19 +163,19 @@  discard block
 block discarded – undo
163 163
                 $to[0]['email'] = $contactAddr;
164 164
 
165 165
                 // handle to name: address, prefer reply-to
166
-                if(!empty($email->reply_to_name)) {
166
+                if (!empty($email->reply_to_name)) {
167 167
                     $to[0]['display'] = $email->reply_to_name;
168
-                } elseif(!empty($email->from_name)) {
168
+                } elseif (!empty($email->from_name)) {
169 169
                     $to[0]['display'] = $email->from_name;
170 170
                 }
171 171
 
172 172
                 $et = new EmailTemplate();
173 173
                 $et->retrieve($createCaseTemplateId);
174
-                if(empty($et->subject))		{ $et->subject = ''; }
175
-                if(empty($et->body))		{ $et->body = ''; }
176
-                if(empty($et->body_html))	{ $et->body_html = ''; }
174
+                if (empty($et->subject)) { $et->subject = ''; }
175
+                if (empty($et->body)) { $et->body = ''; }
176
+                if (empty($et->body_html)) { $et->body_html = ''; }
177 177
 
178
-                $et->subject = "Re:" . " " . str_replace('%1', $c->case_number, $c->getEmailSubjectMacro() . " ". $c->name);
178
+                $et->subject = "Re:"." ".str_replace('%1', $c->case_number, $c->getEmailSubjectMacro()." ".$c->name);
179 179
 
180 180
                 $html = trim($email->description_html);
181 181
                 $plain = trim($email->description);
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                 $ret['description'] = empty($email->description_html) ?  str_replace("\n", "\n<BR/>", $email->description) : $email->description_html;
193 193
 
194 194
                 $reply = new Email();
195
-                $reply->type				= 'out';
196
-                $reply->to_addrs			= $to[0]['email'];
195
+                $reply->type = 'out';
196
+                $reply->to_addrs = $to[0]['email'];
197 197
                 $reply->to_addrs_arr		= $to;
198 198
                 $reply->cc_addrs_arr		= array();
199 199
                 $reply->bcc_addrs_arr		= array();
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
                 $reply->from_addr			= $fromAddress;
202 202
                 $reply->reply_to_name		= $replyToName;
203 203
                 $reply->reply_to_addr		= $replyToAddr;
204
-                $reply->name				= $et->subject;
205
-                $reply->description			= $et->body . "<div><hr /></div>" .  $email->description;
204
+                $reply->name = $et->subject;
205
+                $reply->description = $et->body."<div><hr /></div>".$email->description;
206 206
                 if (!$et->text_only) {
207
-                    $reply->description_html	= $et->body_html .  "<div><hr /></div>" . $email->description;
207
+                    $reply->description_html = $et->body_html."<div><hr /></div>".$email->description;
208 208
                 }
209 209
                 $GLOBALS['log']->debug('saving and sending auto-reply email');
210 210
                 //$reply->save(); // don't save the actual email.
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
         } else {
215 215
             echo "First if not matching\n";
216
-            if(!empty($email->reply_to_email)) {
216
+            if (!empty($email->reply_to_email)) {
217 217
                 $contactAddr = $email->reply_to_email;
218 218
             } else {
219 219
                 $contactAddr = $email->from_addr;
Please login to merge, or discard this patch.
modules/InboundEmail/ShowInboundFoldersList.php 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
  * Description:
44 44
  ********************************************************************************/
45
- // hack to allow "&", "%" and "+" through a $_GET var
45
+    // hack to allow "&", "%" and "+" through a $_GET var
46 46
 // set by ie_test_open_popup() javascript call
47 47
 foreach($_REQUEST as $k => $v) {
48
-	$v = str_replace('::amp::', '&', $v);
49
-	$v = str_replace('::plus::', '+', $v);
50
-	$v = str_replace('::percent::', '%', $v);
51
-	$_REQUEST[$k] = $v;
48
+    $v = str_replace('::amp::', '&', $v);
49
+    $v = str_replace('::plus::', '+', $v);
50
+    $v = str_replace('::percent::', '%', $v);
51
+    $_REQUEST[$k] = $v;
52 52
 }
53 53
 
54 54
 require_once('modules/InboundEmail/language/en_us.lang.php');
@@ -79,33 +79,33 @@  discard block
 block discarded – undo
79 79
 
80 80
 $popupBoolean = false;
81 81
 if (isset($_REQUEST['target']) && $_REQUEST['target'] == 'Popup') {
82
-	$popupBoolean = true;
82
+    $popupBoolean = true;
83 83
 }
84 84
 if (isset($_REQUEST['target1']) && $_REQUEST['target1'] == 'Popup') {
85
-	$popupBoolean = true;
85
+    $popupBoolean = true;
86 86
 }
87 87
 
88 88
 if($popupBoolean) {
89
-	$title = $mod_strings['LBL_SELECT_SUBSCRIBED_FOLDERS'];
90
-	$msg = $mod_strings['LBL_TEST_WAIT_MESSAGE'];
89
+    $title = $mod_strings['LBL_SELECT_SUBSCRIBED_FOLDERS'];
90
+    $msg = $mod_strings['LBL_TEST_WAIT_MESSAGE'];
91 91
 }
92 92
 
93 93
 $subdcriptionFolderHelp = $app_strings['LBL_EMAIL_SUBSCRIPTION_FOLDER_HELP'];
94 94
 
95 95
 if(isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) {
96
-	$useSsl = true;
96
+    $useSsl = true;
97 97
 }
98 98
 
99 99
 $searchField = !empty($_REQUEST['searchField']) ? $_REQUEST['searchField'] : "";
100 100
 $multipleString = "multiple=\"true\"";
101 101
 if (!empty($searchField)) {
102
-	$subdcriptionFolderHelp = "";
103
-	$multipleString = "";
104
-	if ($searchField == 'trash') {
105
-		$title = $mod_strings['LBL_SELECT_TRASH_FOLDERS'];
106
-	} else {
107
-		$title = $mod_strings['LBL_SELECT_SENT_FOLDERS'];
108
-	} // else
102
+    $subdcriptionFolderHelp = "";
103
+    $multipleString = "";
104
+    if ($searchField == 'trash') {
105
+        $title = $mod_strings['LBL_SELECT_TRASH_FOLDERS'];
106
+    } else {
107
+        $title = $mod_strings['LBL_SELECT_SENT_FOLDERS'];
108
+    } // else
109 109
 
110 110
 } // else
111 111
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 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.
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  ********************************************************************************/
45 45
  // hack to allow "&", "%" and "+" through a $_GET var
46 46
 // set by ie_test_open_popup() javascript call
47
-foreach($_REQUEST as $k => $v) {
47
+foreach ($_REQUEST as $k => $v) {
48 48
 	$v = str_replace('::amp::', '&', $v);
49 49
 	$v = str_replace('::plus::', '+', $v);
50 50
 	$v = str_replace('::percent::', '%', $v);
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 global $current_user;
65 65
 global $sugar_config;
66 66
 
67
-$title				= '';
67
+$title = '';
68 68
 $msg				= '';
69 69
 $tls				= '';
70
-$cert				= '';
70
+$cert = '';
71 71
 $ssl				= '';
72
-$notls				= '';
73
-$novalidate_cert	= '';
74
-$useSsl				= false;
72
+$notls = '';
73
+$novalidate_cert = '';
74
+$useSsl = false;
75 75
 $deletedFoldersList = "";
76 76
 
77 77
 ///////////////////////////////////////////////////////////////////////////////
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 	$popupBoolean = true;
86 86
 }
87 87
 
88
-if($popupBoolean) {
88
+if ($popupBoolean) {
89 89
 	$title = $mod_strings['LBL_SELECT_SUBSCRIBED_FOLDERS'];
90 90
 	$msg = $mod_strings['LBL_TEST_WAIT_MESSAGE'];
91 91
 }
92 92
 
93 93
 $subdcriptionFolderHelp = $app_strings['LBL_EMAIL_SUBSCRIPTION_FOLDER_HELP'];
94 94
 
95
-if(isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) {
95
+if (isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) {
96 96
 	$useSsl = true;
97 97
 }
98 98
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 } // else
111 111
 
112 112
 
113
-$ie                 = new InboundEmail();
114
-if(!empty($_REQUEST['ie_id'])) {
113
+$ie = new InboundEmail();
114
+if (!empty($_REQUEST['ie_id'])) {
115 115
     $ie->retrieve($_REQUEST['ie_id']);
116 116
 }
117 117
 $ie->email_user     = $_REQUEST['email_user'];
@@ -119,15 +119,15 @@  discard block
 block discarded – undo
119 119
 $ie->port           = $_REQUEST['port'];
120 120
 $ie->protocol       = $_REQUEST['protocol'];
121 121
 //Bug 23083.Special characters in email password results in IMAP authentication failure
122
-if(!empty($_REQUEST['email_password'])) {
122
+if (!empty($_REQUEST['email_password'])) {
123 123
     $ie->email_password = html_entity_decode($_REQUEST['email_password'], ENT_QUOTES);
124 124
     $ie->email_password = str_rot13($ie->email_password);
125 125
 }
126 126
 //$ie->mailbox      = $_REQUEST['mailbox'];
127 127
 
128
-$ie->mailbox        = 'INBOX';
128
+$ie->mailbox = 'INBOX';
129 129
 
130
-if($popupBoolean) {
130
+if ($popupBoolean) {
131 131
     $returnArray = $ie->getFoldersListForMailBox();
132 132
     $foldersList = $returnArray['foldersList'];
133 133
     if ($returnArray['status']) {
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
         $deletedFoldersString = "";
138 138
         $count = 0;
139 139
         if (!empty($requestMailBox) && !empty($foldersListArray)) {
140
-            foreach($requestMailBox as $mailbox) {
140
+            foreach ($requestMailBox as $mailbox) {
141 141
                 if (!in_array($mailbox, $foldersListArray)) {
142 142
                     if ($count != 0) {
143
-                        $deletedFoldersString = $deletedFoldersString . " ,";
143
+                        $deletedFoldersString = $deletedFoldersString." ,";
144 144
                     }
145
-                    $deletedFoldersString = $deletedFoldersString . $mailbox;
145
+                    $deletedFoldersString = $deletedFoldersString.$mailbox;
146 146
                     $count++;
147 147
                 }
148 148
             } // foreach
@@ -229,10 +229,10 @@  discard block
 block discarded – undo
229 229
 
230 230
 ///////////////////////////////////////////////////////////////////////////////
231 231
 ////	COMPLETE RENDERING OF THE POPUP
232
-echo '<input type="hidden" id="sf_returnstatus" name="returnstatus" value="'. $returnArray['status'] .'">';
233
-echo '<input type="hidden" id="sf_foldersList" name="foldersList" value="'. htmlspecialchars($foldersList) .'">';
234
-echo '<input type="hidden" id="sf_selectedfoldersList" name="selectedfoldersList" value="'. implode(",", $requestMailBox) .'">';
235
-echo '<input type="hidden" id="sf_searchField" name="searchField" value="'. $searchField .'">';
232
+echo '<input type="hidden" id="sf_returnstatus" name="returnstatus" value="'.$returnArray['status'].'">';
233
+echo '<input type="hidden" id="sf_foldersList" name="foldersList" value="'.htmlspecialchars($foldersList).'">';
234
+echo '<input type="hidden" id="sf_selectedfoldersList" name="selectedfoldersList" value="'.implode(",", $requestMailBox).'">';
235
+echo '<input type="hidden" id="sf_searchField" name="searchField" value="'.$searchField.'">';
236 236
 
237 237
 echo '
238 238
 <script type="text/javascript">
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		if(typeof(document.getElementById("sf_msg")) != "undefined") {
270 270
 			document.getElementById("sf_msg").innerHTML = "'.$msg.'";
271 271
 			var deletedFoldersList = document.getElementById("sf_deletedFoldersList");
272
-			deletedFoldersList.innerHTML = "'. $deletedFoldersList .'";
272
+			deletedFoldersList.innerHTML = "'. $deletedFoldersList.'";
273 273
 			if (deletedFoldersList.innerHTML.length > 0) {
274 274
 				deletedFoldersList.style.display = "";
275 275
 			} // if
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
modules/InboundEmail/EditGroupFolder.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 /* Start standard EditView setup logic */
56 56
 
57 57
 if(isset($_REQUEST['record'])) {
58
-	$GLOBALS['log']->debug("In EditGroupFolder view, about to retrieve record: ".$_REQUEST['record']);
59
-	$result = $focus->retrieve($_REQUEST['record']);
58
+    $GLOBALS['log']->debug("In EditGroupFolder view, about to retrieve record: ".$_REQUEST['record']);
59
+    $result = $focus->retrieve($_REQUEST['record']);
60 60
     if($result == null)
61 61
     {
62
-    	sugar_die($app_strings['ERROR_NO_RECORD']);
62
+        sugar_die($app_strings['ERROR_NO_RECORD']);
63 63
     }
64 64
 }
65 65
 
@@ -85,28 +85,28 @@  discard block
 block discarded – undo
85 85
 $groupFolders = Array();
86 86
 $groupFoldersOrig = array();
87 87
 foreach($ret['groupFolders'] as $key => $value) {
88
-	if(!empty($focus->id)) {
89
-		if ($value['id'] == $focus->id) {
90
-			continue;
91
-		}
92
-	} // if
93
-	$groupFolders[$value['id']] = $value['name'];
94
-	$groupFoldersOrig[] = $value['origName'];
88
+    if(!empty($focus->id)) {
89
+        if ($value['id'] == $focus->id) {
90
+            continue;
91
+        }
92
+    } // if
93
+    $groupFolders[$value['id']] = $value['name'];
94
+    $groupFoldersOrig[] = $value['origName'];
95 95
 } // foreach
96 96
 $groupFolderName = "";
97 97
 $addToGroupFolder = "";
98 98
 $createGroupFolderStyle = "display:''";
99 99
 $editGroupFolderStyle = "display:''";
100 100
 if(!empty($focus->id)) {
101
-	$groupFolderName = 	$focus->name;
101
+    $groupFolderName = 	$focus->name;
102 102
 }
103 103
 if(!empty($focus->id)) {
104
-	$addToGroupFolder = $focus->parent_folder;
104
+    $addToGroupFolder = $focus->parent_folder;
105 105
 }
106 106
 if(!empty($focus->id)) {
107
-	$createGroupFolderStyle = "display:none;";
107
+    $createGroupFolderStyle = "display:none;";
108 108
 } else {
109
-	$editGroupFolderStyle = "display:none;";
109
+    $editGroupFolderStyle = "display:none;";
110 110
 } // else
111 111
 $smarty->assign('createGroupFolderStyle', $createGroupFolderStyle);
112 112
 $smarty->assign('editGroupFolderStyle', $editGroupFolderStyle);
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.
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
  * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
39 39
  ********************************************************************************/
40 40
 
41
-$_REQUEST['edit']='true';
41
+$_REQUEST['edit'] = 'true';
42 42
 
43 43
 require_once('include/SugarFolders/SugarFolders.php');
44 44
 
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 $javascript = new Javascript();
55 55
 /* Start standard EditView setup logic */
56 56
 
57
-if(isset($_REQUEST['record'])) {
57
+if (isset($_REQUEST['record'])) {
58 58
 	$GLOBALS['log']->debug("In EditGroupFolder view, about to retrieve record: ".$_REQUEST['record']);
59 59
 	$result = $focus->retrieve($_REQUEST['record']);
60
-    if($result == null)
60
+    if ($result == null)
61 61
     {
62 62
     	sugar_die($app_strings['ERROR_NO_RECORD']);
63 63
     }
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 $ret = $focus->getFoldersForSettings($current_user);
85 85
 $groupFolders = Array();
86 86
 $groupFoldersOrig = array();
87
-foreach($ret['groupFolders'] as $key => $value) {
88
-	if(!empty($focus->id)) {
87
+foreach ($ret['groupFolders'] as $key => $value) {
88
+	if (!empty($focus->id)) {
89 89
 		if ($value['id'] == $focus->id) {
90 90
 			continue;
91 91
 		}
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 $addToGroupFolder = "";
98 98
 $createGroupFolderStyle = "display:''";
99 99
 $editGroupFolderStyle = "display:''";
100
-if(!empty($focus->id)) {
101
-	$groupFolderName = 	$focus->name;
100
+if (!empty($focus->id)) {
101
+	$groupFolderName = $focus->name;
102 102
 }
103
-if(!empty($focus->id)) {
103
+if (!empty($focus->id)) {
104 104
 	$addToGroupFolder = $focus->parent_folder;
105 105
 }
106
-if(!empty($focus->id)) {
106
+if (!empty($focus->id)) {
107 107
 	$createGroupFolderStyle = "display:none;";
108 108
 } else {
109 109
 	$editGroupFolderStyle = "display:none;";
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 $smarty->assign('group_folder_options', get_select_options_with_id($groupFolders, $addToGroupFolder));
118 118
 
119 119
 
120
-$smarty->assign('CSS',SugarThemeRegistry::current()->getCSS());
120
+$smarty->assign('CSS', SugarThemeRegistry::current()->getCSS());
121 121
 
122 122
 
123
-$smarty->assign('languageStrings', getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js",  $GLOBALS['sugar_config']['js_lang_version']));
123
+$smarty->assign('languageStrings', getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']));
124 124
 echo $smarty->fetch("modules/Emails/templates/_createGroupFolder.tpl");
125 125
 ?>
126 126
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
modules/InboundEmail/SaveGroupFolder.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
 $_REQUEST['parent_folder'] = $_REQUEST['groupFoldersAdd'];
54 54
 $_REQUEST['group_id'] = $_REQUEST['groupFoldersUser'];
55 55
 if (empty($_REQUEST['record'])) {
56
-	$folder->setFolder($_REQUEST);
56
+    $folder->setFolder($_REQUEST);
57 57
 } else {
58
-	$folder->updateFolder($_REQUEST);
58
+    $folder->updateFolder($_REQUEST);
59 59
 }
60 60
 $body1 = "
61 61
 	<script type='text/javascript'>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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.
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
modules/Tasks/metadata/editviewdefs.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -39,129 +39,129 @@
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Tasks'] = 
41 41
 array (
42
-  'EditView' => 
43
-  array (
42
+    'EditView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46
-      'form' => 
47
-      array (
46
+        'form' => 
47
+        array (
48 48
         'hidden' => 
49 49
         array (
50
-           '<input type="hidden" name="isSaveAndNew" value="false">',
50
+            '<input type="hidden" name="isSaveAndNew" value="false">',
51 51
         ),
52 52
         'buttons' => 
53 53
         array (
54
-           'SAVE',
55
-           'CANCEL',
54
+            'SAVE',
55
+            'CANCEL',
56 56
            
57
-          array (
57
+            array (
58 58
             'customCode' => '{if $fields.status.value != "Completed"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; if(check_form(\'EditView\'))SUGAR.ajaxUI.submitForm(this.form);" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
59
-          ),
59
+            ),
60 60
         ),
61
-      ),
62
-      'maxColumns' => '2',
63
-      'widths' => 
64
-      array (
61
+        ),
62
+        'maxColumns' => '2',
63
+        'widths' => 
64
+        array (
65 65
          
66 66
         array (
67
-          'label' => '10',
68
-          'field' => '30',
67
+            'label' => '10',
68
+            'field' => '30',
69 69
         ),
70 70
          
71 71
         array (
72
-          'label' => '10',
73
-          'field' => '30',
72
+            'label' => '10',
73
+            'field' => '30',
74
+        ),
74 75
         ),
75
-      ),
76
-      'useTabs' => false,
76
+        'useTabs' => false,
77 77
     ),
78 78
     'panels' => 
79 79
     array (
80
-      'lbl_task_information' => 
81
-      array (
80
+        'lbl_task_information' => 
81
+        array (
82 82
          
83 83
         array (
84 84
            
85
-          array (
85
+            array (
86 86
             'name' => 'name',
87 87
             'displayParams' => 
88 88
             array (
89
-              'required' => true,
89
+                'required' => true,
90
+            ),
90 91
             ),
91
-          ),
92 92
            
93
-          array (
93
+            array (
94 94
             'name' => 'status',
95 95
             'displayParams' => 
96 96
             array (
97
-              'required' => true,
97
+                'required' => true,
98
+            ),
98 99
             ),
99
-          ),
100 100
         ),
101 101
          
102 102
         array (
103 103
            
104
-          array (
104
+            array (
105 105
             'name' => 'date_start',
106 106
             'type' => 'datetimecombo',
107 107
             'displayParams' => 
108 108
             array (
109
-              'showNoneCheckbox' => true,
110
-              'showFormats' => true,
109
+                'showNoneCheckbox' => true,
110
+                'showFormats' => true,
111
+            ),
111 112
             ),
112
-          ),
113 113
            
114
-          array (
114
+            array (
115 115
             'name' => 'parent_name',
116 116
             'label' => 'LBL_LIST_RELATED_TO',
117
-          ),
117
+            ),
118 118
         ),
119 119
          
120 120
         array (
121 121
            
122
-          array (
122
+            array (
123 123
             'name' => 'date_due',
124 124
             'type' => 'datetimecombo',
125 125
             'displayParams' => 
126 126
             array (
127
-              'showNoneCheckbox' => true,
128
-              'showFormats' => true,
127
+                'showNoneCheckbox' => true,
128
+                'showFormats' => true,
129
+            ),
129 130
             ),
130
-          ),
131 131
            
132
-          array (
132
+            array (
133 133
             'name' => 'contact_name',
134 134
             'label' => 'LBL_CONTACT_NAME',
135
-          ),
135
+            ),
136 136
         ),
137 137
          
138 138
         array (
139 139
            
140
-          array (
140
+            array (
141 141
             'name' => 'priority',
142 142
             'displayParams' => 
143 143
             array (
144
-              'required' => true,
144
+                'required' => true,
145
+            ),
145 146
             ),
146
-          ),
147 147
            
148 148
         ),
149 149
          
150 150
         array (
151 151
            
152
-          array (
152
+            array (
153 153
             'name' => 'description',
154
-          ),
154
+            ),
155
+        ),
155 156
         ),
156
-      ),
157 157
       
158
-	  'LBL_PANEL_ASSIGNMENT' => array(
159
-	    array(
160
-		    'assigned_user_name',
161
-	    ),
162
-	  ),
158
+        'LBL_PANEL_ASSIGNMENT' => array(
159
+        array(
160
+            'assigned_user_name',
161
+        ),
162
+        ),
163 163
       
164 164
     ),
165
-  ),
165
+    ),
166 166
 );
167 167
 ?>
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -38,37 +38,37 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Tasks'] = 
41
-array (
41
+array(
42 42
   'EditView' => 
43
-  array (
43
+  array(
44 44
     'templateMeta' => 
45
-    array (
45
+    array(
46 46
       'form' => 
47
-      array (
47
+      array(
48 48
         'hidden' => 
49
-        array (
49
+        array(
50 50
            '<input type="hidden" name="isSaveAndNew" value="false">',
51 51
         ),
52 52
         'buttons' => 
53
-        array (
53
+        array(
54 54
            'SAVE',
55 55
            'CANCEL',
56 56
            
57
-          array (
57
+          array(
58 58
             'customCode' => '{if $fields.status.value != "Completed"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; if(check_form(\'EditView\'))SUGAR.ajaxUI.submitForm(this.form);" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
59 59
           ),
60 60
         ),
61 61
       ),
62 62
       'maxColumns' => '2',
63 63
       'widths' => 
64
-      array (
64
+      array(
65 65
          
66
-        array (
66
+        array(
67 67
           'label' => '10',
68 68
           'field' => '30',
69 69
         ),
70 70
          
71
-        array (
71
+        array(
72 72
           'label' => '10',
73 73
           'field' => '30',
74 74
         ),
@@ -76,80 +76,80 @@  discard block
 block discarded – undo
76 76
       'useTabs' => false,
77 77
     ),
78 78
     'panels' => 
79
-    array (
79
+    array(
80 80
       'lbl_task_information' => 
81
-      array (
81
+      array(
82 82
          
83
-        array (
83
+        array(
84 84
            
85
-          array (
85
+          array(
86 86
             'name' => 'name',
87 87
             'displayParams' => 
88
-            array (
88
+            array(
89 89
               'required' => true,
90 90
             ),
91 91
           ),
92 92
            
93
-          array (
93
+          array(
94 94
             'name' => 'status',
95 95
             'displayParams' => 
96
-            array (
96
+            array(
97 97
               'required' => true,
98 98
             ),
99 99
           ),
100 100
         ),
101 101
          
102
-        array (
102
+        array(
103 103
            
104
-          array (
104
+          array(
105 105
             'name' => 'date_start',
106 106
             'type' => 'datetimecombo',
107 107
             'displayParams' => 
108
-            array (
108
+            array(
109 109
               'showNoneCheckbox' => true,
110 110
               'showFormats' => true,
111 111
             ),
112 112
           ),
113 113
            
114
-          array (
114
+          array(
115 115
             'name' => 'parent_name',
116 116
             'label' => 'LBL_LIST_RELATED_TO',
117 117
           ),
118 118
         ),
119 119
          
120
-        array (
120
+        array(
121 121
            
122
-          array (
122
+          array(
123 123
             'name' => 'date_due',
124 124
             'type' => 'datetimecombo',
125 125
             'displayParams' => 
126
-            array (
126
+            array(
127 127
               'showNoneCheckbox' => true,
128 128
               'showFormats' => true,
129 129
             ),
130 130
           ),
131 131
            
132
-          array (
132
+          array(
133 133
             'name' => 'contact_name',
134 134
             'label' => 'LBL_CONTACT_NAME',
135 135
           ),
136 136
         ),
137 137
          
138
-        array (
138
+        array(
139 139
            
140
-          array (
140
+          array(
141 141
             'name' => 'priority',
142 142
             'displayParams' => 
143
-            array (
143
+            array(
144 144
               'required' => true,
145 145
             ),
146 146
           ),
147 147
            
148 148
         ),
149 149
          
150
-        array (
150
+        array(
151 151
            
152
-          array (
152
+          array(
153 153
             'name' => 'description',
154 154
           ),
155 155
         ),
Please login to merge, or discard this patch.
modules/Tasks/metadata/detailviewdefs.php 2 patches
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -39,157 +39,157 @@
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Tasks'] =
41 41
 array (
42
-  'DetailView' => 
43
-  array (
42
+    'DetailView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46
-      'form' => 
47
-      array (
46
+        'form' => 
47
+        array (
48 48
         'buttons' => 
49 49
         array (
50
-          0 => 'EDIT',
51
-          1 => 'DUPLICATE',
52
-          2 => 'DELETE',
53
-          3 => 
54
-          array (
50
+            0 => 'EDIT',
51
+            1 => 'DUPLICATE',
52
+            2 => 'DELETE',
53
+            3 => 
54
+            array (
55 55
             'customCode' => '{if $fields.status.value != "Completed"} <input type="hidden" name="isSaveAndNew" value="false">  <input type="hidden" name="status" value="">  <input id="close_and_create_new_button" title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  class="button"  onclick="this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true; this.form.return_id.value=\'{$fields.id.value}\';"  name="button"  value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  type="submit">{/if}',
56 56
             'sugar_html' => 
57 57
             array (
58
-              'type' => 'submit',
59
-              'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
60
-              'htmlOptions' => 
61
-              array (
58
+                'type' => 'submit',
59
+                'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
60
+                'htmlOptions' => 
61
+                array (
62 62
                 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
63 63
                 'class' => 'button',
64 64
                 'onclick' => 'this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true; this.form.return_id.value=\'{$fields.id.value}\';',
65 65
                 'name' => 'button',
66 66
                 'id' => 'close_and_create_new_button',
67
-              ),
68
-              'template' => '{if $fields.status.value != "Completed"}[CONTENT]{/if}',
67
+                ),
68
+                'template' => '{if $fields.status.value != "Completed"}[CONTENT]{/if}',
69
+            ),
69 70
             ),
70
-          ),
71
-          4 => 
72
-          array (
71
+            4 => 
72
+            array (
73 73
             'customCode' => '{if $fields.status.value != "Completed"} <input type="hidden" name="isSave" value="false">  <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}" id="close_button" class="button"  onclick="this.form.status.value=\'Completed\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'"  name="button1"  value="{$APP.LBL_CLOSE_BUTTON_TITLE}"  type="submit">{/if}',
74 74
             'sugar_html' => 
75 75
             array (
76
-              'type' => 'submit',
77
-              'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
78
-              'htmlOptions' => 
79
-              array (
76
+                'type' => 'submit',
77
+                'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
78
+                'htmlOptions' => 
79
+                array (
80 80
                 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
81 81
                 'class' => 'button',
82 82
                 'onclick' => 'this.form.status.value=\'Completed\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'',
83 83
                 'name' => 'button1',
84 84
                 'id' => 'close_button',
85
-              ),
85
+                ),
86 86
                 'template' => '{if $fields.status.value != "Completed"}[CONTENT]{/if}'
87 87
             ),
88
-          ),
88
+            ),
89 89
         ),
90 90
         'hidden' => 
91 91
         array (
92
-          0 => '<input type="hidden" name="isSaveAndNew">',
93
-          1 => '<input type="hidden" name="status" value="">',
94
-          2 => '<input type="hidden" name="isSave">',
92
+            0 => '<input type="hidden" name="isSaveAndNew">',
93
+            1 => '<input type="hidden" name="status" value="">',
94
+            2 => '<input type="hidden" name="isSave">',
95 95
         ),
96
-      ),
97
-      'maxColumns' => '2',
98
-      'widths' => 
99
-      array (
96
+        ),
97
+        'maxColumns' => '2',
98
+        'widths' => 
99
+        array (
100 100
         0 => 
101 101
         array (
102
-          'label' => '10',
103
-          'field' => '30',
102
+            'label' => '10',
103
+            'field' => '30',
104 104
         ),
105 105
         1 => 
106 106
         array (
107
-          'label' => '10',
108
-          'field' => '30',
107
+            'label' => '10',
108
+            'field' => '30',
109 109
         ),
110
-      ),
111
-      'useTabs' => true,
112
-      'tabDefs' => 
113
-      array (
110
+        ),
111
+        'useTabs' => true,
112
+        'tabDefs' => 
113
+        array (
114 114
         'LBL_TASK_INFORMATION' => 
115 115
         array (
116
-          'newTab' => true,
117
-          'panelDefault' => 'expanded',
116
+            'newTab' => true,
117
+            'panelDefault' => 'expanded',
118 118
         ),
119 119
         'LBL_PANEL_ASSIGNMENT' => 
120 120
         array (
121
-          'newTab' => true,
122
-          'panelDefault' => 'expanded',
121
+            'newTab' => true,
122
+            'panelDefault' => 'expanded',
123
+        ),
123 124
         ),
124
-      ),
125 125
     ),
126 126
     'panels' => 
127 127
     array (
128
-      'lbl_task_information' => 
129
-      array (
128
+        'lbl_task_information' => 
129
+        array (
130 130
         0 => 
131 131
         array (
132
-          0 => 
133
-          array (
132
+            0 => 
133
+            array (
134 134
             'name' => 'name',
135 135
             'label' => 'LBL_SUBJECT',
136
-          ),
137
-          1 => 'status',
136
+            ),
137
+            1 => 'status',
138 138
         ),
139 139
         1 => 
140 140
         array (
141
-          0 => 'date_start',
142
-          1 => 
143
-          array (
141
+            0 => 'date_start',
142
+            1 => 
143
+            array (
144 144
             'name' => 'parent_name',
145 145
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
146
-          ),
146
+            ),
147 147
         ),
148 148
         2 => 
149 149
         array (
150
-          0 => 'date_due',
151
-          1 => 
152
-          array (
150
+            0 => 'date_due',
151
+            1 => 
152
+            array (
153 153
             'name' => 'contact_name',
154 154
             'label' => 'LBL_CONTACT',
155
-          ),
155
+            ),
156 156
         ),
157 157
         3 => 
158 158
         array (
159
-          0 => 'priority',
159
+            0 => 'priority',
160 160
         ),
161 161
         4 => 
162 162
         array (
163
-          0 => 'description',
163
+            0 => 'description',
164
+        ),
164 165
         ),
165
-      ),
166
-      'LBL_PANEL_ASSIGNMENT' => 
167
-      array (
166
+        'LBL_PANEL_ASSIGNMENT' => 
167
+        array (
168 168
         0 => 
169 169
         array (
170
-          0 => 
171
-          array (
170
+            0 => 
171
+            array (
172 172
             'name' => 'assigned_user_name',
173 173
             'label' => 'LBL_ASSIGNED_TO',
174
-          ),
174
+            ),
175 175
         ),
176 176
         1 => 
177 177
         array (
178
-          0 => 
179
-          array (
178
+            0 => 
179
+            array (
180 180
             'name' => 'date_entered',
181 181
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
182 182
             'label' => 'LBL_DATE_ENTERED',
183
-          ),
184
-          1 => 
185
-          array (
183
+            ),
184
+            1 => 
185
+            array (
186 186
             'name' => 'date_modified',
187 187
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
188 188
             'label' => 'LBL_DATE_MODIFIED',
189
-          ),
189
+            ),
190
+        ),
190 191
         ),
191
-      ),
192 192
     ),
193
-  ),
193
+    ),
194 194
 );
195 195
 ?>
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -38,27 +38,27 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Tasks'] =
41
-array (
41
+array(
42 42
   'DetailView' => 
43
-  array (
43
+  array(
44 44
     'templateMeta' => 
45
-    array (
45
+    array(
46 46
       'form' => 
47
-      array (
47
+      array(
48 48
         'buttons' => 
49
-        array (
49
+        array(
50 50
           0 => 'EDIT',
51 51
           1 => 'DUPLICATE',
52 52
           2 => 'DELETE',
53 53
           3 => 
54
-          array (
54
+          array(
55 55
             'customCode' => '{if $fields.status.value != "Completed"} <input type="hidden" name="isSaveAndNew" value="false">  <input type="hidden" name="status" value="">  <input id="close_and_create_new_button" title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  class="button"  onclick="this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true; this.form.return_id.value=\'{$fields.id.value}\';"  name="button"  value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  type="submit">{/if}',
56 56
             'sugar_html' => 
57
-            array (
57
+            array(
58 58
               'type' => 'submit',
59 59
               'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
60 60
               'htmlOptions' => 
61
-              array (
61
+              array(
62 62
                 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
63 63
                 'class' => 'button',
64 64
                 'onclick' => 'this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true; this.form.return_id.value=\'{$fields.id.value}\';',
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
             ),
70 70
           ),
71 71
           4 => 
72
-          array (
72
+          array(
73 73
             'customCode' => '{if $fields.status.value != "Completed"} <input type="hidden" name="isSave" value="false">  <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}" id="close_button" class="button"  onclick="this.form.status.value=\'Completed\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'"  name="button1"  value="{$APP.LBL_CLOSE_BUTTON_TITLE}"  type="submit">{/if}',
74 74
             'sugar_html' => 
75
-            array (
75
+            array(
76 76
               'type' => 'submit',
77 77
               'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
78 78
               'htmlOptions' => 
79
-              array (
79
+              array(
80 80
                 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
81 81
                 'class' => 'button',
82 82
                 'onclick' => 'this.form.status.value=\'Completed\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
           ),
89 89
         ),
90 90
         'hidden' => 
91
-        array (
91
+        array(
92 92
           0 => '<input type="hidden" name="isSaveAndNew">',
93 93
           1 => '<input type="hidden" name="status" value="">',
94 94
           2 => '<input type="hidden" name="isSave">',
@@ -96,93 +96,93 @@  discard block
 block discarded – undo
96 96
       ),
97 97
       'maxColumns' => '2',
98 98
       'widths' => 
99
-      array (
99
+      array(
100 100
         0 => 
101
-        array (
101
+        array(
102 102
           'label' => '10',
103 103
           'field' => '30',
104 104
         ),
105 105
         1 => 
106
-        array (
106
+        array(
107 107
           'label' => '10',
108 108
           'field' => '30',
109 109
         ),
110 110
       ),
111 111
       'useTabs' => true,
112 112
       'tabDefs' => 
113
-      array (
113
+      array(
114 114
         'LBL_TASK_INFORMATION' => 
115
-        array (
115
+        array(
116 116
           'newTab' => true,
117 117
           'panelDefault' => 'expanded',
118 118
         ),
119 119
         'LBL_PANEL_ASSIGNMENT' => 
120
-        array (
120
+        array(
121 121
           'newTab' => true,
122 122
           'panelDefault' => 'expanded',
123 123
         ),
124 124
       ),
125 125
     ),
126 126
     'panels' => 
127
-    array (
127
+    array(
128 128
       'lbl_task_information' => 
129
-      array (
129
+      array(
130 130
         0 => 
131
-        array (
131
+        array(
132 132
           0 => 
133
-          array (
133
+          array(
134 134
             'name' => 'name',
135 135
             'label' => 'LBL_SUBJECT',
136 136
           ),
137 137
           1 => 'status',
138 138
         ),
139 139
         1 => 
140
-        array (
140
+        array(
141 141
           0 => 'date_start',
142 142
           1 => 
143
-          array (
143
+          array(
144 144
             'name' => 'parent_name',
145 145
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
146 146
           ),
147 147
         ),
148 148
         2 => 
149
-        array (
149
+        array(
150 150
           0 => 'date_due',
151 151
           1 => 
152
-          array (
152
+          array(
153 153
             'name' => 'contact_name',
154 154
             'label' => 'LBL_CONTACT',
155 155
           ),
156 156
         ),
157 157
         3 => 
158
-        array (
158
+        array(
159 159
           0 => 'priority',
160 160
         ),
161 161
         4 => 
162
-        array (
162
+        array(
163 163
           0 => 'description',
164 164
         ),
165 165
       ),
166 166
       'LBL_PANEL_ASSIGNMENT' => 
167
-      array (
167
+      array(
168 168
         0 => 
169
-        array (
169
+        array(
170 170
           0 => 
171
-          array (
171
+          array(
172 172
             'name' => 'assigned_user_name',
173 173
             'label' => 'LBL_ASSIGNED_TO',
174 174
           ),
175 175
         ),
176 176
         1 => 
177
-        array (
177
+        array(
178 178
           0 => 
179
-          array (
179
+          array(
180 180
             'name' => 'date_entered',
181 181
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
182 182
             'label' => 'LBL_DATE_ENTERED',
183 183
           ),
184 184
           1 => 
185
-          array (
185
+          array(
186 186
             'name' => 'date_modified',
187 187
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
188 188
             'label' => 'LBL_DATE_MODIFIED',
Please login to merge, or discard this patch.
modules/Tasks/metadata/quickcreatedefs.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -39,131 +39,131 @@
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Tasks'] = 
41 41
 array (
42
-  'QuickCreate' => 
43
-  array (
42
+    'QuickCreate' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46
-      'form' => 
47
-      array (
46
+        'form' => 
47
+        array (
48 48
         'hidden' => 
49 49
         array (
50
-           '<input type="hidden" name="isSaveAndNew" value="false">',
50
+            '<input type="hidden" name="isSaveAndNew" value="false">',
51 51
         ),
52 52
         'buttons' => 
53 53
         array (
54
-           'SAVE',
55
-           'CANCEL',
54
+            'SAVE',
55
+            'CANCEL',
56 56
            
57
-          array (
57
+            array (
58 58
             'customCode' => '{if $fields.status.value != "Completed"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
59
-          ),
59
+            ),
60 60
         ),
61
-      ),
62
-      'maxColumns' => '2',
63
-      'widths' => 
64
-      array (
61
+        ),
62
+        'maxColumns' => '2',
63
+        'widths' => 
64
+        array (
65 65
          
66 66
         array (
67
-          'label' => '10',
68
-          'field' => '30',
67
+            'label' => '10',
68
+            'field' => '30',
69 69
         ),
70 70
          
71 71
         array (
72
-          'label' => '10',
73
-          'field' => '30',
72
+            'label' => '10',
73
+            'field' => '30',
74 74
         ),
75
-      ),
76
-      'useTabs' => false,
75
+        ),
76
+        'useTabs' => false,
77 77
     ),
78 78
     'panels' => 
79 79
     array (
80
-      'default' => 
81
-      array (
80
+        'default' => 
81
+        array (
82 82
          
83 83
         array (
84 84
            
85
-          array (
85
+            array (
86 86
             'name' => 'name',
87 87
             'displayParams' => 
88 88
             array (
89
-              'required' => true,
89
+                'required' => true,
90
+            ),
90 91
             ),
91
-          ),
92 92
            
93
-          array (
93
+            array (
94 94
             'name' => 'status',
95 95
             'displayParams' => 
96 96
             array (
97
-              'required' => true,
97
+                'required' => true,
98
+            ),
98 99
             ),
99
-          ),
100 100
         ),
101 101
          
102 102
         array (
103 103
            
104
-          array (
104
+            array (
105 105
             'name' => 'date_start',
106 106
             'type' => 'datetimecombo',
107 107
             'displayParams' => 
108 108
             array (
109
-              'showNoneCheckbox' => true,
110
-              'showFormats' => true,
109
+                'showNoneCheckbox' => true,
110
+                'showFormats' => true,
111
+            ),
111 112
             ),
112
-          ),
113 113
            
114
-          array (
114
+            array (
115 115
             'name' => 'parent_name',
116 116
             'label' => 'LBL_LIST_RELATED_TO',
117
-          ),
117
+            ),
118 118
         ),
119 119
          
120 120
         array (
121 121
            
122
-          array (
122
+            array (
123 123
             'name' => 'date_due',
124 124
             'type' => 'datetimecombo',
125 125
             'displayParams' => 
126 126
             array (
127
-              'showNoneCheckbox' => true,
128
-              'showFormats' => true,
127
+                'showNoneCheckbox' => true,
128
+                'showFormats' => true,
129
+            ),
129 130
             ),
130
-          ),
131 131
            
132
-          array (
132
+            array (
133 133
             'name' => 'contact_name',
134 134
             'label' => 'LBL_CONTACT_NAME',
135
-          ),
135
+            ),
136 136
         ),
137 137
          
138 138
         array (
139 139
            
140
-          array (
140
+            array (
141 141
             'name' => 'priority',
142 142
             'displayParams' => 
143 143
             array (
144
-              'required' => true,
144
+                'required' => true,
145
+            ),
145 146
             ),
146
-          ),
147 147
         ),
148
-         array (
149
-          array (
148
+            array (
149
+            array (
150 150
             'name' => 'assigned_user_name',
151 151
             'label' => 'LBL_ASSIGNED_TO_NAME',
152
-          ),
152
+            ),
153 153
         ),
154 154
         array (
155 155
            
156
-          array (
156
+            array (
157 157
             'name' => 'description',
158 158
             'displayParams' => 
159 159
             array (
160
-              'rows' => 8,
161
-              'cols' => 60,
160
+                'rows' => 8,
161
+                'cols' => 60,
162 162
             ),
163
-          ),
163
+            ),
164
+        ),
164 165
         ),
165
-      ),
166 166
     ),
167
-  ),
167
+    ),
168 168
 );
169 169
 ?>
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -38,37 +38,37 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Tasks'] = 
41
-array (
41
+array(
42 42
   'QuickCreate' => 
43
-  array (
43
+  array(
44 44
     'templateMeta' => 
45
-    array (
45
+    array(
46 46
       'form' => 
47
-      array (
47
+      array(
48 48
         'hidden' => 
49
-        array (
49
+        array(
50 50
            '<input type="hidden" name="isSaveAndNew" value="false">',
51 51
         ),
52 52
         'buttons' => 
53
-        array (
53
+        array(
54 54
            'SAVE',
55 55
            'CANCEL',
56 56
            
57
-          array (
57
+          array(
58 58
             'customCode' => '{if $fields.status.value != "Completed"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
59 59
           ),
60 60
         ),
61 61
       ),
62 62
       'maxColumns' => '2',
63 63
       'widths' => 
64
-      array (
64
+      array(
65 65
          
66
-        array (
66
+        array(
67 67
           'label' => '10',
68 68
           'field' => '30',
69 69
         ),
70 70
          
71
-        array (
71
+        array(
72 72
           'label' => '10',
73 73
           'field' => '30',
74 74
         ),
@@ -76,87 +76,87 @@  discard block
 block discarded – undo
76 76
       'useTabs' => false,
77 77
     ),
78 78
     'panels' => 
79
-    array (
79
+    array(
80 80
       'default' => 
81
-      array (
81
+      array(
82 82
          
83
-        array (
83
+        array(
84 84
            
85
-          array (
85
+          array(
86 86
             'name' => 'name',
87 87
             'displayParams' => 
88
-            array (
88
+            array(
89 89
               'required' => true,
90 90
             ),
91 91
           ),
92 92
            
93
-          array (
93
+          array(
94 94
             'name' => 'status',
95 95
             'displayParams' => 
96
-            array (
96
+            array(
97 97
               'required' => true,
98 98
             ),
99 99
           ),
100 100
         ),
101 101
          
102
-        array (
102
+        array(
103 103
            
104
-          array (
104
+          array(
105 105
             'name' => 'date_start',
106 106
             'type' => 'datetimecombo',
107 107
             'displayParams' => 
108
-            array (
108
+            array(
109 109
               'showNoneCheckbox' => true,
110 110
               'showFormats' => true,
111 111
             ),
112 112
           ),
113 113
            
114
-          array (
114
+          array(
115 115
             'name' => 'parent_name',
116 116
             'label' => 'LBL_LIST_RELATED_TO',
117 117
           ),
118 118
         ),
119 119
          
120
-        array (
120
+        array(
121 121
            
122
-          array (
122
+          array(
123 123
             'name' => 'date_due',
124 124
             'type' => 'datetimecombo',
125 125
             'displayParams' => 
126
-            array (
126
+            array(
127 127
               'showNoneCheckbox' => true,
128 128
               'showFormats' => true,
129 129
             ),
130 130
           ),
131 131
            
132
-          array (
132
+          array(
133 133
             'name' => 'contact_name',
134 134
             'label' => 'LBL_CONTACT_NAME',
135 135
           ),
136 136
         ),
137 137
          
138
-        array (
138
+        array(
139 139
            
140
-          array (
140
+          array(
141 141
             'name' => 'priority',
142 142
             'displayParams' => 
143
-            array (
143
+            array(
144 144
               'required' => true,
145 145
             ),
146 146
           ),
147 147
         ),
148
-         array (
149
-          array (
148
+         array(
149
+          array(
150 150
             'name' => 'assigned_user_name',
151 151
             'label' => 'LBL_ASSIGNED_TO_NAME',
152 152
           ),
153 153
         ),
154
-        array (
154
+        array(
155 155
            
156
-          array (
156
+          array(
157 157
             'name' => 'description',
158 158
             'displayParams' => 
159
-            array (
159
+            array(
160 160
               'rows' => 8,
161 161
               'cols' => 60,
162 162
             ),
Please login to merge, or discard this patch.
modules/Tasks/metadata/listviewdefs.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,9 +101,9 @@
 block discarded – undo
101 101
         'label' => 'LBL_LIST_STATUS', 
102 102
         'link' => false,
103 103
         'default' => false),
104
-	'DATE_ENTERED' => array (
105
-	    'width' => '10',
106
-	    'label' => 'LBL_DATE_ENTERED',
107
-	    'default' => true),            
104
+    'DATE_ENTERED' => array (
105
+        'width' => '10',
106
+        'label' => 'LBL_DATE_ENTERED',
107
+        'default' => true),            
108 108
 );
109 109
 ?>
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.
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         'label' => 'LBL_LIST_STATUS', 
102 102
         'link' => false,
103 103
         'default' => false),
104
-	'DATE_ENTERED' => array (
104
+	'DATE_ENTERED' => array(
105 105
 	    'width' => '10',
106 106
 	    'label' => 'LBL_DATE_ENTERED',
107 107
 	    'default' => true),            
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.