Test Failed
Pull Request — master (#325)
by Kiran
18:03
created
geodirectory-functions/map-functions/map_template_tags.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -225,10 +225,11 @@  discard block
 block discarded – undo
225 225
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/>
226 226
                 <?php }
227 227
 
228
-                if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters'])
229
-                    $show_entire_cat_panel = "none";
230
-                else
231
-                    $show_entire_cat_panel = "''";
228
+                if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) {
229
+                                    $show_entire_cat_panel = "none";
230
+                } else {
231
+                                    $show_entire_cat_panel = "''";
232
+                }
232 233
                 ?>
233 234
 
234 235
                 <?php if ($geodir_map_options['enable_map_direction']) { ?>
@@ -302,8 +303,9 @@  discard block
 block discarded – undo
302 303
 				}
303 304
 				
304 305
 				$geodir_default_map_search_pt = get_option('geodir_default_map_search_pt');
305
-				if (empty($geodir_default_map_search_pt))
306
-					$geodir_default_map_search_pt = 'gd_place';
306
+				if (empty($geodir_default_map_search_pt)) {
307
+									$geodir_default_map_search_pt = 'gd_place';
308
+				}
307 309
 
308 310
                 global $gd_session;
309 311
                 $homemap_catlist_ptype = $gd_session->get('homemap_catlist_ptype');
Please login to merge, or discard this patch.
geodirectory-functions/custom_fields_input_functions.php 1 patch
Braces   +191 added lines, -68 removed lines patch added patch discarded remove patch
@@ -86,26 +86,31 @@  discard block
 block discarded – undo
86 86
         $value = geodir_get_cf_value($cf);
87 87
         $type = $cf['type'];
88 88
         //number and float validation $validation_pattern
89
-        if(isset($cf['data_type']) && $cf['data_type']=='INT'){$type = 'number';}
90
-        elseif(isset($cf['data_type']) && $cf['data_type']=='FLOAT'){$type = 'float';}
89
+        if(isset($cf['data_type']) && $cf['data_type']=='INT'){$type = 'number';} elseif(isset($cf['data_type']) && $cf['data_type']=='FLOAT'){$type = 'float';}
91 90
 
92 91
         //validation
93 92
         if(isset($cf['validation_pattern']) && $cf['validation_pattern']){
94 93
             $validation = 'pattern="'.$cf['validation_pattern'].'"';
95
-        }else{$validation='';}
94
+        } else{$validation='';}
96 95
 
97 96
         // validation message
98 97
         if(isset($cf['validation_msg']) && $cf['validation_msg']){
99 98
             $validation_msg = 'title="'.$cf['validation_msg'].'"';
100
-        }else{$validation_msg='';}
99
+        } else{$validation_msg='';}
101 100
         ?>
102 101
 
103 102
         <div id="<?php echo $cf['name'];?>_row"
104
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
103
+             class="<?php if ($cf['is_required']) {
104
+	echo 'required_field';
105
+}
106
+?> geodir_form_row clearfix gd-fieldset-details">
105 107
             <label>
106 108
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
107 109
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
108
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
110
+                <?php if ($cf['is_required']) {
111
+	echo '<span>*</span>';
112
+}
113
+?>
109 114
             </label>
110 115
             <input field_type="<?php echo $type;?>" name="<?php echo $cf['name'];?>" id="<?php echo $cf['name'];?>"
111 116
                    value="<?php echo esc_attr(stripslashes($value));?>" type="<?php echo $type;?>" class="geodir_textfield" <?php echo $validation;echo $validation_msg;?> />
@@ -160,11 +165,17 @@  discard block
 block discarded – undo
160 165
         }?>
161 166
 
162 167
         <div id="<?php echo $cf['name'];?>_row"
163
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
168
+             class="<?php if ($cf['is_required']) {
169
+	echo 'required_field';
170
+}
171
+?> geodir_form_row clearfix gd-fieldset-details">
164 172
             <label>
165 173
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
166 174
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
167
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
175
+                <?php if ($cf['is_required']) {
176
+	echo '<span>*</span>';
177
+}
178
+?>
168 179
             </label>
169 180
             <input field_type="<?php echo $cf['type'];?>" name="<?php  echo $cf['name'];?>" id="<?php echo $cf['name'];?>"
