Completed
Push — master ( e40fee...8e8f82 )
by Adam
19:18
created
modules/Documents/metadata/detailviewdefs.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -39,140 +39,140 @@
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Documents'] = 
41 41
 array (
42
-  'DetailView' => 
43
-  array (
42
+    'DetailView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46
-      'maxColumns' => '2',
47
-      'form' => 
48
-      array (
46
+        'maxColumns' => '2',
47
+        'form' => 
48
+        array (
49 49
         'hidden' => 
50 50
         array (
51
-          0 => '<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">',
51
+            0 => '<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">',
52 52
         ),
53
-      ),
54
-      'widths' => 
55
-      array (
53
+        ),
54
+        'widths' => 
55
+        array (
56 56
         0 => 
57 57
         array (
58
-          'label' => '10',
59
-          'field' => '30',
58
+            'label' => '10',
59
+            'field' => '30',
60 60
         ),
61 61
         1 => 
62 62
         array (
63
-          'label' => '10',
64
-          'field' => '30',
63
+            'label' => '10',
64
+            'field' => '30',
65 65
         ),
66
-      ),
67
-      'useTabs' => true,
68
-      'tabDefs' => 
69
-      array (
66
+        ),
67
+        'useTabs' => true,
68
+        'tabDefs' => 
69
+        array (
70 70
         'LBL_DOCUMENT_INFORMATION' => 
71 71
         array (
72
-          'newTab' => true,
73
-          'panelDefault' => 'expanded',
72
+            'newTab' => true,
73
+            'panelDefault' => 'expanded',
74 74
         ),
75 75
         'LBL_PANEL_ASSIGNMENT' =>
76 76
         array (
77
-          'newTab' => true,
78
-          'panelDefault' => 'expanded',
77
+            'newTab' => true,
78
+            'panelDefault' => 'expanded',
79
+        ),
79 80
         ),
80
-      ),
81 81
     ),
82 82
     'panels' => 
83 83
     array (
84
-      'lbl_document_information' => 
85
-      array (
84
+        'lbl_document_information' => 
85
+        array (
86 86
         0 => 
87 87
         array (
88
-          0 => 
89
-          array (
88
+            0 => 
89
+            array (
90 90
             'name' => 'filename',
91 91
             'displayParams' => 
92 92
             array (
93
-              'link' => 'filename',
94
-              'id' => 'document_revision_id',
93
+                'link' => 'filename',
94
+                'id' => 'document_revision_id',
95
+            ),
95 96
             ),
96
-          ),
97
-          1 => 
98
-          array (
97
+            1 => 
98
+            array (
99 99
             'name' => 'status_id',
100 100
             'label' => 'LBL_DOC_STATUS',
101
-          ),
101
+            ),
102 102
         ),
103 103
         1 => 
104 104
         array (
105
-          0 => 
106
-          array (
105
+            0 => 
106
+            array (
107 107
             'name' => 'document_name',
108 108
             'label' => 'LBL_DOC_NAME',
109
-          ),
110
-          1 => 
111
-          array (
109
+            ),
110
+            1 => 
111
+            array (
112 112
             'name' => 'revision',
113 113
             'label' => 'LBL_DOC_VERSION',
114
-          ),
114
+            ),
115 115
         ),
116 116
         2 => 
117 117
         array (
118
-          0 => 
119
-          array (
118
+            0 => 
119
+            array (
120 120
             'name' => 'template_type',
121 121
             'label' => 'LBL_DET_TEMPLATE_TYPE',
122
-          ),
123
-          1 => 
124
-          array (
122
+            ),
123
+            1 => 
124
+            array (
125 125
             'name' => 'is_template',
126 126
             'label' => 'LBL_DET_IS_TEMPLATE',
127
-          ),
127
+            ),
128 128
         ),
129 129
         3 => 
130 130
         array (
131
-          0 => 'active_date',
132
-          1 => 'exp_date',
131
+            0 => 'active_date',
132
+            1 => 'exp_date',
133 133
         ),
134 134
         4 => 
135 135
         array (
136
-          0 => 'category_id',
137
-          1 => 'subcategory_id',
136
+            0 => 'category_id',
137
+            1 => 'subcategory_id',
138 138
         ),
139 139
         5 => 
140 140
         array (
141
-          0 => '',
142
-          1 => '',
141
+            0 => '',
142
+            1 => '',
143 143
         ),
144 144
         6 => 
145 145
         array (
146
-          0 => 'related_doc_name',
147
-          1 => 'related_doc_rev_number',
146
+            0 => 'related_doc_name',
147
+            1 => 'related_doc_rev_number',
148 148
         ),
149 149
         7 => 
150 150
         array (
151
-          0 => 
152
-          array (
151
+            0 => 
152
+            array (
153 153
             'name' => 'assigned_user_name',
154 154
             'label' => 'LBL_ASSIGNED_TO_NAME',
155
-          ),
155
+            ),
156 156
         ),
157
-      ),
158
-      'LBL_PANEL_ASSIGNMENT' =>
159
-      array (
157
+        ),
158
+        'LBL_PANEL_ASSIGNMENT' =>
159
+        array (
160 160
         0 => 
161 161
         array (
162
-          0 => 
163
-          array (
164
-              'name' => 'date_entered',
165
-              'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
166
-          ),
167
-          1 => 
168
-          array (
169
-              'name' => 'date_modified',
170
-              'label' => 'LBL_DATE_MODIFIED',
171
-              'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
172
-          ),
173
-        ),
174
-      ),
162
+            0 => 
163
+            array (
164
+                'name' => 'date_entered',
165
+                'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
166
+            ),
167
+            1 => 
168
+            array (
169
+                'name' => 'date_modified',
170
+                'label' => 'LBL_DATE_MODIFIED',
171
+                'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
172
+            ),
173
+        ),
174
+        ),
175
+    ),
175 176
     ),
