Download Monitor - Version 4.0.5

Version Description

Download this release

Release Info

Developer barrykooij
Plugin Icon 128x128 Download Monitor
Version 4.0.5
Comparing to
See all releases

Code changes from version 4.0.4 to 4.0.5

download-monitor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.0.4
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
- define( 'DLM_VERSION', '4.0.4' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 4.0.5
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
+ define( 'DLM_VERSION', '4.0.5' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.barrykooij.com/donate/
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker
5
  Requires at least: 3.8
6
  Tested up to: 4.9.4
7
- Stable tag: 4.0.4
8
  License: GPLv3
9
  Text Domain: -
10
 
@@ -114,6 +114,11 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
117
  = 4.0.4: February 19, 2018 =
118
  * Tweak: Fixed a bug where versions of draft and pending review downloads were not displayed in the backend.
119
 
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker
5
  Requires at least: 3.8
6
  Tested up to: 4.9.4
7
+ Stable tag: 4.0.5
8
  License: GPLv3
9
  Text Domain: -
10
 
114
 
115
  == Changelog ==
116
 
117
+ = 4.0.5: February 21, 2018 =
118
+ * Tweak: Fixed a bug that caused the "Add file" button to not appear on the Add New Download screen.
119
+ * Tweak: Fixed a bug that caused the crc32b hash not to be saved when adding a download via the 'Quick-add Download' option.
120
+ * Tweak: WordPressVersionRepository no longer explicitly sets 'post_content' and 'post_excerpt' database fields of dlm_download_version to empty strings. Props [Erin Morelli](https://github.com/ErinMorelli).
121
+
122
  = 4.0.4: February 19, 2018 =
123
  * Tweak: Fixed a bug where versions of draft and pending review downloads were not displayed in the backend.
124
 
src/Admin/MediaInsert.php CHANGED
@@ -128,7 +128,7 @@ class DLM_Admin_Media_Insert {
128
  // Set hashes
129
  update_post_meta( $file_id, '_md5', $hashes['md5'] );
130
  update_post_meta( $file_id, '_sha1', $hashes['sha1'] );
131
- update_post_meta( $file_id, '_crc32', $hashes['crc32'] );
132
 
133
  // Success message
134
  echo '<div class="updated"><p>' . __( 'Download successfully created.', 'download-monitor' ) . '</p></div>';
128
  // Set hashes
129
  update_post_meta( $file_id, '_md5', $hashes['md5'] );
130
  update_post_meta( $file_id, '_sha1', $hashes['sha1'] );
131
+ update_post_meta( $file_id, '_crc32', $hashes['crc32b'] );
132
 
133
  // Success message
134
  echo '<div class="updated"><p>' . __( 'Download successfully created.', 'download-monitor' ) . '</p></div>';
src/Admin/WritePanels.php CHANGED
@@ -159,12 +159,12 @@ class DLM_Admin_Writepanels {
159
  'post_status' => array( 'any', 'trash' )
160
  ), 1 );
161
 
162
- if ( 0 == count( $downloads ) ) {
163
- return;
 
 
164
  }
165
 
166
- $download = $downloads[0];
167
-
168
  wp_nonce_field( 'save_meta_data', 'dlm_nonce' );
169
  ?>
170
  <div class="download_monitor_files dlm-metaboxes-wrapper">
159
  'post_status' => array( 'any', 'trash' )
160
  ), 1 );
161
 
162
+ if ( count( $downloads ) > 0 ) {
163
+ $download = $downloads[0];
164
+ } else {
165
+ $download = new DLM_Download();
166
  }
167
 
 
 
168
  wp_nonce_field( 'save_meta_data', 'dlm_nonce' );
169
  ?>
170
  <div class="download_monitor_files dlm-metaboxes-wrapper">
src/Version/WordPressVersionRepository.php CHANGED
@@ -167,8 +167,6 @@ class DLM_WordPress_Version_Repository implements DLM_Version_Repository {
167
  // create
168
  $version_id = wp_insert_post( array(
169
  'post_title' => $version->get_title(),
170
- 'post_content' => '',
171
- 'post_excerpt' => '',
172
  'post_author' => $version->get_author(),
173
  'post_type' => 'dlm_download_version',
174
  'post_status' => 'publish',
@@ -189,8 +187,6 @@ class DLM_WordPress_Version_Repository implements DLM_Version_Repository {
189
  $version_id = wp_update_post( array(
190
  'ID' => $version->get_id(),
191
  'post_title' => $version->get_title(),
192
- 'post_content' => '',
193
- 'post_excerpt' => '',
194
  'post_author' => $version->get_author(),
195
  'post_status' => 'publish',
196
  'post_parent' => $version->get_download_id(),
167
  // create
168
  $version_id = wp_insert_post( array(
169
  'post_title' => $version->get_title(),
 
 
170
  'post_author' => $version->get_author(),
171
  'post_type' => 'dlm_download_version',
172
  'post_status' => 'publish',
187
  $version_id = wp_update_post( array(
188
  'ID' => $version->get_id(),
189
  'post_title' => $version->get_title(),
 
 
190
  'post_author' => $version->get_author(),
191
  'post_status' => 'publish',
192
  'post_parent' => $version->get_download_id(),