Passed
Push — 1.10.x ( 08890a...2189d7 )
by Yannick
116:38 queued 75:46
created
main/inc/lib/usermanager.lib.php 1 patch
Braces   +97 added lines, -62 removed lines patch added patch discarded remove patch
@@ -774,10 +774,12 @@  discard block
 block discarded – undo
774 774
     public static function update_openid($user_id, $openid)
775 775
     {
776 776
         $table_user = Database :: get_main_table(TABLE_MAIN_USER);
777
-        if ($user_id != strval(intval($user_id)))
778
-            return false;
779
-        if ($user_id === false)
780
-            return false;
777
+        if ($user_id != strval(intval($user_id))) {
778
+                    return false;
779
+        }
780
+        if ($user_id === false) {
781
+                    return false;
782
+        }
781 783
         $sql = "UPDATE $table_user SET
782 784
                 openid='".Database::escape_string($openid)."'";
783 785
         $sql .= " WHERE id= $user_id";
@@ -2069,8 +2071,9 @@  discard block
 block discarded – undo
2069 2071
         if (empty($user_id)) {
2070 2072
             $user_id = 0;
2071 2073
         } else {
2072
-            if ($user_id != strval(intval($user_id)))
2073
-                return array();
2074
+            if ($user_id != strval(intval($user_id))) {
2075
+                            return array();
2076
+            }
2074 2077
         }
2075 2078
         $extra_data = array();
2076 2079
         $t_uf = Database::get_main_table(TABLE_EXTRA_FIELD);
@@ -2162,8 +2165,9 @@  discard block
 block discarded – undo
2162 2165
         if (empty($user_id)) {
2163 2166
             $user_id = 0;
2164 2167
         } else {
2165
-            if ($user_id != strval(intval($user_id)))
2166
-                return array();
2168
+            if ($user_id != strval(intval($user_id))) {
2169
+                            return array();
2170
+            }
2167 2171
         }
2168 2172
         $extra_data = array();
2169 2173
         $t_uf = Database::get_main_table(TABLE_EXTRA_FIELD);
@@ -2880,13 +2884,15 @@  discard block
 block discarded – undo
2880 2884
      */
2881 2885
     public static function get_api_keys($user_id = null, $api_service = 'dokeos')
2882 2886
     {
2883
-        if ($user_id != strval(intval($user_id)))
2884
-            return false;
2887
+        if ($user_id != strval(intval($user_id))) {
2888
+                    return false;
2889
+        }
2885 2890
         if (empty($user_id)) {
2886 2891
             $user_id = api_get_user_id();
2887 2892
         }
2888
-        if ($user_id === false)
2889
-            return false;
2893
+        if ($user_id === false) {
2894
+                    return false;
2895
+        }
2890 2896
         $service_name = Database::escape_string($api_service);
2891 2897
         if (is_string($service_name) === false) {
2892 2898
             return false;
@@ -2894,11 +2900,14 @@  discard block
 block discarded – undo
2894 2900
         $t_api = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
2895 2901
         $sql = "SELECT * FROM $t_api WHERE user_id = $user_id AND api_service='$api_service';";
2896 2902
         $res = Database::query($sql);
2897
-        if ($res === false)
2898
-            return false; //error during query
2903
+        if ($res === false) {
2904
+                    return false;
2905
+        }
2906
+        //error during query
2899 2907
         $num = Database::num_rows($res);
2900
-        if ($num == 0)
2901
-            return false;
2908
+        if ($num == 0) {
2909
+                    return false;
2910
+        }
2902 2911
         $list = array();
2903 2912
         while ($row = Database::fetch_array($res)) {
2904 2913
             $list[$row['id']] = $row['api_key'];
@@ -2913,13 +2922,15 @@  discard block
 block discarded – undo
2913 2922
      */
2914 2923
     public static function add_api_key($user_id = null, $api_service = 'dokeos')
2915 2924
     {
2916
-        if ($user_id != strval(intval($user_id)))
2917
-            return false;
2925
+        if ($user_id != strval(intval($user_id))) {
2926
+                    return false;
2927
+        }
2918 2928
         if (empty($user_id)) {
2919 2929
             $user_id = api_get_user_id();
2920 2930
         }
2921
-        if ($user_id === false)
2922
-            return false;
2931
+        if ($user_id === false) {
2932
+                    return false;
2933
+        }
2923 2934
         $service_name = Database::escape_string($api_service);
2924 2935
         if (is_string($service_name) === false) {
2925 2936
             return false;
@@ -2928,8 +2939,10 @@  discard block
 block discarded – undo
2928 2939
         $md5 = md5((time() + ($user_id * 5)) - rand(10000, 10000)); //generate some kind of random key
2929 2940
         $sql = "INSERT INTO $t_api (user_id, api_key,api_service) VALUES ($user_id,'$md5','$service_name')";
2930 2941
         $res = Database::query($sql);
2931
-        if ($res === false)
2932
-            return false; //error during query
2942
+        if ($res === false) {
2943
+                    return false;
2944
+        }
2945
+        //error during query
2933 2946
         $num = Database::insert_id();
2934 2947
         return ($num == 0) ? false : $num;
2935 2948
     }
@@ -2941,22 +2954,29 @@  discard block
 block discarded – undo
2941 2954
      */
2942 2955
     public static function delete_api_key($key_id)
2943 2956
     {
2944
-        if ($key_id != strval(intval($key_id)))
2945
-            return false;
2946
-        if ($key_id === false)
2947
-            return false;
2957
+        if ($key_id != strval(intval($key_id))) {
2958
+                    return false;
2959
+        }
2960
+        if ($key_id === false) {
2961
+                    return false;
2962
+        }
2948 2963
         $t_api = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
2949 2964
         $sql = "SELECT * FROM $t_api WHERE id = ".$key_id;
2950 2965
         $res = Database::query($sql);
2951
-        if ($res === false)
2952
-            return false; //error during query
2966
+        if ($res === false) {
2967
+                    return false;
2968
+        }
2969
+        //error during query
2953 2970
         $num = Database::num_rows($res);
2954
-        if ($num !== 1)
2955
-            return false;
2971
+        if ($num !== 1) {
2972
+                    return false;
2973
+        }
2956 2974
         $sql = "DELETE FROM $t_api WHERE id = ".$key_id;
2957 2975
         $res = Database::query($sql);
2958
-        if ($res === false)
2959
-            return false; //error during query
2976
+        if ($res === false) {
2977
+                    return false;
2978
+        }
2979
+        //error during query
2960 2980
         return true;
2961 2981
     }
2962 2982
 
@@ -2968,10 +2988,12 @@  discard block
 block discarded – undo
2968 2988
      */
2969 2989
     public static function update_api_key($user_id, $api_service)
2970 2990
     {
2971
-        if ($user_id != strval(intval($user_id)))
2972
-            return false;
2973
-        if ($user_id === false)
2974
-            return false;
2991
+        if ($user_id != strval(intval($user_id))) {
2992
+                    return false;
2993
+        }
2994
+        if ($user_id === false) {
2995
+                    return false;
2996
+        }
2975 2997
         $service_name = Database::escape_string($api_service);
2976 2998
         if (is_string($service_name) === false) {
2977 2999
             return false;
@@ -2997,12 +3019,15 @@  discard block
 block discarded – undo
2997 3019
      */
2998 3020
     public static function get_api_key_id($user_id, $api_service)
2999 3021
     {
3000
-        if ($user_id != strval(intval($user_id)))
3001
-            return false;
3002
-        if ($user_id === false)
3003
-            return false;
3004
-        if (empty($api_service))
3005
-            return false;
3022
+        if ($user_id != strval(intval($user_id))) {
3023
+                    return false;
3024
+        }
3025
+        if ($user_id === false) {
3026
+                    return false;
3027
+        }
3028
+        if (empty($api_service)) {
3029
+                    return false;
3030
+        }
3006 3031
         $t_api = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
3007 3032
         $api_service = Database::escape_string($api_service);
3008 3033
         $sql = "SELECT id FROM $t_api WHERE user_id=".$user_id." AND api_service='".$api_service."'";
@@ -4473,8 +4498,9 @@  discard block
 block discarded – undo
4473 4498
                     $form->applyFilter('extra_'.$field_details[1], 'stripslashes');
4474 4499
                     $form->applyFilter('extra_'.$field_details[1], 'trim');
4475 4500
                     if (!$admin_permissions) {
4476
-                        if ($field_details[7] == 0)
4477
-                            $form->freeze('extra_'.$field_details[1]);
4501
+                        if ($field_details[7] == 0) {
4502
+                                                    $form->freeze('extra_'.$field_details[1]);
4503
+                        }
4478 4504
                     }
4479 4505
                     break;
4480 4506
                 case ExtraField::FIELD_TYPE_RADIO:
@@ -4491,8 +4517,9 @@  discard block
 block discarded – undo
4491 4517
                     }
4492 4518
                     $form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], '');
4493 4519
                     if (!$admin_permissions) {
4494
-                        if ($field_details[7] == 0)
4495
-                            $form->freeze('extra_'.$field_details[1]);
4520
+                        if ($field_details[7] == 0) {
4521
+                                                    $form->freeze('extra_'.$field_details[1]);
4522
+                        }
4496 4523
                     }
4497 4524
                     break;
4498 4525
                 case ExtraField::FIELD_TYPE_SELECT:
@@ -4530,8 +4557,9 @@  discard block
 block discarded – undo
4530 4557
                     );
4531 4558
 
4532 4559
                     if (!$admin_permissions) {
4533
-                        if ($field_details[7] == 0)
4534
-                            $form->freeze('extra_'.$field_details[1]);
4560
+                        if ($field_details[7] == 0) {
4561
+                                                    $form->freeze('extra_'.$field_details[1]);
4562
+                        }
4535 4563
                     }
4536 4564
                     break;
4537 4565
                 case ExtraField::FIELD_TYPE_SELECT_MULTIPLE:
@@ -4547,8 +4575,9 @@  discard block
 block discarded – undo
4547 4575
                         array('multiple' => 'multiple')
4548 4576
                     );
4549 4577
                     if (!$admin_permissions) {
4550
-                        if ($field_details[7] == 0)
4551
-                            $form->freeze('extra_'.$field_details[1]);
4578
+                        if ($field_details[7] == 0) {
4579
+                                                    $form->freeze('extra_'.$field_details[1]);
4580
+                        }
4552 4581
                     }
4553 4582
                     break;
4554 4583
                 case ExtraField::FIELD_TYPE_DATE:
@@ -4556,8 +4585,9 @@  discard block
 block discarded – undo
4556 4585
                     $defaults['extra_'.$field_details[1]] = date('Y-m-d 12:00:00');
4557 4586
                     $form->setDefaults($defaults);
4558 4587
                     if (!$admin_permissions) {
4559
-                        if ($field_details[7] == 0)
4560
-                            $form->freeze('extra_'.$field_details[1]);
4588
+                        if ($field_details[7] == 0) {
4589
+                                                    $form->freeze('extra_'.$field_details[1]);
4590
+                        }
4561 4591
                     }
4562 4592
                     $form->applyFilter('theme', 'trim');
4563 4593
                     break;
@@ -4566,8 +4596,9 @@  discard block
 block discarded – undo
4566 4596
                     $defaults['extra_'.$field_details[1]] = date('Y-m-d 12:00:00');
4567 4597
                     $form->setDefaults($defaults);
4568 4598
                     if (!$admin_permissions) {
4569
-                        if ($field_details[7] == 0)
4570
-                            $form->freeze('extra_'.$field_details[1]);
4599
+                        if ($field_details[7] == 0) {
4600
+                                                    $form->freeze('extra_'.$field_details[1]);
4601
+                        }
4571 4602
                     }
4572 4603
                     $form->applyFilter('theme', 'trim');
4573 4604
                     break;
@@ -4586,8 +4617,9 @@  discard block
 block discarded – undo
4586 4617
                     $form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], ' ');
4587 4618
 
4588 4619
                     if (!$admin_permissions) {
4589
-                        if ($field_details[7] == 0)
4590
-                            $form->freeze('extra_'.$field_details[1]);
4620
+                        if ($field_details[7] == 0) {
4621
+                                                    $form->freeze('extra_'.$field_details[1]);
4622
+                        }
4591 4623
                     }
4592 4624
 
4593 4625
                     /* Recoding the selected values for double : if the user has
@@ -4647,8 +4679,9 @@  discard block
 block discarded – undo
4647 4679
                     break;
4648 4680
                 case ExtraField::FIELD_TYPE_TIMEZONE:
4649 4681
                     $form->addElement('select', 'extra_'.$field_details[1], $field_details[3], api_get_timezones(), '');
4650
-                    if ($field_details[7] == 0)
4651
-                        $form->freeze('extra_'.$field_details[1]);
4682
+                    if ($field_details[7] == 0) {
4683
+                                            $form->freeze('extra_'.$field_details[1]);
4684
+                    }
4652 4685
                     break;
4653 4686
                 case ExtraField::FIELD_TYPE_SOCIAL_PROFILE:
4654 4687
                     // get the social network's favicon
@@ -4673,8 +4706,9 @@  discard block
 block discarded – undo
4673 4706
                     );
4674 4707
                     $form->applyFilter('extra_'.$field_details[1], 'stripslashes');
4675 4708
                     $form->applyFilter('extra_'.$field_details[1], 'trim');
4676
-                    if ($field_details[7] == 0)
4677
-                        $form->freeze('extra_'.$field_details[1]);
4709
+                    if ($field_details[7] == 0) {
4710
+                                            $form->freeze('extra_'.$field_details[1]);
4711
+                    }
4678 4712
                     break;
4679 4713
                 case ExtraField::FIELD_TYPE_FILE:
4680 4714
                     $extra_field = 'extra_'.$field_details[1];
@@ -4991,8 +5025,9 @@  discard block
 block discarded – undo
4991 5025
         $url .= "?s=$s&d=$d&r=$r";
4992 5026
         if ( $img ) {
4993 5027
             $url = '<img src="' . $url . '"';
4994
-            foreach ( $atts as $key => $val )
4995
-                $url .= ' ' . $key . '="' . $val . '"';
5028
+            foreach ( $atts as $key => $val ) {
5029
+                            $url .= ' ' . $key . '="' . $val . '"';
5030
+            }
4996 5031
             $url .= ' />';
4997 5032
         }
4998 5033
         return $url;
Please login to merge, or discard this patch.
main/inc/lib/sub_language.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@
 block discarded – undo
29 29
                 while (($file = readdir($dh)) !== false) {
30 30
                     if ($file[0] <> '.' && substr($file, -4, strlen($file)) == '.php') {
31 31
                         if ($only_main_name) {
32
-                            if ($file != '' && strpos($file, '.inc.php'))
33
-                                $content_dir[] = substr($file, 0, strpos($file, '.inc.php'));
32
+                            if ($file != '' && strpos($file, '.inc.php')) {
33
+                                                            $content_dir[] = substr($file, 0, strpos($file, '.inc.php'));
34
+                            }
34 35
                         } else {
35 36
                             $content_dir[] = $file;
36 37
                         }
Please login to merge, or discard this patch.
main/inc/lib/database.lib.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -594,7 +594,7 @@
 block discarded – undo
594 594
                     if (!empty($limit_array)) {
595 595
                         if (count($limit_array) > 1) {
596 596
                             $return_value .= ' LIMIT '.intval($limit_array[0]).' , '.intval($limit_array[1]);
597
-                        }  else {
597
+                        } else {
598 598
                             $return_value .= ' LIMIT '.intval($limit_array[0]);
599 599
                         }
600 600
                     }
Please login to merge, or discard this patch.
main/inc/lib/svg-edit/extensions/imagelib/index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
 		if (strpos($filename, "svg")){
66 66
 			$new_sizes['width'] = 60;
67 67
 			$new_sizes['height'] = 60;
68
-		}
69
-		else {
68
+		} else {
70 69
 			$new_sizes = api_resize_image($image, 60, 60);
71 70
 		}
72 71
 
Please login to merge, or discard this patch.
main/inc/lib/group_portal_manager.lib.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -563,8 +563,9 @@  discard block
 block discarded – undo
563 563
                 $new_relation_type[] = "'$rel'";
564 564
             }
565 565
             $relation_type = implode(',', $new_relation_type);
566
-            if (!empty($relation_type))
567
-                $where_relation_condition = "AND gu.relation_type IN ($relation_type) ";
566
+            if (!empty($relation_type)) {
567
+                            $where_relation_condition = "AND gu.relation_type IN ($relation_type) ";
568
+            }
568 569
         }
569 570
 
570 571
         $sql = "SELECT
@@ -1086,8 +1087,9 @@  discard block
 block discarded – undo
1086 1087
                 $thumbwidth = $max_size_for_picture;
1087 1088
             }
1088 1089
             $new_height = round(($thumbwidth / $picture_infos['width']) * $picture_infos['height']);
1089
-            if ($new_height > $max_size_for_picture)
1090
-                $new_height = $thumbwidth;
1090
+            if ($new_height > $max_size_for_picture) {
1091
+                            $new_height = $thumbwidth;
1092
+            }
1091 1093
             $temp->resize($thumbwidth, $new_height, 0);
1092 1094
         }
1093 1095
 
Please login to merge, or discard this patch.
main/inc/lib/diagnoser.lib.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -158,8 +158,9 @@  discard block
 block discarded – undo
158 158
         $array[] = $this->build_setting($status, '[INI]', 'display_errors', 'http://www.php.net/manual/en/ini.core.php#ini.display_errors', $setting, $req_setting, 'on_off', get_lang('DisplayErrorsInfo'));
159 159
 
160 160
         $setting = ini_get('default_charset');
161
-        if ($setting == '')
162
-            $setting = null;
161
+        if ($setting == '') {
162
+                    $setting = null;
163
+        }
163 164
         $req_setting = null;
164 165
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_ERROR;
165 166
         $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo'));
@@ -177,22 +178,25 @@  discard block
 block discarded – undo
177 178
         $setting = ini_get('memory_limit');
178 179
         $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M';
179 180
         $status = self :: STATUS_ERROR;
180
-        if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT)
181
-            $status = self :: STATUS_OK;
181
+        if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) {
182
+                    $status = self :: STATUS_OK;
183
+        }
182 184
         $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo'));
183 185
 
184 186
         $setting = ini_get('post_max_size');
185 187
         $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M';
186 188
         $status = self :: STATUS_ERROR;
187
-        if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE)
188
-            $status = self :: STATUS_OK;
189
+        if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) {
190
+                    $status = self :: STATUS_OK;
191
+        }
189 192
         $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo'));
190 193
 
191 194
         $setting = ini_get('upload_max_filesize');
192 195
         $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M';
193 196
         $status = self :: STATUS_ERROR;
194
-        if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE)
195
-            $status = self :: STATUS_OK;
197
+        if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) {
198
+                    $status = self :: STATUS_OK;
199
+        }
196 200
         $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo'));
197 201
 
198 202
         $setting = ini_get('variables_order');
@@ -205,7 +209,7 @@  discard block
 block discarded – undo
205 209
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
206 210
         $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo'));
207 211
 
208
-        if (api_check_browscap()){$setting = true;}else{$setting=false;}
212
+        if (api_check_browscap()){$setting = true;} else{$setting=false;}
209 213
         $req_setting = true;
210 214
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
211 215
         $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo'));
Please login to merge, or discard this patch.
main/inc/lib/browser/Browser.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1152,68 +1152,52 @@
 block discarded – undo
1152 1152
         if (stripos($this->_agent, 'windows') !== false) 
1153 1153
         {
1154 1154
             $this->_platform = self::PLATFORM_WINDOWS;
1155
-        } 
1156
-        else if (stripos($this->_agent, 'iPad') !== false) 
1155
+        } else if (stripos($this->_agent, 'iPad') !== false) 
1157 1156
         {
1158 1157
             $this->_platform = self::PLATFORM_IPAD;
1159
-        } 
1160
-        else if (stripos($this->_agent, 'iPod') !== false) 
1158
+        } else if (stripos($this->_agent, 'iPod') !== false) 
1161 1159
         {
1162 1160
             $this->_platform = self::PLATFORM_IPOD;
1163
-        } 
1164
-        else if (stripos($this->_agent, 'iPhone') !== false) 
1161
+        } else if (stripos($this->_agent, 'iPhone') !== false) 
1165 1162
         {
1166 1163
             $this->_platform = self::PLATFORM_IPHONE;
1167
-        } 
1168
-        elseif (stripos($this->_agent, 'mac') !== false) 
1164
+        } elseif (stripos($this->_agent, 'mac') !== false) 
1169 1165
         {
1170 1166
             $this->_platform = self::PLATFORM_APPLE;
1171
-        } 
1172
-        elseif (stripos($this->_agent, 'android') !== false) 
1167
+        } elseif (stripos($this->_agent, 'android') !== false) 
1173 1168
         {
1174 1169
             $this->_platform = self::PLATFORM_ANDROID;
1175
-        } 
1176
-        elseif (stripos($this->_agent, 'linux') !== false) 
1170
+        } elseif (stripos($this->_agent, 'linux') !== false) 
1177 1171
         {
1178 1172
             $this->_platform = self::PLATFORM_LINUX;
1179
-        } 
1180
-        else if (stripos($this->_agent, 'Nokia') !== false) 
1173
+        } else if (stripos($this->_agent, 'Nokia') !== false) 
1181 1174
         {
1182 1175
             $this->_platform = self::PLATFORM_NOKIA;
1183
-        } 
1184
-        else if (stripos($this->_agent, 'BlackBerry') !== false) 
1176
+        } else if (stripos($this->_agent, 'BlackBerry') !== false) 
1185 1177
         {
1186 1178
             $this->_platform = self::PLATFORM_BLACKBERRY;
1187
-        } 
1188
-        elseif (stripos($this->_agent, 'FreeBSD') !== false) 
1179
+        } elseif (stripos($this->_agent, 'FreeBSD') !== false) 
1189 1180
         {
1190 1181
             $this->_platform = self::PLATFORM_FREEBSD;
1191
-        } 
1192
-        elseif (stripos($this->_agent, 'OpenBSD') !== false) 
1182
+        } elseif (stripos($this->_agent, 'OpenBSD') !== false) 
1193 1183
         {
1194 1184
             $this->_platform = self::PLATFORM_OPENBSD;
1195
-        } 
1196
-        elseif (stripos($this->_agent, 'NetBSD') !== false) 
1185
+        } elseif (stripos($this->_agent, 'NetBSD') !== false) 
1197 1186
         {
1198 1187
             $this->_platform = self::PLATFORM_NETBSD;
1199
-        } 
1200
-        elseif (stripos($this->_agent, 'OpenSolaris') !== false) 
1188
+        } elseif (stripos($this->_agent, 'OpenSolaris') !== false) 
1201 1189
         {
1202 1190
             $this->_platform = self::PLATFORM_OPENSOLARIS;
1203
-        } 
1204
-        elseif (stripos($this->_agent, 'SunOS') !== false) 
1191
+        } elseif (stripos($this->_agent, 'SunOS') !== false) 
1205 1192
         {
1206 1193
             $this->_platform = self::PLATFORM_SUNOS;
1207
-        } 
1208
-        elseif (stripos($this->_agent, 'OS\/2') !== false) 
1194
+        } elseif (stripos($this->_agent, 'OS\/2') !== false) 
1209 1195
         {
1210 1196
             $this->_platform = self::PLATFORM_OS2;
1211
-        } 
1212
-        elseif (stripos($this->_agent, 'BeOS') !== false) 
1197
+        } elseif (stripos($this->_agent, 'BeOS') !== false) 
1213 1198
         {
1214 1199
             $this->_platform = self::PLATFORM_BEOS;
1215
-        } 
1216
-        elseif (stripos($this->_agent, 'win') !== false) 
1200
+        } elseif (stripos($this->_agent, 'win') !== false) 
1217 1201
         {
1218 1202
             $this->_platform = self::PLATFORM_WINDOWS;
1219 1203
         }
Please login to merge, or discard this patch.
main/inc/lib/phpmailer/class.smtp.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,9 @@
 block discarded – undo
143 143
 
144 144
     // SMTP server can take longer to respond, give longer timeout for first read
145 145
     // Windows does not have support for this timeout function
146
-    if(substr(PHP_OS, 0, 3) != "WIN")
147
-     socket_set_timeout($this->smtp_conn, $tval, 0);
146
+    if(substr(PHP_OS, 0, 3) != "WIN") {
147
+         socket_set_timeout($this->smtp_conn, $tval, 0);
148
+    }
148 149
 
149 150
     // get any announcement
150 151
     $announce = $this->get_lines();
Please login to merge, or discard this patch.
main/inc/lib/phpmailer/class.phpmailer.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,9 @@  discard block
 block discarded – undo
38 38
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
39 39
  */
40 40
 
41
-if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");
41
+if (version_compare(PHP_VERSION, '5.0.0', '<') ) {
42
+    exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");
43
+}
42 44
 
43 45
 class PHPMailer {
44 46
 
@@ -1502,8 +1504,9 @@  discard block
 block discarded – undo
1502 1504
       case '8bit':
1503 1505
         $encoded = $this->FixEOL($str);
1504 1506
         //Make sure it ends with a line break
1505
-        if (substr($encoded, -(strlen($this->LE))) != $this->LE)
1506
-          $encoded .= $this->LE;
1507
+        if (substr($encoded, -(strlen($this->LE))) != $this->LE) {
1508
+                  $encoded .= $this->LE;
1509
+        }
1507 1510
         break;
1508 1511
       case 'binary':
1509 1512
         $encoded = $str;
@@ -2264,7 +2267,9 @@  discard block
 block discarded – undo
2264 2267
    * @param string $body Message Body
2265 2268
    */
2266 2269
   public function DKIM_BodyC($body) {
2267
-    if ($body == '') return "\r\n";
2270
+    if ($body == '') {
2271
+        return "\r\n";
2272
+    }
2268 2273
     // stabilize line endings
2269 2274
     $body=str_replace("\r\n","\n",$body);
2270 2275
     $body=str_replace("\n","\r\n",$body);
Please login to merge, or discard this patch.