예제 #1
0
 public function get_file()
 {
     $file = rtrim($this->config->get_backup_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . DB_NAME . "-backup.sql";
     $files = glob($file . '*');
     if (isset($files[0])) {
         return $files[0];
     }
     return $file . '.' . WPB2D_Factory::secret(DB_NAME);
 }
 public function get_log_file()
 {
     if (!$this->logFile) {
         WPB2D_BackupController::create_dump_dir();
         $path = WPB2D_Factory::get('config')->get_backup_dir() . DIRECTORY_SEPARATOR . self::LOGFILE;
         $files = glob($path . '.*');
         if (isset($files[0])) {
             $this->logFile = $files[0];
         } else {
             $this->logFile = $path . '.' . WPB2D_Factory::secret(self::LOGFILE);
         }
     }
     return $this->logFile;
 }