PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | application/controllers/Wdk_frontendajax.php +1 -21 trunk → 1.5.9 View file →
@@ -157,14 +157,8 @@
157 157
158 158 if($table == 'calendar_listing_m')
159 159 $table = 'listing_m';
160 160
161 -
162 - $allowed_models = ['category_m', 'location_m', 'field_m', 'listing_m', 'user_m', 'icons_list', 'calendar_listing_m'];
163 - if (!in_array(strtolower($table), $allowed_models, true)) {
164 - wp_die('Forbidden');
165 - }
166 -
167 161 $post_table = $this->db->prefix.'posts';
168 162
169 163 $table_name = substr($table,0, -2);
170 164
@@ -445,14 +439,8 @@
445 439
446 440 if($table == 'calendar_listing_m')
447 441 $table = 'listing_m';
448 442
449 -
450 - $allowed_models = ['category_m', 'location_m', 'field_m', 'listing_m', 'user_m', 'icons_list', 'calendar_listing_m'];
451 - if (!in_array(strtolower($table), $allowed_models, true)) {
452 - wp_die('Forbidden');
453 - }
454 -
455 443 $table_name = substr($table,0, -2);
456 444 $attr_id = preg_replace("/[^0-9a-zA-Z_\-]/", "",sanitize_text_field($parameters['attribute_id']));
457 445 $attr_val = preg_replace("/[^0-9a-zA-Z_\-]/", "",sanitize_text_field($parameters['attribute_value']));
458 446
@@ -1143,19 +1131,11 @@
1143 1131 // add_filter('wdk/search_suggestion/listings_limit', function($limit) { return 10; });
1144 1132
1145 1133 $limit = apply_filters('wdk/search_suggestion/listings_limit', 5);
1146 1134 $this->db->where(array("post_title LIKE '%".esc_sql($search_text)."%'" => NULL));
1147 - $db_results = $this->listing_m->get_pagination($limit, NULL, array('post_status' => 'publish','post_password=""' => NULL,'is_activated' => 1,'is_approved'=>1));
1135 + $db_results = $this->listing_m->get_pagination($limit, NULL, array('is_activated' => 1,'is_approved'=>1));
1148 1136
1149 1137 if($db_results) foreach($db_results as $row) {
1150 - if (
1151 - !isset($row->post_status, $row->post_password) ||
1152 - $row->post_status !== 'publish' ||
1153 - $row->post_password !== ''
1154 - ) {
1155 - continue;
1156 - }
1157 -
1158 1138 $results[] = [
1159 1139 'field_key' => 'link',
1160 1140 'value' => get_permalink($row),
1161 1141 'print' => [