170 181
                    value="<?php echo esc_attr(stripslashes($value));?>" type="email" class="geodir_textfield"/>
@@ -220,11 +231,17 @@  discard block
 block discarded – undo
220 231
         }?>
221 232
 
222 233
         <div id="<?php echo $cf['name'];?>_row"
223
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
234
+             class="<?php if ($cf['is_required']) {
235
+	echo 'required_field';
236
+}
237
+?> geodir_form_row clearfix gd-fieldset-details">
224 238
             <label>
225 239
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
226 240
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
227
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
241
+                <?php if ($cf['is_required']) {
242
+	echo '<span>*</span>';
243
+}
244
+?>
228 245
             </label>
229 246
             <input field_type="<?php echo $cf['type'];?>" name="<?php  echo $cf['name'];?>" id="<?php echo $cf['name'];?>"
230 247
                    value="<?php echo esc_attr(stripslashes($value));?>" type="tel" class="geodir_textfield"/>
@@ -280,11 +297,17 @@  discard block
 block discarded – undo
280 297
         }?>
281 298
 
282 299
         <div id="<?php echo $cf['name'];?>_row"
283
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
300
+             class="<?php if ($cf['is_required']) {
301
+	echo 'required_field';
302
+}
303
+?> geodir_form_row clearfix gd-fieldset-details">
284 304
             <label>
285 305
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
286 306
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
287
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
307
+                <?php if ($cf['is_required']) {
308
+	echo '<span>*</span>';
309
+}
310
+?>
288 311
             </label>
289 312
             <input field_type="<?php echo $cf['type'];?>" name="<?php echo $cf['name'];?>" id="<?php echo $cf['name'];?>"
290 313
                    value="<?php echo esc_attr(stripslashes($value));?>" type="url" class="geodir_textfield"
@@ -339,11 +362,17 @@  discard block
 block discarded – undo
339 362
 
340 363
         ?>
341 364
         <div id="<?php echo $cf['name'];?>_row"
342
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
365
+             class="<?php if ($cf['is_required']) {
366
+	echo 'required_field';
367
+}
368
+?> geodir_form_row clearfix gd-fieldset-details">
343 369
             <label>
344 370
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
345 371
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
346
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
372
+                <?php if ($cf['is_required']) {
373
+	echo '<span>*</span>';
374
+}
375
+?>
347 376
             </label>
348 377
             <?php if ($cf['option_values']) {
349 378
                 $option_values = geodir_string_values_to_options($cf['option_values'], true);
@@ -412,11 +441,17 @@  discard block
 block discarded – undo
412 441
         ?>
413 442
 
414 443
         <div id="<?php echo $cf['name'];?>_row"
415
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
444
+             class="<?php if ($cf['is_required']) {
445
+	echo 'required_field';
446
+}
447
+?> geodir_form_row clearfix gd-fieldset-details">
416 448
             <label>
417 449
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
418 450
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
419
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
451
+                <?php if ($cf['is_required']) {
452
+	echo '<span>*</span>';
453
+}
454
+?>
420 455
             </label>
421 456
             <?php if ($value != '1') {
422 457
                 $value = '0';
@@ -476,11 +511,17 @@  discard block
 block discarded – undo
476 511
         ?>
477 512
 
478 513
         <div id="<?php echo $cf['name'];?>_row"
479
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
514
+             class="<?php if ($cf['is_required']) {
515
+	echo 'required_field';
516
+}
517
+?> geodir_form_row clearfix gd-fieldset-details">
480 518
             <label>
481 519
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
482 520
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
483
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
521
+                <?php if ($cf['is_required']) {
522
+	echo '<span>*</span>';
523
+}
524
+?>
484 525
             </label><?php
485 526
 
486 527
 
@@ -548,11 +589,17 @@  discard block
 block discarded – undo
548 589
 
549 590
         ?>
550 591
         <div id="<?php echo $cf['name'];?>_row"
551
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row geodir_custom_fields clearfix gd-fieldset-details">
592
+             class="<?php if ($cf['is_required']) {
593
+	echo 'required_field';
594
+}
595
+?> geodir_form_row geodir_custom_fields clearfix gd-fieldset-details">
552 596
             <label>