176
-  ),
177 177
 );
178 178
 ?>
Please login to merge, or discard this patch.
modules/Documents/metadata/quickcreatedefs.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,42 +49,42 @@
 block discarded – undo
49 49
                                             array('label' => '10', 'field' => '30')
50 50
                                             ),
51 51
                             'includes' => 
52
-                              array (
52
+                                array (
53 53
                                 array('file' => 'include/javascript/popup_parent_helper.js'),
54 54
                                 array('file' => 'cache/include/javascript/sugar_grp_jsolait.js'),
55 55
                                 array('file' => 'modules/Documents/documents.js'),
56
-                              ),
56
+                                ),
57 57
 ),
58
- 'panels' =>array (
59
-  'default' => 
60
-  array (
58
+    'panels' =>array (
59
+    'default' => 
60
+    array (
61 61
     
62 62
     array (
63
-      'status_id',
63
+        'status_id',
64 64
     ),
65 65
     array (
66
-      array('name'=>'filename', 
66
+        array('name'=>'filename', 
67 67
             'displayParams'=>array('required'=>true, 'onchangeSetFileNameTo' => 'document_name'),
68 68
             ),
69 69
     ),
70 70
     
71 71
     array (
72
-      'document_name',
73
-       array('name'=>'revision',
72
+        'document_name',
73
+        array('name'=>'revision',
74 74
             'customCode' => '<input name="revision" type="text" value="{$fields.revision.value}" {$DISABLED}>'
75
-           ),
75
+            ),
76 76
     ),    
77 77
     
78 78
     array (
79
-       array('name'=>'active_date','displayParams'=>array('required'=>true)),
80
-       'category_id',
79
+        array('name'=>'active_date','displayParams'=>array('required'=>true)),
80
+        'category_id',
81 81
     ),
82 82
     
83 83
 
84 84
     array (
85
-      array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)),
85
+        array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)),
86
+    ),
86 87
     ),
87
-  ),
88 88
 )
89 89
 
90 90
 );
