From: Anthony Talarico Date: Tue, 11 Apr 2017 19:50:52 +0000 (-0400) Subject: fixing the files in the detail page, used name instead of file name for the path X-Git-Tag: v1.0.0^2~35 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=885cf785ecffc589d7ea310308dbd36cbdd216ac;p=WP-Plugins%2Fglm-member-db-fields.git fixing the files in the detail page, used name instead of file name for the path --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 1f469f6..b3be111 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -44,11 +44,11 @@ add_filter('glm-member-db-front-members-list-info', function($content, $id) { add_filter('glm-member-db-front-members-detail-files', function( $content, $id) { $file_path =GLM_MEMBERS_PLUGIN_MEDIA_URL. "/files/"; - $sql = "SELECT name FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX ."files WHERE ref_dest = $id;"; + $sql = "SELECT name, file_name FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX ."files WHERE ref_dest = $id;"; $results = $this->wpdb->get_results($sql); foreach($results as $result){ - $file = "" .$result->name .''; + $file = "" .$result->name .''; $content .= $file; }