Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
modules/Contacts/metadata/quickcreatedefs.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -44,17 +44,17 @@  discard block
 block discarded – undo
44 44
  * All Rights Reserved.
45 45
  * Contributor(s): ______________________________________..
46 46
  ********************************************************************************/
47
-$viewdefs = array (
47
+$viewdefs = array(
48 48
   'Contacts' => 
49
-  array (
49
+  array(
50 50
     'QuickCreate' => 
51
-    array (
51
+    array(
52 52
       'templateMeta' => 
53
-      array (
53
+      array(
54 54
         'form' => 
55
-        array (
55
+        array(
56 56
           'hidden' => 
57
-          array (
57
+          array(
58 58
             '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
59 59
             '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
60 60
             '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
@@ -66,81 +66,81 @@  discard block
 block discarded – undo
66 66
         ),
67 67
         'maxColumns' => '2',
68 68
         'widths' => 
69
-        array (
70
-          array (
69
+        array(
70
+          array(
71 71
             'label' => '10',
72 72
             'field' => '30',
73 73
           ),
74
-          array (
74
+          array(
75 75
             'label' => '10',
76 76
             'field' => '30',
77 77
           ),
78 78
         ),
79 79
       ),
80 80
       'panels' => 
81
-      array (
81
+      array(
82 82
         'default' => 
83
-        array (
83
+        array(
84 84
 
85
-          array (
85
+          array(
86 86
 
87
-            array (
87
+            array(
88 88
               'name' => 'first_name',
89 89
                 'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value}'
90 90
                 . '&nbsp;<input name="first_name" id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
91 91
             ),
92 92
 
93
-            array (
93
+            array(
94 94
               'name' => 'account_name',
95 95
             ),
96 96
           ),
97 97
 
98
-          array (
98
+          array(
99 99
 
100
-            array (
100
+            array(
101 101
               'name' => 'last_name',
102 102
               'displayParams'=>array('required'=>true),
103 103
             ),
104 104
 
105
-            array (
105
+            array(
106 106
               'name' => 'phone_work',
107 107
             ),
108 108
           ),
109 109
 
110
-          array (
110
+          array(
111 111
 
112
-            array (
112
+            array(
113 113
               'name' => 'title',
114 114
             ),
115 115
 
116
-            array (
116
+            array(
117 117
               'name' => 'phone_mobile',
118 118
             ),
119 119
           ),
120 120
 
121
-          array (
121
+          array(
122 122
 
123
-            array (
123
+            array(
124 124
               'name' => 'phone_fax',
125 125
             ),
126 126
 
127
-            array (
127
+            array(
128 128
               'name' => 'do_not_call',
129 129
             ),
130 130
           ),
131 131
 
132
-          array (
133
-            array (
132
+          array(
133
+            array(
134 134
               'name' => 'email1',
135 135
             ),
136
-            array (
136
+            array(
137 137
               'name' => 'lead_source',
138 138
             ),
139 139
           ),
140 140
 
141
-          array (
141
+          array(
142 142
 
143
-            array (
143
+            array(
144 144
               'name' => 'assigned_user_name',
145 145
             ),
146 146
           ),
Please login to merge, or discard this patch.
modules/Contacts/metadata/listviewdefs.php 1 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.
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     'MODIFIED_BY_NAME' => array(
168 168
         'width' => '10', 
169 169
         'label' => 'LBL_MODIFIED'),
170
-    'SYNC_CONTACT' => array (
170
+    'SYNC_CONTACT' => array(
171 171
         'type' => 'bool',
172 172
         'label' => 'LBL_SYNC_CONTACT',
173 173
         'width' => '10%',
Please login to merge, or discard this patch.
modules/Contacts/views/view.detail.php 1 patch
Spacing   +3 added lines, -3 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
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
  	 * We are overridding the display method to manipulate the portal information.
51 51
  	 * If portal is not enabled then don't show the portal fields.
52 52
  	 */
53
-	public function display(){
53
+	public function display() {
54 54
 		global $sugar_config;
55 55
 
56 56
 		$aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		$admin = new Administration();
64 64
 		$admin->retrieveSettings();
65
-		if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
65
+		if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
66 66
 			$this->ss->assign("PORTAL_ENABLED", true);
67 67
 		}
68 68
 		parent::display();
Please login to merge, or discard this patch.
modules/Contacts/views/view.quickcreate.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //FILE SUGARCRM flav=pro || flav=sales
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
4 4
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
6 6
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -47,16 +47,16 @@  discard block
 block discarded – undo
47 47
     public function preDisplay() 
48 48
     {
49 49
     	parent::preDisplay();
50
-    	if($this->_isDCForm) {
50
+    	if ($this->_isDCForm) {
51 51
     		//XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu
52 52
     		//          NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks
53 53
     		//          resulting in none of the fields properly populating when selecting an account
54
-    		if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office;
55
-    		if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
56
-    		if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
57
-    		if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
58
-    		if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
59
-    		if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
54
+    		if (!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office;
55
+    		if (!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
56
+    		if (!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
57
+    		if (!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
58
+    		if (!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
59
+    		if (!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
60 60
 	   	}
61 61
     }    
62 62
 }
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Contacts/views/view.closecontactaddresspopup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
 
43 43
 class ContactsViewCloseContactAddressPopup extends ViewList {
44 44
 	
45
- 	function CloseContactAddressPopup(){
45
+ 	function CloseContactAddressPopup() {
46 46
  		parent::ViewList();
47 47
  	}
48 48
 
49 49
  	function display() {
50
-        if(isset($_REQUEST['close_window'])) echo "<script>window.close();</script>";
50
+        if (isset($_REQUEST['close_window'])) echo "<script>window.close();</script>";
51 51
         parent::display();
52 52
  	}	
53 53
 }
Please login to merge, or discard this patch.
modules/Contacts/views/view.validportalusername.php 1 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.
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $portalUsername = $this->bean->db->quote($_REQUEST['portal_name']);
72 72
             $result = $this->bean->db->query("Select count(id) as total from contacts where portal_name = '$portalUsername' and deleted='0'");
73 73
             $total = 0;
74
-            while($row = $this->bean->db->fetchByAssoc($result))
74
+            while ($row = $this->bean->db->fetchByAssoc($result))
75 75
                 $total = $row['total'];
76 76
             echo $total;
77 77
         }
Please login to merge, or discard this patch.
modules/Contacts/views/view.mailmergepopup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
 class ContactsViewMailMergePopup extends SugarView {
50 50
 	
51
- 	function ContactAddressPopup(){
51
+ 	function ContactAddressPopup() {
52 52
  		parent::SugarView();
53 53
  	}
54 54
  	
Please login to merge, or discard this patch.
modules/Contacts/ContactOpportunityRelationshipEdit.php 1 patch
Spacing   +9 added lines, -9 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.
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 
58 58
 $focus = new ContactOpportunityRelationship();
59 59
 
60
-if(isset($_REQUEST['record'])) {
60
+if (isset($_REQUEST['record'])) {
61 61
     $focus->retrieve($_REQUEST['record']);
62 62
 }
63 63
 
64
-if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
64
+if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
65 65
 	$focus->id = "";
66 66
 }
67 67
 
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 $qsd = QuickSearchDefaults::getQuickSearchDefaults();
81 81
 $sqs_objects = array('opportunity_name' => $qsd->getQSParent());
82 82
 $sqs_objects['opportunity_name']['populate_list'] = array('opportunity_name', 'opportunity_id');
83
-$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
83
+$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = '.$json->encode($sqs_objects).'</script>';
84 84
 echo $quicksearch_js;
85 85
 
86
-$xtpl=new XTemplate ('modules/Contacts/ContactOpportunityRelationshipEdit.html');
86
+$xtpl = new XTemplate('modules/Contacts/ContactOpportunityRelationshipEdit.html');
87 87
 $xtpl->assign("MOD", $mod_strings);
88 88
 $xtpl->assign("APP", $app_strings);
89 89
 
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
94 94
 $xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
95 95
 $xtpl->assign("ID", $focus->id);
96
-$xtpl->assign("CONTACT",$contactName = Array("NAME" => $focus->contact_name, "ID" => $focus->contact_id));
97
-$xtpl->assign("OPPORTUNITY",$oppName = Array("NAME" => $focus->opportunity_name, "ID" => $focus->opportunity_id));
96
+$xtpl->assign("CONTACT", $contactName = Array("NAME" => $focus->contact_name, "ID" => $focus->contact_id));
97
+$xtpl->assign("OPPORTUNITY", $oppName = Array("NAME" => $focus->opportunity_name, "ID" => $focus->opportunity_id));
98 98
 
99
-echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_CONTACT_OPP_FORM_TITLE']." ".$contactName['NAME'] . " - ". $oppName['NAME']), true);
99
+echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONTACT_OPP_FORM_TITLE']." ".$contactName['NAME']." - ".$oppName['NAME']), true);
100 100
 
101 101
 $xtpl->assign("CONTACT_ROLE_OPTIONS", get_select_options_with_id($app_list_strings['opportunity_relationship_type_dom'], $focus->contact_role));
102 102
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 $javascript = new javascript();
112 112
 $javascript->setFormName('EditView');
113 113
 $javascript->setSugarBean($focus);
114
-$javascript->addToValidateBinaryDependency('opportunity_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_OPP_NAME'], 'false', '', 'opportunity_id');
114
+$javascript->addToValidateBinaryDependency('opportunity_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'].$mod_strings['LBL_OPP_NAME'], 'false', '', 'opportunity_id');
115 115
 echo $javascript->getScript();
116 116
 
117 117
 
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/formLetterPdf.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -33,53 +33,53 @@  discard block
 block discarded – undo
33 33
 	global $sugar_config;
34 34
 
35 35
     $module_type = $_REQUEST['module'];
36
-	$module_type_create = rtrim($module_type,'s');
36
+	$module_type_create = rtrim($module_type, 's');
37 37
 	$module_type_low = strtolower($module_type);
38 38
 	
39 39
 	$module = new $module_type_create();
40 40
 
41 41
     $recordIds = array();
42 42
 
43
-    if(isset($_REQUEST['current_post']) && $_REQUEST['current_post'] != ''){
43
+    if (isset($_REQUEST['current_post']) && $_REQUEST['current_post'] != '') {
44 44
         $order_by = '';
45 45
         require_once('include/MassUpdate.php');
46 46
         $mass = new MassUpdate();
47 47
         $mass->generateSearchWhere($_REQUEST['module'], $_REQUEST['current_post']);
48 48
         $ret_array = create_export_query_relate_link_patch($_REQUEST['module'], $mass->searchFields, $mass->where_clauses);
49 49
         $query = $module->create_export_query($order_by, $ret_array['where'], $ret_array['join']);
50
-        $result = $GLOBALS['db']->query($query,true);
50
+        $result = $GLOBALS['db']->query($query, true);
51 51
         $uids = array();
52
-        while($val = $GLOBALS['db']->fetchByAssoc($result,false))
52
+        while ($val = $GLOBALS['db']->fetchByAssoc($result, false))
53 53
         {
54 54
             array_push($recordIds, $val['id']);
55 55
         }
56 56
     }
57
-    else{
58
-        $recordIds = explode(',',$_REQUEST['uid']);
57
+    else {
58
+        $recordIds = explode(',', $_REQUEST['uid']);
59 59
     }
60 60
 
61 61
 	
62 62
 	$template = new AOS_PDF_Templates();
63 63
 	$template->retrieve($_REQUEST['templateID']);
64 64
 	
65
-	$pdf=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
65
+	$pdf = new mPDF('en', 'A4', '', 'DejaVuSansCondensed', $template->margin_left, $template->margin_right, $template->margin_top, $template->margin_bottom, $template->margin_header, $template->margin_footer);
66 66
 	
67 67
 	foreach ($recordIds as $recordId) {
68 68
 		$module->retrieve($recordId);
69
-		$pdf_history=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
69
+		$pdf_history = new mPDF('en', 'A4', '', 'DejaVuSansCondensed', $template->margin_left, $template->margin_right, $template->margin_top, $template->margin_bottom, $template->margin_header, $template->margin_footer);
70 70
 
71 71
 		$object_arr = array();
72 72
 		$object_arr[$module_type] = $module->id;
73 73
 	
74
-		if($module_type === 'Contacts')
74
+		if ($module_type === 'Contacts')
75 75
 		{
76 76
 			$object_arr['Accounts'] = $module->account_id;
77 77
 		}
78 78
 	
79
-		$search = array ('@<script[^>]*?>.*?</script>@si', 		// Strip out javascript
80
-						'@<[\/\!]*?[^<>]*?>@si',		// Strip out HTML tags
81
-						'@([\r\n])[\s]+@',			// Strip out white space
82
-						'@&(quot|#34);@i',			// Replace HTML entities
79
+		$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
80
+						'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
81
+						'@([\r\n])[\s]+@', // Strip out white space
82
+						'@&(quot|#34);@i', // Replace HTML entities
83 83
 						'@&(amp|#38);@i',
84 84
 						'@&(lt|#60);@i',
85 85
 						'@&(gt|#62);@i',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 						'@<address[^>]*?>@si'
89 89
 		);
90 90
 
91
-		$replace = array ('',
91
+		$replace = array('',
92 92
 						 '',
93 93
 						 '\1',
94 94
 						 '"',
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 	
103 103
 		$text = preg_replace($search, $replace, $template->description);
104 104
 		$text = preg_replace_callback('/\{DATE\s+(.*?)\}/', 
105
-			function ($matches) { return date($matches[1]); },
106
-			$text );
105
+			function($matches) { return date($matches[1]); },
106
+			$text);
107 107
 		$header = preg_replace($search, $replace, $template->pdfheader);
108 108
 		$footer = preg_replace($search, $replace, $template->pdffooter);
109 109
 	
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 		$header = templateParser::parse_template($header, $object_arr);
112 112
 		$footer = templateParser::parse_template($footer, $object_arr);
113 113
 	
114
-		$printable = str_replace("\n","<br />",$converted);
114
+		$printable = str_replace("\n", "<br />", $converted);
115 115
 
116
-		$file_name = str_replace(" ","_",$template->name).".pdf";
116
+		$file_name = str_replace(" ", "_", $template->name).".pdf";
117 117
 	
118 118
 		ob_clean();
119
-		try{
119
+		try {
120 120
 			$note = new Note();
121 121
 			$note->modified_user_id = $current_user->id;
122 122
 			$note->created_by = $current_user->id;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			$note->parent_id = $module->id;
126 126
 			$note->file_mime_type = 'application/pdf';
127 127
 			$note->filename = $file_name;
128
-			if($module_type == 'Contacts')
128
+			if ($module_type == 'Contacts')
129 129
 			{
130 130
 				$note->contact_id = $module->id;
131 131
 				$note->parent_type = 'Accounts';
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
 			}
134 134
 			$note->save();
135 135
 		
136
-			$fp = fopen($sugar_config['upload_dir'].'nfile.pdf','wb');
136
+			$fp = fopen($sugar_config['upload_dir'].'nfile.pdf', 'wb');
137 137
 			fclose($fp);
138 138
 		
139 139
 			$pdf_history->setAutoFont();
140 140
 			$pdf_history->SetHTMLHeader($header);
141 141
 			$pdf_history->SetHTMLFooter($footer);
142 142
 			$pdf_history->writeHTML($printable);
143
-			$pdf_history->Output($sugar_config['upload_dir'].'nfile.pdf','F');
143
+			$pdf_history->Output($sugar_config['upload_dir'].'nfile.pdf', 'F');
144 144
 		
145 145
 			$pdf->AddPage();
146 146
 			$pdf->setAutoFont();
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 			$pdf->SetHTMLFooter($footer);
149 149
 			$pdf->writeHTML($printable);
150 150
 		
151
-			rename($sugar_config['upload_dir'].'nfile.pdf',$sugar_config['upload_dir'].$note->id);
151
+			rename($sugar_config['upload_dir'].'nfile.pdf', $sugar_config['upload_dir'].$note->id);
152 152
 		
153
-		}catch(mPDF_exception $e){ 
153
+		}catch (mPDF_exception $e) { 
154 154
 			echo $e;
155 155
 		}
156 156
 	}
Please login to merge, or discard this patch.