/** * visszaadja a szerverek listajat amikrol van backup * * @return array */ public function getServersList() { require_once 'BackupPcFinder.php'; switch ($this->type) { case 'tarhely': $finder = new BackupPcFinder($this->config['path_to_tarhely_backups']); return $finder->listDirs(); break; case 'mysql': $finder = new BackupPcFinder($this->config['path_to_mysql_backups']); return $finder->listDirs(); break; } }
public function parseMySqlDirectories() { if (!file_exists($this->file)) { return false; } require_once 'BackupPcFinder.php'; $finder = new BackupPcFinder($this->file); $dirs = $finder->listDirs(); if (empty($dirs)) { return $dirs; } $revisions = array(); foreach ($dirs as $dir) { $date = preg_replace('/2010/', '', $dir); $date = substr($date, 0, 2) . '.' . substr($date, 2, 3); $revisions[] = array('number' => $dir, 'date' => $date); } return $revisions; }