Version Description
Download this release
Release Info
Developer | mandsconsulting |
Plugin | Email Before Download |
Version | 5.1.5 |
Comparing to | |
See all releases |
Code changes from version 5.1.4 to 5.1.5
- email-before-download.php +2 -2
- public/class-email-before-download-public.php +8 -12
- readme.txt +3 -4
email-before-download.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* @wordpress-plugin
|
12 |
* Plugin Name: Email Before Download
|
13 |
* Plugin URI: mandsconsulting.com
|
14 |
-
* Version: 5.1.
|
15 |
* Author: M&S Consulting
|
16 |
* Author URI: mandsconsulting.com
|
17 |
* License: GPL-2.0+
|
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
24 |
die;
|
25 |
}
|
26 |
|
27 |
-
define( 'PLUGIN_NAME_VERSION', '5.1.
|
28 |
|
29 |
function activate_email_before_download() {
|
30 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-email-before-download-activator.php';
|
11 |
* @wordpress-plugin
|
12 |
* Plugin Name: Email Before Download
|
13 |
* Plugin URI: mandsconsulting.com
|
14 |
+
* Version: 5.1.5
|
15 |
* Author: M&S Consulting
|
16 |
* Author URI: mandsconsulting.com
|
17 |
* License: GPL-2.0+
|
24 |
die;
|
25 |
}
|
26 |
|
27 |
+
define( 'PLUGIN_NAME_VERSION', '5.1.5' );
|
28 |
|
29 |
function activate_email_before_download() {
|
30 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-email-before-download-activator.php';
|
public/class-email-before-download-public.php
CHANGED
@@ -115,21 +115,17 @@ public function record($allowed, $download){
|
|
115 |
}
|
116 |
$db = new Email_Before_Download_DB();
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
|
123 |
-
|
|
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
if ($this->expired($link))
|
129 |
-
wp_die(__('This download has expired. Please fill out a new form to generate a new link.', 'email-before-download'));
|
130 |
|
131 |
-
$db->mark_downloaded($link->id);
|
132 |
-
}
|
133 |
|
134 |
return $allowed;
|
135 |
}
|
115 |
}
|
116 |
$db = new Email_Before_Download_DB();
|
117 |
|
118 |
+
if(isset($_GET['uid'])) {
|
119 |
+
$link = $db->select_link('uid', $_GET['uid']);
|
120 |
+
if (!$link)
|
121 |
+
wp_die(__('Invalid UID Please fill out a new form to generate a new link.', 'email-before-download'));
|
122 |
|
123 |
+
if ($this->expired($link))
|
124 |
+
wp_die(__('This download has expired. Please fill out a new form to generate a new link.', 'email-before-download'));
|
125 |
|
126 |
+
$db->mark_downloaded($link->id);
|
127 |
+
}
|
|
|
|
|
|
|
128 |
|
|
|
|
|
129 |
|
130 |
return $allowed;
|
131 |
}
|
readme.txt
CHANGED
@@ -106,13 +106,12 @@ This is the list of all short code attributes that can be used. Some of them o
|
|
106 |
|
107 |
|
108 |
== Changelog ==
|
109 |
-
|
|
|
110 |
=5.1.4=
|
111 |
-
*
|
112 |
-
|
113 |
=5.1.3=
|
114 |
* fixed issue with link displaying when email only selected.
|
115 |
-
|
116 |
=5.1.2=
|
117 |
* Simplified use of PHPDomDocument to better function with older versions of PHP
|
118 |
* Let Javascript do more of the work for hiding/showing forms
|
106 |
|
107 |
|
108 |
== Changelog ==
|
109 |
+
=5.1.5=
|
110 |
+
* fixed issue with false positives on invalid uids
|
111 |
=5.1.4=
|
112 |
+
* minor bugfixes
|
|
|
113 |
=5.1.3=
|
114 |
* fixed issue with link displaying when email only selected.
|
|
|
115 |
=5.1.2=
|
116 |
* Simplified use of PHPDomDocument to better function with older versions of PHP
|
117 |
* Let Javascript do more of the work for hiding/showing forms
|