Skip to content

Commit

Permalink
3.0.7
Browse files Browse the repository at this point in the history
Fix issue in DB restore
  • Loading branch information
nilsteampassnet committed May 4, 2023
1 parent ddee2dc commit 31421cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pages/backups.js.php
Expand Up @@ -252,16 +252,22 @@ function(data) {
runtimes: "gears,html5,flash,silverlight,browserplus",
browse_button: "onthefly-restore-file-select",
container: "onthefly-restore-file",
max_file_size: "50mb",
chunk_size: "0",
max_file_size: '<?php
if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
echo $SETTINGS['upload_maxfilesize'] . 'mb';
} else {
echo $SETTINGS['upload_maxfilesize'];
}
?>',
chunk_size: '5mb',
unique_names: true,
dragdrop: true,
multiple_queues: false,
multi_selection: false,
max_file_count: 1,
url: "sources/upload.files.php",
flash_swf_url: "includes/libraries/Plupload/plupload.flash.swf",
silverlight_xap_url: "includes/libraries/Plupload/plupload.silverlight.xap",
url: "<?php echo $SETTINGS['cpassman_url']; ?>/sources/upload.files.php",
flash_swf_url: "<?php echo $SETTINGS['cpassman_url']; ?>/includes/libraries/Plupload/plupload.flash.swf",
silverlight_xap_url: "<?php echo $SETTINGS['cpassman_url']; ?>/includes/libraries/Plupload/plupload.silverlight.xap",
filters: [{
title: "SQL files",
extensions: "sql"
Expand Down Expand Up @@ -299,6 +305,7 @@ function(teampassUser) {
// Show cog
toastr.remove();
toastr.info('<?php echo langHdl('loading_item'); ?> ... <i class="fas fa-circle-notch fa-spin fa-2x"></i>');
console.log("Upload token: "+store.get('teampassUser').uploadToken);

up.settings.multipart_params = {
"PHPSESSID": "<?php echo $_SESSION['user_id']; ?>",
Expand Down
1 change: 1 addition & 0 deletions sources/upload.files.php
Expand Up @@ -219,6 +219,7 @@
)
) === false
&& $post_type_upload !== 'import_items_from_keepass'
&& $post_type_upload !== 'restore_db'
) {
handleUploadError('Invalid file extension.');
die();
Expand Down

0 comments on commit 31421cf

Please sign in to comment.