Version Description
Download this release
Release Info
Developer | cssimmon |
Plugin | Backup and Restore WordPress – WPBackItUp Backup Plugin |
Version | 1.36.0 |
Comparing to | |
See all releases |
Code changes from version 1.35.0 to 1.36.0
- js/wp-backitup-admin.min.js +1 -1
- js/wp-backitup-components.min.js +1 -1
- readme.txt +7 -2
- wp-backitup.php +2 -2
js/wp-backitup-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var WPBNewBackupData={},ajaxSafeNamespace="wpbackitup-premium",ENUM={GDRIVE:"GDRIVE",AMAZONS3:"AMAZONS3",DROPBOX:"DROPBOX"},CLOUDSTATUS={READY:"ready",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},debugFlag=!1;if("undefined"==typeof WPBackItUpSafeLocals)var WPBackItUpSafeLocals=[];var wpbackitup_get_action_name=function(e){return ajaxSafeNamespace+"_"+e},AjaxGetSafe=function(e){return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:wpbackitup_get_action_name(e),security:WPBackItUpSafeLocals[e]},dataType:"json"})},AjaxGetCore=function(e){var a=wpbackitup_local[e];return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:"wp-backitup_"+e,security:a},dataType:"json"})},AjaxPostSafe=function(e,a){var a=a||{};return a.action=wpbackitup_get_action_name(e),a.security=WPBackItUpSafeLocals[e],jQuery.ajax({url:ajaxurl,type:"POST",data:a,dataType:"json"})};!function(e){"use strict";if(document.querySelector("#wpbackitup-core-backup"))var a=new Vue({el:"#wpbackitup-core-backup",data:{cloudStatus:{},isNewRowAvailable:!1,backupNewRow:{}},methods:{getAvailableBackups:function(){AjaxGetCore("get_available_backups").then(function(e){if(e.success)for(var t=0;t<e.data.length;t++){var i=e.data[t].backup_job_id,s=e.data[t].backup_job_cloud_status;a.$set(a.cloudStatus,i,s)}})},getBackupStatus:function(){var e=WPBNewBackupData;if("success"===e.backupStatus){var a=e.backupName,t=a.lastIndexOf("_"),i=a.substring(t+1);this.isNewRowAvailable=!0,this.backupNewRow={name:e.backupName,type:e.backupRuntype,date:e.backupDate,duration:e.backupDuration,status:e.backupStatus,row:99999,jobId:i,zipExist:!0},WPBNewBackupData={}}}},mounted:function(){this.getAvailableBackups(),this.getBackupStatusInterval=setInterval(function(){0!==Object.keys(WPBNewBackupData).length&&this.getBackupStatus()}.bind(this),1e3),this.getAvailableBackupsInterval=setInterval(function(){this.getAvailableBackups()}.bind(this),3e3)},beforeDestroy:function(){clearInterval(this.getAvailableBackupsInterval),clearInterval(this.getBackupStatusInterval)}})}(jQuery),function(e){function a(){e(".viewloglink").click(function(){var a=e(this).attr("href");return e("#backup_name").val(a),e("#viewlog").submit(),!1})}function t(){e(".downloadbackuplink").bind("click",function(){var a=e(this).attr("href");return e("#backup_file").val(a),e(this).append('<i class="fas fa-check"></i>'),e(this).css({color:"green"}),e("#download_backup").submit(),!1})}function i(a,i){var n=({action:f("backup_zip_filelist"),job_id:a},i.replace(/[^A-Za-z0-9\-]/g,"")),o=0,c="",l='<div id="'+n+'"> <h2>'+wpbackitup_local.bl_backup_set+" <em>"+i+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button><span id="wpbiu-note-response">'+wpbackitup_local.bl_note_saved_success+"</span></div> <p>"+wpbackitup_local.bl_backup_download+'</p> <table class="widefat" id="datatable"> <tbody>';e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_zip_filelist"),job_id:a},dataType:"json"}).done(function(i){i.data?(e.each(i.data,function(){var a=e(this)[0].name.split(/[\/]+/).pop(),t=e(this)[0].size,i=e(this)[0].file_exists;if(console.log(a,t),a.indexOf("-backupset-")>-1)c='<p><a class="downloadbackuplink" href="'+a+'"><i class="fas fa-cloud-download-alt fa-2x"></i> <strong>'+wpbackitup_local.bl_backup_download_single+"</strong></a> <br><em>"+wpbackitup_local.bl_please_note+t+wpbackitup_local.bl_may_timeout+"</em></p>";else{o++;var s="";o%2!=0&&(s="alternate"),l+='<tr class="'+s+'" id="row'+o+'">',l+=i?'<td><a class="downloadbackuplink" href="'+a+'">'+a+"</a></td>":"<td>"+a+"</td>",l+="<td>"+t+"</td> </tr>"}}),l+=c+"</tbody></table></div>",e("#TB_ajaxContent").html(l),t(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-note-box").val(a.data)}}),e("#wpbiu-note-btn").click(function(){var t=e("#wpbiu-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-note-response").fadeIn()})}),e("#wpbiu-note-box").focus(function(){e("#wpbiu-note-response").hide()})):s(i,null,null)}).fail(function(e,a,t){s(e,a,t)})}function s(e,a,t){var i="Error-Invalid response from server: ";a&&(i+=a+"\n"),t&&(i+=t+"\n"),i+="\nResponse: \n\n"+JSON.stringify(e),alert(i)}function n(){var a={action:f("restore_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),e(a).find(".isa_error").fadeIn(1500),clearInterval(window.intervalDefine)),e(this).html()==-2&&e(a).find(".isa_warning").fadeIn(1500),99==e(this).html()&&(e(a).find(".isa_success").fadeIn(1500),clearInterval(window.intervalDefine))})})}function o(){var a={action:f("backup_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){if(x)return clearInterval(window.intervalDefine),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("button-hidden").fadeOut(200),e("#backup-button").removeClass("button-hidden").fadeIn(200),e(".backup-cancelled").fadeIn(200),!1;var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),clearInterval(window.intervalDefine),c()),e(this).html()==-2&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".wpbackitup-warning").fadeIn(1500)),99==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500),clearInterval(window.intervalDefine),c())})})}function c(){var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_response_reader")},dataType:"json"});a.always(function(a,t,i){if(console.log("Backup Response:"+JSON.stringify(a)),"undefined"!=typeof a.backupStatus&&"undefined"!=typeof a.backupMessage){if(console.log("JSON Backup Status:"+a.backupStatus),console.log("JSON Backup Message:"+a.backupMessage),y)return;switch(y=!0,a.backupStatus){case"success":if(console.log("JSON success response received."),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("button-hidden").fadeOut(200),e("#backup-button").removeClass("button-hidden").fadeIn(200),e(".isa_success").show,e(".backup-success").fadeIn(1500),_(a),"undefined"!=typeof a.backupWarnings){var s=e(".backup-warning"),n=a.backupWarnings;n.forEach(function(e){var a=e.warningMessage;s.append('<li class="isa_warning">'+wpbackitup_local.warning+": "+a+"</li>")}),s.fadeIn(1500)}break;case"error":console.log("JSON error response received.");var o=wpbackitup_local.unexpected_err;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+": "+o,l=e(".backup-error");l.html(c),l.addClass("isa_error"),l.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("button-hidden").fadeOut(200),e("#backup-button").removeClass("button-hidden").fadeIn(200);break;default:console.log("Unexpected JSON response status received.");var o=wpbackitup_local.unexpected_err2;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+"(JS998) : "+o,u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("button-hidden").fadeOut(200),e("#backup-button").removeClass("button-hidden").fadeIn(200)}}else{console.log("NON JSON response received."),console.log("Backup Response:"+i),c=wpbackitup_local.unexpected_err3+": ",c+="</br>"+wpbackitup_local.response+": "+JSON.stringify(a),c+="</br>"+wpbackitup_local.status+": "+t,c+="</br>"+wpbackitup_local.error+": "+JSON.stringify(i),e(".backup-status").hide();var u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.show(),e(".status-icon").fadeOut(200)}})}function l(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-success").hide(),e(".default-status").hide(),e(".backup-error").hide(),e(".backup-cancelled").hide(),e("ul.backup-status").children().children().hide(),e(".backup-errors").children().children().hide(),e(".backup-success").children().children().hide(),e(".backup-status").show(),y=!1,window.intervalDefine=setInterval(o,5e3)}function u(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-status").show(),y=!1,clearInterval(window.intervalDefine),window.intervalDefine=setInterval(o,5e3)}function r(){e(".restore-icon").css("visibility","visible"),e(".default-status, .upload-status").hide(),e("ul.restore-status").children().children().hide(),e(".restore-errors").children().children().hide(),e(".restore-success").children().children().hide(),e(".restore-status, .restore-errors, .restore-success").show(),e(".preparing-icon").css("visibility","visible"),e(".preparing").find(".status-icon").fadeIn(1500),window.intervalDefine=setInterval(n,5e3)}function p(a){var t=new plupload.Uploader(a);t.init(),t.bind("FilesAdded",function(a,t){plupload.each(t,function(a){e("#filelist").append('<div id="media-item-'+a.id+'" class="media-item child-of-0"><img class="pinkynail" alt="" src="'+site_url+'/wp-includes/images/media/archive.png"><div class="filename new" id="'+a.id+'">'+a.name+" (<span>"+plupload.formatSize(0)+"</span> of "+plupload.formatSize(a.size)+') <div class="progress" style="width: 0%;"></div></div></div>')}),a.refresh(),a.start()}),t.bind("UploadProgress",function(a,t){e("#"+t.id+" .progress").width(.15*t.percent+"%"),e("#"+t.id+" span").html(plupload.formatSize(parseInt(t.size*t.percent/100)))}),t.bind(" ChunkUploaded",function(e,a,t){console.log("Chunk Uploaded:"),console.log(t),d(t,e,a)&&console.log("chunk error")}),t.bind("Error",function(a,t){console.log("PlUpload Error:"),console.log(t);var i="error-item-"+t.file.id;e("#"+i).length||e("#filelist").append('<div class="error-div error" id="'+i+'" ><strong>'+t.file.name+" has failed to upload due to error: </strong> <span>"+t.message+"</span> </div>")}),t.bind("FileUploaded",function(a,t,i){console.log("File Uploaded"),console.log(i),d(i,a,t)?console.log("uploaded error"):(console.log("uploaded success"),e("#"+t.id+" .progress").css("background-color","green"),e("#import-uploads").show())})}function d(e,a,t){if("200"!=e.status)return alert("Unknown server response status: "+e.code),console.log(e),b(a,t,999,e.response),!0;try{return response_json=jQuery.parseJSON(e.response),!!response_json.error&&(b(a,t,100,response_json.error),!0)}catch(i){return console.log("Unexpected JSON Error"+i),b(a,t,998,e.response),!0}}function b(a,t,i,s){t.status=plupload.FAILED,a.trigger("Error",{code:i,message:s,file:t}),e("#media-item-"+t.id).hide()}function _(i){"undefined"!=typeof i&&(WPBNewBackupData=i,e("#nofiles")&&e("#nofiles").remove(),a(),t())}function f(e){return w+"_"+e}function k(){notification_bar=e("#wp-backitup-notification-parent"),notification_bar.fadeOut("slow")}function h(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("error",!1),notification_bar.toggleClass("updated",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}function g(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("updated",!1),notification_bar.toggleClass("error",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}var w="wp-backitup",v=0;a(),t();try{"undefined"!=typeof wpbackitup_plupload_config&&p(wpbackitup_plupload_config)}catch(m){console.log(m)}e(".logs_backup").click(function(){var a=e(this).attr("href");return e("#backup_file").val(a),e("#download_logs").val(),e("#download_backup").submit(),!1}),e("#scheduled-backups-accordian").click(function(){scheduled_backups=e("#scheduled-backups"),scheduled_backups_button=e("#scheduled-backups-accordian"),e(this).is(".fa-angle-double-down")?(scheduled_backups.fadeIn("slow"),scheduled_backups_button.toggleClass("fa-angle-double-down",!1),scheduled_backups_button.toggleClass("fa-angle-double-up",!0)):(scheduled_backups_button.toggleClass("fa-angle-double-down",!0),scheduled_backups_button.toggleClass("fa-angle-double-up",!1),scheduled_backups.fadeOut("slow"))}),e("#upload-backups-accordian").click(function(){upload_backups=e("#wpbackitup-plupload-modal"),upload_backups_button=e("#upload-backups-accordian"),e(this).is(".fa-angle-double-down")?(upload_backups.fadeIn("slow"),upload_backups_button.toggleClass("fa-angle-double-down",!1),upload_backups_button.toggleClass("fa-angle-double-up",!0)):(upload_backups_button.toggleClass("fa-angle-double-down",!0),upload_backups_button.toggleClass("fa-angle-double-up",!1),upload_backups.fadeOut("slow"))}),e("#wpbackitup-zip").bind("change",function(){var a=this.files[0].size,t=e("#maxfilesize").val();"undefined"!=a&&"undefined"!=t&&""!=a&&""!=t&&a>t&&(alert(wpbackitup_local.upload_file_size_exceed),e("#wpbackitup-zip").val(""))}),e("#import-uploads").click(function(){setTimeout(function(){window.location.reload()},100)}),e(document.body).on("click",".thickbox",function(){if(!e(this).parents(".wpbiu-restore-item").length){var a=e(this).data("jobid");console.log(a);var t=this.name;i(a,t)}}),e(document.body).on("click",".thickbox",function(){var a=e(this).data("jobid"),t=e(this).attr("name");if(e(this).parents(".wpbiu-restore-item").length){var i="<h2>"+wpbackitup_local.bl_backup_set+" <em>"+t+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-restore-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-restore-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button> <span id="wpbiu-restore-note-response">'+wpbackitup_local.bl_note_saved_success+"</span> </div>";e("#wpbiu-restore-note").html(i),e("#wpbiu-restore-note-response").hide(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-restore-note-box").val(a.data)}}),e("#wpbiu-restore-note-btn").click(function(){var t=e("#wpbiu-restore-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-restore-note-response").fadeIn()})})}e("#wpbiu-restore-note-box").focus(function(){e("#wpbiu-restore-note-response").hide()})});var y=!1;e("#wp-backitup-notification-widget-close").click(function(){notification_bar=e("#wp-backitup-notification-widget"),notification_bar.fadeOut("slow");var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("delete_transient")},dataType:"json"});a.always(function(a,t,i){a!==!1&&(notification_bar.removeClass(),notification_bar.addClass("notice"),notification_bar.addClass("notice-"+a.message_type),e("#wp-backitup-notification-widget-message p").html(a.message),notification_bar.hide().fadeIn("slow"))})}),e("#wp-backitup-notification-close").click(function(){k()}),e("#wp-backitup-save_schedule_form").submit(function(){var a=new FormData;a.append("action",f("update-schedule")),a.append("_wpnonce",e("#wp-backitup_nonce-update-schedule").val()),a.append("_wp_http_referer",e("[name='_wp_http_referer']").val());var t=[];return e.each(e("input[name='dow']:checked"),function(){t.push(e(this).val())}),a.append("days_selected",t),jQuery.ajax({url:ajaxurl,type:"POST",cache:!1,contentType:!1,processData:!1,dataType:"json",data:a,success:function(e,a,t){switch(response=e.message,console.log("Success:"+response),response){case"success":h(wpbackitup_local.scheduled_saved);break;case"error":g(wpbackitup_local.scheduled_not_saved)}},error:function(e,a,t){console.log("Error."+a+":"+t)},complete:function(e,a){console.log("Complete")}}),!1});var j=null;e(".backup-button").click(function(a){a.preventDefault(),x=!1,e("#backup-button").attr("disabled","disabled"),e("#backup-button").addClass("button-hidden"),e("#cancel-button").removeClass("button-hidden"),e("#cancel-button").removeAttr("disabled"),e("#cancel-button").fadeIn(200),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup")},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),l()}}),j.always(function(e,a,t){console.log("Backup Button Click - Always"),console.log(e.message),"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}),e(".get-backup-schedule-button").click(function(a){a.preventDefault();var t="get_backup_schedule",i=wpbackitup_local[t];j=e.ajax({url:ajaxurl,type:"POST",data:{action:"wp-backitup_"+t,security:i},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report.")}})}),e(".set-backup-schedule-button").click(function(a){a.preventDefault();var t="set_backup_schedule",i=wpbackitup_local[t],s="daily",n=!0,o="16:30",c="M";j=e.ajax({url:ajaxurl,type:"POST",data:{action:"wp-backitup_"+t,security:i,frequency:s,start_time:o,days:c,enabled:n},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report.")}})});var x=!1;e(".cancel-button").click(function(a){a.preventDefault(),e("#cancel-button").attr("disabled","disabled"),null!=j&&(j.abort(),j=null),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("cancel_backup"),job_id:v},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),u()}}),j.always(function(e,a,t){console.log("Cancel Button Click - Always"),console.log(e),"undefined"!=typeof e.success&&1==e.success?console.log("Job Cancelled successfully"):console.log("Job was not cancelled successfully"),x=!0})}),e("#datatable").on("click","a.restoreRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.confirm_restore)){var t=this.title;this.id.replace("restoreRow","row");userid=e("input[name=user_id]").val();var i=e.ajax({url:ajaxurl,type:"post",data:{action:f("restore"),selected_file:t,user_id:userid},cache:!1,dataType:"json",beforeSend:function(){console.log("BeforeSend:Nothing to report."),r()}});i.always(function(e,a,t){"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}}),e("#datatable").on("click","a.deleteRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.sure)){var t=this.title,i=e(this).data("id"),s=this.id.replace("deleteRow","row");e.ajax({url:ajaxurl,type:"post",data:{action:f("delete_file"),filed:t,post_id:i},success:function(a){var t=a.search("deleted");0==t?e("#"+s).remove():alert(wpbackitup_local.file_not_del)}})}})}(jQuery),function(e){"use strict";var a="wp-backitup",t=function(e){return a+"_"+e},i=function(a){return e.ajax({url:ajaxurl,type:"GET",data:{action:t(a)},dataType:"json"})},s=function(a,i){var i=i||{};return i.action=t(a),i.security=e("#wpbackitup-core-ajax-nonce").val(),e.ajax({url:ajaxurl,type:"POST",data:i,dataType:"json"})};e(window).load(function(){if(document.querySelector("#wpbackitup-core-settings")){Vue.use(VueTabs);var e=new Vue({el:"#wpbackitup-core-settings",data:{loading:!1,updated:!1,emailsArray:[],errorMessages:{},backup_retained_number:3,logging:!1,single_file_db:!1,single_file_backupset:!1,rversion_compare:!1,remove_supporting_zip_files:!1,backup_plugins_filter:[],backup_themes_filter:[],backup_uploads_filter:[],backup_others_filter:[],dbFilterOptions:[],db_filters:[],allow_usage_tracking:!1,backup_dbtables_batch_size:1e4,backup_sql_merge_batch_size:1e4,backup_sql_batch_size:1e4,backup_plugins_batch_size:5e3,backup_themes_batch_size:5e3,backup_uploads_batch_size:500,backup_others_batch_size:500,backup_zip_max_size:524288e3,backup_max_timeout:120,delete_all:!1,safe_sync:!1,beta_updates:!1},computed:{dbFilterHasSearch:function(){return 0==this.dbFilterOptions.length},dbFilterPlaceholder:function(){return this.dbFilterOptions.length>0?wpbackitup_local.settings_select_database_table_to_filter:wpbackitup_local.settings_no_database_table_to_filter}},methods:{handleEmailInput:function(e){},handleTagsInput:function(e){},setSettings:function(){var a={data:{notification_email:this.emailsArray.join(","),backup_retained_number:this.backup_retained_number,logging:this.logging,single_file_db:this.single_file_db,single_file_backupset:this.single_file_backupset,rversion_compare:this.rversion_compare,remove_supporting_zip_files:this.remove_supporting_zip_files,backup_plugins_filter:this.backup_plugins_filter.join(","),backup_themes_filter:this.backup_themes_filter.join(","),backup_uploads_filter:this.backup_uploads_filter.join(","),backup_others_filter:this.backup_others_filter.join(","),backup_dbtables_filter_list:this.db_filters.map(function(e){return e.value}).join(","),backup_dbtables_batch_size:this.backup_dbtables_batch_size,backup_sql_merge_batch_size:this.backup_sql_merge_batch_size,backup_sql_batch_size:this.backup_sql_batch_size,backup_plugins_batch_size:this.backup_plugins_batch_size,backup_themes_batch_size:this.backup_themes_batch_size,backup_uploads_batch_size:this.backup_uploads_batch_size,backup_others_batch_size:this.backup_others_batch_size,backup_zip_max_size:this.backup_zip_max_size,backup_max_timeout:this.backup_max_timeout,delete_all:this.delete_all,safe_sync:this.safe_sync,beta_updates:this.beta_updates,allow_usage_tracking:this.allow_usage_tracking}};console.log(a),s("set_settings",a).then(function(a){a.success?(e.updated=!0,e.errorMessages={},swal(wpbackitup_local.settings_save_awesome,wpbackitup_local.settings_save_success_message,"success")):(e.errorMessages=a.data,swal(wpbackitup_local.settings_save_oops,wpbackitup_local.settings_save_error_message,"error"))})},getSettings:function(){this.loading=!0,i("get_settings").then(function(a){e.loading=!1,a.success&&(console.log(a),e.emailsArray=a.data.notification_email.split(",").filter(Boolean),e.backup_retained_number=a.data.backup_retained_number,e.logging="1"===a.data.logging,e.single_file_db="1"===a.data.single_file_db,e.rversion_compare="1"===a.data.rversion_compare,e.single_file_backupset="1"===a.data.single_file_backupset,e.remove_supporting_zip_files="1"===a.data.remove_supporting_zip_files,e.backup_plugins_filter=a.data.backup_plugins_filter.split(",").filter(Boolean),e.backup_themes_filter=a.data.backup_themes_filter.split(",").filter(Boolean),e.backup_uploads_filter=a.data.backup_uploads_filter.split(",").filter(Boolean),e.backup_others_filter=a.data.backup_others_filter.split(",").filter(Boolean),e.db_filters=a.data.backup_dbtables_filter_list.split(",").filter(Boolean).map(function(e){return{label:e,value:e}}),e.dbFilterOptions=Object.keys(a.data.backup_dbtables_filterable).map(function(e){var t=a.data.backup_dbtables_filterable[e];return{label:t,value:t}}),e.allow_usage_tracking=a.data.allow_usage_tracking,e.backup_dbtables_batch_size=a.data.backup_dbtables_batch_size,e.backup_sql_merge_batch_size=a.data.backup_sql_merge_batch_size,e.backup_sql_batch_size=a.data.backup_sql_batch_size,e.backup_plugins_batch_size=a.data.backup_plugins_batch_size,e.backup_themes_batch_size=a.data.backup_themes_batch_size,e.backup_uploads_batch_size=a.data.backup_uploads_batch_size,e.backup_others_batch_size=a.data.backup_others_batch_size,e.backup_zip_max_size=a.data.backup_zip_max_size,e.backup_max_timeout=a.data.backup_max_timeout,e.delete_all="1"===a.data.delete_all,e.safe_sync="1"===a.data.safe_sync,e.beta_updates="1"===a.data.beta_updates)})}},created:function(){this.getSettings()}})}})}(jQuery);
|
1 |
+
var WPBNewBackupData={},ajaxSafeNamespace="wpbackitup-premium",ENUM={GDRIVE:"GDRIVE",AMAZONS3:"AMAZONS3",DROPBOX:"DROPBOX"},CLOUDSTATUS={READY:"ready",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},debugFlag=!1;if(void 0===WPBackItUpSafeLocals)var WPBackItUpSafeLocals=[];var wpbackitup_get_action_name=function(e){return ajaxSafeNamespace+"_"+e},AjaxGetSafe=function(e){return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:wpbackitup_get_action_name(e),security:WPBackItUpSafeLocals[e]},dataType:"json"})},AjaxGetCore=function(e){var a=wpbackitup_local[e];return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:"wp-backitup_"+e,security:a},dataType:"json"})},AjaxPostSafe=function(e,a){return(a=a||{}).action=wpbackitup_get_action_name(e),a.security=WPBackItUpSafeLocals[e],jQuery.ajax({url:ajaxurl,type:"POST",data:a,dataType:"json"})};!function(){"use strict";if(document.querySelector("#wpbackitup-core-backup"))var i=new Vue({el:"#wpbackitup-core-backup",data:{cloudStatus:{},isNewRowAvailable:!1,backupNewRow:{}},methods:{getAvailableBackups:function(){AjaxGetCore("get_available_backups").then(function(e){if(e.success)for(var a=0;a<e.data.length;a++){var t=e.data[a].backup_job_id,s=e.data[a].backup_job_cloud_status;i.$set(i.cloudStatus,t,s)}})},getBackupStatus:function(){var e=WPBNewBackupData;if("success"===e.backupStatus){var a=e.backupName,t=a.lastIndexOf("_"),s=a.substring(t+1);this.isNewRowAvailable=!0,this.backupNewRow={name:e.backupName,type:e.backupRuntype,date:e.backupDate,duration:e.backupDuration,status:e.backupStatus,row:99999,jobId:s,zipExist:!0},WPBNewBackupData={}}}},mounted:function(){this.getAvailableBackups(),this.getBackupStatusInterval=setInterval(function(){0!==Object.keys(WPBNewBackupData).length&&this.getBackupStatus()}.bind(this),1e3),this.getAvailableBackupsInterval=setInterval(function(){this.getAvailableBackups()}.bind(this),3e3)},beforeDestroy:function(){clearInterval(this.getAvailableBackupsInterval),clearInterval(this.getBackupStatusInterval)}})}(jQuery),function(l){var e,a,t="wp-backitup",s=0;u(),r();try{"undefined"!=typeof wpbackitup_plupload_config&&(e=wpbackitup_plupload_config,(a=new plupload.Uploader(e)).init(),a.bind("FilesAdded",function(e,a){plupload.each(a,function(e){l("#filelist").append('<div id="media-item-'+e.id+'" class="media-item child-of-0"><img class="pinkynail" alt="" src="'+site_url+'/wp-includes/images/media/archive.png"><div class="filename new" id="'+e.id+'">'+e.name+" (<span>"+plupload.formatSize(0)+"</span> of "+plupload.formatSize(e.size)+') <div class="progress" style="width: 0%;"></div></div></div>')}),e.refresh(),e.start()}),a.bind("UploadProgress",function(e,a){l("#"+a.id+" .progress").width(.15*a.percent+"%"),l("#"+a.id+" span").html(plupload.formatSize(parseInt(a.size*a.percent/100)))}),a.bind(" ChunkUploaded",function(e,a,t){console.log("Chunk Uploaded:"),console.log(t),_(t,e,a)&&console.log("chunk error")}),a.bind("Error",function(e,a){console.log("PlUpload Error:"),console.log(a);var t="error-item-"+a.file.id;l("#"+t).length||l("#filelist").append('<div class="error-div error" id="'+t+'" ><strong>'+a.file.name+" has failed to upload due to error: </strong> <span>"+a.message+"</span> </div>")}),a.bind("FileUploaded",function(e,a,t){console.log("File Uploaded"),console.log(t),_(t,e,a)?console.log("uploaded error"):(console.log("uploaded success"),l("#"+a.id+" .progress").css("background-color","green"),l("#import-uploads").show())}))}catch(e){console.log(e)}function u(){l(".viewloglink").click(function(){var e=l(this).attr("href");return l("#backup_name").val(e),l("#viewlog").submit(),!1})}function r(){l(".downloadbackuplink").bind("click",function(){var e=l(this).attr("href");return l("#backup_file").val(e),l(this).append('<i class="fas fa-check"></i>'),l(this).css({color:"green"}),l("#download_backup").submit(),!1})}function c(e,a,t){var s="Error-Invalid response from server: ";a&&(s+=a+"\n"),t&&(s+=t+"\n"),s+="\nResponse: \n\n"+JSON.stringify(e),alert(s)}function i(){var e={action:k("restore_status_reader"),job_id:s};l.post(ajaxurl,e,function(e){l(e).each(function(){var e="."+l(this).attr("class"),a="."+l(this).attr("class")+"-icon";0==l(this).html()&&(l(e).find(".status").hide(),l(e).find(".status-icon").hide()),1==l(this).html()&&(l(a).css("visibility","visible"),l(e).find(".status").fadeOut(200),l(e).find(".status-icon").fadeIn(1500)),2==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".status").fadeIn(1500)),-1==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".fail").fadeIn(1500),l(e).find(".isa_error").fadeIn(1500),clearInterval(window.intervalDefine)),-2==l(this).html()&&l(e).find(".isa_warning").fadeIn(1500),99==l(this).html()&&(l(e).find(".isa_success").fadeIn(1500),clearInterval(window.intervalDefine))})})}function o(){var e={action:k("backup_status_reader"),job_id:s};l.post(ajaxurl,e,function(e){if(b)return clearInterval(window.intervalDefine),l(".status-icon").fadeOut(200),l("#backup-button").removeAttr("disabled"),l("#cancel-button").addClass("button-hidden").fadeOut(200),l("#backup-button").removeClass("button-hidden").fadeIn(200),l(".backup-cancelled").fadeIn(200),!1;l(e).each(function(){var e="."+l(this).attr("class"),a="."+l(this).attr("class")+"-icon";0==l(this).html()&&(l(e).find(".status").hide(),l(e).find(".status-icon").hide()),1==l(this).html()&&(l(a).css("visibility","visible"),l(e).find(".status").fadeOut(200),l(e).find(".status-icon").fadeIn(1500)),2==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".status").fadeIn(1500)),-1==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".fail").fadeIn(1500),clearInterval(window.intervalDefine),n()),-2==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".wpbackitup-warning").fadeIn(1500)),99==l(this).html()&&(l(e).find(".status-icon").fadeOut(200),l(e).find(".status").fadeIn(1500),clearInterval(window.intervalDefine),n())})})}l(".logs_backup").click(function(){var e=l(this).attr("href");return l("#backup_file").val(e),l("#download_logs").val(),l("#download_backup").submit(),!1}),l("#scheduled-backups-accordian").click(function(){scheduled_backups=l("#scheduled-backups"),scheduled_backups_button=l("#scheduled-backups-accordian"),l(this).is(".fa-angle-double-down")?(scheduled_backups.fadeIn("slow"),scheduled_backups_button.toggleClass("fa-angle-double-down",!1),scheduled_backups_button.toggleClass("fa-angle-double-up",!0)):(scheduled_backups_button.toggleClass("fa-angle-double-down",!0),scheduled_backups_button.toggleClass("fa-angle-double-up",!1),scheduled_backups.fadeOut("slow"))}),l("#upload-backups-accordian").click(function(){upload_backups=l("#wpbackitup-plupload-modal"),upload_backups_button=l("#upload-backups-accordian"),l(this).is(".fa-angle-double-down")?(upload_backups.fadeIn("slow"),upload_backups_button.toggleClass("fa-angle-double-down",!1),upload_backups_button.toggleClass("fa-angle-double-up",!0)):(upload_backups_button.toggleClass("fa-angle-double-down",!0),upload_backups_button.toggleClass("fa-angle-double-up",!1),upload_backups.fadeOut("slow"))}),l("#wpbackitup-zip").bind("change",function(){var e=this.files[0].size,a=l("#maxfilesize").val();"undefined"!=e&&"undefined"!=a&&""!=e&&""!=a&&a<e&&(alert(wpbackitup_local.upload_file_size_exceed),l("#wpbackitup-zip").val(""))}),l("#import-uploads").click(function(){setTimeout(function(){window.location.reload()},100)}),l(document.body).on("click",".thickbox",function(){if(!l(this).parents(".wpbiu-restore-item").length){var e=l(this).data("jobid");console.log(e),function(a,e){k("backup_zip_filelist");var t=e.replace(/[^A-Za-z0-9\-]/g,""),i=0,o="",n='<div id="'+t+'"> <h2>'+wpbackitup_local.bl_backup_set+" <em>"+e+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button><span id="wpbiu-note-response">'+wpbackitup_local.bl_note_saved_success+"</span></div> <p>"+wpbackitup_local.bl_backup_download+'</p> <table class="widefat" id="datatable"> <tbody>';l.ajax({url:ajaxurl,type:"POST",data:{action:k("backup_zip_filelist"),job_id:a},dataType:"json"}).done(function(e){e.data?(l.each(e.data,function(){var e=l(this)[0].name.split(/[\/]+/).pop(),a=l(this)[0].size,t=l(this)[0].file_exists;if(console.log(e,a),-1<e.indexOf("-backupset-"))o='<p><a class="downloadbackuplink" href="'+e+'"><i class="fas fa-cloud-download-alt fa-2x"></i> <strong>'+wpbackitup_local.bl_backup_download_single+"</strong></a> <br><em>"+wpbackitup_local.bl_please_note+a+wpbackitup_local.bl_may_timeout+"</em></p>";else{var s="";++i%2!=0&&(s="alternate"),n+='<tr class="'+s+'" id="row'+i+'">',n+=t?'<td><a class="downloadbackuplink" href="'+e+'">'+e+"</a></td>":"<td>"+e+"</td>",n+="<td>"+a+"</td> </tr>"}}),n+=o+"</tbody></table></div>",l("#TB_ajaxContent").html(n),r(),l.ajax({url:ajaxurl,type:"post",data:{action:k("backup_get_note"),job_id:a},success:function(e){l("#wpbiu-note-box").val(e.data)}}),l("#wpbiu-note-btn").click(function(){var e=l("#wpbiu-note-box").val();l.ajax({url:ajaxurl,type:"POST",data:{action:k("backup_add_note"),job_id:a,note:e},dataType:"json"}).success(function(e){l("#wpbiu-note-response").fadeIn()})}),l("#wpbiu-note-box").focus(function(){l("#wpbiu-note-response").hide()})):c(e,null,null)}).fail(function(e,a,t){c(e,a,t)})}(e,this.name)}}),l(document.body).on("click",".thickbox",function(){var a=l(this).data("jobid"),e=l(this).attr("name");if(l(this).parents(".wpbiu-restore-item").length){var t="<h2>"+wpbackitup_local.bl_backup_set+" <em>"+e+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-restore-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-restore-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button> <span id="wpbiu-restore-note-response">'+wpbackitup_local.bl_note_saved_success+"</span> </div>";l("#wpbiu-restore-note").html(t),l("#wpbiu-restore-note-response").hide(),l.ajax({url:ajaxurl,type:"post",data:{action:k("backup_get_note"),job_id:a},success:function(e){l("#wpbiu-restore-note-box").val(e.data)}}),l("#wpbiu-restore-note-btn").click(function(){var e=l("#wpbiu-restore-note-box").val();l.ajax({url:ajaxurl,type:"POST",data:{action:k("backup_add_note"),job_id:a,note:e},dataType:"json"}).success(function(e){l("#wpbiu-restore-note-response").fadeIn()})})}l("#wpbiu-restore-note-box").focus(function(){l("#wpbiu-restore-note-response").hide()})});var p=!1;function n(){l.ajax({url:ajaxurl,type:"POST",data:{action:k("backup_response_reader")},dataType:"json"}).always(function(e,a,t){if(console.log("Backup Response:"+JSON.stringify(e)),void 0!==e.backupStatus&&void 0!==e.backupMessage){if(console.log("JSON Backup Status:"+e.backupStatus),console.log("JSON Backup Message:"+e.backupMessage),p)return;switch(p=!0,e.backupStatus){case"success":if(console.log("JSON success response received."),l(".status-icon").fadeOut(200),l("#backup-button").removeAttr("disabled"),l("#cancel-button").addClass("button-hidden").fadeOut(200),l("#backup-button").removeClass("button-hidden").fadeIn(200),l(".isa_success").show,l(".backup-success").fadeIn(1500),function(e){void 0!==e&&(WPBNewBackupData=e,l("#nofiles")&&l("#nofiles").remove(),u(),r())}(e),void 0!==e.backupWarnings){var s=l(".backup-warning");e.backupWarnings.forEach(function(e){var a=e.warningMessage;s.append('<li class="isa_warning">'+wpbackitup_local.warning+": "+a+"</li>")}),s.fadeIn(1500)}break;case"error":console.log("JSON error response received.");var i=wpbackitup_local.unexpected_err;void 0!==e.backupMessage&&(i=e.backupMessage);var o=wpbackitup_local.error+": "+i,n=l(".backup-error");n.html(o),n.addClass("isa_error"),n.fadeIn(1500),l(".status-icon").fadeOut(200),l("#backup-button").removeAttr("disabled"),l("#cancel-button").addClass("button-hidden").fadeOut(200),l("#backup-button").removeClass("button-hidden").fadeIn(200);break;default:console.log("Unexpected JSON response status received.");i=wpbackitup_local.unexpected_err2;void 0!==e.backupMessage&&(i=e.backupMessage);o=wpbackitup_local.error+"(JS998) : "+i;(c=l(".backup-error")).html(o),c.addClass("isa_error"),c.fadeIn(1500),l(".status-icon").fadeOut(200),l("#backup-button").removeAttr("disabled"),l("#cancel-button").addClass("button-hidden").fadeOut(200),l("#backup-button").removeClass("button-hidden").fadeIn(200)}}else{var c;console.log("NON JSON response received."),console.log("Backup Response:"+t),o=wpbackitup_local.unexpected_err3+": ",o+="</br>"+wpbackitup_local.response+": "+JSON.stringify(e),o+="</br>"+wpbackitup_local.status+": "+a,o+="</br>"+wpbackitup_local.error+": "+JSON.stringify(t),l(".backup-status").hide(),(c=l(".backup-error")).html(o),c.addClass("isa_error"),c.show(),l(".status-icon").fadeOut(200)}})}l("#wp-backitup-notification-widget-close").click(function(){notification_bar=l("#wp-backitup-notification-widget"),notification_bar.fadeOut("slow"),l.ajax({url:ajaxurl,type:"POST",data:{action:k("delete_transient")},dataType:"json"}).always(function(e,a,t){!1!==e&&(notification_bar.removeClass(),notification_bar.addClass("notice"),notification_bar.addClass("notice-"+e.message_type),l("#wp-backitup-notification-widget-message p").html(e.message),notification_bar.hide().fadeIn("slow"))})}),l("#wp-backitup-notification-close").click(function(){notification_bar=l("#wp-backitup-notification-parent"),notification_bar.fadeOut("slow")}),l("#wp-backitup-save_schedule_form").submit(function(){var e=new FormData;e.append("action",k("update-schedule")),e.append("_wpnonce",l("#wp-backitup_nonce-update-schedule").val()),e.append("_wp_http_referer",l("[name='_wp_http_referer']").val());var a=[];return l.each(l("input[name='dow']:checked"),function(){a.push(l(this).val())}),e.append("days_selected",a),jQuery.ajax({url:ajaxurl,type:"POST",cache:!1,contentType:!1,processData:!1,dataType:"json",data:e,success:function(e,a,t){switch(response=e.message,console.log("Success:"+response),response){case"success":!function(e){notification_bar_message=l("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+e+"</p>"),notification_bar=l("#wp-backitup-notification-parent"),notification_bar.toggleClass("error",!1),notification_bar.toggleClass("updated",!0),notification_bar.show(),l("html, body").animate({scrollTop:0},"slow")}(wpbackitup_local.scheduled_saved);break;case"error":!function(e){notification_bar_message=l("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+e+"</p>"),notification_bar=l("#wp-backitup-notification-parent"),notification_bar.toggleClass("updated",!1),notification_bar.toggleClass("error",!0),notification_bar.show(),l("html, body").animate({scrollTop:0},"slow")}(wpbackitup_local.scheduled_not_saved)}},error:function(e,a,t){console.log("Error."+a+":"+t)},complete:function(e,a){console.log("Complete")}}),!1});var d=null;l(".backup-button").click(function(e){e.preventDefault(),b=!1,l("#backup-button").attr("disabled","disabled"),l("#backup-button").addClass("button-hidden"),l("#cancel-button").removeClass("button-hidden"),l("#cancel-button").removeAttr("disabled"),l("#cancel-button").fadeIn(200),(d=l.ajax({url:ajaxurl,type:"POST",data:{action:k("backup")},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),l(".backup-icon").css("visibility","visible"),l(".backup-icon").show(),l(".backup-success").hide(),l(".default-status").hide(),l(".backup-error").hide(),l(".backup-cancelled").hide(),l("ul.backup-status").children().children().hide(),l(".backup-errors").children().children().hide(),l(".backup-success").children().children().hide(),l(".backup-status").show(),p=!1,window.intervalDefine=setInterval(o,5e3)}})).always(function(e,a,t){console.log("Backup Button Click - Always"),console.log(e.message),void 0!==e.job_id?(s=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}),l(".get-backup-schedule-button").click(function(e){e.preventDefault();var a="get_backup_schedule",t=wpbackitup_local[a];d=l.ajax({url:ajaxurl,type:"POST",data:{action:"wp-backitup_"+a,security:t},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report.")}})}),l(".set-backup-schedule-button").click(function(e){e.preventDefault();var a="set_backup_schedule",t=wpbackitup_local[a];d=l.ajax({url:ajaxurl,type:"POST",data:{action:"wp-backitup_"+a,security:t,frequency:"daily",start_time:"16:30",days:"M",enabled:!0},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report.")}})});var b=!1;function _(a,t,s){if("200"!=a.status)return alert("Unknown server response status: "+a.code),console.log(a),f(t,s,999,a.response),!0;try{return response_json=jQuery.parseJSON(a.response),!!response_json.error&&(f(t,s,100,response_json.error),!0)}catch(e){return console.log("Unexpected JSON Error"+e),f(t,s,998,a.response),!0}}function f(e,a,t,s){a.status=plupload.FAILED,e.trigger("Error",{code:t,message:s,file:a}),l("#media-item-"+a.id).hide()}function k(e){return t+"_"+e}l(".cancel-button").click(function(e){e.preventDefault(),l("#cancel-button").attr("disabled","disabled"),null!=d&&(d.abort(),d=null),(d=l.ajax({url:ajaxurl,type:"POST",data:{action:k("cancel_backup"),job_id:s},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),l(".backup-icon").css("visibility","visible"),l(".backup-icon").show(),l(".backup-status").show(),p=!1,clearInterval(window.intervalDefine),window.intervalDefine=setInterval(o,5e3)}})).always(function(e,a,t){console.log("Cancel Button Click - Always"),console.log(e),void 0!==e.success&&1==e.success?console.log("Job Cancelled successfully"):console.log("Job was not cancelled successfully"),b=!0})}),l("#datatable").on("click","a.restoreRow",function(e){if(e.preventDefault(),confirm(wpbackitup_local.confirm_restore)){var a=this.title;this.id.replace("restoreRow","row");userid=l("input[name=user_id]").val(),l.ajax({url:ajaxurl,type:"post",data:{action:k("restore"),selected_file:a,user_id:userid},cache:!1,dataType:"json",beforeSend:function(){console.log("BeforeSend:Nothing to report."),l(".restore-icon").css("visibility","visible"),l(".default-status, .upload-status").hide(),l("ul.restore-status").children().children().hide(),l(".restore-errors").children().children().hide(),l(".restore-success").children().children().hide(),l(".restore-status, .restore-errors, .restore-success").show(),l(".preparing-icon").css("visibility","visible"),l(".preparing").find(".status-icon").fadeIn(1500),window.intervalDefine=setInterval(i,5e3)}}).always(function(e,a,t){void 0!==e.job_id?(s=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}}),l("#datatable").on("click","a.deleteRow",function(e){if(e.preventDefault(),confirm(wpbackitup_local.sure)){var a=this.title,t=l(this).data("id"),s=this.id.replace("deleteRow","row");l.ajax({url:ajaxurl,type:"post",data:{action:k("delete_file"),filed:a,post_id:t},success:function(e){0==e.search("deleted")?l("#"+s).remove():alert(wpbackitup_local.file_not_del)}})}})}(jQuery),function(t){"use strict";function s(e){return"wp-backitup_"+e}t(window).load(function(){if(document.querySelector("#wpbackitup-core-settings")){Vue.use(VueTabs);var a=new Vue({el:"#wpbackitup-core-settings",data:{loading:!1,updated:!1,emailsArray:[],errorMessages:{},backup_retained_number:3,logging:!1,single_file_db:!1,single_file_backupset:!1,rversion_compare:!1,remove_supporting_zip_files:!1,backup_plugins_filter:[],backup_themes_filter:[],backup_uploads_filter:[],backup_others_filter:[],dbFilterOptions:[],db_filters:[],allow_usage_tracking:!1,backup_dbtables_batch_size:1e4,backup_sql_merge_batch_size:1e4,backup_sql_batch_size:1e4,backup_plugins_batch_size:5e3,backup_themes_batch_size:5e3,backup_uploads_batch_size:500,backup_others_batch_size:500,backup_zip_max_size:524288e3,backup_max_timeout:120,delete_all:!1,safe_sync:!1,beta_updates:!1},computed:{dbFilterHasSearch:function(){return 0==this.dbFilterOptions.length},dbFilterPlaceholder:function(){return 0<this.dbFilterOptions.length?wpbackitup_local.settings_select_database_table_to_filter:wpbackitup_local.settings_no_database_table_to_filter}},methods:{handleEmailInput:function(e){},handleTagsInput:function(e){},setSettings:function(){var e={data:{notification_email:this.emailsArray.join(","),backup_retained_number:this.backup_retained_number,logging:this.logging,single_file_db:this.single_file_db,single_file_backupset:this.single_file_backupset,rversion_compare:this.rversion_compare,remove_supporting_zip_files:this.remove_supporting_zip_files,backup_plugins_filter:this.backup_plugins_filter.join(","),backup_themes_filter:this.backup_themes_filter.join(","),backup_uploads_filter:this.backup_uploads_filter.join(","),backup_others_filter:this.backup_others_filter.join(","),backup_dbtables_filter_list:this.db_filters.map(function(e){return e.value}).join(","),backup_dbtables_batch_size:this.backup_dbtables_batch_size,backup_sql_merge_batch_size:this.backup_sql_merge_batch_size,backup_sql_batch_size:this.backup_sql_batch_size,backup_plugins_batch_size:this.backup_plugins_batch_size,backup_themes_batch_size:this.backup_themes_batch_size,backup_uploads_batch_size:this.backup_uploads_batch_size,backup_others_batch_size:this.backup_others_batch_size,backup_zip_max_size:this.backup_zip_max_size,backup_max_timeout:this.backup_max_timeout,delete_all:this.delete_all,safe_sync:this.safe_sync,beta_updates:this.beta_updates,allow_usage_tracking:this.allow_usage_tracking}};console.log(e),function(e,a){return(a=a||{}).action=s(e),a.security=t("#wpbackitup-core-ajax-nonce").val(),t.ajax({url:ajaxurl,type:"POST",data:a,dataType:"json"})}("set_settings",e).then(function(e){e.success?(a.updated=!0,a.errorMessages={},swal(wpbackitup_local.settings_save_awesome,wpbackitup_local.settings_save_success_message,"success")):(a.errorMessages=e.data,swal(wpbackitup_local.settings_save_oops,wpbackitup_local.settings_save_error_message,"error"))})},getSettings:function(){this.loading=!0,function(e){return t.ajax({url:ajaxurl,type:"GET",data:{action:s(e)},dataType:"json"})}("get_settings").then(function(t){a.loading=!1,t.success&&(console.log(t),a.emailsArray=t.data.notification_email.split(",").filter(Boolean),a.backup_retained_number=t.data.backup_retained_number,a.logging="1"===t.data.logging,a.single_file_db="1"===t.data.single_file_db,a.rversion_compare="1"===t.data.rversion_compare,a.single_file_backupset="1"===t.data.single_file_backupset,a.remove_supporting_zip_files="1"===t.data.remove_supporting_zip_files,a.backup_plugins_filter=t.data.backup_plugins_filter.split(",").filter(Boolean),a.backup_themes_filter=t.data.backup_themes_filter.split(",").filter(Boolean),a.backup_uploads_filter=t.data.backup_uploads_filter.split(",").filter(Boolean),a.backup_others_filter=t.data.backup_others_filter.split(",").filter(Boolean),a.db_filters=t.data.backup_dbtables_filter_list.split(",").filter(Boolean).map(function(e){return{label:e,value:e}}),a.dbFilterOptions=Object.keys(t.data.backup_dbtables_filterable).map(function(e){var a=t.data.backup_dbtables_filterable[e];return{label:a,value:a}}),a.allow_usage_tracking=t.data.allow_usage_tracking,a.backup_dbtables_batch_size=t.data.backup_dbtables_batch_size,a.backup_sql_merge_batch_size=t.data.backup_sql_merge_batch_size,a.backup_sql_batch_size=t.data.backup_sql_batch_size,a.backup_plugins_batch_size=t.data.backup_plugins_batch_size,a.backup_themes_batch_size=t.data.backup_themes_batch_size,a.backup_uploads_batch_size=t.data.backup_uploads_batch_size,a.backup_others_batch_size=t.data.backup_others_batch_size,a.backup_zip_max_size=t.data.backup_zip_max_size,a.backup_max_timeout=t.data.backup_max_timeout,a.delete_all="1"===t.data.delete_all,a.safe_sync="1"===t.data.safe_sync,a.beta_updates="1"===t.data.beta_updates)})}},created:function(){this.getSettings()}})}})}(jQuery);
|
js/wp-backitup-components.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Vue.component("backup-row",{template:"#backup-row-template",props:{name:{type:String,
|
1 |
+
Vue.component("backup-row",{template:"#backup-row-template",props:{name:{type:String,default:""},type:{type:String},date:{type:String},duration:{type:String},status:{type:String},row:{type:Number},jobId:{type:String},zipExist:{type:Boolean}},data:function(){return{}},methods:{},computed:{klass:function(){return this.row%2==0?"alternate":""},backupParsedId:function(){return this.name.replace(/[^A-Za-z0-9\-]/g,"")},cloudVisible:function(){return"SUCCESS"===this.status.toUpperCase()},cstatus:function(){return this.$parent.cloudStatus[this.jobId]}}}),Vue.component("send-cloud",{template:"#send-to-cloud",props:{visible:{type:Boolean,default:!1},kloudStatus:{type:String}},data:function(){return{providers:[],DROPBOX:{},GDRIVE:{},AMAZONS3:{},jobId:this.$parent.jobId,row:this.$parent.row}},methods:{openModal:function(t){this.$refs[t].open()},closeModal:function(t){this.$refs[t].close()},getEnabledProviders:function(){AjaxGetSafe("get_enabled_providers").then(function(t){t.success&&(this.providers=t.data)}.bind(this))},saveIndProviders:function(t){for(var e=this.providers.length,s=0;s<e;s++)this.providers[s]===ENUM.DROPBOX&&!0===this.DROPBOX[t]?this.postJobIdToSafe(t,ENUM.DROPBOX):this.providers[s]===ENUM.GDRIVE&&!0===this.GDRIVE[t]?this.postJobIdToSafe(t,ENUM.GDRIVE):this.providers[s]===ENUM.AMAZONS3&&!0===this.AMAZONS3[t]&&this.postJobIdToSafe(t,ENUM.AMAZONS3);this.closeModal("modal"+t)},postJobIdToSafe:function(t,e){AjaxPostSafe("queue_job_sync",{job_id:t,provider:e}).then(function(t){t.success&&(this.kloudStatus=CLOUDSTATUS.UPLOADING)}.bind(this))}},mounted:function(){this.getEnabledProviders()}});var validators={email:new RegExp(/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/),text:new RegExp(/^[a-zA-Z]+$/),digits:new RegExp(/^[\d() \.\:\-\+#]+$/)};Vue.component("input-tags",{template:"#input-tags-template",props:{tags:{type:Array,default:[]},placeholder:{type:String,default:""},onChange:{type:Function},readOnly:{type:Boolean,default:!1},validate:{type:String,default:""}},data:function(){return{newTag:""}},methods:{focusNewTag:function(){this.readOnly||this.$el.querySelector(".new-tag").focus()},addNew:function(t){t&&-1===this.tags.indexOf(t)&&this.validateIfNeeded(t)&&(this.tags.push(t),this.tagChange()),this.newTag=""},validateIfNeeded:function(t){return""===this.validate||void 0===this.validate||(!(-1<Object.keys(validators).indexOf(this.validate))||validators[this.validate].test(t))},remove:function(t){this.tags.splice(t,1),this.tagChange()},removeLastTag:function(){this.newTag||(this.tags.pop(),this.tagChange())},tagChange:function(){this.onChange&&this.onChange(JSON.parse(JSON.stringify(this.tags)))}}});
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: wpbackitup, cssimmon, alaminopu, imranshuvo
|
|
3 |
Tags: backup, backups, back up, backup plugin, database backup, multisite backup, full backup, database, restore, migrate, clone, malware
|
4 |
Requires at least: 3.8.0
|
5 |
Requires PHP: 5.2.4
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.
|
8 |
Author URI: https://www.wpbackitup.com
|
9 |
Donate link: https://www.wpbackitup.com
|
10 |
License: GPLv2 or later
|
@@ -217,6 +217,11 @@ Our online documentation and full list of FAQs can be found at [support.wpbackit
|
|
217 |
|
218 |
|
219 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
220 |
= 1.35 =
|
221 |
*Release Date - May 14, 2019
|
222 |
|
3 |
Tags: backup, backups, back up, backup plugin, database backup, multisite backup, full backup, database, restore, migrate, clone, malware
|
4 |
Requires at least: 3.8.0
|
5 |
Requires PHP: 5.2.4
|
6 |
+
Tested up to: 5.3
|
7 |
+
Stable tag: 1.35.0
|
8 |
Author URI: https://www.wpbackitup.com
|
9 |
Donate link: https://www.wpbackitup.com
|
10 |
License: GPLv2 or later
|
217 |
|
218 |
|
219 |
== Changelog ==
|
220 |
+
= 1.36 =
|
221 |
+
*Release Date - November 19, 2019
|
222 |
+
|
223 |
+
* UPDATE : Updates to support WordPress 5.3
|
224 |
+
|
225 |
= 1.35 =
|
226 |
*Release Date - May 14, 2019
|
227 |
|
wp-backitup.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
|
7 |
* Author: WPBackItUp
|
8 |
* Author URI: https://www.wpbackitup.com
|
9 |
-
* Version: 1.
|
10 |
* Text Domain: wp-backitup
|
11 |
*
|
12 |
* License: GPL3
|
@@ -32,7 +32,7 @@ define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
|
|
32 |
define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
|
33 |
|
34 |
define( 'WPBACKITUP__MAJOR_VERSION', 1);
|
35 |
-
define( 'WPBACKITUP__MINOR_VERSION',
|
36 |
define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
|
37 |
define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
|
38 |
|
6 |
* Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
|
7 |
* Author: WPBackItUp
|
8 |
* Author URI: https://www.wpbackitup.com
|
9 |
+
* Version: 1.36
|
10 |
* Text Domain: wp-backitup
|
11 |
*
|
12 |
* License: GPL3
|
32 |
define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
|
33 |
|
34 |
define( 'WPBACKITUP__MAJOR_VERSION', 1);
|
35 |
+
define( 'WPBACKITUP__MINOR_VERSION', 36);
|
36 |
define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
|
37 |
define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
|
38 |
|