553 597
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
554 598
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
555
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
599
+                <?php if ($cf['is_required']) {
600
+	echo '<span>*</span>';
601
+}
602
+?>
556 603
             </label>
557 604
             <?php
558 605
             $option_values_arr = geodir_string_values_to_options($cf['option_values'], true);
@@ -629,11 +676,17 @@  discard block
 block discarded – undo
629 676
         }
630 677
         ?>
631 678
         <div id="<?php echo $cf['name']; ?>_row"
632
-             class="<?php if ($cf['is_required']) echo 'required_field'; ?> geodir_form_row clearfix gd-fieldset-details">
679
+             class="<?php if ($cf['is_required']) {
680
+	echo 'required_field';
681
+}
682
+?> geodir_form_row clearfix gd-fieldset-details">
633 683
             <label>
634 684
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
635 685
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
636
-                <?php if ($cf['is_required']) echo '<span>*</span>'; ?>
686
+                <?php if ($cf['is_required']) {
687
+	echo '<span>*</span>';
688
+}
689
+?>
637 690
             </label>
638 691
             <input type="hidden" name="gd_field_<?php echo $cf['name']; ?>" value="1"/>
639 692
             <?php if ($multi_display == 'select') { ?>
@@ -746,11 +799,17 @@  discard block
 block discarded – undo
746 799
         ?>
747 800
 
748 801
         <div id="<?php echo $cf['name']; ?>_row"
749
-             class="<?php if ($cf['is_required']) echo 'required_field'; ?> geodir_form_row clearfix gd-fieldset-details">
802
+             class="<?php if ($cf['is_required']) {
803
+	echo 'required_field';
804
+}
805
+?> geodir_form_row clearfix gd-fieldset-details">
750 806
             <label>
751 807
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
752 808
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
753
-                <?php if ($cf['is_required']) echo '<span>*</span>'; ?>
809
+                <?php if ($cf['is_required']) {
810
+	echo '<span>*</span>';
811
+}
812
+?>
754 813
             </label>
755 814
 
756 815
             <?php $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10); ?>
@@ -810,8 +869,9 @@  discard block
 block discarded – undo
810 869
         $extra_fields = unserialize($cf['extra_fields']);
811 870
         $name = $cf['name'];
812 871
 
813
-        if ($extra_fields['date_format'] == '')
814
-            $extra_fields['date_format'] = 'yy-mm-dd';
872
+        if ($extra_fields['date_format'] == '') {
873
+                    $extra_fields['date_format'] = 'yy-mm-dd';
874
+        }
815 875
 
816 876
         $date_format = $extra_fields['date_format'];
817 877
         $jquery_date_format  = $date_format;
@@ -825,7 +885,7 @@  discard block
 block discarded – undo
825 885
             $replace = array('d','j','l','m','n','F','Y');//PHP date format
826 886
 
827 887
             $date_format = str_replace($search, $replace, $date_format);
828
-        }else{
888
+        } else{
829 889
             $jquery_date_format = geodir_date_format_php_to_jqueryui( $jquery_date_format );
830 890
         }
831 891
 
@@ -860,12 +920,18 @@  discard block
 block discarded – undo
860 920
 
861 921
         </script>
862 922
         <div id="<?php echo $name;?>_row"
863
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
923
+             class="<?php if ($cf['is_required']) {
924
+	echo 'required_field';
925
+}
926
+?> geodir_form_row clearfix gd-fieldset-details">
864 927
             <label>
865 928
 
866 929
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
867 930
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
868
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
931
+                <?php if ($cf['is_required']) {
932
+	echo '<span>*</span>';
933
+}
934
+?>
869 935
             </label>
870 936
 
871 937
             <input field_type="<?php echo $cf['type'];?>" name="<?php echo $name;?>" id="<?php echo $name;?>"
@@ -919,8 +985,9 @@  discard block
 block discarded – undo
919 985
 
920 986
         $name = $cf['name'];
921 987
 
922
-        if ($value != '')
923
-            $value = date('H:i', strtotime($value));
988
+        if ($value != '') {
989
+                    $value = date('H:i', strtotime($value));
990
+        }
924 991
         ?>
925 992
         <script type="text/javascript">
