Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
modules/Prospects/ProspectFormBase.php 3 patches
Indentation   +165 added lines, -165 removed lines patch added patch discarded remove patch
@@ -49,95 +49,95 @@  discard block
 block discarded – undo
49 49
 class ProspectFormBase  {
50 50
 
51 51
 function checkForDuplicates($prefix){
52
-	global $local_log;
53
-	require_once('include/formbase.php');
52
+    global $local_log;
53
+    require_once('include/formbase.php');
54 54
 	
55
-	$focus = new Prospect();
56
-	if(!checkRequired($prefix, array_keys($focus->required_fields))){
57
-		return null;
58
-	}
59
-	$query = '';
60
-	$baseQuery = 'select id,first_name, last_name, title, email1, email2  from prospects where deleted!=1 and (';
61
-	if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
62
-		$query = $baseQuery ."  (first_name like '". $_POST[$prefix.'first_name'] . "%' and last_name = '". $_POST[$prefix.'last_name'] ."')";
63
-	}else{
64
-			$query = $baseQuery ."  last_name = '". $_POST[$prefix.'last_name'] ."'";
65
-	}
66
-	if(!empty($_POST[$prefix.'email1'])){
67
-		if(empty($query)){
68
-		$query = $baseQuery. "  email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
69
-		}else {
70
-			$query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
71
-		}
72
-	}
73
-	if(!empty($_POST[$prefix.'email2'])){
74
-		if(empty($query))	{
75
-			$query = $baseQuery. "  email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
76
-		}else{
77
-			$query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
78
-		}
79
-
80
-	}
81
-
82
-	if(!empty($query)){
83
-		$rows = array();
55
+    $focus = new Prospect();
56
+    if(!checkRequired($prefix, array_keys($focus->required_fields))){
57
+        return null;
58
+    }
59
+    $query = '';
60
+    $baseQuery = 'select id,first_name, last_name, title, email1, email2  from prospects where deleted!=1 and (';
61
+    if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
62
+        $query = $baseQuery ."  (first_name like '". $_POST[$prefix.'first_name'] . "%' and last_name = '". $_POST[$prefix.'last_name'] ."')";
63
+    }else{
64
+            $query = $baseQuery ."  last_name = '". $_POST[$prefix.'last_name'] ."'";
65
+    }
66
+    if(!empty($_POST[$prefix.'email1'])){
67
+        if(empty($query)){
68
+        $query = $baseQuery. "  email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
69
+        }else {
70
+            $query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
71
+        }
72
+    }
73
+    if(!empty($_POST[$prefix.'email2'])){
74
+        if(empty($query))	{
75
+            $query = $baseQuery. "  email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
76
+        }else{
77
+            $query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
78
+        }
79
+
80
+    }
81
+
82
+    if(!empty($query)){
83
+        $rows = array();
84 84
 		
85
-		$db = DBManagerFactory::getInstance();
86
-		$result = $db->query($query.');');
85
+        $db = DBManagerFactory::getInstance();
86
+        $result = $db->query($query.');');
87 87
         while($row = $db->fetchByAssoc($result)) {
88 88
             $rows[] = $row;
89
-		}
90
-		if(count($rows) > 0) return $rows;
91
-		}
92
-	return null;
89
+        }
90
+        if(count($rows) > 0) return $rows;
91
+        }
92
+    return null;
93 93
 }
94 94
 
95 95
 
96 96
 function buildTableForm($rows, $mod=''){
97
-	global $action;
98
-	if(!empty($mod)){
99
-	global $current_language;
100
-	$mod_strings = return_module_language($current_language, $mod);
101
-	}else global $mod_strings;
102
-	global $app_strings;
103
-	$cols = sizeof($rows[0]) * 2 + 1;
104
-	if ($action != 'ShowDuplicates') 
105
-	{
106
-		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
107
-		$form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>";
108
-	}
109
-	else 
110
-	{
111
-		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
112
-	}
113
-	$form .= get_form_header($mod_strings['LBL_DUPLICATE'],"", '');
114
-	$form .= "<table width='100%' cellpadding='0' cellspacing='0'>	<tr >	";
115
-	if ($action != 'ShowDuplicates') 
116
-	{
117
-		$form .= "<td > &nbsp;</td>";
118
-	}
119
-
120
-	require_once('include/formbase.php');
121
-	$form .= getPostToForm();
122
-
123
-	if(isset($rows[0])){
124
-		foreach ($rows[0] as $key=>$value){
125
-			if($key != 'id'){
126
-					$form .= "<td scope='col' >". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
127
-			}
128
-		}
129
-		$form .= "</tr>";
130
-	}
131
-	$rowColor = 'oddListRowS1';
132
-	foreach($rows as $row){
133
-
134
-		$form .= "<tr class='$rowColor'>";
135
-		if ($action != 'ShowDuplicates') 
136
-			$form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>\n";
97
+    global $action;
98
+    if(!empty($mod)){
99
+    global $current_language;
100
+    $mod_strings = return_module_language($current_language, $mod);
101
+    }else global $mod_strings;
102
+    global $app_strings;
103
+    $cols = sizeof($rows[0]) * 2 + 1;
104
+    if ($action != 'ShowDuplicates') 
105
+    {
106
+        $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
107
+        $form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>";
108
+    }
109
+    else 
110
+    {
111
+        $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
112
+    }
113
+    $form .= get_form_header($mod_strings['LBL_DUPLICATE'],"", '');
114
+    $form .= "<table width='100%' cellpadding='0' cellspacing='0'>	<tr >	";
115
+    if ($action != 'ShowDuplicates') 
116
+    {
117
+        $form .= "<td > &nbsp;</td>";
118
+    }
119
+
120
+    require_once('include/formbase.php');
121
+    $form .= getPostToForm();
122
+
123
+    if(isset($rows[0])){
124
+        foreach ($rows[0] as $key=>$value){
125
+            if($key != 'id'){
126
+                    $form .= "<td scope='col' >". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
127
+            }
128
+        }
129
+        $form .= "</tr>";
130
+    }
131
+    $rowColor = 'oddListRowS1';
132
+    foreach($rows as $row){
133
+
134
+        $form .= "<tr class='$rowColor'>";
135
+        if ($action != 'ShowDuplicates') 
136
+            $form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>\n";
137 137
 		
138
-		$wasSet = false;
138
+        $wasSet = false;
139 139
 
140
-		foreach ($row as $key=>$value) {
140
+        foreach ($row as $key=>$value) {
141 141
             if($key != 'id') {
142 142
                 if(!$wasSet) {
143 143
                     $form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
@@ -147,25 +147,25 @@  discard block
 block discarded – undo
147 147
                     $form .= "<td><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
148 148
                 }
149 149
             }
150
-		}
151
-
152
-		if($rowColor == 'evenListRowS1'){
153
-			$rowColor = 'oddListRowS1';
154
-		}else{
155
-			 $rowColor = 'evenListRowS1';
156
-		}
157
-		$form .= "</tr>";
158
-	}
159
-	$form .= "<tr ><td colspan='$cols' class='blackline'></td></tr>";
160
-	if ($action == 'ShowDuplicates') 
161
-	{
162
-		$form .= "</table><br><input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='${app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value='  ${app_strings['LBL_SAVE_BUTTON_LABEL']}  '> <input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView'; this.form.module.value='Prospects';\" type='submit' name='button' value='  ${app_strings['LBL_CANCEL_BUTTON_LABEL']}  '></form>";
163
-	}
164
-	else 
165
-	{
166
-		$form .= "</table><br><input type='submit' class='button' name='ContinueProspect' value='${mod_strings['LNK_NEW_PROSPECT']}'></form>";
167
-	}
168
-	return $form;
150
+        }
151
+
152
+        if($rowColor == 'evenListRowS1'){
153
+            $rowColor = 'oddListRowS1';
154
+        }else{
155
+                $rowColor = 'evenListRowS1';
156
+        }
157
+        $form .= "</tr>";
158
+    }
159
+    $form .= "<tr ><td colspan='$cols' class='blackline'></td></tr>";
160
+    if ($action == 'ShowDuplicates') 
161
+    {
162
+        $form .= "</table><br><input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='${app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value='  ${app_strings['LBL_SAVE_BUTTON_LABEL']}  '> <input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView'; this.form.module.value='Prospects';\" type='submit' name='button' value='  ${app_strings['LBL_CANCEL_BUTTON_LABEL']}  '></form>";
163
+    }
164
+    else 
165
+    {
166
+        $form .= "</table><br><input type='submit' class='button' name='ContinueProspect' value='${mod_strings['LNK_NEW_PROSPECT']}'></form>";
167
+    }
168
+    return $form;
169 169
 
170 170
 
171 171
 
@@ -173,31 +173,31 @@  discard block
 block discarded – undo
173 173
 
174 174
 }
175 175
 function getWideFormBody($prefix, $mod='',$formname='',  $prospect = ''){
176
-	if(!ACLController::checkAccess('Prospects', 'edit', true)){
177
-		return '';
178
-	}
176
+    if(!ACLController::checkAccess('Prospects', 'edit', true)){
177
+        return '';
178
+    }
179 179
 	
180
-	if(empty($prospect)){
181
-		$prospect = new Prospect();
182
-	}
183
-	global $mod_strings;
180
+    if(empty($prospect)){
181
+        $prospect = new Prospect();
182
+    }
183
+    global $mod_strings;
184 184
 $temp_strings = $mod_strings;
185 185
 if(!empty($mod)){
186
-	global $current_language;
187
-	$mod_strings = return_module_language($current_language, $mod);
186
+    global $current_language;
187
+    $mod_strings = return_module_language($current_language, $mod);
188 188
 }
189
-		global $app_strings;
190
-		global $current_user;
191
-		global $app_list_strings;
192
-		$primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $prospect->primary_address_country);
193
-		$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
194
-		$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
195
-		$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
196
-		$lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
197
-		$lbl_address =  $mod_strings['LBL_PRIMARY_ADDRESS'];
198
-		$user_id = $current_user->id;
199
-		$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
200
-		$form = <<<EOQ
189
+        global $app_strings;
190
+        global $current_user;
191
+        global $app_list_strings;
192
+        $primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $prospect->primary_address_country);
193
+        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
194
+        $lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
195
+        $lbl_last_name = $mod_strings['LBL_LAST_NAME'];
196
+        $lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
197
+        $lbl_address =  $mod_strings['LBL_PRIMARY_ADDRESS'];
198
+        $user_id = $current_user->id;
199
+        $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
200
+        $form = <<<EOQ
201 201
 		<input type="hidden" name="${prefix}record" value="">
