| @@ 223-234 (lines=12) @@ | ||
| 220 | { |
|
| 221 | $files = array(); |
|
| 222 | ||
| 223 | if($this->is_multipart($backup_name)) |
|
| 224 | { |
|
| 225 | $lines = explode(PHP_EOL, $this->get_storage_filesystem()->read($backup_name)); |
|
| 226 | foreach($lines as $line) |
|
| 227 | { |
|
| 228 | if($line) |
|
| 229 | { |
|
| 230 | $data = str_getcsv($line); |
|
| 231 | $files[] = $data[0]; |
|
| 232 | } |
|
| 233 | } |
|
| 234 | } |
|
| 235 | ||
| 236 | return $files; |
|
| 237 | } |
|
| @@ 241-252 (lines=12) @@ | ||
| 238 | ||
| 239 | public function delete_backup_by_name($backup_name) |
|
| 240 | { |
|
| 241 | if($this->is_multipart($backup_name)) |
|
| 242 | { |
|
| 243 | $lines = explode(PHP_EOL, $this->get_storage_filesystem()->read($backup_name)); |
|
| 244 | foreach($lines as $line) |
|
| 245 | { |
|
| 246 | if($line) |
|
| 247 | { |
|
| 248 | $data = str_getcsv($line); |
|
| 249 | $this->get_storage_filesystem()->delete($data[0]); |
|
| 250 | } |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| 254 | if($this->get_storage_filesystem()->delete($backup_name)) |
|
| 255 | $return = true; |
|