File Manager - Version 5.2.1

Version Description

= 5.1.9 = + No special requirements.

Download this release

Release Info

Developer aihimel
Plugin Icon 128x128 File Manager
Version 5.2.1
Comparing to
See all releases

Code changes from version 5.2.0 to 5.2.1

BootStart/BootStart.php CHANGED
@@ -229,7 +229,7 @@ abstract class FM_BootStart{
229
 
230
  // elFinder Scripts depends on jQuery UI core, selectable, draggable, droppable, resizable, dialog and slider.
231
  wp_register_script( 'fmp-elfinder-script', $this->url('elFinder/js/elfinder.full.js'), array('jquery', 'jquery-ui-core', 'jquery-ui-selectable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-slider', 'jquery-ui-tabs') );
232
- wp_register_script( 'fmp-elfinder-editor-script', $this->url('elFinder/js/extras/editors.default.js'), array('fmp-elfinder-script') );
233
 
234
  }
235
 
229
 
230
  // elFinder Scripts depends on jQuery UI core, selectable, draggable, droppable, resizable, dialog and slider.
231
  wp_register_script( 'fmp-elfinder-script', $this->url('elFinder/js/elfinder.full.js'), array('jquery', 'jquery-ui-core', 'jquery-ui-selectable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-slider', 'jquery-ui-tabs') );
232
+ // wp_register_script( 'fmp-elfinder-editor-script', $this->url('elFinder/js/extras/editors.default.js'), array('fmp-elfinder-script') );
233
 
234
  }
235
 
file-manager.php CHANGED
@@ -3,8 +3,8 @@
3
  *
4
  * Plugin Name: File Manager
5
  * Author: Aftabul Islam
6
- * Author URI: http://www.giribaz.com
7
- * Version: 5.2.0
8
  * Author Email: toaihimel@gmail.com
9
  * PHP version: 5.6
10
  * Text domain: file-manager
@@ -13,9 +13,19 @@
13
  *
14
  * */
15
 
 
 
 
 
 
 
 
16
  // Directory Seperator
17
  if( !defined( 'DS' ) ) define("DS", DIRECTORY_SEPARATOR);
18
 
 
 
 
19
 
20
  // Including elFinder class
21
  require_once('elFinder' . DS . 'elFinder.php');
@@ -79,9 +89,9 @@ class FM extends FM_BootStart {
79
 
80
  $this->version = '5.1.3';
81
  $this->version_no = 513;
82
- $this->site = 'http://www.giribaz.com';
83
- $this->giribaz_landing_page = 'http://www.giribaz.com/wordpress-file-manager-plugin';
84
- $this->support_page = 'http://giribaz.com/support/';
85
  $this->feedback_page = 'https://wordpress.org/support/plugin/file-manager/reviews/';
86
  $this->file_manager_view_path = plugin_dir_path(__FILE__);
87
 
@@ -119,9 +129,9 @@ class FM extends FM_BootStart {
119
 
120
  $opts = array(
121
  'bind' => array(
122
- 'put.pre' => array(new FMPHPSyntaxChecker, 'checkSyntax'), // Syntax Checking.
123
- 'archive.pre back.pre chmod.pre colwidth.pre copy.pre cut.pre duplicate.pre editor.pre put.pre extract.pre forward.pre fullscreen.pre getfile.pre help.pre home.pre info.pre mkdir.pre mkfile.pre netmount.pre netunmount.pre open.pre opendir.pre paste.pre places.pre quicklook.pre reload.pre rename.pre resize.pre restore.pre rm.pre search.pre sort.pre up.pre upload.pre view.pre zipdl.pre file.pre tree.pre parents.pre ls.pre tmb.pre size.pre dim.pre get.pre' => array(&$this, 'security_check'),
124
- 'upload' => array(new FMMediaSync(), 'onFileUpload'),
125
  '*' => 'fm_logger',
126
  ),
127
  'debug' => true,
@@ -183,12 +193,12 @@ class FM extends FM_BootStart {
183
  if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
184
 
185
  if ($file == $this_plugin){
186
- array_unshift( $links, '<a target=\'blank\' href="http://www.giribaz.com/support/">'. "Support" .'</a>');
187
 
188
  array_unshift( $links, '<a href="admin.php?page=file-manager-settings">'. "File Manager" .'</a>');
189
 
190
  if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
191
- array_unshift( $links, '<a target=\'blank\' class="file-manager-admin-panel-pro" href="http://www.giribaz.com/wordpress-file-manager-plugin/" style="color: white; font-weight: bold; background-color: red; padding-right: 5px; padding-left: 5px; border-radius: 40%;">'. "Pro" .'</a>');
192
 
193
  }
194
 
3
  *
4
  * Plugin Name: File Manager
5
  * Author: Aftabul Islam
6
+ * Author URI: https://wpjos.com
7
+ * Version: 5.2.1
8
  * Author Email: toaihimel@gmail.com
9
  * PHP version: 5.6
10
  * Text domain: file-manager
13
  *
14
  * */
15
 
16
+ /*
17
+ * @since v5.2.0
18
+ *
19
+ * Constant Definition
20
+ *
21
+ * */
22
+
23
  // Directory Seperator
24
  if( !defined( 'DS' ) ) define("DS", DIRECTORY_SEPARATOR);
25
 
26
+ $upload_dir = wp_upload_dir();
27
+
28
+ defined( 'FM_UPLOAD_BASE_DIR' ) || define( 'FM_UPLOAD_BASE_DIR', $upload_dir['basedir'] . DS . 'file-manager' . DS );
29
 
30
  // Including elFinder class
31
  require_once('elFinder' . DS . 'elFinder.php');
89
 
90
  $this->version = '5.1.3';
91
  $this->version_no = 513;
92
+ $this->site = 'https://wpjos.com';
93
+ $this->giribaz_landing_page = 'https://wpjos.com/library-file-manager-plugin';
94
+ $this->support_page = 'https://wpjos.com/support/';
95
  $this->feedback_page = 'https://wordpress.org/support/plugin/file-manager/reviews/';
96
  $this->file_manager_view_path = plugin_dir_path(__FILE__);
97
 
129
 
130
  $opts = array(
131
  'bind' => array(
132
+ 'put.pre' => array(new FMPHPSyntaxChecker, 'checkSyntax'), // Syntax Checking.
133
+ // 'archive.pre back.pre chmod.pre colwidth.pre copy.pre cut.pre duplicate.pre editor.pre put.pre extract.pre forward.pre fullscreen.pre getfile.pre help.pre home.pre info.pre mkdir.pre mkfile.pre netmount.pre netunmount.pre open.pre opendir.pre paste.pre places.pre quicklook.pre reload.pre rename.pre resize.pre restore.pre rm.pre search.pre sort.pre up.pre upload.pre view.pre zipdl.pre file.pre tree.pre parents.pre ls.pre tmb.pre size.pre dim.pre get.pre' => array(&$this, 'security_check'),
134
+ // 'upload' => array(new FMMediaSync(), 'onFileUpload'),
135
  '*' => 'fm_logger',
136
  ),
137
  'debug' => true,
193
  if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
194
 
195
  if ($file == $this_plugin){
196
+ array_unshift( $links, '<a target=\'blank\' href="https://wpjos.com/support/">'. "Support" .'</a>');
197
 
198
  array_unshift( $links, '<a href="admin.php?page=file-manager-settings">'. "File Manager" .'</a>');
199
 
200
  if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
201
+ array_unshift( $links, '<a target=\'blank\' class="file-manager-admin-panel-pro" href="https://wpjos.com/library-file-manager-plugin/" style="color: white; font-weight: bold; background-color: red; padding-right: 5px; padding-left: 5px; border-radius: 40%;">'. "Pro" .'</a>');
202
 
203
  }
204
 
inc/class.media-sync.php CHANGED
@@ -29,14 +29,14 @@ class FMMediaSync {
29
  public function onFileUpload($cmd, &$result, $args, $elfinder, $volume){
30
  $images = array();
31
  $I = 0;
32
- $fp = fopen('fmm.txt', 'w+');
33
-
34
  $upload_target_path = $volume->getPath($args['target']);
35
 
36
  if( strpos( $upload_target_path, $this->wp_upload_directory ) !== false ){
37
 
38
  $images = array();
39
-
 
40
  for($I = 0; $I < count($args['FILES']['upload']['name']); $I++){
41
 
42
  $images[] = array(
29
  public function onFileUpload($cmd, &$result, $args, $elfinder, $volume){
30
  $images = array();
31
  $I = 0;
32
+
 
33
  $upload_target_path = $volume->getPath($args['target']);
34
 
35
  if( strpos( $upload_target_path, $this->wp_upload_directory ) !== false ){
36
 
37
  $images = array();
38
+ error_log(print_r($args, true));
39
+ error_log(print_r($args['FILES'], true));
40
  for($I = 0; $I < count($args['FILES']['upload']['name']); $I++){
41
 
42
  $images[] = array(
inc/class.php.syntax.checker.php CHANGED
@@ -10,14 +10,18 @@ class FMPHPSyntaxChecker{
10
  $args['content'] = stripcslashes($args['content']); // Default wordpress slashing removed.
11
 
12
  // Checking syntax for PHP file.
13
- if(strpos($args, '<?php') !== false){
14
- $temp_file_path = __DIR__ . DIRECTORY_SEPARATOR . 'temp.php';
15
  $fp = fopen($temp_file_path, "w+");
16
  fwrite($fp, $args['content']);
17
  fclose($fp);
18
  exec("php -l " . $temp_file_path , $output, $return);
19
- if(strpos($output[0], 'Errors parsing' ) !== false) $error_message = __("Syntax Error found. Please check your code for syntax error.",'file-manager');
 
 
 
20
  unlink($temp_file_path);
 
21
  if($return !== 0) return array(
22
  'preventexec' => true,
23
  'results' => array(
10
  $args['content'] = stripcslashes($args['content']); // Default wordpress slashing removed.
11
 
12
  // Checking syntax for PHP file.
13
+ if(strpos($args['content'], '<?php') !== false){
14
+ $temp_file_path = FM_UPLOAD_BASE_DIR . 'temp.php';
15
  $fp = fopen($temp_file_path, "w+");
16
  fwrite($fp, $args['content']);
17
  fclose($fp);
18
  exec("php -l " . $temp_file_path , $output, $return);
19
+
20
+ if(strpos($output[3], 'Errors parsing' ) !== false)
21
+ $error_message = __("Syntax Error found. Please check your code for syntax error.",'file-manager');
22
+
23
  unlink($temp_file_path);
24
+
25
  if($return !== 0) return array(
26
  'preventexec' => true,
27
  'results' => array(
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: aihimel
3
  Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
4
  Requires at least: 4.0.0
5
- Tested up to: 5.6
6
  Requires PHP: 5.6
7
  Stable tag: trunk
8
  License: GPLv2 or later
@@ -70,7 +70,7 @@ Just install the plugin following standard wordpress plugin install process. All
70
  + **Operation Control:** Control 13+ operations for specific user and user role.
71
  + **Ban Roles/Users:** Ban Users and Roles.
72
 
73
- **[Extend File Manager](http://giribaz.com/wordpress-file-manager-plugin/)**
74
 
75
  == Installation ==
76
 
2
  Contributors: aihimel
3
  Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
4
  Requires at least: 4.0.0
5
+ Tested up to: 5.8
6
  Requires PHP: 5.6
7
  Stable tag: trunk
8
  License: GPLv2 or later
70
  + **Operation Control:** Control 13+ operations for specific user and user role.
71
  + **Ban Roles/Users:** Ban Users and Roles.
72
 
73
+ **[Extend File Manager](https://wpjos.com/library-file-manager-plugin/)**
74
 
75
  == Installation ==
76
 
views/admin/extension-themepack.php CHANGED
@@ -13,7 +13,7 @@ global $FileManager;
13
 
14
  <h2><?php _e("Themepack", 'file-manager'); ?></h2>
15
  <p>
16
- <h4><a href='http://giribaz.com/file-manager-themepack/'><?php _e("Themepack", 'file-manager'); ?></a></h4>
17
  <ul>
18
  <li><?php _e("50 Different Themes", 'file-manager'); ?></li>
19
  <li><?php _e("Supports backend and frontend", 'file-manager'); ?></li>
@@ -22,7 +22,7 @@ global $FileManager;
22
  </ul>
23
  </p>
24
  <br/>
25
- <a class='fm-call-toaction' href='http://giribaz.com/file-manager-themepack/'><?php _e("Get it now!", 'file-manager'); ?></a>
26
  <br/>
27
  <br/>
28
  </div>
13
 
14
  <h2><?php _e("Themepack", 'file-manager'); ?></h2>
15
  <p>
16
+ <h4><a href='https://wpjos.com/file-manager-themepack/'><?php _e("Themepack", 'file-manager'); ?></a></h4>
17
  <ul>
18
  <li><?php _e("50 Different Themes", 'file-manager'); ?></li>
19
  <li><?php _e("Supports backend and frontend", 'file-manager'); ?></li>
22
  </ul>
23
  </p>
24
  <br/>
25
+ <a class='fm-call-toaction' href='https://wpjos.com/file-manager-themepack/'><?php _e("Get it now!", 'file-manager'); ?></a>
26
  <br/>
27
  <br/>
28
  </div>
views/admin/extensions.php CHANGED
@@ -32,7 +32,7 @@ global $FileManager;
32
  </ul>
33
  </p>
34
  <br/>
35
- <a class='fm-call-toaction' href='https://www.giribaz.com/wordpress-file-manager-plugin'><?php _e("Get it now!", 'file-manager'); ?></a>
36
  <br/>
37
  <br/>
38
  </div>
32
  </ul>
33
  </p>
34
  <br/>
35
+ <a class='fm-call-toaction' href='https://wpjos.com/library-file-manager-plugin'><?php _e("Get it now!", 'file-manager'); ?></a>
36
  <br/>
37
  <br/>
38
  </div>
views/admin/footer.php CHANGED
@@ -11,13 +11,13 @@ global $FileManager;
11
  <div class='fm-footer'>
12
 
13
  <ul>
14
- <li><a href='http://giribaz.com/faq/'><?php _e("FAQ", 'file-manager'); ?></a></li>
15
  <li><a href='https://wordpress.org/plugins/file-manager/changelog/'><?php _e("Changelog", 'file-manager'); ?></a></li>
16
- <li><a href='http://giribaz.com/contacts/'><?php _e("Contacts", 'file-manager'); ?></a></li>
17
- <li><a href='http://giribaz.com/documentations/'><?php _e("Docs", 'file-manager'); ?></a></li>
18
  <li><a href='<?= $FileManager->feedback_page; ?>'><?php _e("Review", 'file-manager'); ?></a></li>
19
  <li><a href='<?= $FileManager->support_page; ?>'><?php _e("Help & Support", 'file-manager'); ?></a></li>
20
- <li><a href='<?= $FileManager->site; ?>'>Giribaz</a></li>
21
  </ul>
22
 
23
  </div>
11
  <div class='fm-footer'>
12
 
13
  <ul>
14
+ <li><a href='https://wpjos.com/faq/'><?php _e("FAQ", 'file-manager'); ?></a></li>
15
  <li><a href='https://wordpress.org/plugins/file-manager/changelog/'><?php _e("Changelog", 'file-manager'); ?></a></li>
16
+ <li><a href='https://wpjos.com/contacts/'><?php _e("Contacts", 'file-manager'); ?></a></li>
17
+ <li><a href='https://wpjos.com/documentations/'><?php _e("Docs", 'file-manager'); ?></a></li>
18
  <li><a href='<?= $FileManager->feedback_page; ?>'><?php _e("Review", 'file-manager'); ?></a></li>
19
  <li><a href='<?= $FileManager->support_page; ?>'><?php _e("Help & Support", 'file-manager'); ?></a></li>
20
+ <li><a href='<?= $FileManager->site; ?>'>WPJos</a></li>
21
  </ul>
22
 
23
  </div>
views/admin/permission_system.php CHANGED
@@ -21,8 +21,8 @@ $FileManager->admin_assets();
21
 
22
  <div class='col-main'>
23
  <div class='fmp-demo-notice'>
24
- <?php _e("This is a demo of", 'file-manager'); ?><a href='http://giribaz.com/wordpress-file-manager-plugin/'><?php _e("File Manager Permission System(Pro)", 'file-manager'); ?></a> <?php _e("Extension.", 'file-manager'); ?>
25
- <button onClick="window.location = 'http://giribaz.com/wordpress-file-manager-plugin/'"><?php _e("Get It Now!", 'file-manager'); ?></button>
26
  </div>
27
  <div class='gb-fm-row'>
28
 
21
 
22
  <div class='col-main'>
23
  <div class='fmp-demo-notice'>
24
+ <?php _e("This is a demo of", 'file-manager'); ?><a href='https://wpjos.com/library-file-manager-plugin/'><?php _e("File Manager Permission System(Pro)", 'file-manager'); ?></a> <?php _e("Extension.", 'file-manager'); ?>
25
+ <button onClick="window.location = 'https://wpjos.com/library-file-manager-plugin/'"><?php _e("Get It Now!", 'file-manager'); ?></button>
26
  </div>
27
  <div class='gb-fm-row'>
28
 
views/admin/sales.php CHANGED
@@ -11,7 +11,7 @@ global $FileManager;
11
  ?>
12
 
13
  <div class='fm-donate'>
14
- <a href='http://www.giribaz.com'>
15
  <img style='width:100%;' src='<?php echo plugin_dir_url(__FILE__) . '..' . '/' . '..' . '/' . 'img' . '/' . 'new_year_sales_60_percent_off.png'; ?>' >
16
  </a>
17
  </div>
11
  ?>
12
 
13
  <div class='fm-donate'>
14
+ <a href='https://wpjos.com'>
15
  <img style='width:100%;' src='<?php echo plugin_dir_url(__FILE__) . '..' . '/' . '..' . '/' . 'img' . '/' . 'new_year_sales_60_percent_off.png'; ?>' >
16
  </a>
17
  </div>
views/admin/sidebar.php CHANGED
@@ -24,9 +24,9 @@ global $FileManager;
24
  <?php endif; ?>
25
 
26
  <?php if(!defined('FILE_MANAGER_THEMEPACK')): ?>
27
- <div class='gb-fm-row'><?php require_once( 'extension-themepack.php' ); ?></div>
28
  <?php endif; ?>
29
  <?php if(!defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_THEMEPACK')):?>
30
- <div class='gb-fm-row'><?php require_once( plugin_dir_path(__FILE__ ) . 'donate.php' ); ?></div>
31
  <?php endif; ?>
32
  </div>
24
  <?php endif; ?>
25
 
26
  <?php if(!defined('FILE_MANAGER_THEMEPACK')): ?>
27
+ <!-- <div class='gb-fm-row'>--><?php //require_once( 'extension-themepack.php' ); ?><!--</div>-->
28
  <?php endif; ?>
29
  <?php if(!defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_THEMEPACK')):?>
30
+ <!-- <div class='gb-fm-row'>--><?php //require_once( plugin_dir_path(__FILE__ ) . 'donate.php' ); ?><!--</div>-->
31
  <?php endif; ?>
32
  </div>