Completed
Push — master ( 58f496...a833c2 )
by Adam
18:52
created
modules/Campaigns/WizardEmailSetupSave.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 //perform this if the option to create new mail box has been checked
86 86
 if(isset($_REQUEST['wiz_new_mbox']) && ($_REQUEST['wiz_new_mbox']=='1')){
87 87
     
88
-   //Populate the Request variables that inboundemail expects
88
+    //Populate the Request variables that inboundemail expects
89 89
     $_REQUEST['mark_read'] = 1;
90 90
     $_REQUEST['only_since'] = 1;
91 91
     $_REQUEST['mailbox_type'] = 'bounce';
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 function clean_up_post($prefix){
115 115
 
116 116
     foreach ($_REQUEST as $key => $val) {
117
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
118
-              $newkey  =substr($key, strlen($prefix)) ;
119
-              $_REQUEST[$newkey] = $val;
120
-         }               
117
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
118
+                $newkey  =substr($key, strlen($prefix)) ;
119
+                $_REQUEST[$newkey] = $val;
120
+            }               
121 121
     }
122 122
 
123 123
     foreach ($_POST as $key => $val) {
124
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
125
-              $newkey  =substr($key, strlen($prefix)) ;
126
-              $_POST[$newkey] = $val;
124
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
125
+                $newkey  =substr($key, strlen($prefix)) ;
126
+                $_POST[$newkey] = $val;
127 127
               
128
-         }               
128
+            }               
129 129
     }
130 130
 }
131 131
 
Please login to merge, or discard this patch.
modules/Campaigns/DeleteTestCampaigns.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
     $test_ids = array();
67 67
     $test_list_ids = array();
68 68
     while($row = $focus->db->fetchByAssoc($res)) {
69
-       $test_ids[] = $row['emailid'];
70
-       $test_list_ids[$row['listid']] = true;
69
+        $test_ids[] = $row['emailid'];
70
+        $test_list_ids[$row['listid']] = true;
71 71
     }
72 72
     $test_list_ids = array_keys($test_list_ids);
73 73
     unset($res);