926 993
             jQuery(document).ready(function () {
@@ -933,12 +1000,18 @@  discard block
 block discarded – undo
933 1000
             });
934 1001
         </script>
935 1002
         <div id="<?php echo $name;?>_row"
936
-             class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
1003
+             class="<?php if ($cf['is_required']) {
1004
+	echo 'required_field';
1005
+}
1006
+?> geodir_form_row clearfix gd-fieldset-details">
937 1007
             <label>
938 1008
 
939 1009
                 <?php $site_title = __($cf['site_title'], 'geodirectory');
940 1010
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
941
-                <?php if ($cf['is_required']) echo '<span>*</span>';?>
1011
+                <?php if ($cf['is_required']) {
1012
+	echo '<span>*</span>';
1013
+}
1014
+?>
942 1015
             </label>
943 1016
             <input readonly="readonly" field_type="<?php echo $cf['type'];?>" name="<?php echo $name;?>"
944 1017
                    id="<?php echo $name;?>" value="<?php echo esc_attr($value);?>" type="text" class="geodir_textfield"/>
@@ -1030,17 +1103,27 @@  discard block
 block discarded – undo
1030 1103
         }
1031 1104
 
1032 1105
         $location = geodir_get_default_location();
1033
-        if (empty($city)) $city = isset($location->city) ? $location->city : '';
1034
-        if (empty($region)) $region = isset($location->region) ? $location->region : '';
1035
-        if (empty($country)) $country = isset($location->country) ? $location->country : '';
1106
+        if (empty($city)) {
1107
+        	$city = isset($location->city) ? $location->city : '';
1108
+        }
1109
+        if (empty($region)) {
1110
+        	$region = isset($location->region) ? $location->region : '';
1111
+        }
1112
+        if (empty($country)) {
1113
+        	$country = isset($location->country) ? $location->country : '';
1114
+        }
1036 1115
 
1037 1116
         $lat_lng_blank = false;
1038 1117
         if (empty($lat) && empty($lng)) {
1039 1118
             $lat_lng_blank = true;
1040 1119
         }
1041 1120
 
1042
-        if (empty($lat)) $lat = isset($location->city_latitude) ? $location->city_latitude : '';
1043
-        if (empty($lng)) $lng = isset($location->city_longitude) ? $location->city_longitude : '';
1121
+        if (empty($lat)) {
1122
+        	$lat = isset($location->city_latitude) ? $location->city_latitude : '';
1123
+        }
1124
+        if (empty($lng)) {
1125
+        	$lng = isset($location->city_longitude) ? $location->city_longitude : '';
1126
+        }
1044 1127
 
1045 1128
         /**
1046 1129
          * Filter the default latitude.
@@ -1064,10 +1147,16 @@  discard block
 block discarded – undo
1064 1147
         ?>
1065 1148
 
1066 1149
         <div id="geodir_<?php echo $prefix . 'address';?>_row"
1067
-             class="<?php if ($is_required) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
1150
+             class="<?php if ($is_required) {
1151
+	echo 'required_field';
1152
+}
1153
+?> geodir_form_row clearfix gd-fieldset-details">
1068 1154
             <label>
1069 1155
                 <?php _e($address_title, 'geodirectory'); ?>
1070
-                <?php if ($is_required) echo '<span>*</span>';?>
1156
+                <?php if ($is_required) {
1157
+	echo '<span>*</span>';
1158
+}
1159
+?>
1071 1160
             </label>
1072 1161
             <input type="text" field_type="<?php echo $type;?>" name="<?php echo $prefix . 'address';?>"
1073 1162
                    id="<?php echo $prefix . 'address';?>" class="geodir_textfield"
@@ -1128,10 +1217,16 @@  discard block
 block discarded – undo
1128 1217
             /* show lat lng */
1129 1218
             $style_latlng = ((isset($extra_fields['show_latlng']) && $extra_fields['show_latlng']) || is_admin()) ? '' : 'style="display:none"'; ?>
1130 1219
             <div id="geodir_<?php echo $prefix . 'latitude'; ?>_row"
