Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backup_migrate
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
backup_migrate
Commits
bb2cbf10
Commit
bb2cbf10
authored
8 years ago
by
szeidler
Committed by
Ronan Dowling
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #2809965 by szeidler: Restore - nothing happens
parent
37f76d06
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Filter/DrupalUtils.php
+16
-0
16 additions, 0 deletions
src/Filter/DrupalUtils.php
with
16 additions
and
0 deletions
src/Filter/DrupalUtils.php
+
16
−
0
View file @
bb2cbf10
...
...
@@ -6,6 +6,7 @@
namespace
BackupMigrate\Drupal\Filter
;
use
BackupMigrate\Core\Exception\BackupMigrateException
;
use
BackupMigrate\Core\File\BackupFileReadableInterface
;
use
BackupMigrate\Core\Plugin\PluginBase
;
use
BackupMigrate\Core\Config\Config
;
...
...
@@ -94,4 +95,19 @@ class DrupalUtils extends PluginBase {
}
}
/**
* Ensure, that the restore file does not exceed the server's upload_limit.
*
* @param BackupFileReadableInterface $file
*
* @return BackupFileReadableInterface
*/
public
function
beforeRestore
(
BackupFileReadableInterface
$file
)
{
if
(
$file
->
getMeta
(
'filesize'
)
>
file_upload_max_size
())
{
throw
new
BackupMigrateException
(
'The input file exceeds the servers upload_max_filesize or post_max_size limit.'
,
array
(
'!id'
=>
$file
->
getMeta
(
'id'
)));
}
return
$file
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment