HEX
Server: LiteSpeed
System: Linux s1296.sgp1.mysecurecloudhost.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: bishwesh (1878)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/bishwesh/public_html/wp-content/plugins/file-manager/inc/migrate.php
<?php
// Security check
defined('ABSPATH') || die();

// This class migrates from the older version to the newer version
class FMMigrate{

  private $version;

  public function __construct($current_version){

    // Checkks the current version
    // update_option('fm_current_version', 524);
    $this->version = get_option('fm_current_version', 524);
    if((int)($this->version) < (int)($current_version)){
      for($I = (int)($this->version) + 1; $I <= $current_version; $I++ ){
        $function = 'migrate_to_' . $I;
        if( method_exists($this, $function) ) $this->$function();
        update_option('fm_current_version', $I);
      }
    }

  }

    protected function migrate_to_502(){
        $upload_dir = wp_upload_dir();
        $log_file = $upload_dir['basedir'] . DS . 'file-manager' . DS . 'log.txt';
        if(file_exists($log_file)) unlink($log_file);
    }

    protected function migrate_to_510(){

    }

}