Please login to merge, or discard this patch.
modules/Documents/metadata/listviewdefs.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 $listViewDefs['Documents'] = array(
45
-  'DOCUMENT_NAME' => 
46
-  array (
45
+    'DOCUMENT_NAME' => 
46
+    array (
47 47
     'width' => '20%',
48 48
     'label' => 'LBL_NAME',
49 49
     'link' => true,
50 50
     'default' => true,
51 51
     'bold' => true,
52
-  ),
53
-  'FILENAME' => 
54
-  array (
52
+    ),
53
+    'FILENAME' => 
54
+    array (
55 55
     'width' => '20%',
56 56
     'label' => 'LBL_FILENAME',
57 57
     'link' => true,
@@ -66,45 +66,45 @@  discard block
 block discarded – undo
66 66
         2 => 'doc_type',
67 67
         3 => 'doc_url',
68 68
     ),
69
-  ),
70
-  'CATEGORY_ID' => 
71
-  array (
69
+    ),
70
+    'CATEGORY_ID' => 
71
+    array (
72 72
     'width' => '10%',
73 73
     'label' => 'LBL_LIST_CATEGORY',
74 74
     'default' => true,
75
-  ),
76
-  'SUBCATEGORY_ID' => 
77
-  array (
75
+    ),
76
+    'SUBCATEGORY_ID' => 
77
+    array (
78 78
     'width' => '15%',
79 79
     'label' => 'LBL_LIST_SUBCATEGORY',
80 80
     'default' => true,
81
-  ),
82
-  'LAST_REV_CREATE_DATE' => 
83
-  array (
81
+    ),
82
+    'LAST_REV_CREATE_DATE' => 
83
+    array (
84 84
     'width' => '10%',
85 85
     'label' => 'LBL_LIST_LAST_REV_DATE',
86 86
     'default' => true,
87 87
     'sortable' => false,
88 88
     'related_fields' => 
89 89
     array (
90
-      0 => 'document_revision_id',
90
+        0 => 'document_revision_id',
91
+    ),
91 92
     ),
92
-  ),
93
-  'EXP_DATE' => 
94
-  array (
93
+    'EXP_DATE' => 
94
+    array (
95 95
     'width' => '10%',
96 96
     'label' => 'LBL_LIST_EXP_DATE',
97 97
     'default' => true,
98
-  ),
99
-  'ASSIGNED_USER_NAME' =>
100
-  array(
98
+    ),
99
+    'ASSIGNED_USER_NAME' =>
100
+    array(
101 101
     'width' => '10',
102 102
     'label' => 'LBL_LIST_ASSIGNED_USER',
103 103
     'module' => 'Employees',
104 104
     'id' => 'ASSIGNED_USER_ID',
105 105
     'default' => true),
106
-  'MODIFIED_BY_NAME' =>
107
-  array (
106
+    'MODIFIED_BY_NAME' =>
107
+    array (
108 108
     'width' => '10%',
109 109
     'label' => 'LBL_MODIFIED_USER',
110 110
     'module' => 'Users',
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
     'sortable' => false,
114 114
     'related_fields' =>
115 115
     array (
116
-      0 => 'modified_user_id',
116
+        0 => 'modified_user_id',
117 117
     ),
118 118
     ),
119
-  'DATE_ENTERED' => array (
119
+    'DATE_ENTERED' => array (
120 120
     'width' => '10%',
121 121
     'label' => 'LBL_DATE_ENTERED',
122 122
     'default' => true,
123
-  )
123
+    )
124 124
 );
125 125
 ?>
126 126
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Campaigns/PopupCampaignRoi.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -79,46 +79,46 @@
 block discarded – undo
79 79
             //$opp_query1 .= " and deleted=0";
80 80
             $opp_result1=$campaign->db->query($opp_query1);
81 81
             $opp_data1=$campaign->db->fetchByAssoc($opp_result1);
82
- //get the click-throughs
83
- $query_click = "SELECT count(*) hits ";
84
-			$query_click.= " FROM campaign_log ";
85
-			$query_click.= " WHERE campaign_id = '$campaign_id' AND activity_type='link' AND related_type='CampaignTrackers' AND archived=0 AND deleted=0";
82
+    //get the click-throughs
83
+    $query_click = "SELECT count(*) hits ";
84
+            $query_click.= " FROM campaign_log ";
85
+            $query_click.= " WHERE campaign_id = '$campaign_id' AND activity_type='link' AND related_type='CampaignTrackers' AND archived=0 AND deleted=0";
86 86
 
87 87
             //if $marketing id is specified, then lets filter the chart by the value
88 88
             if (!empty($marketing_id)){
89 89
                 $query_click.= " AND marketing_id ='$marketing_id'";
90 90
             }
91 91
 
92
-			$query_click.= " GROUP BY  activity_type, target_type";
93
-			$query_click.= " ORDER BY  activity_type, target_type";
94
-			$result = $campaign->db->query($query_click);
92
+            $query_click.= " GROUP BY  activity_type, target_type";
93
+            $query_click.= " ORDER BY  activity_type, target_type";
94
+            $result = $campaign->db->query($query_click);
95 95
 
96 96
 
97
-  $xtpl->assign("OPP_COUNT", $opp_data1['opp_count']);
98
-  $xtpl->assign("ACTUAL_COST",$opp_data1['actual_cost']);
99
-  $xtpl->assign("PLANNED_BUDGET",$opp_data1['budget']);
100
-  $xtpl->assign("EXPECTED_REVENUE",$opp_data1['expected_revenue']);
97
+    $xtpl->assign("OPP_COUNT", $opp_data1['opp_count']);
98
+    $xtpl->assign("ACTUAL_COST",$opp_data1['actual_cost']);
99
+    $xtpl->assign("PLANNED_BUDGET",$opp_data1['budget']);
100
+    $xtpl->assign("EXPECTED_REVENUE",$opp_data1['expected_revenue']);
101 101
 
102 102
 
103 103
 
104 104
 
105
-	$currency  = new Currency();
105
+    $currency  = new Currency();
106 106
 if(isset($focus->currency_id) && !empty($focus->currency_id))
107 107
 {
108
-	$currency->retrieve($focus->currency_id);
109
-	if( $currency->deleted != 1){
110
-		$xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol );
111
-	}else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
108
+    $currency->retrieve($focus->currency_id);
109
+    if( $currency->deleted != 1){
110
+        $xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol );
111
+    }else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
112 112
 }else{
113 113
 
114
-	$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
114
+    $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
115 115
 
116 116
 }