1131
-                 class="<?php if ($is_required) echo 'required_field'; ?> geodir_form_row clearfix gd-fieldset-details" <?php echo $style_latlng; ?>>
1220
+                 class="<?php if ($is_required) {
1221
+	echo 'required_field';
1222
+}
1223
+?> geodir_form_row clearfix gd-fieldset-details" <?php echo $style_latlng; ?>>
1132 1224
                 <label>
1133 1225
                     <?php echo PLACE_ADDRESS_LAT; ?>
1134
-                    <?php if ($is_required) echo '<span>*</span>'; ?>
1226
+                    <?php if ($is_required) {
1227
+	echo '<span>*</span>';
1228
+}
1229
+?>
1135 1230
                 </label>
1136 1231
                 <input type="text" field_type="<?php echo $type; ?>" name="<?php echo $prefix . 'latitude'; ?>"
1137 1232
                        id="<?php echo $prefix . 'latitude'; ?>" class="geodir_textfield"
@@ -1143,10 +1238,16 @@  discard block
 block discarded – undo
1143 1238
             </div>
1144 1239
 
1145 1240
             <div id="geodir_<?php echo $prefix . 'longitude'; ?>_row"
1146
-                 class="<?php if ($is_required) echo 'required_field'; ?> geodir_form_row clearfix gd-fieldset-details" <?php echo $style_latlng; ?>>
1241
+                 class="<?php if ($is_required) {
1242
+	echo 'required_field';
1243
+}
1244
+?> geodir_form_row clearfix gd-fieldset-details" <?php echo $style_latlng; ?>>
1147 1245
                 <label>
1148 1246
                     <?php echo PLACE_ADDRESS_LNG; ?>
1149
-                    <?php if ($is_required) echo '<span>*</span>'; ?>
1247
+                    <?php if ($is_required) {
1248
+	echo '<span>*</span>';
1249
+}
1250
+?>
1150 1251
                 </label>
1151 1252
                 <input type="text" field_type="<?php echo $type; ?>" name="<?php echo $prefix . 'longitude'; ?>"
1152 1253
                        id="<?php echo $prefix . 'longitude'; ?>" class="geodir_textfield"
@@ -1250,11 +1351,17 @@  discard block
 block discarded – undo
1250 1351
             $value = '';
1251 1352
         } ?>
1252 1353
         <div id="<?php echo $name;?>_row"
1253
-             class="<?php if ($is_required) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
1354
+             class="<?php if ($is_required) {
1355
+	echo 'required_field';
1356
+}
1357
+?> geodir_form_row clearfix gd-fieldset-details">
1254 1358
             <label>
1255 1359
                 <?php $site_title = __($site_title, 'geodirectory');
1256 1360
                 echo (trim($site_title)) ? $site_title : '&nbsp;'; ?>
1257
-                <?php if ($is_required) echo '<span>*</span>';?>
1361
+                <?php if ($is_required) {
1362
+	echo '<span>*</span>';
1363
+}
1364
+?>
1258 1365
             </label>
1259 1366
 
1260 1367
             <div id="<?php echo $name;?>" class="geodir_taxonomy_field" style="float:left; width:70%;">
@@ -1288,8 +1395,9 @@  discard block
 block discarded – undo
1288 1395
                     $post_cat = implode(",", $post_cat[$name]);
1289 1396
 
1290 1397
                 } else {
1291
-                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
1292
-                        $post_cat = geodir_get_post_meta($_REQUEST['pid'], $name, true);
1398
+                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
1399
+                                            $post_cat = geodir_get_post_meta($_REQUEST['pid'], $name, true);
1400
+                    }
1293 1401
                 }
1294 1402
 
1295 1403
 
@@ -1327,21 +1435,24 @@  discard block
 block discarded – undo
1327 1435
 
1328 1436
                         $cat_display == '';
1329 1437
                         $multiple = '';
1330
-                        if ($cat_display == 'multiselect')
1331
-                            $multiple = 'multiple="multiple"';
1438
+                        if ($cat_display == 'multiselect') {
1439
+                                                    $multiple = 'multiple="multiple"';
1440
+                        }
1332 1441
 
1333 1442
                         echo '<select id="' . $name . '" ' . $multiple . ' type="' . $name . '" name="post_category[' . $name . '][]" alt="' . $name . '" field_type="' . $cat_display . '" class="geodir_textfield textfield_x chosen_select" data-placeholder="' . __('Select Category', 'geodirectory') . '">';