202 202
 		<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
203 203
 		<table border='0' celpadding="0" cellspacing="0" width='100%'>
@@ -304,26 +304,26 @@  discard block
 block discarded – undo
304 304
 }
305 305
 
306 306
 function getFormBody($prefix, $mod='', $formname=''){
307
-	if(!ACLController::checkAccess('Prospects', 'edit', true)){
308
-		return '';
309
-	}
307
+    if(!ACLController::checkAccess('Prospects', 'edit', true)){
308
+        return '';
309
+    }
310 310
 global $mod_strings;
311 311
 $temp_strings = $mod_strings;
312 312
 if(!empty($mod)){
313
-	global $current_language;
314
-	$mod_strings = return_module_language($current_language, $mod);
313
+    global $current_language;
314
+    $mod_strings = return_module_language($current_language, $mod);
315 315
 }
316
-		global $app_strings;
317
-		global $current_user;
318
-		$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
319
-		$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
320
-		$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
321
-		$lbl_phone = $mod_strings['LBL_PHONE'];
322
-		$user_id = $current_user->id;
323
-		$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
316
+        global $app_strings;
317
+        global $current_user;
318
+        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
319
+        $lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
320
+        $lbl_last_name = $mod_strings['LBL_LAST_NAME'];
321
+        $lbl_phone = $mod_strings['LBL_PHONE'];
322
+        $user_id = $current_user->id;
323
+        $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
324 324
 if ($formname == 'EmailEditView')
325 325
 {
326
-		$form = <<<EOQ
326
+        $form = <<<EOQ
327 327
 		<input type="hidden" name="${prefix}record" value="">
328 328
 		<input type="hidden" name="${prefix}email2" value="">
329 329
 		<input type="hidden" name="${prefix}phone_work" value="">
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 }
340 340
 else
341 341
 {
342
-		$form = <<<EOQ
342
+        $form = <<<EOQ
343 343
 		<input type="hidden" name="${prefix}record" value="">
344 344
 		<input type="hidden" name="${prefix}email2" value="">
345 345
 		<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
 }
370 370
 function getForm($prefix, $mod=''){
371 371
 if(!ACLController::checkAccess('Prospects', 'edit', true)){
372
-		return '';
373
-	}
372
+        return '';
373
+    }
374 374
 if(!empty($mod)){
375
-	global $current_language;
376
-	$mod_strings = return_module_language($current_language, $mod);
375
+    global $current_language;
376
+    $mod_strings = return_module_language($current_language, $mod);
377 377
 }else global $mod_strings;
378 378
 global $app_strings;
379 379
 
@@ -405,31 +405,31 @@  discard block
 block discarded – undo
405 405
 
406 406
 
407 407
 function handleSave($prefix,$redirect=true, $useRequired=false){
408
-	global $theme;
408
+    global $theme;
409 409
 	
410 410
 	
411 411
 	
412 412
 	
413
-	require_once('include/formbase.php');
413
+    require_once('include/formbase.php');
414 414
 	
415
-	global $timedate;
415
+    global $timedate;
416 416
 	
417 417
 	
418
-	$focus = new Prospect();
419
-	if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
420
-		return null;
421
-	}
422
-	$focus = populateFromPost($prefix, $focus);
423
-	if(!$focus->ACLAccess('Save')){
424
-		return null;
425
-	}
426
-	if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false;
418
+    $focus = new Prospect();
419
+    if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
420
+        return null;
421
+    }
422
+    $focus = populateFromPost($prefix, $focus);
423
+    if(!$focus->ACLAccess('Save')){
424
+        return null;
425
+    }
426
+    if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false;
427 427
 	
428
-	if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
429
-	if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
428
+    if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
429
+    if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
430 430
 	
431
-	if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
432
-		/*
431
+    if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
432
+        /*
433 433
 		// we don't check dupes on Prospects - this is the dirtiest data in the system
434 434
 		//$duplicateProspects = $this->checkForDuplicates($prefix);
435 435
 		if(isset($duplicateProspects)){
@@ -473,13 +473,13 @@  discard block
 block discarded – undo
473 473
 			header("Location: index.php?$get");
474 474
 			return null;
475 475
 		}*/
476
-	}
477
-	global $current_user;
476
+    }
477
+    global $current_user;
478 478
 
479
-	$focus->save($GLOBALS['check_notify']);
480
-	$return_id = $focus->id;
479
+    $focus->save($GLOBALS['check_notify']);
480
+    $return_id = $focus->id;
481 481
     
482
-	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
482
+    $GLOBALS['log']->debug("Saved record with id of ".$return_id);
483 483
     if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
484 484
         $get = '&module=';
485 485
         if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
@@ -497,12 +497,12 @@  discard block
 block discarded – undo
497 497
         header("Location: index.php?$get");
498 498
         return;
499 499
     }
500
-	if($redirect){
501
-	    require_once('include/formbase.php');
502
-	    handleRedirect($return_id, 'Prospects');
503
-	}else{
504
-		return $focus;
505
-	}
500
+    if($redirect){
501
+        require_once('include/formbase.php');
502
+        handleRedirect($return_id, 'Prospects');
503
+    }else{
504
+        return $focus;
505
+    }
506 506
 }
507 507
 
508 508
 }
Please login to merge, or discard this patch.
Spacing   +69 added lines, -69 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.
@@ -46,71 +46,71 @@  discard block
 block discarded – undo
46 46
  * Contributor(s): ______________________________________..
47 47
  ********************************************************************************/
48 48
 