117 117
 
118 118
 global $current_user;
119 119
 if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
120 120
 
121
-	$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' align='bottom'",null,null,'.gif',$mod_strings['LBL_EDIT_LAYOUT'])."</a>");
121
+    $xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' align='bottom'",null,null,'.gif',$mod_strings['LBL_EDIT_LAYOUT'])."</a>");
122 122
 
123 123
 }
124 124
 
Please login to merge, or discard this patch.
modules/Campaigns/WizardEmailSetupSave.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 //perform this if the option to create new mail box has been checked
86 86
 if(isset($_REQUEST['wiz_new_mbox']) && ($_REQUEST['wiz_new_mbox']=='1')){
87 87
     
88
-   //Populate the Request variables that inboundemail expects
88
+    //Populate the Request variables that inboundemail expects
89 89
     $_REQUEST['mark_read'] = 1;
90 90
     $_REQUEST['only_since'] = 1;
91 91
     $_REQUEST['mailbox_type'] = 'bounce';
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 function clean_up_post($prefix){
115 115
 
116 116
     foreach ($_REQUEST as $key => $val) {
117
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
118
-              $newkey  =substr($key, strlen($prefix)) ;
119
-              $_REQUEST[$newkey] = $val;
120
-         }               
117
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
118
+                $newkey  =substr($key, strlen($prefix)) ;
119
+                $_REQUEST[$newkey] = $val;
120
+            }               
121 121
     }
122 122
 
123 123
     foreach ($_POST as $key => $val) {
124
-              if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
125
-              $newkey  =substr($key, strlen($prefix)) ;
126
-              $_POST[$newkey] = $val;
124
+                if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){
125
+                $newkey  =substr($key, strlen($prefix)) ;
126
+                $_POST[$newkey] = $val;
127 127
               
128
-         }               
128
+            }               
129 129
     }
130 130
 }
131 131
 
Please login to merge, or discard this patch.
modules/Campaigns/DeleteTestCampaigns.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
     $test_ids = array();
67 67
     $test_list_ids = array();
68 68
     while($row = $focus->db->fetchByAssoc($res)) {
69
-       $test_ids[] = $row['emailid'];
70
-       $test_list_ids[$row['listid']] = true;
69
+        $test_ids[] = $row['emailid'];
70
+        $test_list_ids[$row['listid']] = true;
71 71
     }
72 72
     $test_list_ids = array_keys($test_list_ids);
73 73
     unset($res);