Please login to merge, or discard this patch.
modules/Campaigns/WizardEmailSetup.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
 if(isset($mbox) && count($mbox)>0){
138 138
     $mboxTable .= "<tr><td colspan='5'><b>" .count($mbox) ." ". $mod_strings['LBL_MAILBOX_CHECK_WIZ_GOOD']." </b>.</td></tr>";
139 139
         $mboxTable .= "<tr class='listViewHRS1'><td width='20%'><b>".$mod_strings['LBL_MAILBOX_NAME']."</b></td>"
140
-                   .  " <td width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></td>"
141
-                   .  " <td width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></td>" 
142
-                   .  " <td width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></td>"
143
-                   .  " <td width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></td></tr>";
140
+                    .  " <td width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></td>"
141
+                    .  " <td width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></td>" 
142
+                    .  " <td width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></td>"
143
+                    .  " <td width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></td></tr>";
144 144
     $colorclass=' ';
145 145
     foreach($mbox as $details){
146 146
                 
147
-     if( $colorclass == "class='evenListRowS1'"){
147
+        if( $colorclass == "class='evenListRowS1'"){
148 148
             $colorclass= "class='oddListRowS1'";
149 149
         }else{ 
150 150
             $colorclass= "class='evenListRowS1'";
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 /**************************** WIZARD UI DIV Stuff *******************/
176 176
   
177 177
 //  this is the wizard control script that resides in page    
178
- $divScript = <<<EOQ
178
+    $divScript = <<<EOQ
179 179
  <script type="text/javascript" language="javascript">  
180 180
 
181 181
     //this function toggles visibility of fields based on selected options
Please login to merge, or discard this patch.
modules/Campaigns/ProcessBouncedEmails.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     $query = "SELECT description FROM notes WHERE file_mime_type = 'messsage/rfc822' AND parent_type='Emails' AND parent_id = '".$email->id."' AND deleted=0";
57 57
     $rs = $GLOBALS['db']->query($query);
58 58
     while ($row = $GLOBALS['db']->fetchByAssoc($rs)) 
59
-		$contents .= $row['description'];
59
+        $contents .= $row['description'];
60 60
 
61 61
     return $contents;
62 62
 }
@@ -162,80 +162,80 @@  discard block
 block discarded – undo
162 162
 
163 163
 function campaign_process_bounced_emails(&$email, &$email_header) 
164 164
 {
165
-	global $sugar_config;
166
-	$emailFromAddress = $email_header->fromaddress;
167
-	$email_description = $email->raw_source;
165
+    global $sugar_config;
166
+    $emailFromAddress = $email_header->fromaddress;
167
+    $email_description = $email->raw_source;
168 168
     	
169
-	//if raw_source is empty, try using the description instead
170
-    	if (empty($email_description)){
171
-        	$email_description = $email->description;
172
-	}
169
+    //if raw_source is empty, try using the description instead
170
+        if (empty($email_description)){
171
+            $email_description = $email->description;
172
+    }
173 173
 
174 174
     $email_description .= retrieveErrorReportAttachment($email);
175 175
 
176
-	if (preg_match('/MAILER-DAEMON|POSTMASTER/i',$emailFromAddress)) 
177
-	{
178
-	    $email_description=quoted_printable_decode($email_description);
179
-		$matches=array();
176
+    if (preg_match('/MAILER-DAEMON|POSTMASTER/i',$emailFromAddress)) 
177
+    {
178
+        $email_description=quoted_printable_decode($email_description);
179
+        $matches=array();
180 180
 		
181
-		//do we have the identifier tag in the email?
182
-		$identifierScanResults = checkBouncedEmailForIdentifier($email_description);
181
+        //do we have the identifier tag in the email?
182
+        $identifierScanResults = checkBouncedEmailForIdentifier($email_description);
183 183
 		
184
-		if ( $identifierScanResults['found'] ) 
185
-		{
186
-			$matches = $identifierScanResults['matches'];
187
-			$identifiers = $identifierScanResults['identifiers'];
188
-
189
-			if (!empty($identifiers)) 
190
-			{
191
-				//array should have only one element in it.
192
-				$identifier = trim($identifiers[0]);
193
-				$row = getExistingCampaignLogEntry($identifier);
184
+        if ( $identifierScanResults['found'] ) 
185
+        {
186
+            $matches = $identifierScanResults['matches'];
187
+            $identifiers = $identifierScanResults['identifiers'];
188
+
189
+            if (!empty($identifiers)) 
190
+            {
191
+                //array should have only one element in it.
192
+                $identifier = trim($identifiers[0]);
193
+                $row = getExistingCampaignLogEntry($identifier);
194 194
 				
195
-				//Found entry
196
-				if (!empty($row)) 
197
-				{
198
-					//do not create another campaign_log record is we already have an
199
-					//invalid email or send error entry for this tracker key.
200
-					$query_log = "select * from campaign_log where target_tracker_key='{$row['target_tracker_key']}'"; 
201
-					$query_log .=" and (activity_type='invalid email' or activity_type='send error')";
195
+                //Found entry
196
+                if (!empty($row)) 
197
+                {
198
+                    //do not create another campaign_log record is we already have an
199
+                    //invalid email or send error entry for this tracker key.
200
+                    $query_log = "select * from campaign_log where target_tracker_key='{$row['target_tracker_key']}'"; 
201
+                    $query_log .=" and (activity_type='invalid email' or activity_type='send error')";
202 202
                     $targeted = new CampaignLog();
203
-					$result_log=$targeted->db->query($query_log);
204
-					$row_log=$targeted->db->fetchByAssoc($result_log);
205
-
206
-					if (empty($row_log)) 
207
-					{
208
-						$return_id = createBouncedCampaignLogEntry($row, $email, $email_description);	
209
-						return TRUE;
210
-					}				
211
-					else 
212
-					{
213
-					    $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier");
214
-					    return FALSE;
215
-					}
216
-				} 
217
-				else 
218
-				{
219
-				    $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier);
220
-					return FALSE;
221
-				}			
222
-    		} 
223
-    		else 
224
-    		{
225
-    			$GLOBALS['log']->info("Warning: Empty identifier for campaign log.");
226
-    			return FALSE;
227
-    		}
228
-    	}  
229
-    	else 
230
-    	{
231
-    	    $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link.");	
232
-    		return FALSE;	
233
-      	}
234
-  } 
235
-  else 
236
-  {
237
-	$GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON.");
238
-	return FALSE;
239
-  }
203
+                    $result_log=$targeted->db->query($query_log);
204
+                    $row_log=$targeted->db->fetchByAssoc($result_log);
205
+
206
+                    if (empty($row_log)) 
207
+                    {
208
+                        $return_id = createBouncedCampaignLogEntry($row, $email, $email_description);	
209
+                        return TRUE;
210
+                    }				
211
+                    else 
212
+                    {
213
+                        $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier");
214
+                        return FALSE;
215
+                    }
216
+                } 
217
+                else 
218
+                {
219
+                    $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier);
220
+                    return FALSE;
221
+                }			
222
+            } 
223
+            else 
224
+            {
225
+                $GLOBALS['log']->info("Warning: Empty identifier for campaign log.");
226
+                return FALSE;
227
+            }
228
+        }  
229
+        else 
230
+        {
231
+            $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link.");	
232
+            return FALSE;	
233
+            }
234
+    } 
235
+    else 
236
+    {
237
+    $GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON.");
238
+    return FALSE;
239
+    }
240 240
 }
241 241
 ?>
Please login to merge, or discard this patch.
modules/Campaigns/CampaignDiagnostic.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
60 60
 //account for use within wizards
61 61
 if(!isset($_REQUEST['inline']) || $_REQUEST['inline'] != 'inline'){
62
-	$params = array();
63
-	$params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
64
-	$params[] = $mod_strings['LBL_CAMPAIGN_DIAGNOSTICS'];
62
+    $params = array();
63
+    $params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
64
+    $params[] = $mod_strings['LBL_CAMPAIGN_DIAGNOSTICS'];
65 65
 	
66
-	echo getClassicModuleTitle('Campaigns', $params, true);
66
+    echo getClassicModuleTitle('Campaigns', $params, true);
67 67
 }
68 68
 
69 69
 global $theme;
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 if(isset($mbox) && count($mbox)>0){
111 111
     $mboxTable .= "<tr><td colspan='5' style='text-align: left;'><b>" .count($mbox) ." ". $mod_strings['LBL_MAILBOX_CHECK1_GOOD']." </b>.</td></tr>";
112 112
         $mboxTable .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX_NAME']."</b></th>"
113
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></th>"
114
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></th>"
115
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></th>"
116
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></th></tr>";
113
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></th>"
114
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></th>"
115
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></th>"
116
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></th></tr>";
117 117
 
118 118
     foreach($mbox as $details){
119 119
         $mboxTable .= "<tr><td>".$details['name']."</td>";
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 }else{
145 145
     $conf_msg .= "<tr><td colspan = '5'><b> ".$mod_strings['LBL_MAILBOX_CHECK2_GOOD']."</b></td></tr>";
146 146
     $conf_msg .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_NAME']."</b></th>"
147
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>"
148
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SENDTYPE']."</b></th>";
147
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>"
148
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SENDTYPE']."</b></th>";
149 149
     if($focus->settings['mail_sendtype']=='SMTP'){
150
-     $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>"
151
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>";
150
+        $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>"
151
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>";
152 152
 
153 153
     }else{$conf_msg .= "</tr>";}
154 154
                    
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $conf_msg .= "<tr><td>".$focus->settings['notify_fromname']."</td>";
158 158
         $conf_msg .= "<td>".$focus->settings['notify_fromaddress']."</td>";
159 159
         $conf_msg .= "<td>".$focus->settings['mail_sendtype']."</td>";
160
-     if($focus->settings['mail_sendtype']=='SMTP'){
160
+        if($focus->settings['mail_sendtype']=='SMTP'){
161 161
         $conf_msg .= "<td>".$focus->settings['mail_smtpserver']."</td>";
162 162
         $conf_msg .= "<td>".$focus->settings['mail_smtpuser']."</td></tr>";
163 163
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 //build the table rows for scheduler display
199 199
 while ($sched_row = $focus->db->fetchByAssoc($sched_res)){$scheds[] = $sched_row;}
200 200
 foreach ($scheds as $funct){
201
-  if( ($funct['job']==$check_sched1)  ||   ($funct['job']==$check_sched2)){
201
+    if( ($funct['job']==$check_sched1)  ||   ($funct['job']==$check_sched2)){
202 202
         $sched_mes = 'use';
203 203
         $sched_mes_body .= "<tr><td style='text-align: left;'>".$funct['name']."</td>";
204 204
         $sched_mes_body .= "<td style='text-align: left;'>".$funct['status']."</td></tr>";
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             $check_sched2 ="found";
209 209
         }  
210 210
         
211
-  }
211
+    }
212 212
 }
213 213
 
214 214
 //determine which table header to use, based on whether or not schedulers were found
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 if($sched_mes == 'use'){
217 217
     $sched_mes = "<h5>".$mod_strings['LBL_SCHEDULER_CHECK_GOOD']."</h5><br><table class='other view' cellspacing='1'>";
218 218
     $sched_mes .= "<tr><th scope='col' width='40%'><b>".$mod_strings['LBL_SCHEDULER_NAME']."</b></tH>"
219
-               .  " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>";
219
+                .  " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>";
220 220
             
221 221
 }else{
222 222
     $sched_mes = "<table class='other view' cellspacing='1'>";
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     if (is_admin($current_user)){
239 239
         $admin_sched_link="<a href='index.php?module=Schedulers&action=index'>".$mod_strings['LBL_SCHEDULER_LINK']."</a>";
240 240
     }else{
241
-     $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];   
241
+        $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];   
242 242
     }    
243 243
 }    
244 244
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 /********** FINAL END OF PAGE UI Stuff ********/
252 252
 if(!isset($_REQUEST['inline']) || $_REQUEST['inline'] != 'inline'){
253 253
 
254
-      $ss->display('modules/Campaigns/CampaignDiagnostic.html');
254
+        $ss->display('modules/Campaigns/CampaignDiagnostic.html');
255 255
 }
256 256
 
257 257
 /**
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     }elseif($num == 0){
273 273
         //if health number is zero, then all checks passed, set green image
274 274
         //green
275
-       return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']);
275
+        return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']);
276 276
 
277 277
 
278 278
     }else{
Please login to merge, or discard this patch.
modules/Campaigns/WizardMarketingSave.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
     }
66 66
         
67 67
 }else{
68
-     //default to just saving and exiting wizard
69
-     $master = 'save';   
68
+        //default to just saving and exiting wizard
69
+        $master = 'save';   
70 70
 }
71 71
 
72 72
 
@@ -90,17 +90,17 @@  discard block
 block discarded – undo
90 90
 }
91 91
 
92 92
     foreach ($_REQUEST as $key => $val) {
93
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
94
-              $newkey  =substr($key, strlen($prefix)) ;
95
-              $_REQUEST[$newkey] = $val;
96
-         }               
93
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
94
+                $newkey  =substr($key, strlen($prefix)) ;
95
+                $_REQUEST[$newkey] = $val;
96
+            }               
97 97
     }
98 98
 
99 99
     foreach ($_REQUEST as $key => $val) {
100
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
101
-              $newkey  =substr($key, strlen($prefix)) ;
102
-              $_REQUEST[$newkey] = $val;
103
-         }               
100
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
101
+                $newkey  =substr($key, strlen($prefix)) ;
102
+                $_REQUEST[$newkey] = $val;
103
+            }               
104 104
     }
105 105
 
106 106
 if(!empty($_REQUEST['meridiem'])){
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 }
109 109
 
110 110
 if(empty($_REQUEST['time_start'])) {
111
-  $_REQUEST['date_start'] = $_REQUEST['date_start'] . ' 00:00';	
111
+    $_REQUEST['date_start'] = $_REQUEST['date_start'] . ' 00:00';	
112 112
 } else {
113
-  $_REQUEST['date_start'] = $_REQUEST['date_start'] . ' ' . $_REQUEST['time_start'];
113
+    $_REQUEST['date_start'] = $_REQUEST['date_start'] . ' ' . $_REQUEST['time_start'];
114 114
 }
115 115
 
116 116
 foreach($marketing->column_fields as $field)
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
     $_REQUEST['record'] =$marketing->campaign_id;
181 181
     $_POST['record']=$marketing->campaign_id;
182 182
     $_REQUEST['mode'] = $master;
183
-     $_POST['mode'] = $master; 
184
-     $_REQUEST['from_wiz']= 'true';
183
+        $_POST['mode'] = $master; 
184
+        $_REQUEST['from_wiz']= 'true';
185 185
     require_once('modules/Campaigns/QueueCampaign.php');
186 186
 }
187 187
 
Please login to merge, or discard this patch.
modules/EmailTemplates/field_arrays.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,19 +46,19 @@
 block discarded – undo
46 46
  * Contributor(s): ______________________________________..
47 47
  ********************************************************************************/
48 48
 $fields_array['EmailTemplate'] = array ('column_fields' => Array("id"
49
-		, "date_entered"
50
-		, "date_modified"
51
-		, "modified_user_id"
52
-		, "created_by"
53
-		, "description"
54
-		, "subject"
55
-		, "body"
56
-		, "body_html"
57
-		, "name"
58
-		, "published"
59
-		),
49
+        , "date_entered"
50
+        , "date_modified"
51
+        , "modified_user_id"
52
+        , "created_by"
53
+        , "description"
54
+        , "subject"
55
+        , "body"
56
+        , "body_html"
57
+        , "name"
58
+        , "published"
59
+        ),
60 60
         'list_fields' =>  Array('id', 'name', 'description','date_modified'
61
-	),
61
+    ),
62 62
     'required_fields' => array("name"=>1),
63 63
 );
