Media from FTP - Version 9.90

Version Description

Security measures. Fixed problem of "Date and time input assistance" settings.

Download this release

Release Info

Developer Katsushi Kawamori
Plugin Icon wp plugin Media from FTP
Version 9.90
Comparing to
See all releases

Code changes from version 9.89 to 9.90

Files changed (3) hide show
  1. mediafromftp.php +1 -1
  2. readme.txt +9 -1
  3. req/MediaFromFtpAdmin.php +13 -18
mediafromftp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Media from FTP
4
  Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
- Version: 9.89
6
  Description: Register to media library from files that have been uploaded by FTP.
7
  Author: Katsushi Kawamori
8
  Author URI: https://riverforest-wp.info/
2
  /*
3
  Plugin Name: Media from FTP
4
  Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
+ Version: 9.90
6
  Description: Register to media library from files that have been uploaded by FTP.
7
  Author: Katsushi Kawamori
8
  Author URI: https://riverforest-wp.info/
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: files, ftp, import, media, sync, uploads
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
- Stable tag: 9.89
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -33,6 +33,7 @@ Register to media library from files that have been uploaded by FTP.
33
  * Español [apasionados](https://apasionados.es/)
34
  * Français [Li-An](https://www.echodesplugins.li-an.fr/)
35
  * Russian [khomenkov](https://awesomeprintstudio.com/)
 
36
 
37
  == Installation ==
38
 
@@ -116,6 +117,10 @@ Register to media library from files that have been uploaded by FTP.
116
 
117
  == Changelog ==
118
 
 
 
 
 
119
  = 9.89 =
120
  Fixed problem of date and time acquisition at registration.
121
 
@@ -148,6 +153,9 @@ Fixed [PHP Object Injection Vulnerability](https://www.pluginvulnerabilities.com
148
 
149
  == Upgrade Notice ==
150
 
 
 
 
151
  = 9.88 =
152
  Security measures.
153
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
+ Stable tag: 9.90
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
33
  * Español [apasionados](https://apasionados.es/)
34
  * Français [Li-An](https://www.echodesplugins.li-an.fr/)
35
  * Russian [khomenkov](https://awesomeprintstudio.com/)
36
+ * Italian [ironicmoka](https://profiles.wordpress.org/photoironic/)
37
 
38
  == Installation ==
39
 
117
 
118
  == Changelog ==
119
 
120
+ = 9.90 =
121
+ Security measures.
122
+ Fixed problem of "Date and time input assistance" settings.
123
+
124
  = 9.89 =
125
  Fixed problem of date and time acquisition at registration.
126
 
153
 
154
  == Upgrade Notice ==
155
 
156
+ = 9.90 =
157
+ Security measures.
158
+
159
  = 9.88 =
160
  Security measures.
161
 
req/MediaFromFtpAdmin.php CHANGED
@@ -170,18 +170,6 @@ class MediaFromFtpAdmin {
170
  $return .= '<input type="number" step="1" min="1" max="999" class="screen-per-page" name="mediafromftp_pagemax" maxlength="3" value="'.$mediafromftp_settings['pagemax'].'">';
171
  $return .= '</div>';
172
 
173
- $return .= '<div class="item-mediafromftp-settings">';
174
- $return .= '<legend>'.__('Date and time input assistance', 'media-from-ftp').'</legend>';
175
- $return .= '<div style="display: block;padding:5px 5px">';
176
- if ($mediafromftp_settings['datetimepicker'] == TRUE) {
177
- $return .= '<input type="checkbox" name="mediafromftp_datetimepicker" value="1" checked />';
178
- } else {
179
- $return .= '<input type="checkbox" name="mediafromftp_datetimepicker" value="1" />';
180
- }
181
- $return .= '<a href="https://xdsoft.net/jqplugins/datetimepicker/" target="_blank" style="text-decoration: none;">Date Time Picker</a>(jQuery '.__('Plugin').')';
182
- $return .= '</div>';
183
- $return .= '</div>';
184
-
185
  $return .= '<div class="item-mediafromftp-settings">';
186
  $return .= '<legend>'.__('Display of search results', 'media-from-ftp').'</legend>';
187
  $return .= '<div style="display: block;padding:5px 5px">';
@@ -648,6 +636,13 @@ class MediaFromFtpAdmin {
648
  _e('Organize my uploads into month- and year-based folders');
649
  ?>
650
  </div>
 
 
 
 
 
 
 
651
  </div>
652
 
653
  <div class="item-mediafromftp-settings">
@@ -919,7 +914,7 @@ class MediaFromFtpAdmin {
919
  <?php $mediafromftp->form_html($mediafromftp_settings); ?>
920
  <form method="post" id="mediafromftp_ajax_update">
921
  <form id="media-from-ftp-filter" method="get">
922
- <input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?>" />
923
  <?php echo $update_upper_button; ?>
924
  <?php $MediaFromFtpListTable->display(); ?>
925
  <?php echo $update_lower_button; ?>
@@ -1529,6 +1524,11 @@ class MediaFromFtpAdmin {
1529
  if ( !empty($_POST['mediafromftp_datefixed']) ) {
1530
  $mediafromftp_settings['datefixed'] = sanitize_text_field($_POST['mediafromftp_datefixed']);
1531
  }
 
 
 
 
 
1532
  $mediafromftp_settings['max_execution_time'] = intval($_POST['mediafromftp_max_execution_time']);
1533
  $mediafromftp_settings['character_code'] = sanitize_text_field($_POST['mediafromftp_character_code']);
1534
  if ( !empty($_POST['mediafromftp_cron_apply']) ) {
@@ -1610,11 +1610,6 @@ class MediaFromFtpAdmin {
1610
  if (!empty($_POST['mediafromftp_pagemax'])){
1611
  $mediafromftp_settings['pagemax'] = intval($_POST['mediafromftp_pagemax']);
1612
  }
1613
- if ( !empty($_POST['mediafromftp_datetimepicker']) ) {
1614
- $mediafromftp_settings['datetimepicker'] = 1;
1615
- } else {
1616
- $mediafromftp_settings['datetimepicker'] = 0;
1617
- }
1618
  if (!empty($_POST['searchdir'])){
1619
  $searchdir = urldecode($_POST['searchdir']);
1620
  if ( strpos( realpath(wp_normalize_path(ABSPATH.$searchdir)), MEDIAFROMFTP_PLUGIN_UPLOAD_DIR) === FALSE ) {
170
  $return .= '<input type="number" step="1" min="1" max="999" class="screen-per-page" name="mediafromftp_pagemax" maxlength="3" value="'.$mediafromftp_settings['pagemax'].'">';
171
  $return .= '</div>';
172
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  $return .= '<div class="item-mediafromftp-settings">';
174
  $return .= '<legend>'.__('Display of search results', 'media-from-ftp').'</legend>';
175
  $return .= '<div style="display: block;padding:5px 5px">';
636
  _e('Organize my uploads into month- and year-based folders');
637
  ?>
638
  </div>
639
+
640
+ <div style="display: block; padding:5px 5px">
641
+ <input type="checkbox" name="mediafromftp_datetimepicker" form="mediafromftp_settings_form" value="1" <?php checked('1', $mediafromftp_settings['datetimepicker']); ?> />
642
+ <a href="https://xdsoft.net/jqplugins/datetimepicker/" target="_blank" style="text-decoration: none;">Date Time Picker</a>(jQuery <?php _e('Plugin'); ?>)
643
+ <?php _e('Date and time input assistance', 'media-from-ftp'); ?>
644
+ </div>
645
+
646
  </div>
647
 
648
  <div class="item-mediafromftp-settings">
914
  <?php $mediafromftp->form_html($mediafromftp_settings); ?>
915
  <form method="post" id="mediafromftp_ajax_update">
916
  <form id="media-from-ftp-filter" method="get">
917
+ <input type="hidden" name="page" value="<?php echo esc_attr($_GET['page']); ?>" />
918
  <?php echo $update_upper_button; ?>
919
  <?php $MediaFromFtpListTable->display(); ?>
920
  <?php echo $update_lower_button; ?>
1524
  if ( !empty($_POST['mediafromftp_datefixed']) ) {
1525
  $mediafromftp_settings['datefixed'] = sanitize_text_field($_POST['mediafromftp_datefixed']);
1526
  }
1527
+ if ( !empty($_POST['mediafromftp_datetimepicker']) ) {
1528
+ $mediafromftp_settings['datetimepicker'] = 1;
1529
+ } else {
1530
+ $mediafromftp_settings['datetimepicker'] = FALSE;
1531
+ }
1532
  $mediafromftp_settings['max_execution_time'] = intval($_POST['mediafromftp_max_execution_time']);
1533
  $mediafromftp_settings['character_code'] = sanitize_text_field($_POST['mediafromftp_character_code']);
1534
  if ( !empty($_POST['mediafromftp_cron_apply']) ) {
1610
  if (!empty($_POST['mediafromftp_pagemax'])){
1611
  $mediafromftp_settings['pagemax'] = intval($_POST['mediafromftp_pagemax']);
1612
  }
 
 
 
 
 
1613
  if (!empty($_POST['searchdir'])){
1614
  $searchdir = urldecode($_POST['searchdir']);
1615
  if ( strpos( realpath(wp_normalize_path(ABSPATH.$searchdir)), MEDIAFROMFTP_PLUGIN_UPLOAD_DIR) === FALSE ) {