Skip to content

Commit

Permalink
Add search in file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
luiscmas committed May 16, 2016
1 parent 3b2aad6 commit 00db603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-downloadmanager.php
Expand Up @@ -511,7 +511,7 @@ function downloads_page($category_id = 0) {
if(!empty($search)) {
$search_words_array = explode(' ', $search_word);
foreach($search_words_array as $search_word_array) {
$search_sql .= " AND ((file_name LIKE('%$search_word_array%') OR file_des LIKE ('%$search_word_array%')))";
$search_sql .= " AND ((file_name LIKE('%$search_word_array%') OR file_des LIKE ('%$search_word_array%') OR file LIKE ('%$search_word_array%')))";
}
}
// Calculate Categories And Total Stats
Expand Down Expand Up @@ -637,7 +637,7 @@ function downloads_page($category_id = 0) {
$template_download_listing = str_replace("%FILE_ID%", $file->file_id, $template_download_listing);
$template_download_listing = str_replace("%FILE%", stripslashes($file->file), $template_download_listing);
$template_download_listing = str_replace("%FILE_NAME%", download_search_highlight($search, stripslashes($file->file_name)), $template_download_listing);
$template_download_listing = str_replace("%FILE_EXT%", file_extension(stripslashes($file->file)), $template_download_listing);
$template_download_listing = str_replace("%FILE_EXT%", download_search_highlight($search, file_extension(stripslashes($file->file))), $template_download_listing);
$template_download_listing = str_replace("%FILE_ICON%", file_extension_image(stripslashes($file->file), $file_extensions_images), $template_download_listing);
$template_download_listing = str_replace("%FILE_DESCRIPTION%", download_search_highlight($search, stripslashes($file->file_des)), $template_download_listing);
$template_download_listing = str_replace("%FILE_SIZE%", format_filesize($file->file_size), $template_download_listing);
Expand Down

0 comments on commit 00db603

Please sign in to comment.