Please login to merge, or discard this patch.
modules/Campaigns/WizardEmailSetup.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
 if(isset($mbox) && count($mbox)>0){
138 138
     $mboxTable .= "<tr><td colspan='5'><b>" .count($mbox) ." ". $mod_strings['LBL_MAILBOX_CHECK_WIZ_GOOD']." </b>.</td></tr>";
139 139
         $mboxTable .= "<tr class='listViewHRS1'><td width='20%'><b>".$mod_strings['LBL_MAILBOX_NAME']."</b></td>"
140
-                   .  " <td width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></td>"
141
-                   .  " <td width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></td>" 
142
-                   .  " <td width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></td>"
143
-                   .  " <td width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></td></tr>";
140
+                    .  " <td width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></td>"
141
+                    .  " <td width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></td>" 
142
+                    .  " <td width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></td>"
143
+                    .  " <td width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></td></tr>";
144 144
     $colorclass=' ';
145 145
     foreach($mbox as $details){
146 146
                 
147
-     if( $colorclass == "class='evenListRowS1'"){
147
+        if( $colorclass == "class='evenListRowS1'"){
148 148
             $colorclass= "class='oddListRowS1'";
149 149
         }else{ 
150 150
             $colorclass= "class='evenListRowS1'";
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 /**************************** WIZARD UI DIV Stuff *******************/
176 176
   
177 177
 //  this is the wizard control script that resides in page    
178
- $divScript = <<<EOQ
178
+    $divScript = <<<EOQ
179 179
  <script type="text/javascript" language="javascript">  
180 180
 
181 181
     //this function toggles visibility of fields based on selected options
Please login to merge, or discard this patch.
modules/Campaigns/ProcessBouncedEmails.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     $query = "SELECT description FROM notes WHERE file_mime_type = 'messsage/rfc822' AND parent_type='Emails' AND parent_id = '".$email->id."' AND deleted=0";
57 57
     $rs = $GLOBALS['db']->query($query);
58 58
     while ($row = $GLOBALS['db']->fetchByAssoc($rs)) 
59
-		$contents .= $row['description'];
59
+        $contents .= $row['description'];
60 60
 
61 61
     return $contents;
62 62
 }
@@ -162,80 +162,80 @@  discard block
 block discarded – undo
162 162
 
163 163
 function campaign_process_bounced_emails(&$email, &$email_header) 
164 164
 {
165
-	global $sugar_config;
166
-	$emailFromAddress = $email_header->fromaddress;
167
-	$email_description = $email->raw_source;
165
+    global $sugar_config;
166
+    $emailFromAddress = $email_header->fromaddress;
167
+    $email_description = $email->raw_source;
168 168
     	
169
-	//if raw_source is empty, try using the description instead
170
-    	if (empty($email_description)){
171
-        	$email_description = $email->description;
172
-	}
169
+    //if raw_source is empty, try using the description instead
170
+        if (empty($email_description)){
171
+            $email_description = $email->description;
172
+    }
173 173
 
174 174
     $email_description .= retrieveErrorReportAttachment($email);
175 175
 
176
-	if (preg_match('/MAILER-DAEMON|POSTMASTER/i',$emailFromAddress)) 
177
-	{
178
-	    $email_description=quoted_printable_decode($email_description);
179
-		$matches=array();
176
+    if (preg_match('/MAILER-DAEMON|POSTMASTER/i',$emailFromAddress)) 
177
+    {
178
+        $email_description=quoted_printable_decode($email_description);
179
+        $matches=array();
180 180
 		
181
-		//do we have the identifier tag in the email?
182
-		$identifierScanResults = checkBouncedEmailForIdentifier($email_description);
181
+        //do we have the identifier tag in the email?
182
+        $identifierScanResults = checkBouncedEmailForIdentifier($email_description);
183 183
 		
184
-		if ( $identifierScanResults['found'] ) 
185
-		{
186
-			$matches = $identifierScanResults['matches'];
187
-			$identifiers = $identifierScanResults['identifiers'];
188
-
189
-			if (!empty($identifiers)) 
190
-			{
191
-				//array should have only one element in it.
192
-				$identifier = trim($identifiers[0]);
193
-				$row = getExistingCampaignLogEntry($identifier);
184
+        if ( $identifierScanResults['found'] ) 
185
+        {
186
+            $matches = $identifierScanResults['matches'];
187
+            $identifiers = $identifierScanResults['identifiers'];
188
+
189
+            if (!empty($identifiers)) 
190
+            {
191
+                //array should have only one element in it.
192
+                $identifier = trim($identifiers[0]);
193
+                $row = getExistingCampaignLogEntry($identifier);
194 194
 				
195
-				//Found entry
196
-				if (!empty($row)) 
197
-				{
198
-					//do not create another campaign_log record is we already have an
199
-					//invalid email or send error entry for this tracker key.
200
-					$query_log = "select * from campaign_log where target_tracker_key='{$row['target_tracker_key']}'"; 
201
-					$query_log .=" and (activity_type='invalid email' or activity_type='send error')";
195
+                //Found entry
196
+                if (!empty($row)) 
197
+                {
198
+                    //do not create another campaign_log record is we already have an
199
+                    //invalid email or send error entry for this tracker key.
200
+                    $query_log = "select * from campaign_log where target_tracker_key='{$row['target_tracker_key']}'"; 
201
+                    $query_log .=" and (activity_type='invalid email' or activity_type='send error')";
202 202
                     $targeted = new CampaignLog();
203
-					$result_log=$targeted->db->query($query_log);
204
-					$row_log=$targeted->db->fetchByAssoc($result_log);
205
-
206
-					if (empty($row_log)) 
207
-					{
208
-						$return_id = createBouncedCampaignLogEntry($row, $email, $email_description);	
209
-						return TRUE;
210
-					}				
211
-					else 
212
-					{
213
-					    $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier");
214
-					    return FALSE;
215
-					}
216
-				} 
217
-				else 
218
-				{
219
-				    $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier);
220
-					return FALSE;
221
-				}			
222
-    		} 
223
-    		else 
224
-    		{
225
-    			$GLOBALS['log']->info("Warning: Empty identifier for campaign log.");
226
-    			return FALSE;
227
-    		}
228
-    	}  
229
-    	else 
230
-    	{
231
-    	    $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link.");	
232
-    		return FALSE;	
233
-      	}
234
-  } 
235
-  else 
236
-  {
237
-	$GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON.");
238
-	return FALSE;
239
-  }
203
+                    $result_log=$targeted->db->query($query_log);
204
+                    $row_log=$targeted->db->fetchByAssoc($result_log);
205
+
206
+                    if (empty($row_log)) 
207
+                    {
208
+                        $return_id = createBouncedCampaignLogEntry($row, $email, $email_description);	
209
+                        return TRUE;
210
+                    }				
211
+                    else 
212
+                    {
213
+                        $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier");
214
+                        return FALSE;
215
+                    }
216
+                } 
217
+                else 
218
+                {
219
+                    $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier);
220
+                    return FALSE;
221
+                }			
222
+            } 
223
+            else 
224
+            {
225
+                $GLOBALS['log']->info("Warning: Empty identifier for campaign log.");
226
+                return FALSE;
227
+            }
228
+        }  
229
+        else 
230
+        {
231
+            $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link.");	
232
+            return FALSE;	
233
+            }
234
+    } 
235
+    else 
236
+    {
237
+    $GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON.");
238
+    return FALSE;
239
+    }
240 240
 }
241 241
 ?>
Please login to merge, or discard this patch.
modules/Campaigns/CampaignDiagnostic.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
60 60
 //account for use within wizards
61 61
 if(!isset($_REQUEST['inline']) || $_REQUEST['inline'] != 'inline'){
62
-	$params = array();
63
-	$params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
64
-	$params[] = $mod_strings['LBL_CAMPAIGN_DIAGNOSTICS'];
62
+    $params = array();
63
+    $params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
64
+    $params[] = $mod_strings['LBL_CAMPAIGN_DIAGNOSTICS'];
65 65
 	
66
-	echo getClassicModuleTitle('Campaigns', $params, true);
66
+    echo getClassicModuleTitle('Campaigns', $params, true);
67 67
 }
68 68
 
69 69
 global $theme;
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 if(isset($mbox) && count($mbox)>0){
111 111
     $mboxTable .= "<tr><td colspan='5' style='text-align: left;'><b>" .count($mbox) ." ". $mod_strings['LBL_MAILBOX_CHECK1_GOOD']." </b>.</td></tr>";
112 112
         $mboxTable .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX_NAME']."</b></th>"
113
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></th>"
114
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></th>"
115
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></th>"
116
-                   .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></th></tr>";
113
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LOGIN']."</b></th>"
114
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAILBOX']."</b></th>"
115
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_SERVER_URL']."</b></th>"
116
+                    .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_LIST_STATUS']."</b></th></tr>";
117 117
 
118 118
     foreach($mbox as $details){
119 119
         $mboxTable .= "<tr><td>".$details['name']."</td>";
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 }else{
145 145
     $conf_msg .= "<tr><td colspan = '5'><b> ".$mod_strings['LBL_MAILBOX_CHECK2_GOOD']."</b></td></tr>";
146 146
     $conf_msg .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_NAME']."</b></th>"
147
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>"
148
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SENDTYPE']."</b></th>";
147
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>"
148
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SENDTYPE']."</b></th>";
149 149
     if($focus->settings['mail_sendtype']=='SMTP'){
150
-     $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>"
151
-               .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>";
150
+        $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>"
151
+                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>";
152 152
 
153 153
     }else{$conf_msg .= "</tr>";}
154 154
                    
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $conf_msg .= "<tr><td>".$focus->settings['notify_fromname']."</td>";
158 158
         $conf_msg .= "<td>".$focus->settings['notify_fromaddress']."</td>";
159 159
         $conf_msg .= "<td>".$focus->settings['mail_sendtype']."</td>";
160
-     if($focus->settings['mail_sendtype']=='SMTP'){
160
+        if($focus->settings['mail_sendtype']=='SMTP'){
161 161
         $conf_msg .= "<td>".$focus->settings['mail_smtpserver']."</td>";
162 162
         $conf_msg .= "<td>".$focus->settings['mail_smtpuser']."</td></tr>";
163 163
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 //build the table rows for scheduler display
199 199
 while ($sched_row = $focus->db->fetchByAssoc($sched_res)){$scheds[] = $sched_row;}
200 200
 foreach ($scheds as $funct){
201
-  if( ($funct['job']==$check_sched1)  ||   ($funct['job']==$check_sched2)){
201
+    if( ($funct['job']==$check_sched1)  ||   ($funct['job']==$check_sched2)){
202 202
         $sched_mes = 'use';
203 203
         $sched_mes_body .= "<tr><td style='text-align: left;'>".$funct['name']."</td>";
204 204
         $sched_mes_body .= "<td style='text-align: left;'>".$funct['status']."</td></tr>";
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             $check_sched2 ="found";
209 209
         }  
210 210
         
211
-  }
211
+    }
212 212
 }
213 213
 
214 214
 //determine which table header to use, based on whether or not schedulers were found
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 if($sched_mes == 'use'){
217 217
     $sched_mes = "<h5>".$mod_strings['LBL_SCHEDULER_CHECK_GOOD']."</h5><br><table class='other view' cellspacing='1'>";
218 218
     $sched_mes .= "<tr><th scope='col' width='40%'><b>".$mod_strings['LBL_SCHEDULER_NAME']."</b></tH>"
219
-               .  " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>";
219
+                .  " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>";
220 220
             
221 221
 }else{
222 222
     $sched_mes = "<table class='other view' cellspacing='1'>";
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     if (is_admin($current_user)){
239 239
         $admin_sched_link="<a href='index.php?module=Schedulers&action=index'>".$mod_strings['LBL_SCHEDULER_LINK']."</a>";
240 240
     }else{
241
-     $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];   
241
+        $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];   
242 242
     }    
243 243
 }    
244 244
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 /********** FINAL END OF PAGE UI Stuff ********/
252 252
 if(!isset($_REQUEST['inline']) || $_REQUEST['inline'] != 'inline'){
253 253
 
254
-      $ss->display('modules/Campaigns/CampaignDiagnostic.html');
254
+        $ss->display('modules/Campaigns/CampaignDiagnostic.html');
255 255
 }
256 256
 
257 257
 /**
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     }elseif($num == 0){
273 273
         //if health number is zero, then all checks passed, set green image
274 274
         //green
275
-       return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']);
275
+        return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']);
276 276
 
277 277
 
278 278
     }else{
Please login to merge, or discard this patch.