64 64
 ?>
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
modules/EmailTemplates/AttachFiles.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
  * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
39 39
  ********************************************************************************/
40 40
 
41
- //Request object must have these property values:
42
- //		Module: module name, this module should have a file called TreeData.php
43
- //		Function: name of the function to be called in TreeData.php, the function will be called statically.
44
- //		PARAM prefixed properties: array of these property/values will be passed to the function as parameter.
41
+    //Request object must have these property values:
42
+    //		Module: module name, this module should have a file called TreeData.php
43
+    //		Function: name of the function to be called in TreeData.php, the function will be called statically.
44
+    //		PARAM prefixed properties: array of these property/values will be passed to the function as parameter.
45 45
 
46 46
 
47 47
 require_once('include/JSON.php');
@@ -56,27 +56,27 @@  discard block
 block discarded – undo
56 56
 $ret = array();
57 57
 
58 58
 foreach($_FILES as $k => $file) {
59
-	if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) {
60
-	    $upload_file = new UploadFile($k);
61
-		// check the file
62
-		if($upload_file->confirm_upload()) {
63
-		    $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name
64
-		    $guid = create_guid();
65
-		    if($upload_file->final_move($guid)) { // move to uploads
66
-		        $path = $upload_file->get_upload_path($guid);
67
-		        // if file is OK, copy to cache
68
-		        if(verify_uploaded_image($path) && copy($path, $dest)) {
69
-		            $ret[] = $dest;
70
-		        }
71
-		        // remove temp file
72
-		        unlink($path);
73
-		    }
74
-		}
75
-	}
59
+    if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) {
60
+        $upload_file = new UploadFile($k);
61
+        // check the file
62
+        if($upload_file->confirm_upload()) {
63
+            $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name
64
+            $guid = create_guid();
65
+            if($upload_file->final_move($guid)) { // move to uploads
66
+                $path = $upload_file->get_upload_path($guid);
67
+                // if file is OK, copy to cache
68
+                if(verify_uploaded_image($path) && copy($path, $dest)) {
69
+                    $ret[] = $dest;
70
+                }
71
+                // remove temp file
72
+                unlink($path);
73
+            }
74
+        }
75
+    }
76 76
 }