49
-class ProspectFormBase  {
49
+class ProspectFormBase {
50 50
 
51
-function checkForDuplicates($prefix){
51
+function checkForDuplicates($prefix) {
52 52
 	global $local_log;
53 53
 	require_once('include/formbase.php');
54 54
 	
55 55
 	$focus = new Prospect();
56
-	if(!checkRequired($prefix, array_keys($focus->required_fields))){
56
+	if (!checkRequired($prefix, array_keys($focus->required_fields))) {
57 57
 		return null;
58 58
 	}
59 59
 	$query = '';
60 60
 	$baseQuery = 'select id,first_name, last_name, title, email1, email2  from prospects where deleted!=1 and (';
61
-	if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
62
-		$query = $baseQuery ."  (first_name like '". $_POST[$prefix.'first_name'] . "%' and last_name = '". $_POST[$prefix.'last_name'] ."')";
63
-	}else{
64
-			$query = $baseQuery ."  last_name = '". $_POST[$prefix.'last_name'] ."'";
61
+	if (!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])) {
62
+		$query = $baseQuery."  (first_name like '".$_POST[$prefix.'first_name']."%' and last_name = '".$_POST[$prefix.'last_name']."')";
63
+	} else {
64
+			$query = $baseQuery."  last_name = '".$_POST[$prefix.'last_name']."'";
65 65
 	}
66
-	if(!empty($_POST[$prefix.'email1'])){
67
-		if(empty($query)){
68
-		$query = $baseQuery. "  email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
69
-		}else {
70
-			$query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
66
+	if (!empty($_POST[$prefix.'email1'])) {
67
+		if (empty($query)) {
68
+		$query = $baseQuery."  email1='".$_POST[$prefix.'email1']."' or email2 = '".$_POST[$prefix.'email1']."'";
69
+		} else {
70
+			$query .= "or email1='".$_POST[$prefix.'email1']."' or email2 = '".$_POST[$prefix.'email1']."'";
71 71
 		}
72 72
 	}
73
-	if(!empty($_POST[$prefix.'email2'])){
74
-		if(empty($query))	{
75
-			$query = $baseQuery. "  email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
76
-		}else{
77
-			$query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
73
+	if (!empty($_POST[$prefix.'email2'])) {
74
+		if (empty($query)) {
75
+			$query = $baseQuery."  email1='".$_POST[$prefix.'email2']."' or email2 = '".$_POST[$prefix.'email2']."'";
76
+		} else {
77
+			$query .= "or email1='".$_POST[$prefix.'email2']."' or email2 = '".$_POST[$prefix.'email2']."'";
78 78
 		}
79 79
 
80 80
 	}
81 81
 
82
-	if(!empty($query)){
82
+	if (!empty($query)) {
83 83
 		$rows = array();
84 84
 		
85 85
 		$db = DBManagerFactory::getInstance();
86 86
 		$result = $db->query($query.');');
87
-        while($row = $db->fetchByAssoc($result)) {
87
+        while ($row = $db->fetchByAssoc($result)) {
88 88
             $rows[] = $row;
89 89
 		}
90
-		if(count($rows) > 0) return $rows;
90
+		if (count($rows) > 0) return $rows;
91 91
 		}
92 92
 	return null;
93 93
 }
94 94
 
95 95
 
96
-function buildTableForm($rows, $mod=''){
96
+function buildTableForm($rows, $mod = '') {
97 97
 	global $action;
98
-	if(!empty($mod)){
98
+	if (!empty($mod)) {
99 99
 	global $current_language;
100 100
 	$mod_strings = return_module_language($current_language, $mod);
101
-	}else global $mod_strings;
101
+	} else global $mod_strings;
102 102
 	global $app_strings;
103 103
 	$cols = sizeof($rows[0]) * 2 + 1;
104 104
 	if ($action != 'ShowDuplicates') 
105 105
 	{
106
-		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
106
+		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE'].'</td></tr><tr><td height="20"></td></tr></table>';
107 107
 		$form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>";
108 108
 	}
109 109
 	else 
110 110
 	{
111
-		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
111
+		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES'].'</td></tr><tr><td height="20"></td></tr></table>';
112 112
 	}
113
-	$form .= get_form_header($mod_strings['LBL_DUPLICATE'],"", '');
113
+	$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
114 114
 	$form .= "<table width='100%' cellpadding='0' cellspacing='0'>	<tr >	";
115 115
 	if ($action != 'ShowDuplicates') 
116 116
 	{
@@ -120,16 +120,16 @@  discard block
 block discarded – undo
120 120
 	require_once('include/formbase.php');
121 121
 	$form .= getPostToForm();
122 122
 
123
-	if(isset($rows[0])){
124
-		foreach ($rows[0] as $key=>$value){
125
-			if($key != 'id'){
126
-					$form .= "<td scope='col' >". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
123
+	if (isset($rows[0])) {
124
+		foreach ($rows[0] as $key=>$value) {
125
+			if ($key != 'id') {
126
+					$form .= "<td scope='col' >".$mod_strings[$mod_strings['db_'.$key]]."</td>";
127 127
 			}
128 128
 		}
129 129
 		$form .= "</tr>";
130 130
 	}
131 131
 	$rowColor = 'oddListRowS1';
132
-	foreach($rows as $row){
132
+	foreach ($rows as $row) {
133 133
 
134 134
 		$form .= "<tr class='$rowColor'>";
135 135
 		if ($action != 'ShowDuplicates') 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 		$wasSet = false;
139 139
 
140 140
 		foreach ($row as $key=>$value) {
141
-            if($key != 'id') {
142
-                if(!$wasSet) {
141
+            if ($key != 'id') {
142
+                if (!$wasSet) {
143 143
                     $form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
144 144
                     $wasSet = true;
145 145
                 }
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
             }
150 150
 		}
151 151
 
152
-		if($rowColor == 'evenListRowS1'){
152
+		if ($rowColor == 'evenListRowS1') {
153 153
 			$rowColor = 'oddListRowS1';
154
-		}else{
154
+		} else {
155 155
 			 $rowColor = 'evenListRowS1';
156 156
 		}
157 157
 		$form .= "</tr>";
@@ -172,17 +172,17 @@  discard block
 block discarded – undo
172 172
 
173 173
 
174 174
 }
175
-function getWideFormBody($prefix, $mod='',$formname='',  $prospect = ''){
176
-	if(!ACLController::checkAccess('Prospects', 'edit', true)){
175
+function getWideFormBody($prefix, $mod = '', $formname = '', $prospect = '') {
176
+	if (!ACLController::checkAccess('Prospects', 'edit', true)) {
177 177
 		return '';
178 178
 	}
179 179
 	
180
-	if(empty($prospect)){
180
+	if (empty($prospect)) {
181 181
 		$prospect = new Prospect();
182 182
 	}
183 183
 	global $mod_strings;
184 184
 $temp_strings = $mod_strings;
185
-if(!empty($mod)){
185
+if (!empty($mod)) {
186 186
 	global $current_language;
187 187
 	$mod_strings = return_module_language($current_language, $mod);
188 188
 }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
195 195
 		$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
196 196
 		$lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
197
-		$lbl_address =  $mod_strings['LBL_PRIMARY_ADDRESS'];
197
+		$lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
198 198
 		$user_id = $current_user->id;
199 199
 		$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
200 200
 		$form = <<<EOQ
@@ -295,21 +295,21 @@  discard block
 block discarded – undo
295 295
 $javascript = new javascript();
296 296
 $javascript->setFormName($formname);
297 297
 $javascript->setSugarBean(new Prospect());
298
-$javascript->addField('email1','false',$prefix);
299
-$javascript->addField('email2','false',$prefix);
298
+$javascript->addField('email1', 'false', $prefix);
299
+$javascript->addField('email2', 'false', $prefix);
300 300
 $javascript->addRequiredFields($prefix);
301
-$form .=$javascript->getScript();
301
+$form .= $javascript->getScript();
302 302
 $mod_strings = $temp_strings;
303 303
 return $form;
304 304
 }
305 305
 
306
-function getFormBody($prefix, $mod='', $formname=''){
307
-	if(!ACLController::checkAccess('Prospects', 'edit', true)){
306
+function getFormBody($prefix, $mod = '', $formname = '') {
307
+	if (!ACLController::checkAccess('Prospects', 'edit', true)) {
308 308
 		return '';
309 309
 	}
310 310
 global $mod_strings;
311 311
 $temp_strings = $mod_strings;
312
-if(!empty($mod)){
312
+if (!empty($mod)) {
313 313
 	global $current_language;
314 314
 	$mod_strings = return_module_language($current_language, $mod);
315 315
 }
@@ -359,22 +359,22 @@  discard block
 block discarded – undo
359 359
 $javascript = new javascript();
360 360
 $javascript->setFormName($formname);
361 361
 $javascript->setSugarBean(new Prospect());
362
-$javascript->addField('email1','false',$prefix);
362
+$javascript->addField('email1', 'false', $prefix);
363 363
 $javascript->addRequiredFields($prefix);
364 364
 
365
-$form .=$javascript->getScript();
365
+$form .= $javascript->getScript();
366 366
 $mod_strings = $temp_strings;
367 367
 return $form;
368 368
 
369 369
 }
370
-function getForm($prefix, $mod=''){
371
-if(!ACLController::checkAccess('Prospects', 'edit', true)){
370
+function getForm($prefix, $mod = '') {
371
+if (!ACLController::checkAccess('Prospects', 'edit', true)) {
372 372
 		return '';
373 373
 	}
374
-if(!empty($mod)){
374
+if (!empty($mod)) {
375 375
 	global $current_language;
376 376
 	$mod_strings = return_module_language($current_language, $mod);
377
-}else global $mod_strings;
377
+} else global $mod_strings;
378 378
 global $app_strings;
379 379
 
380 380
 $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 			<input type="hidden" name="${prefix}module" value="Prospects">
390 390
 			<input type="hidden" name="${prefix}action" value="Save">
391 391
 EOQ;
392
-$the_form .= $this->getFormBody($prefix,'Prospects', "${prefix}ProspectSave");
392
+$the_form .= $this->getFormBody($prefix, 'Prospects', "${prefix}ProspectSave");
393 393
 $the_form .= <<<EOQ
394 394
 		<input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="${prefix}button" value="  $lbl_save_button_label  " >
395 395
 		</form>
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 }
405 405
 
406 406
 
407
-function handleSave($prefix,$redirect=true, $useRequired=false){
407
+function handleSave($prefix, $redirect = true, $useRequired = false) {
408 408
 	global $theme;
409 409
 	
410 410
 	
@@ -416,14 +416,14 @@  discard block
 block discarded – undo
416 416
 	
417 417
 	
418 418
 	$focus = new Prospect();
419
-	if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
419
+	if ($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
420 420
 		return null;
421 421
 	}
422 422
 	$focus = populateFromPost($prefix, $focus);
423
-	if(!$focus->ACLAccess('Save')){
423
+	if (!$focus->ACLAccess('Save')) {
424 424
 		return null;
425 425
 	}
426
-	if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false;
426
+	if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify'] = false;
427 427
 	
428 428
 	if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
429 429
 	if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
@@ -480,27 +480,27 @@  discard block
 block discarded – undo
480 480
 	$return_id = $focus->id;
481 481
     
482 482
 	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
483
-    if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
483
+    if (isset($_POST['popup']) && $_POST['popup'] == 'true') {
484 484
         $get = '&module=';
485
-        if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
485
+        if (!empty($_POST['return_module'])) $get .= $_POST['return_module'];
486 486
         else $get .= 'Prospects';
487 487
         $get .= '&action=';
488
-        if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
488
+        if (!empty($_POST['return_action'])) $get .= $_POST['return_action'];
489 489
         else $get .= 'Popup';
490
-        if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
491
-        if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
492
-        if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
493
-        if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
494
-        $get .= '&first_name=' . $focus->first_name;
495
-        $get .= '&last_name=' . $focus->last_name;
490
+        if (!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
491
+        if (!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
492
+        if (!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
493
+        if (!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
494
+        $get .= '&first_name='.$focus->first_name;
495
+        $get .= '&last_name='.$focus->last_name;
496 496
         $get .= '&query=true';
497 497
         header("Location: index.php?$get");
498 498
         return;
499 499
     }
500
-	if($redirect){
500
+	if ($redirect) {
501 501
 	    require_once('include/formbase.php');
502 502
 	    handleRedirect($return_id, 'Prospects');
503
-	}else{
503
+	} else {
504 504
 		return $focus;
505 505
 	}
506 506
 }
Please login to merge, or discard this patch.
Braces   +53 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -60,20 +62,20 @@  discard block
 block discarded – undo
60 62
 	$baseQuery = 'select id,first_name, last_name, title, email1, email2  from prospects where deleted!=1 and (';
61 63
 	if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
62 64
 		$query = $baseQuery ."  (first_name like '". $_POST[$prefix.'first_name'] . "%' and last_name = '". $_POST[$prefix.'last_name'] ."')";
63
-	}else{
65
+	} else{
64 66
 			$query = $baseQuery ."  last_name = '". $_POST[$prefix.'last_name'] ."'";
65 67
 	}
66 68
 	if(!empty($_POST[$prefix.'email1'])){
67 69
 		if(empty($query)){
68 70
 		$query = $baseQuery. "  email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
69
-		}else {
71
+		} else {
70 72
 			$query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
71 73
 		}
72 74
 	}
73 75
 	if(!empty($_POST[$prefix.'email2'])){
74 76
 		if(empty($query))	{
75 77
 			$query = $baseQuery. "  email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
76
-		}else{
78
+		} else{
77 79
 			$query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
78 80
 		}
79 81
 
@@ -87,7 +89,9 @@  discard block
 block discarded – undo
87 89
         while($row = $db->fetchByAssoc($result)) {
88 90
             $rows[] = $row;
89 91
 		}
90
-		if(count($rows) > 0) return $rows;
92
+		if(count($rows) > 0) {
93
+		    return $rows;
94
+		}
91 95
 		}
92 96
 	return null;
93 97
 }
@@ -98,15 +102,16 @@  discard block
 block discarded – undo
98 102
 	if(!empty($mod)){
99 103
 	global $current_language;
100 104
 	$mod_strings = return_module_language($current_language, $mod);
101
-	}else global $mod_strings;
105
+	} else {
106
+	    global $mod_strings;
107
+	}
102 108
 	global $app_strings;
103 109
 	$cols = sizeof($rows[0]) * 2 + 1;
104 110
 	if ($action != 'ShowDuplicates') 
105 111
 	{
106 112
 		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
107 113
 		$form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>";
108
-	}
109
-	else 
114
+	} else 
110 115
 	{
111 116
 		$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
112 117
 	}
@@ -132,8 +137,9 @@  discard block
 block discarded – undo
132 137
 	foreach($rows as $row){
133 138
 
134 139
 		$form .= "<tr class='$rowColor'>";
135
-		if ($action != 'ShowDuplicates') 
136
-			$form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>\n";
140
+		if ($action != 'ShowDuplicates') {
141
+					$form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>\n";
142
+		}
137 143
 		
138 144
 		$wasSet = false;
139 145
 
@@ -142,8 +148,7 @@  discard block
 block discarded – undo
142 148
                 if(!$wasSet) {
143 149
                     $form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
144 150
                     $wasSet = true;
145
-                }
146
-                else {
151
+                } else {
147 152
                     $form .= "<td><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
148 153
                 }
149 154
             }
@@ -151,7 +156,7 @@  discard block
 block discarded – undo
151 156
 
152 157
 		if($rowColor == 'evenListRowS1'){
153 158
 			$rowColor = 'oddListRowS1';
154
-		}else{
159
+		} else{
155 160
 			 $rowColor = 'evenListRowS1';
156 161
 		}
157 162
 		$form .= "</tr>";
@@ -374,7 +379,9 @@  discard block
 block discarded – undo
374 379
 if(!empty($mod)){
375 380
 	global $current_language;
376 381
 	$mod_strings = return_module_language($current_language, $mod);
377
-}else global $mod_strings;
382
+} else {
383
+    global $mod_strings;
384
+}
378 385
 global $app_strings;
379 386
 
380 387
 $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
@@ -423,10 +430,16 @@  discard block
 block discarded – undo
423 430
 	if(!$focus->ACLAccess('Save')){
424 431
 		return null;
425 432
 	}
426
-	if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false;
433
+	if (!isset($GLOBALS['check_notify'])) {
434
+	    $GLOBALS['check_notify']=false;
435
+	}
427 436
 	
428
-	if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
429
-	if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
437
+	if (!isset($_POST[$prefix.'email_opt_out'])) {
438
+	    $focus->email_opt_out = 0;
439
+	}
440
+	if (!isset($_POST[$prefix.'do_not_call'])) {
441
+	    $focus->do_not_call = 0;
442
+	}
430 443
 	
431 444
 	if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
432 445
 		/*
@@ -482,15 +495,29 @@  discard block
 block discarded – undo
482 495
 	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
483 496
     if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
484 497
         $get = '&module=';
485
-        if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
486
-        else $get .= 'Prospects';
498
+        if(!empty($_POST['return_module'])) {
499
+            $get .= $_POST['return_module'];
500
+        } else {
501
+            $get .= 'Prospects';
502
+        }
487 503
         $get .= '&action=';
488
-        if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
489
-        else $get .= 'Popup';
490
-        if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
491
-        if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
492
-        if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
493
-        if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
504
+        if(!empty($_POST['return_action'])) {
505
+            $get .= $_POST['return_action'];
506
+        } else {
507
+            $get .= 'Popup';
508
+        }
509
+        if(!empty($_POST['return_id'])) {
510
+            $get .= '&return_id='.$_POST['return_id'];
511
+        }
512
+        if(!empty($_POST['popup'])) {
513
+            $get .= '&popup='.$_POST['popup'];
514
+        }
515
+        if(!empty($_POST['create'])) {
516
+            $get .= '&create='.$_POST['create'];
517
+        }
518
+        if(!empty($_POST['to_pdf'])) {
519
+            $get .= '&to_pdf='.$_POST['to_pdf'];
520
+        }
494 521
         $get .= '&first_name=' . $focus->first_name;
495 522
         $get .= '&last_name=' . $focus->last_name;
496 523
         $get .= '&query=true';
@@ -500,7 +527,7 @@  discard block
 block discarded – undo
500 527
 	if($redirect){
501 528
 	    require_once('include/formbase.php');
502 529
 	    handleRedirect($return_id, 'Prospects');
503
-	}else{
530
+	} else{
504 531
 		return $focus;
505 532
 	}
506 533
 }
Please login to merge, or discard this patch.
modules/Prospects/metadata/additionalDetails.php 3 patches
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -40,58 +40,58 @@
 block discarded – undo
40 40
 
41 41
 
42 42
 function additionalDetailsProspect($fields) {
43
-	static $mod_strings;
44
-	if(empty($mod_strings)) {
45
-		global $current_language;
46
-		$mod_strings = return_module_language($current_language, 'Prospects');
47
-	}
43
+    static $mod_strings;
44
+    if(empty($mod_strings)) {
45
+        global $current_language;
46
+        $mod_strings = return_module_language($current_language, 'Prospects');
47
+    }
48 48
 		
49
-	$overlib_string = '';
49
+    $overlib_string = '';
50 50
 	
51
-	if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
52
-	if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
53
-		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
54
-		!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
55
-			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
56
-	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
57
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
58
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
59
-	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
60
-	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
61
-	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
62
-	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
63
-	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
64
-		$overlib_string .= '<br>';  
65
-	if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
66
-	if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
67
-	if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
51
+    if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
52
+    if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
53
+        !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
54
+        !empty($fields['PRIMARY_ADDRESS_COUNTRY']))
55
+            $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
56
+    if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
57
+    if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
58
+    if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
59
+    if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
60
+    if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
61
+    if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
62
+    if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
63
+    if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
64
+        $overlib_string .= '<br>';  
65
+    if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
66
+    if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
67
+    if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
68 68
 
69
-	if(!empty($fields['EMAIL1'])) 
70
-		$overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . 
71
-								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
72
-								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
73
-								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" .
74
-								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") .
75
-								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>";
76
-	if(!empty($fields['EMAIL2'])) 
77
-		$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
78
-								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
79
-								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
80
-								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
81
-								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
82
-								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>";
69
+    if(!empty($fields['EMAIL1'])) 
70
+        $overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . 
71
+                                    "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
72
+                                    "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
73
+                                    "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" .
74
+                                    "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") .
75
+                                    "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>";
76
+    if(!empty($fields['EMAIL2'])) 
77
+        $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
78
+                                    "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
79
+                                    "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
80
+                                    "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
81
+                                    "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
82
+                                    "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>";
83 83
 	
84
-	if(!empty($fields['DESCRIPTION'])) { 
85
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
86
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
87
-	}	
84
+    if(!empty($fields['DESCRIPTION'])) { 
85
+        $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
86
+        if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
87
+    }	
88 88
 	
89
-	return array('fieldToAddTo' => 'FULL_NAME', 
90
-				 'string' => $overlib_string, 
91
-				 'editLink' => "index.php?action=EditView&module=Prospects&return_module=Prospects&record={$fields['ID']}", 
92
-				 'viewLink' => "index.php?action=DetailView&module=Prospects&return_module=Prospects&record={$fields['ID']}");
89
+    return array('fieldToAddTo' => 'FULL_NAME', 
90
+                    'string' => $overlib_string, 
91
+                    'editLink' => "index.php?action=EditView&module=Prospects&return_module=Prospects&record={$fields['ID']}", 
92
+                    'viewLink' => "index.php?action=DetailView&module=Prospects&return_module=Prospects&record={$fields['ID']}");
93 93
 	
94 94
 }
95 95
  
96
- ?>
96
+    ?>
97 97
  
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 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.
@@ -41,49 +41,49 @@  discard block
 block discarded – undo
41 41
 
42 42
 function additionalDetailsProspect($fields) {
43 43
 	static $mod_strings;
44
-	if(empty($mod_strings)) {
44
+	if (empty($mod_strings)) {
45 45
 		global $current_language;
46 46
 		$mod_strings = return_module_language($current_language, 'Prospects');
47 47
 	}
48 48
 		
49 49
 	$overlib_string = '';
50 50
 	
51
-	if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
52
-	if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
51
+	if (!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'.$mod_strings['LBL_EDIT_ACCOUNT_NAME'].'</b> '.$fields['ACCOUNT_NAME'].'<br>';
52
+	if (!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
53 53
 		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
54 54
 		!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
55
-			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
56
-	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
57
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
58
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
59
-	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
60
-	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
61
-	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
62
-	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
63
-	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
55
+			$overlib_string .= '<b>'.$mod_strings['LBL_PRIMARY_ADDRESS'].'</b><br>';
56
+	if (!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'].'<br>';
57
+	if (!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'].'<br>';
58
+	if (!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'].'<br>';
59
+	if (!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'].', ';
60
+	if (!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'].' ';
61
+	if (!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'].' ';
62
+	if (!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'].'<br>';
63
+	if (strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
64 64
 		$overlib_string .= '<br>';  
65
-	if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
66
-	if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
67
-	if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
65
+	if (!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'.$mod_strings['LBL_MOBILE_PHONE'].'</b> <span class="phone">'.$fields['PHONE_MOBILE'].'</span><br>';
66
+	if (!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'.$mod_strings['LBL_HOME_PHONE'].'</b> <span class="phone">'.$fields['PHONE_HOME'].'</span><br>';
67
+	if (!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_PHONE'].'</b> <span class="phone">'.$fields['PHONE_OTHER'].'</span><br>';
68 68
 
69
-	if(!empty($fields['EMAIL1'])) 
70
-		$overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . 
71
-								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
72
-								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
73
-								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" .
74
-								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") .
69
+	if (!empty($fields['EMAIL1'])) 
70
+		$overlib_string .= '<b>'.$mod_strings['LBL_EMAIL_ADDRESS'].'</b> '. 
71
+								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&".
72
+								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names".
73
+								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&".
74
+								 "to_email_addrs=".urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>").
75 75
 								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>";
76
-	if(!empty($fields['EMAIL2'])) 
77
-		$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
78
-								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
79
-								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
80
-								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
81
-								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
76
+	if (!empty($fields['EMAIL2'])) 
77
+		$overlib_string .= '<b>'.$mod_strings['LBL_OTHER_EMAIL_ADDRESS'].'</b> '. 
78
+								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&".
79
+								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names".
80
+								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&".
81
+								 "to_email_addrs=".urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>").
82 82
 								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>";
83 83
 	
84
-	if(!empty($fields['DESCRIPTION'])) { 
85
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
86
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
84
+	if (!empty($fields['DESCRIPTION'])) { 
85
+		$overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300);
86
+		if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
87 87
 	}	
88 88
 	
89 89
 	return array('fieldToAddTo' => 'FULL_NAME', 
Please login to merge, or discard this patch.
Braces   +51 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -48,42 +50,70 @@  discard block
 block discarded – undo
48 50
 		
49 51
 	$overlib_string = '';
50 52
 	
51
-	if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
53
+	if(!empty($fields['ACCOUNT_NAME'])) {
54
+	    $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
55
+	}
52 56
 	if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
53 57
 		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
54
-		!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
55
-			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
56
-	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
57
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
58
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
59
-	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
60
-	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
61
-	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
62
-	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
63
-	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
64
-		$overlib_string .= '<br>';  
65
-	if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
66
-	if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
67
-	if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
58
+		!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
59
+				$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
60
+	}
61
+	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) {
62
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
63
+	}
64
+	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) {
65
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
66
+	}
67
+	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) {
68
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
69
+	}
70
+	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) {
71
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
72
+	}
73
+	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) {
74
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
75
+	}
76
+	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) {
77
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
78
+	}
79
+	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
80
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
81
+	}
82
+	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) {
83
+			$overlib_string .= '<br>';
84
+	}
85
+	if(!empty($fields['PHONE_MOBILE'])) {
86
+	    $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
87
+	}
88
+	if(!empty($fields['PHONE_HOME'])) {
89
+	    $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
90
+	}
91
+	if(!empty($fields['PHONE_OTHER'])) {
92
+	    $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
93
+	}
68 94
 
69
-	if(!empty($fields['EMAIL1'])) 
70
-		$overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . 
95
+	if(!empty($fields['EMAIL1'])) {
96
+			$overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . 
71 97
 								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
72 98
 								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
73 99
 								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" .
74 100
 								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") .
75 101
 								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>";
76
-	if(!empty($fields['EMAIL2'])) 
77
-		$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
102
+	}
103
+	if(!empty($fields['EMAIL2'])) {
104
+			$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
78 105
 								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
79 106
 								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
80 107
 								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
81 108
 								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
82 109
 								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>";
110
+	}
83 111
 	
84 112
 	if(!empty($fields['DESCRIPTION'])) { 
85 113
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
86
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
114
+		if(strlen($fields['DESCRIPTION']) > 300) {
115
+		    $overlib_string .= '...';
116
+		}
87 117
 	}	
88 118
 	
89 119
 	return array('fieldToAddTo' => 'FULL_NAME', 
Please login to merge, or discard this patch.
modules/Prospects/metadata/editviewdefs.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -43,72 +43,72 @@
 block discarded – undo
43 43
                                             array('label' => '10', 'field' => '30'), 
44 44
                                             array('label' => '10', 'field' => '30')
45 45
                                             ),
46
-     ),
47
- 'panels' =>array (
48
-  'lbl_prospect_information' => 
49
-  array (
46
+        ),
47
+    'panels' =>array (
48
+    'lbl_prospect_information' => 
49
+    array (
50 50
     
51 51
     array (
52
-      array (
52
+        array (
53 53
         'name' => 'first_name',
54 54
         'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value}' 
55
-      . '&nbsp;<input name="first_name"  id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
56
-      ),
55
+        . '&nbsp;<input name="first_name"  id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
56
+        ),
57 57
     ),
58 58
     
59 59
     array (
60
-      array('name'=>'last_name',
60
+        array('name'=>'last_name',
61 61
             'displayParams'=>array('required'=>true),
62
-      ),
63
-      'phone_work',
62
+        ),
63
+        'phone_work',
64 64
     ),
65 65
     
66 66
     array (
67
-      'title',
68
-      'phone_mobile',
67
+        'title',
68
+        'phone_mobile',
69 69
     ),
70 70
     
71 71
     array (
72
-      'department',
73
-      'phone_fax',
72
+        'department',
73
+        'phone_fax',
74 74
     ),
75 75
     
76 76
     array (
77
-      'account_name',
77
+        'account_name',
78 78
     ),
79 79
     
80 80
     array (
81
-      array (
82
-	      'name' => 'primary_address_street',
83
-          'hideLabel' => true,      
84
-	      'type' => 'address',
85
-	      'displayParams'=>array('key'=>'primary', 'rows'=>2, 'cols'=>30, 'maxlength'=>150),
86
-      ),
81
+        array (
82
+            'name' => 'primary_address_street',
83
+            'hideLabel' => true,      
84
+            'type' => 'address',
85
+            'displayParams'=>array('key'=>'primary', 'rows'=>2, 'cols'=>30, 'maxlength'=>150),
86
+        ),
87 87
       
88
-      array (
89
-	      'name' => 'alt_address_street',
90
-	      'hideLabel'=>true,
91
-	      'type' => 'address',
92
-	      'displayParams'=>array('key'=>'alt', 'copy'=>'primary', 'rows'=>2, 'cols'=>30, 'maxlength'=>150),      
93
-      ),
88
+        array (
89
+            'name' => 'alt_address_street',
90
+            'hideLabel'=>true,
91
+            'type' => 'address',
92
+            'displayParams'=>array('key'=>'alt', 'copy'=>'primary', 'rows'=>2, 'cols'=>30, 'maxlength'=>150),      
93
+        ),
94 94
     ),
95 95
     array('email1'),
96 96
     array (
97
-      array('name'=>'description', 
97
+        array('name'=>'description', 
98 98
             'label'=>'LBL_DESCRIPTION'),
99 99
     ),
100 100
     ),
101
-  'LBL_MORE_INFORMATION' => array(
101
+    'LBL_MORE_INFORMATION' => array(
102 102
     array (
103
-      'do_not_call',
103
+        'do_not_call',
104 104
     ),
105 105
     ),
106
-  'LBL_PANEL_ASSIGNMENT' => array(
106
+    'LBL_PANEL_ASSIGNMENT' => array(
107 107
     array (
108
-	  'assigned_user_name',
108
+        'assigned_user_name',
109 109
     ),    
110 110
 
111
-  ),
111
+    ),
112 112
 )
113 113
 
114 114
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -44,48 +44,48 @@  discard block
 block discarded – undo
44 44
                                             array('label' => '10', 'field' => '30')
45 45
                                             ),
46 46
      ),
47
- 'panels' =>array (
47
+ 'panels' =>array(
48 48
   'lbl_prospect_information' => 
49
-  array (
49
+  array(
50 50
     
51
-    array (
52
-      array (
51
+    array(
52
+      array(
53 53
         'name' => 'first_name',
54 54
         'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value}' 
55 55
       . '&nbsp;<input name="first_name"  id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
56 56
       ),
57 57
     ),
58 58
     
59
-    array (
59
+    array(
60 60
       array('name'=>'last_name',
61 61
             'displayParams'=>array('required'=>true),
62 62
       ),
63 63
       'phone_work',
64 64
     ),
65 65
     
66
-    array (
66
+    array(
67 67
       'title',
68 68
       'phone_mobile',
69 69
     ),
70 70
     
71
-    array (
71
+    array(
72 72
       'department',
73 73
       'phone_fax',
74 74
     ),
75 75
     
76
-    array (
76
+    array(
77 77
       'account_name',
78 78
     ),
79 79
     
80
-    array (
81
-      array (
80
+    array(
81
+      array(
82 82
 	      'name' => 'primary_address_street',
83 83
           'hideLabel' => true,      
84 84
 	      'type' => 'address',
85 85
 	      'displayParams'=>array('key'=>'primary', 'rows'=>2, 'cols'=>30, 'maxlength'=>150),
86 86
       ),
87 87
       
88
-      array (
88
+      array(
89 89
 	      'name' => 'alt_address_street',
90 90
 	      'hideLabel'=>true,
91 91
 	      'type' => 'address',
@@ -93,18 +93,18 @@  discard block
 block discarded – undo
93 93
       ),
94 94
     ),
95 95
     array('email1'),
96
-    array (
96
+    array(
97 97
       array('name'=>'description', 
98 98
             'label'=>'LBL_DESCRIPTION'),
99 99
     ),
100 100
     ),
101 101
   'LBL_MORE_INFORMATION' => array(
102
-    array (
102
+    array(
103 103
       'do_not_call',
104 104
     ),
105 105
     ),
106 106
   'LBL_PANEL_ASSIGNMENT' => array(
107
-    array (
107
+    array(
108 108
 	  'assigned_user_name',
109 109
     ),    
110 110
 
Please login to merge, or discard this patch.
modules/Prospects/metadata/popupdefs.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@
 block discarded – undo
42 42
 global $mod_strings;
43 43
 
44 44
 $popupMeta = array('moduleMain' => 'Prospect',
45
-						'varName' => 'PROSPECT',
46
-						'orderBy' => 'prospects.last_name, prospects.first_name',
47
-						'whereClauses' => 
48
-							array('first_name' => 'prospects.first_name',
49
-									'last_name' => 'prospects.last_name'),
50
-						'searchInputs' =>
51
-							array('first_name', 'last_name'),
52
-						'selectDoms' =>
53
-							array('LIST_OPTIONS' => 
54
-											array('dom' => 'prospect_list_type_dom', 'searchInput' => 'list_type'),
55
-								  ),
56
-						'create' =>
57
-							array('formBase' => 'ProspectFormBase.php',
58
-									'formBaseClass' => 'ProspectFormBase',
59
-									'getFormBodyParams' => array('','','ProspectSave'),
60
-									'createButton' => 'LNK_NEW_PROSPECT'
61
-								  )
62
-						);
45
+                        'varName' => 'PROSPECT',
46
+                        'orderBy' => 'prospects.last_name, prospects.first_name',
47
+                        'whereClauses' => 
48
+                            array('first_name' => 'prospects.first_name',
49
+                                    'last_name' => 'prospects.last_name'),
50
+                        'searchInputs' =>
51
+                            array('first_name', 'last_name'),
52
+                        'selectDoms' =>
53
+                            array('LIST_OPTIONS' => 
54
+                                            array('dom' => 'prospect_list_type_dom', 'searchInput' => 'list_type'),
55
+                                    ),
56
+                        'create' =>
57
+                            array('formBase' => 'ProspectFormBase.php',
58
+                                    'formBaseClass' => 'ProspectFormBase',
59
+                                    'getFormBodyParams' => array('','','ProspectSave'),
60
+                                    'createButton' => 'LNK_NEW_PROSPECT'
61
+                                    )
62
+                        );
63 63
 
64 64
 
65 65
 ?>
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.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 						'create' =>
57 57
 							array('formBase' => 'ProspectFormBase.php',
58 58
 									'formBaseClass' => 'ProspectFormBase',
59
-									'getFormBodyParams' => array('','','ProspectSave'),
59
+									'getFormBodyParams' => array('', '', 'ProspectSave'),
60 60
 									'createButton' => 'LNK_NEW_PROSPECT'
61 61
 								  )
62 62
 						);
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/Prospects/metadata/searchdefs.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -39,31 +39,31 @@
 block discarded – undo
39 39
 
40 40
 
41 41
 $searchdefs['Prospects'] = array(
42
-				'templateMeta' => array(
43
-						'maxColumns' => '3',
42
+                'templateMeta' => array(
43
+                        'maxColumns' => '3',
44 44
                         'maxColumnsBasic' => '4', 
45 45
                         'widths' => array('label' => '10', 'field' => '30'), 
46
-                       ),
46
+                        ),
47 47
                 'layout' => array(
48
-  					'basic_search' => array(
49
- 							array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'),
50
-                           array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
48
+                        'basic_search' => array(
49
+                                array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'),
50
+                            array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
51 51
                            
52
-						),
53
-					'advanced_search' => array(
54
-							'first_name', 
55
-							'last_name', 
56
-							array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'),
57
-							array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'),
58
-							'assistant',
59
-							'do_not_call',
60
-							array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'),
61
-							array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
62
-							array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
63
-							array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), 
64
-							array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
52
+                        ),
53
+                    'advanced_search' => array(
54
+                            'first_name', 
55
+                            'last_name', 
56
+                            array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'),
57
+                            array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'),
58
+                            'assistant',
59
+                            'do_not_call',
60
+                            array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'),
61
+                            array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
62
+                            array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
63
+                            array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), 
64
+                            array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
65 65
 							
66
-					),
67
-				),
68
-		   );
66
+                    ),
67
+                ),
68
+            );
69 69
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                        ),
47 47
                 'layout' => array(
48 48
   					'basic_search' => array(
49
- 							array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'),
49
+ 							array('name'=>'search_name', 'label' =>'LBL_NAME', 'type' => 'name'),
50 50
                            array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
51 51
                            
52 52
 						),
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 							array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'),
61 61
 							array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
62 62
 							array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
63
-							array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), 
63
+							array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom',), 
64 64
 							array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
65 65
 							
66 66
 					),
Please login to merge, or discard this patch.
modules/Prospects/metadata/SearchFields.php 3 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -39,35 +39,35 @@
 block discarded – undo
39 39
  ********************************************************************************/
40 40
 
41 41
 $searchFields['Prospects'] = 
42
-	array (
43
-		'first_name' => array( 'query_type'=>'default'),
44
-		'last_name'=> array('query_type'=>'default'),
45
-		'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true),
46
-		'do_not_call'=> array('query_type'=>'default', 'operator'=>'='),
47
-		'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')),
48
-		'email'=> array(
49
-			'query_type' => 'default',
50
-			'operator' => 'subquery',
51
-			'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE',
52
-			'db_field' => array(
53
-				'id',
54
-			),
55
-		),
56
-		'assistant'=> array('query_type'=>'default'),
57
-		'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
58
-		'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
59
-		'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
60
-		'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
61
-		'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
62
-		'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
63
-		'assigned_user_id'=> array('query_type'=>'default'),
64
-	   //Range Search Support 
65
-	   'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
66
-	   'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
67
-	   'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
68
-	   'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
69
-	   'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
70
-       'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),	
71
-	   //Range Search Support
72
-	);
42
+    array (
43
+        'first_name' => array( 'query_type'=>'default'),
44
+        'last_name'=> array('query_type'=>'default'),
45
+        'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true),
46
+        'do_not_call'=> array('query_type'=>'default', 'operator'=>'='),
47
+        'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')),
48
+        'email'=> array(
49
+            'query_type' => 'default',
50
+            'operator' => 'subquery',
51
+            'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE',
52
+            'db_field' => array(
53
+                'id',
54
+            ),
55
+        ),
56
+        'assistant'=> array('query_type'=>'default'),
57
+        'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
58
+        'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
59
+        'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
60
+        'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
61
+        'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
62
+        'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
63
+        'assigned_user_id'=> array('query_type'=>'default'),
64
+        //Range Search Support 
65
+        'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
66
+        'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
67
+        'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
68
+        'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
69
+        'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
70
+        'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),	
71
+        //Range Search Support
72
+    );
73 73
 ?>
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
  ********************************************************************************/
40 40
 
41 41
 $searchFields['Prospects'] = 
42
-	array (
43
-		'first_name' => array( 'query_type'=>'default'),
42
+	array(
43
+		'first_name' => array('query_type'=>'default'),
44 44
 		'last_name'=> array('query_type'=>'default'),
45
-		'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true),
45
+		'search_name'=> array('query_type'=>'default', 'db_field'=>array('first_name', 'last_name'), 'force_unifiedsearch'=>true),
46 46
 		'do_not_call'=> array('query_type'=>'default', 'operator'=>'='),
47
-		'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')),
47
+		'phone'=> array('query_type'=>'default', 'db_field'=>array('phone_mobile', 'phone_work', 'phone_other', 'phone_fax', 'phone_home')),
48 48
 		'email'=> array(
49 49
 			'query_type' => 'default',
50 50
 			'operator' => 'subquery',
@@ -54,20 +54,20 @@  discard block
 block discarded – undo
54 54
 			),
55 55
 		),
56 56
 		'assistant'=> array('query_type'=>'default'),
57
-		'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
58
-		'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
59
-		'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
60
-		'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
61
-		'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
62
-		'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
57
+		'address_street'=> array('query_type'=>'default', 'db_field'=>array('primary_address_street', 'alt_address_street')),
58
+		'address_city'=> array('query_type'=>'default', 'db_field'=>array('primary_address_city', 'alt_address_city')),
59
+		'address_state'=> array('query_type'=>'default', 'db_field'=>array('primary_address_state', 'alt_address_state')),
60
+		'address_postalcode'=> array('query_type'=>'default', 'db_field'=>array('primary_address_postalcode', 'alt_address_postalcode')),
61
+		'address_country'=> array('query_type'=>'default', 'db_field'=>array('primary_address_country', 'alt_address_country')),
62
+		'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
63 63
 		'assigned_user_id'=> array('query_type'=>'default'),
64 64
 	   //Range Search Support 
65
-	   'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
66
-	   'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
67
-	   'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
68
-	   'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
69
-	   'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
70
-       'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),	
65
+	   'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
66
+	   'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
67
+	   'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
68
+	   'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
69
+	   'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
70
+       'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),	
71 71
 	   //Range Search Support
72 72
 	);
73 73
 ?>
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/Prospects/metadata/detailviewdefs.php 2 patches
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -39,188 +39,188 @@
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Prospects'] = 
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' => '<input title="{$MOD.LBL_CONVERT_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';" type="submit" name="CONVERT_LEAD_BTN" value="{$MOD.LBL_CONVERT_BUTTON_LABEL}"/>',
56 56
             'sugar_html' => 
57 57
             array (
58
-              'type' => 'submit',
59
-              'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}',
60
-              'htmlOptions' => 
61
-              array (
58
+                'type' => 'submit',
59
+                'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}',
60
+                'htmlOptions' => 
61
+                array (
62 62
                 'class' => 'button',
63 63
                 'name' => 'CONVERT_LEAD_BTN',
64 64
                 'id' => 'convert_target_button',
65 65
                 'title' => '{$MOD.LBL_CONVERT_BUTTON_TITLE}',
66 66
                 'onclick' => 'this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';',
67
-              ),
67
+                ),
68 68
             ),
69
-          ),
70
-          4 => 
71
-          array (
69
+            ),
70
+            4 => 
71
+            array (
72 72
             'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}"/>',
73 73
             'sugar_html' => 
74 74
             array (
75
-              'type' => 'submit',
76
-              'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}',
77
-              'htmlOptions' => 
78
-              array (
75
+                'type' => 'submit',
76
+                'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}',
77
+                'htmlOptions' => 
78
+                array (
79 79
                 'class' => 'button',
80 80
                 'id' => 'manage_subscriptions_button',
81 81
                 'name' => 'Manage Subscriptions',
82 82
                 'title' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}',
83 83
                 'onclick' => 'this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';',
84
-              ),
84
+                ),
85
+            ),
85 86
             ),
86
-          ),
87 87
         ),
88 88
         'hidden' => 
89 89
         array (
90
-          0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">',
90
+            0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">',
91 91
         ),
92 92
         'headerTpl' => 'modules/Prospects/tpls/DetailViewHeader.tpl',
93
-      ),
94
-      'maxColumns' => '2',
95
-      'widths' => 
96
-      array (
93
+        ),
94
+        'maxColumns' => '2',
95
+        'widths' => 
96
+        array (
97 97
         0 => 
98 98
         array (
99
-          'label' => '10',
100
-          'field' => '30',
99
+            'label' => '10',
100
+            'field' => '30',
101 101
         ),
102 102
         1 => 
103 103
         array (
104
-          'label' => '10',
105
-          'field' => '30',
104
+            'label' => '10',
105
+            'field' => '30',
106
+        ),
106 107
         ),
107
-      ),
108
-      'useTabs' => true,
109
-      'tabDefs' => 
110
-      array (
108
+        'useTabs' => true,
109
+        'tabDefs' => 
110
+        array (
111 111
         'LBL_PROSPECT_INFORMATION' => 
112 112
         array (
113
-          'newTab' => true,
114
-          'panelDefault' => 'expanded',
113
+            'newTab' => true,
114
+            'panelDefault' => 'expanded',
115 115
         ),
116 116
         'LBL_MORE_INFORMATION' => 
117 117
         array (
118
-          'newTab' => true,
119
-          'panelDefault' => 'expanded',
118
+            'newTab' => true,
119
+            'panelDefault' => 'expanded',
120 120
         ),
121 121
         'LBL_PANEL_ASSIGNMENT' => 
122 122
         array (
123
-          'newTab' => true,
124
-          'panelDefault' => 'expanded',
123
+            'newTab' => true,
124
+            'panelDefault' => 'expanded',
125
+        ),
125 126
         ),
126
-      ),
127 127
     ),
128 128
     'panels' => 
129 129
     array (
130
-      'lbl_prospect_information' => 
131
-      array (
130
+        'lbl_prospect_information' => 
131
+        array (
132 132
         0 => 
133 133
         array (
134
-          0 => 
135
-          array (
134
+            0 => 
135
+            array (
136 136
             'name' => 'full_name',
137
-          ),
137
+            ),
138 138
         ),
139 139
         1 => 
140 140
         array (
141
-          0 => 'title',
142
-          1 => 
143
-          array (
141
+            0 => 'title',
142
+            1 => 
143
+            array (
144 144
             'name' => 'phone_work',
145 145
             'label' => 'LBL_OFFICE_PHONE',
146
-          ),
146
+            ),
147 147
         ),
148 148
         2 => 
149 149
         array (
150
-          0 => 'department',
151
-          1 => 'phone_mobile',
150
+            0 => 'department',
151
+            1 => 'phone_mobile',
152 152
         ),
153 153
         3 => 
154 154
         array (
155
-          0 => 
156
-          array (
155
+            0 => 
156
+            array (
157 157
             'name' => 'account_name',
158
-          ),
159
-          1 => 'phone_fax',
158
+            ),
159
+            1 => 'phone_fax',
160 160
         ),
161 161
         4 => 
162 162
         array (
163
-          0 => 
164
-          array (
163
+            0 => 
164
+            array (
165 165
             'name' => 'primary_address_street',
166 166
             'label' => 'LBL_PRIMARY_ADDRESS',
167 167
             'type' => 'address',
168 168
             'displayParams' => 
169 169
             array (
170
-              'key' => 'primary',
170
+                'key' => 'primary',
171
+            ),
171 172
             ),
172
-          ),
173
-          1 => 
174
-          array (
173
+            1 => 
174
+            array (
175 175
             'name' => 'alt_address_street',
176 176
             'label' => 'LBL_ALTERNATE_ADDRESS',
177 177
             'type' => 'address',
178 178
             'displayParams' => 
179 179
             array (
180
-              'key' => 'alt',
180
+                'key' => 'alt',
181
+            ),
181 182
             ),
182
-          ),
183 183
         ),
184 184
         5 => 
185 185
         array (
186
-          0 => 'email1',
186
+            0 => 'email1',
187 187
         ),
188 188
         6 => 
189 189
         array (
190
-          0 => 'description',
190
+            0 => 'description',
191 191
         ),
192 192
         7 => 
193 193
         array (
194
-          0 => 'assigned_user_name',
194
+            0 => 'assigned_user_name',
195 195
         ),
196
-      ),
197
-      'LBL_MORE_INFORMATION' => 
198
-      array (
196
+        ),
197
+        'LBL_MORE_INFORMATION' => 
198
+        array (
199 199
         0 => 
200 200
         array (
201
-          0 => 'email_opt_out',
202
-          1 => 'do_not_call',
201
+            0 => 'email_opt_out',
202
+            1 => 'do_not_call',
203
+        ),
203 204
         ),
204
-      ),
205
-      'LBL_PANEL_ASSIGNMENT' => 
206
-      array (
205
+        'LBL_PANEL_ASSIGNMENT' => 
206
+        array (
207 207
         0 => 
208 208
         array (
209
-          0 => 
210
-          array (
209
+            0 => 
210
+            array (
211 211
             'name' => 'modified_by_name',
212 212
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
213 213
             'label' => 'LBL_DATE_MODIFIED',
214
-          ),
215
-          1 =>
216
-          array (
214
+            ),
215
+            1 =>
216
+            array (
217 217
             'name' => 'created_by_name',
218 218
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
219 219
             'label' => 'LBL_DATE_ENTERED',
220
-          ),
220
+            ),
221 221
         ),
222
-      ),
222
+        ),
223
+    ),
223 224
     ),
224
-  ),
225 225
 );
226 226
 ?>
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -38,27 +38,27 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Prospects'] = 
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' => '<input title="{$MOD.LBL_CONVERT_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';" type="submit" name="CONVERT_LEAD_BTN" value="{$MOD.LBL_CONVERT_BUTTON_LABEL}"/>',
56 56
             'sugar_html' => 
57
-            array (
57
+            array(
58 58
               'type' => 'submit',
59 59
               'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}',
60 60
               'htmlOptions' => 
61
-              array (
61
+              array(
62 62
                 'class' => 'button',
63 63
                 'name' => 'CONVERT_LEAD_BTN',
64 64
                 'id' => 'convert_target_button',
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
             ),
69 69
           ),
70 70
           4 => 
71
-          array (
71
+          array(
72 72
             'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}"/>',
73 73
             'sugar_html' => 
74
-            array (
74
+            array(
75 75
               'type' => 'submit',
76 76
               'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}',
77 77
               'htmlOptions' => 
78
-              array (
78
+              array(
79 79
                 'class' => 'button',
80 80
                 'id' => 'manage_subscriptions_button',
81 81
                 'name' => 'Manage Subscriptions',
@@ -86,134 +86,134 @@  discard block
 block discarded – undo
86 86
           ),
87 87
         ),
88 88
         'hidden' => 
89
-        array (
89
+        array(
90 90
           0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">',
91 91
         ),
92 92
         'headerTpl' => 'modules/Prospects/tpls/DetailViewHeader.tpl',
93 93
       ),
94 94
       'maxColumns' => '2',
95 95
       'widths' => 
96
-      array (
96
+      array(
97 97
         0 => 
98
-        array (
98
+        array(
99 99
           'label' => '10',
100 100
           'field' => '30',
101 101
         ),
102 102
         1 => 
103
-        array (
103
+        array(
104 104
           'label' => '10',
105 105
           'field' => '30',
106 106
         ),
107 107
       ),
108 108
       'useTabs' => true,
109 109
       'tabDefs' => 
110
-      array (
110
+      array(
111 111
         'LBL_PROSPECT_INFORMATION' => 
112
-        array (
112
+        array(
113 113
           'newTab' => true,
114 114
           'panelDefault' => 'expanded',
115 115
         ),
116 116
         'LBL_MORE_INFORMATION' => 
117
-        array (
117
+        array(
118 118
           'newTab' => true,
119 119
           'panelDefault' => 'expanded',
120 120
         ),
121 121
         'LBL_PANEL_ASSIGNMENT' => 
122
-        array (
122
+        array(
123 123
           'newTab' => true,
124 124
           'panelDefault' => 'expanded',
125 125
         ),
126 126
       ),
127 127
     ),
128 128
     'panels' => 
129
-    array (
129
+    array(
130 130
       'lbl_prospect_information' => 
131
-      array (
131
+      array(
132 132
         0 => 
133
-        array (
133
+        array(
134 134
           0 => 
135
-          array (
135
+          array(
136 136
             'name' => 'full_name',
137 137
           ),
138 138
         ),
139 139
         1 => 
140
-        array (
140
+        array(
141 141
           0 => 'title',
142 142
           1 => 
143
-          array (
143
+          array(
144 144
             'name' => 'phone_work',
145 145
             'label' => 'LBL_OFFICE_PHONE',
146 146
           ),
147 147
         ),
148 148
         2 => 
149
-        array (
149
+        array(
150 150
           0 => 'department',
151 151
           1 => 'phone_mobile',
152 152
         ),
153 153
         3 => 
154
-        array (
154
+        array(
155 155
           0 => 
156
-          array (
156
+          array(
157 157
             'name' => 'account_name',
158 158
           ),
159 159
           1 => 'phone_fax',
160 160
         ),
161 161
         4 => 
162
-        array (
162
+        array(
163 163
           0 => 
164
-          array (
164
+          array(
165 165
             'name' => 'primary_address_street',
166 166
             'label' => 'LBL_PRIMARY_ADDRESS',
167 167
             'type' => 'address',
168 168
             'displayParams' => 
169
-            array (
169
+            array(
170 170
               'key' => 'primary',
171 171
             ),
172 172
           ),
173 173
           1 => 
174
-          array (
174
+          array(
175 175
             'name' => 'alt_address_street',
176 176
             'label' => 'LBL_ALTERNATE_ADDRESS',
177 177
             'type' => 'address',
178 178
             'displayParams' => 
179
-            array (
179
+            array(
180 180
               'key' => 'alt',
181 181
             ),
182 182
           ),
183 183
         ),
184 184
         5 => 
185
-        array (
185
+        array(
186 186
           0 => 'email1',
187 187
         ),
188 188
         6 => 
189
-        array (
189
+        array(
190 190
           0 => 'description',
191 191
         ),
192 192
         7 => 
193
-        array (
193
+        array(
194 194
           0 => 'assigned_user_name',
195 195
         ),
196 196
       ),
197 197
       'LBL_MORE_INFORMATION' => 
198
-      array (
198
+      array(
199 199
         0 => 
200
-        array (
200
+        array(
201 201
           0 => 'email_opt_out',
202 202
           1 => 'do_not_call',
203 203
         ),
204 204
       ),
205 205
       'LBL_PANEL_ASSIGNMENT' => 
206
-      array (
206
+      array(
207 207
         0 => 
208
-        array (
208
+        array(
209 209
           0 => 
210
-          array (
210
+          array(
211 211
             'name' => 'modified_by_name',
212 212
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
213 213
             'label' => 'LBL_DATE_MODIFIED',
214 214
           ),
215 215
           1 =>
216
-          array (
216
+          array(
217 217
             'name' => 'created_by_name',
218 218
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
219 219
             'label' => 'LBL_DATE_ENTERED',
Please login to merge, or discard this patch.
modules/Prospects/metadata/quickcreatedefs.php 3 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -46,121 +46,121 @@
 block discarded – undo
46 46
  ********************************************************************************/
47 47
 
48 48
 $viewdefs = array (
49
-  'Prospects' => 
50
-  array (
49
+    'Prospects' => 
50
+    array (
51 51
     'QuickCreate' => 
52 52
     array (
53
-      'templateMeta' => 
54
-      array (
53
+        'templateMeta' => 
54
+        array (
55 55
         'maxColumns' => '2',
56 56
         'widths' => 
57 57
         array (
58
-          0 => 
59
-          array (
58
+            0 => 
59
+            array (
60 60
             'label' => '10',
61 61
             'field' => '30',
62
-          ),
63
-          1 => 
64
-          array (
62
+            ),
63
+            1 => 
64
+            array (
65 65
             'label' => '10',
66 66
             'field' => '30',
67
-          ),
67
+            ),
68 68
         ),
69
-      ),
70
-      'panels' => 
71
-      array (
69
+        ),
70
+        'panels' => 
71
+        array (
72 72
         'LBL_PROSPECT_INFORMATION' => 
73 73
         array (
74
-          0 => 
75
-          array (
76 74
             0 => 
77 75
             array (
78
-              'name' => 'first_name',
76
+            0 => 
77
+            array (
78
+                'name' => 'first_name',
79 79
             ),
80 80
             1 => 
81 81
             array (
82
-              'name' => 'phone_work',
82
+                'name' => 'phone_work',
83 83
             ),
84
-          ),
85
-          1 => 
86
-          array (
84
+            ),
85
+            1 => 
86
+            array (
87 87
             0 => 
88 88
             array (
89
-              'name' => 'last_name',
90
-              'displayParams'=>array('required'=>true)
89
+                'name' => 'last_name',
90
+                'displayParams'=>array('required'=>true)
91 91
             ),
92 92
             1 => 
93 93
             array (
94
-              'name' => 'phone_mobile',
94
+                'name' => 'phone_mobile',
95
+            ),
95 96
             ),
96
-          ),
97
-          2 => 
98
-          array (
97
+            2 => 
98
+            array (
99 99
             0 => 
100 100
             array (
101
-              'name' => 'account_name',
101
+                'name' => 'account_name',
102 102
             ),
103 103
             1 => 
104 104
             array (
105
-              'name' => 'phone_fax',
105
+                'name' => 'phone_fax',
106
+            ),
106 107
             ),
107
-          ),
108
-          3 => 
109
-          array (
108
+            3 => 
109
+            array (
110 110
             0 => 
111 111
             array (
112
-              'name' => 'title',
112
+                'name' => 'title',
113 113
             ),
114 114
             1 => 
115 115
             array (
116
-              'name' => 'department',
116
+                'name' => 'department',
117
+            ),
117 118
             ),
118
-          ),
119
-          4 => 
120
-          array (
119
+            4 => 
120
+            array (
121 121
             0 => 
122 122
             array (
123
-              'name' => 'team_name',
123
+                'name' => 'team_name',
124 124
             ),
125 125
             1 => 
126 126
             array (
127
-              'name' => 'do_not_call',
127
+                'name' => 'do_not_call',
128
+            ),
128 129
             ),
129
-          ),
130
-          5 => 
131
-          array (
130
+            5 => 
131
+            array (
132 132
             0 => 
133 133
             array (
134
-              'name' => 'assigned_user_name',
134
+                'name' => 'assigned_user_name',
135
+            ),
135 136
             ),
136
-          ),
137 137
         ),
138 138
         'lbl_email_addresses' => 
139 139
         array (
140
-          0 => 
141
-          array (
142 140
             0 => 
143 141
             array (
144
-              'name' => 'email1',
142
+            0 => 
143
+            array (
144
+                'name' => 'email1',
145
+            ),
145 146
             ),
146
-          ),
147 147
         ),
148 148
         'LBL_ADDRESS_INFORMATION' => 
149 149
         array (
150
-          0 => 
151
-          array (
152 150
             0 => 
153 151
             array (
154
-              'name' => 'primary_address_street',
152
+            0 => 
153
+            array (
154
+                'name' => 'primary_address_street',
155 155
             ),
156 156
             1 => 
157 157
             array (
158
-              'name' => 'alt_address_street',
158
+                'name' => 'alt_address_street',
159
+            ),
159 160
             ),
160
-          ),
161 161
         ),
162
-      ),
162
+        ),
163
+    ),
163 164
     ),
164
-  ),
165 165
 );
166 166
 ?>
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 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.
@@ -45,116 +45,116 @@  discard block
 block discarded – undo
45 45
  * Contributor(s): ______________________________________..
46 46
  ********************************************************************************/
47 47
 
48
-$viewdefs = array (
48
+$viewdefs = array(
49 49
   'Prospects' => 
50
-  array (
50
+  array(
51 51
     'QuickCreate' => 
52
-    array (
52
+    array(
53 53
       'templateMeta' => 
54
-      array (
54
+      array(
55 55
         'maxColumns' => '2',
56 56
         'widths' => 
57
-        array (
57
+        array(
58 58
           0 => 
59
-          array (
59
+          array(
60 60
             'label' => '10',
61 61
             'field' => '30',
62 62
           ),
63 63
           1 => 
64
-          array (
64
+          array(
65 65
             'label' => '10',
66 66
             'field' => '30',
67 67
           ),
68 68
         ),
69 69
       ),
70 70
       'panels' => 
71
-      array (
71
+      array(
72 72
         'LBL_PROSPECT_INFORMATION' => 
73
-        array (
73
+        array(
74 74
           0 => 
75
-          array (
75
+          array(
76 76
             0 => 
77
-            array (
77
+            array(
78 78
               'name' => 'first_name',
79 79
             ),
80 80
             1 => 
81
-            array (
81
+            array(
82 82
               'name' => 'phone_work',
83 83
             ),
84 84
           ),
85 85
           1 => 
86
-          array (
86
+          array(
87 87
             0 => 
88
-            array (
88
+            array(
89 89
               'name' => 'last_name',
90 90
               'displayParams'=>array('required'=>true)
91 91
             ),
92 92
             1 => 
93
-            array (
93
+            array(
94 94
               'name' => 'phone_mobile',
95 95
             ),
96 96
           ),
97 97
           2 => 
98
-          array (
98
+          array(
99 99
             0 => 
100
-            array (
100
+            array(
101 101
               'name' => 'account_name',
102 102
             ),
103 103
             1 => 
104
-            array (
104
+            array(
105 105
               'name' => 'phone_fax',
106 106
             ),
107 107
           ),
108 108
           3 => 
109
-          array (
109
+          array(
110 110
             0 => 
111
-            array (
111
+            array(
112 112
               'name' => 'title',
113 113
             ),
114 114
             1 => 
115
-            array (
115
+            array(
116 116
               'name' => 'department',
117 117
             ),
118 118
           ),
119 119
           4 => 
120
-          array (
120
+          array(
121 121
             0 => 
122
-            array (
122
+            array(
123 123
               'name' => 'team_name',
124 124
             ),
125 125
             1 => 
126
-            array (
126
+            array(
127 127
               'name' => 'do_not_call',
128 128
             ),
129 129
           ),
130 130
           5 => 
131
-          array (
131
+          array(
132 132
             0 => 
133
-            array (
133
+            array(
134 134
               'name' => 'assigned_user_name',
135 135
             ),
136 136
           ),
137 137
         ),
138 138
         'lbl_email_addresses' => 
139
-        array (
139
+        array(
140 140
           0 => 
141
-          array (
141
+          array(
142 142
             0 => 
143
-            array (
143
+            array(
144 144
               'name' => 'email1',
145 145
             ),
146 146
           ),
147 147
         ),
148 148
         'LBL_ADDRESS_INFORMATION' => 
149
-        array (
149
+        array(
150 150
           0 => 
151
-          array (
151
+          array(
152 152
             0 => 
153
-            array (
153
+            array(
154 154
               'name' => 'primary_address_street',
155 155
             ),
156 156
             1 => 
157
-            array (
157
+            array(
158 158
               'name' => 'alt_address_street',
159 159
             ),
160 160
           ),
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/Prospects/metadata/listviewdefs.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 $listViewDefs['Prospects'] = array(
45
-	'FULL_NAME' => array(
46
-		'width' => '20', 
47
-		'label' => 'LBL_LIST_NAME', 
48
-		'link' => true,
45
+    'FULL_NAME' => array(
46
+        'width' => '20', 
47
+        'label' => 'LBL_LIST_NAME', 
48
+        'link' => true,
49 49
         'related_fields' => array('first_name', 'last_name'),
50 50
         'orderBy' => 'last_name',
51 51
         'default' => true),
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
         'label' => 'LBL_LIST_PHONE', 
66 66
         'link' => false,
67 67
         'default' => true), 
68
-	'DATE_ENTERED' => array (
69
-	    'type' => 'datetime',
70
-	    'label' => 'LBL_DATE_ENTERED',
71
-	    'width' => '10',
72
-	    'default' => true,
73
-	  ),  
68
+    'DATE_ENTERED' => array (
69
+        'type' => 'datetime',
70
+        'label' => 'LBL_DATE_ENTERED',
71
+        'width' => '10',
72
+        'default' => true,
73
+        ),  
74 74
 );
75 75
 ?>
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.