Version Description
Download this release
Release Info
Developer | barrykooij |
Plugin | Download Monitor |
Version | 4.0.8 |
Comparing to | |
See all releases |
Code changes from version 4.0.7 to 4.0.8
- assets/views/meta-box/version.php +1 -1
- download-monitor.php +2 -2
- readme.txt +5 -1
- src/LegacyUpgrader/DownloadUpgrader.php +7 -1
- src/Logs/LoggingListTable.php +2 -2
- src/Shortcodes.php +1 -1
assets/views/meta-box/version.php
CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
<h3>
|
8 |
<button type="button" class="remove_file button"><?php _e( 'Remove', 'download-monitor' ); ?></button>
|
9 |
<div class="handlediv" title="<?php _e( 'Click to toggle', 'download-monitor' ); ?>"></div>
|
10 |
-
<strong>#<?php echo $file_id; ?> — <?php echo sprintf( __( 'Version <span class="version">%s</span> (%s)', 'download-monitor' ), ( $file_version ) ? $file_version : __( 'n/a', 'download-monitor' ), date_i18n( get_option( 'date_format' ), $file_post_date->
|
11 |
<input type="hidden" name="downloadable_file_id[<?php echo $version_increment; ?>]" value="<?php echo $file_id; ?>"/>
|
12 |
<input type="hidden" class="file_menu_order" name="downloadable_file_menu_order[<?php echo $version_increment; ?>]"
|
13 |
value="<?php echo $version_increment; ?>"/>
|
7 |
<h3>
|
8 |
<button type="button" class="remove_file button"><?php _e( 'Remove', 'download-monitor' ); ?></button>
|
9 |
<div class="handlediv" title="<?php _e( 'Click to toggle', 'download-monitor' ); ?>"></div>
|
10 |
+
<strong>#<?php echo $file_id; ?> — <?php echo sprintf( __( 'Version <span class="version">%s</span> (%s)', 'download-monitor' ), ( $file_version ) ? $file_version : __( 'n/a', 'download-monitor' ), date_i18n( get_option( 'date_format' ), $file_post_date->format( 'U' ) ) ); ?> — <?php echo sprintf( _n( 'Downloaded %s time', 'Downloaded %s times', $file_download_count, 'download-monitor' ), $file_download_count ); ?></strong>
|
11 |
<input type="hidden" name="downloadable_file_id[<?php echo $version_increment; ?>]" value="<?php echo $file_id; ?>"/>
|
12 |
<input type="hidden" class="file_menu_order" name="downloadable_file_menu_order[<?php echo $version_increment; ?>]"
|
13 |
value="<?php echo $version_increment; ?>"/>
|
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.
|
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.
|
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.8
|
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.8' );
|
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.5
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv3
|
9 |
Text Domain: -
|
10 |
|
@@ -114,6 +114,10 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
|
|
114 |
|
115 |
== Changelog ==
|
116 |
|
|
|
|
|
|
|
|
|
117 |
= 4.0.7: April 13, 2018 =
|
118 |
* Tweak: Fixed a bug that caused certain months in the reports filter to crash for non English languages.
|
119 |
* Tweak: Fixed a bug that caused the 10 download limit on the Dashboard Widget to be ignored.
|
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.5
|
7 |
+
Stable tag: 4.0.8
|
8 |
License: GPLv3
|
9 |
Text Domain: -
|
10 |
|
114 |
|
115 |
== Changelog ==
|
116 |
|
117 |
+
= 4.0.8: May 3, 2018 =
|
118 |
+
* Tweak: Fixed a bug in the legacy upgrader that caused versions with empty dates not to added.
|
119 |
+
* Tweak: Fixed the use of getTimeStamp() because PHP 5.2 doesn't support this.
|
120 |
+
|
121 |
= 4.0.7: April 13, 2018 =
|
122 |
* Tweak: Fixed a bug that caused certain months in the reports filter to crash for non English languages.
|
123 |
* Tweak: Fixed a bug that caused the 10 download limit on the Dashboard Widget to be ignored.
|
src/LegacyUpgrader/DownloadUpgrader.php
CHANGED
@@ -285,7 +285,13 @@ class DLM_LU_Download_Upgrader {
|
|
285 |
// set other version data
|
286 |
$version->set_filesize( "" ); // empty filesize so it's calculated on persist
|
287 |
$version->set_author( $download->get_author() );
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
// persist new version
|
291 |
download_monitor()->service( 'version_repository' )->persist( $version );
|
285 |
// set other version data
|
286 |
$version->set_filesize( "" ); // empty filesize so it's calculated on persist
|
287 |
$version->set_author( $download->get_author() );
|
288 |
+
|
289 |
+
// version date
|
290 |
+
$version_date = new DateTime( $legacy_download->postDate );
|
291 |
+
if ( $version_date->format( 'U' ) < 0 ) {
|
292 |
+
$version_date = new DateTime();
|
293 |
+
}
|
294 |
+
$version->set_date( $version_date );
|
295 |
|
296 |
// persist new version
|
297 |
download_monitor()->service( 'version_repository' )->persist( $version );
|
src/Logs/LoggingListTable.php
CHANGED
@@ -98,8 +98,8 @@ class DLM_Logging_List_Table extends WP_List_Table {
|
|
98 |
return $download_status;
|
99 |
break;
|
100 |
case 'date' :
|
101 |
-
$time_str = date_i18n( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), strtotime( $log->get_download_date()->
|
102 |
-
return '<time title="' . $time_str . '"">' . sprintf( __( '%s ago', 'download-monitor' ), human_time_diff( $log->get_download_date()->
|
103 |
break;
|
104 |
case 'download' :
|
105 |
try {
|
98 |
return $download_status;
|
99 |
break;
|
100 |
case 'date' :
|
101 |
+
$time_str = date_i18n( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), strtotime( $log->get_download_date()->format( 'U' ) ) );
|
102 |
+
return '<time title="' . $time_str . '"">' . sprintf( __( '%s ago', 'download-monitor' ), human_time_diff( $log->get_download_date()->format( 'U' ), current_time( 'timestamp' ) ) ) . '</time>';
|
103 |
break;
|
104 |
case 'download' :
|
105 |
try {
|
src/Shortcodes.php
CHANGED
@@ -220,7 +220,7 @@ class DLM_Shortcodes {
|
|
220 |
return wpautop( wptexturize( do_shortcode( $download->get_description() ) ) );
|
221 |
case 'post_date' :
|
222 |
case 'file_date' :
|
223 |
-
return date_i18n( get_option( 'date_format' ), $download->get_version()->get_date()->
|
224 |
case 'author' :
|
225 |
return $download->get_the_author();
|
226 |
|
220 |
return wpautop( wptexturize( do_shortcode( $download->get_description() ) ) );
|
221 |
case 'post_date' :
|
222 |
case 'file_date' :
|
223 |
+
return date_i18n( get_option( 'date_format' ), $download->get_version()->get_date()->format( 'U' ) );
|
224 |
case 'author' :
|
225 |
return $download->get_the_author();
|
226 |
|