Файл: EasyHost v2.0/system/htdocs/manager/files/file/move.pl
Строк: 33
<?php
$system->error('The directory you selected wasn't found') if (!$login->user->directory($system->param('new_directory'))->exists);
$system->error('Invalid directory name') if (substr($system->param('new_directory'),0,1) ne '/' || substr($system->param('new_directory'),-1) ne '/' || $system->param('new_directory') =~ /[\/].+[\/]/);
my $reload = undef;
while (my $file = $files->fetch)
{
$system->error('File name contains invalid characters ('.$file->name.')') if ($file->name =~ /[\/]+|^.+$/);
rename($file->real->path,$login->user->directory($system->param('new_directory'))->real->path.$file->name) || $system->error('Couldn't move '.$file->name.': '.$!);
$reload = '&dir_reload=on' if ($file->type eq 'directory');
$login->user->notice('file_rename','moved a file ('.$file->path.' to '.$login->user->directory($system->param('new_directory'))->path.$file->name.')');
}
$system->redirect('/manager/files/directory'.$reload);
?>