1334 1443
 
1335 1444
 
1336
-                        if ($cat_display == 'select')
1337
-                            echo '<option value="">' . __('Select Category', 'geodirectory') . '</option>';
1445
+                        if ($cat_display == 'select') {
1446
+                                                    echo '<option value="">' . __('Select Category', 'geodirectory') . '</option>';
1447
+                        }
1338 1448
 
1339 1449
                     }
1340 1450
 
1341 1451
                     echo geodir_custom_taxonomy_walker($name, $catadd_limit = 0);
1342 1452
 
1343
-                    if ($cat_display == 'select' || $cat_display == 'multiselect')
1344
-                        echo '</select>';
1453
+                    if ($cat_display == 'select' || $cat_display == 'multiselect') {
1454
+                                            echo '</select>';
1455
+                    }
1345 1456
 
1346 1457
                 } else {
1347 1458
 
@@ -1413,18 +1524,23 @@  discard block
 block discarded – undo
1413 1524
 
1414 1525
             $file_value = trim($value, ","); // this will be initial value of the above form field. Image urls.
1415 1526
 
1416
-        } else
1417
-            $file_value = '';
1527
+        } else {
1528
+                    $file_value = '';
1529
+        }
1418 1530
 
1419
-        if (isset($extra_fields['file_multiple']) && $extra_fields['file_multiple'])
1420
-            $file_multiple = true; // allow multiple files upload
1421
-        else
1422
-            $file_multiple = false;
1531
+        if (isset($extra_fields['file_multiple']) && $extra_fields['file_multiple']) {
1532
+                    $file_multiple = true;
1533
+        }
1534
+        // allow multiple files upload
1535
+        else {
1536
+                    $file_multiple = false;
1537
+        }
1423 1538
 
1424
-        if (isset($extra_fields['image_limit']) && $extra_fields['image_limit'])
1425
-            $file_image_limit = $extra_fields['image_limit'];
1426
-        else
1427
-            $file_image_limit = 1;
1539
+        if (isset($extra_fields['image_limit']) && $extra_fields['image_limit']) {
1540
+                    $file_image_limit = $extra_fields['image_limit'];
1541
+        } else {
1542
+                    $file_image_limit = 1;
1543
+        }
1428 1544
 
1429 1545
         $file_width = geodir_media_image_large_width(); // If you want to automatically resize all uploaded images then provide width here (in pixels)
1430 1546
 
@@ -1432,8 +1548,9 @@  discard block
 block discarded – undo
1432 1548
 
1433 1549
         if (!empty($file_value)) {
1434 1550
             $curImages = explode(',', $file_value);
1435
-            if (!empty($curImages))
1436
-                $file_totImg = count($curImages);
1551
+            if (!empty($curImages)) {
1552
+                            $file_totImg = count($curImages);
1553
+            }
1437 1554
         }
1438 1555
 
1439 1556
         $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? implode(",", $extra_fields['gd_file_types']) : '';
@@ -1448,12 +1565,18 @@  discard block
 block discarded – undo
1448 1565
         ?>
1449 1566
 
1450 1567
         <div id="<?php echo $name;?>_row"
1451
-             class="<?php if ($is_required) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details">
1568
+             class="<?php if ($is_required) {
1569
+	echo 'required_field';
1570
+}
1571
+?> geodir_form_row clearfix gd-fieldset-details">
1452 1572
 
1453 1573
             <div id="<?php echo $file_id; ?>dropbox" style="text-align:center;">
1454 1574
                 <label
1455 1575
                     style="text-align:left; padding-top:10px;"><?php $site_title = __($site_title, 'geodirectory');
1456
-                    echo $site_title; ?><?php if ($is_required) echo '<span>*</span>';?></label>
1576
+                    echo $site_title; ?><?php if ($is_required) {
1577
+                    	echo '<span>*</span>';
1578
+                    }
1579
+                    ?></label>
1457 1580
                 <input class="geodir-custom-file-upload" field_type="file" type="hidden"
1458 1581
                        name="<?php echo $file_id; ?>" id="<?php echo $file_id; ?>"
1459 1582
                        value="<?php echo esc_attr($file_value); ?>"/>
Please login to merge, or discard this patch.