77 77
 
78 78
 if (!empty($ret)) {
79
-	$json = getJSONobj();
80
-	echo $json->encode($ret);
81
-	//return the parameters
79
+    $json = getJSONobj();
80
+    echo $json->encode($ret);
81
+    //return the parameters
82 82
 }
Please login to merge, or discard this patch.
modules/EmailTemplates/CheckDeletable.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -50,38 +50,38 @@
 block discarded – undo
50 50
 
51 51
 $focus = new EmailTemplate();
52 52
 if($_REQUEST['from'] == 'DetailView') {
53
-	if(!isset($_REQUEST['record']))
54
-		sugar_die("A record number must be specified to delete the template.");
55
-	$focus->retrieve($_REQUEST['record']);
56
-	if(check_email_template_in_use($focus)) {
57
-		echo 'true';
58
-		return;
59
-	}
60
-	echo 'false';
53
+    if(!isset($_REQUEST['record']))
54
+        sugar_die("A record number must be specified to delete the template.");
55
+    $focus->retrieve($_REQUEST['record']);
56
+    if(check_email_template_in_use($focus)) {
57
+        echo 'true';
58
+        return;
59
+    }
60
+    echo 'false';
61 61
 } else if($_REQUEST['from'] == 'ListView') {
62
-	$returnString = '';
63
-	$idArray = explode(',', $_REQUEST['records']);
64
-	foreach($idArray as $key => $value) {
65
-		if($focus->retrieve($value)) {
66
-			if(check_email_template_in_use($focus)) {
67
-				$returnString .= $focus->name . ',';
68
-			}
69
-		}
70
-	}
71
-	$returnString = substr($returnString, 0, -1);
72
-	echo $returnString;
62
+    $returnString = '';
63
+    $idArray = explode(',', $_REQUEST['records']);
64
+    foreach($idArray as $key => $value) {
65
+        if($focus->retrieve($value)) {
66
+            if(check_email_template_in_use($focus)) {
67
+                $returnString .= $focus->name . ',';
68
+            }
69
+        }
70
+    }
71
+    $returnString = substr($returnString, 0, -1);
72
+    echo $returnString;
73 73
 } else {
74
-	echo '';
74
+    echo '';
75 75
 }
76 76
 
77 77
 function check_email_template_in_use($focus)
78 78
 {
79
-	if($focus->is_used_by_email_marketing()) {
80
-		return true;
81
-	}
82
-	$system = $GLOBALS['sugar_config']['passwordsetting'];
83
-	if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) {
84
-	    return true;
85
-	}
79
+    if($focus->is_used_by_email_marketing()) {
80
+        return true;
81
+    }
82
+    $system = $GLOBALS['sugar_config']['passwordsetting'];
83
+    if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) {
84
+        return true;
85
+    }
86 86
     return false;
87 87
 }
Please login to merge, or discard this patch.