Migration, Backup, Staging – WPvivid - Version 0.9.2

Version Description

Fix display image path error.

Download this release

Release Info

Developer wpvivid
Plugin Icon 128x128 Migration, Backup, Staging – WPvivid
Version 0.9.2
Comparing to
See all releases

Code changes from version 0.9.1 to 0.9.2

admin/js/wpvivid-admin.js CHANGED
@@ -950,30 +950,30 @@ function wpvivid_handle_remote_storage_data(data){
950
  check_status = "checked";
951
  if (value.type === "ftp") {
952
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
953
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp.png");
954
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
955
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
956
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp.png");
957
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
958
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
959
  }
960
  else if (value.type === "sftp") {
961
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
962
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp.png");
963
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
964
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
965
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
966
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp.png");
967
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
968
  }
969
  else if (value.type === "amazonS3") {
970
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.s3Path);
971
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3.png");
972
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
973
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
974
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
975
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
976
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3.png");
977
  }
978
  }
979
  });
@@ -981,12 +981,12 @@ function wpvivid_handle_remote_storage_data(data){
981
  else{
982
  wpvivid_default_remote_storage = '';
983
  jQuery('#wpvivid_out_of_date_remote_path').html("There is no path for remote storage, please set it up first.");
984
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
985
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
986
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
987
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-ftp(gray).png");
988
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-sftp(gray).png");
989
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
990
  }
991
  if(index !== "remote_selected") {
992
  var storage_type = '';
@@ -1005,7 +1005,7 @@ function wpvivid_handle_remote_storage_data(data){
1005
  "<td>" + storage_type + "</td>" +
1006
  "<td class=\"row-title\"><label for=\"tablecell\">" + value.options.name + "</label></td>" +
1007
  "<td onclick=\"wpvivid_delete_remote_storage('" + index + "');\">" +
1008
- "<img src=\"" + wpvivid_plugurl + "/wpvivid/admin/partials/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1009
  "</td>" +
1010
  "</tr>");
1011
  var $remote_storage_table = jQuery('#wpvivid_remote_storage_list');
@@ -1051,39 +1051,39 @@ function wpvivid_retrieve_backup_list(){
1051
  wpvivid_post_request(ajax_data, function(data){
1052
  jQuery('#wpvivid_backuplist').html("");
1053
  var jsonarray = jQuery.parseJSON(data);
1054
- var amazon_s3_url = "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png";
1055
- var ftp_url = "/wpvivid/admin/partials/images/storage-ftp(gray).png";
1056
- var sftp_url = "/wpvivid/admin/partials/images/storage-sftp(gray).png";
1057
- var backup_lock_img = "/wpvivid/admin/partials/images/unlocked.png";
1058
  var backup_lock_status = "unlock";
1059
  if(jsonarray.result === "success") {
1060
  jQuery.each(jsonarray.data, function (index, value1) {
1061
- amazon_s3_url = "/wpvivid/admin/partials/images/storage-amazon-s3(gray).png";
1062
- ftp_url = "/wpvivid/admin/partials/images/storage-ftp(gray).png";
1063
- sftp_url = "/wpvivid/admin/partials/images/storage-sftp(gray).png";
1064
  if (typeof(value1.lock) == "undefined"){
1065
- backup_lock_img = "/wpvivid/admin/partials/images/unlocked.png";
1066
  backup_lock_status = "unlock";
1067
  }
1068
  else{
1069
  if(value1.lock === 0){
1070
- backup_lock_img = "/wpvivid/admin/partials/images/unlocked.png";
1071
  backup_lock_status = "unlock";
1072
  }
1073
  else{
1074
- backup_lock_img = "/wpvivid/admin/partials/images/locked.png";
1075
  backup_lock_status = "lock";
1076
  }
1077
  }
1078
  jQuery.each(value1.remote, function (index2, value2){
1079
  if(value2.type === "amazonS3"){
1080
- amazon_s3_url = "/wpvivid/admin/partials/images/storage-amazon-s3.png";
1081
  }
1082
  if(value2.type === "ftp"){
1083
- ftp_url = "/wpvivid/admin/partials/images/storage-ftp.png";
1084
  }
1085
  if(value2.type === "sftp"){
1086
- sftp_url = "/wpvivid/admin/partials/images/storage-sftp.png";
1087
  }
1088
  });
1089
  var $backuptr = jQuery("<tr>" +
@@ -1094,7 +1094,7 @@ function wpvivid_retrieve_backup_list(){
1094
  "<span title=\"Lock the backup, it won\'t be deleted automatically\">" +
1095
  "<img src=\""+wpvivid_plugurl+backup_lock_img+"\" name=\""+backup_lock_status+"\" onclick=\"wpvivid_set_backup_lock('"+index+"','"+backup_lock_status+"');\" style=\"vertical-align:middle; cursor:pointer;\"/>" +
1096
  "</span> | <span>Type: </span><span>"+value1.type+"</span></br>" +
1097
- "<span><span><a href=\"#\" onclick=\"wpvivid_initialize_log('"+index+"');\"><img src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/Log.png\" name=\""+backup_lock_status+"\" style=\"vertical-align:middle;cursor:pointer;\"/>Log</a></span>|<a href=\"#\" onclick=\"wpvivid_initialize_restore('"+index+"', '"+value1.create_time+"');\"><img src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/Restore.png\" style=\"vertical-align:middle;cursor:pointer;\"/>Restore</a></span>" +
1098
  "</td>" +
1099
  "<td style=\"min-width:300px;\">" +
1100
  "<div style=\"float:left;padding:10px 10px 10px 0px;\">" +
@@ -1106,14 +1106,14 @@ function wpvivid_retrieve_backup_list(){
1106
  "<td>" +
1107
  "<div id=\"wpvivid_file_part_"+index+"\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1108
  "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('"+index+"');\">" +
1109
- "<img id=\"wpvivid_download_btn_"+index+"\" src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1110
  "<div class=\"spinner\" id=\"wpvivid_download_loading_"+index+"\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1111
  "</div>" +
1112
  "</div>" +
1113
  "</td>" +
1114
  "<td>" +
1115
  "<div onclick=\"wpvivid_delete_selected_backup('"+index+"');\">" +
1116
- "<img src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1117
  "</div>" +
1118
  "</td>" +
1119
  "</tr>");
@@ -1481,13 +1481,13 @@ function wpvivid_interface_flow_control(){
1481
  if(j == 0){
1482
  if (jQuery(this).find("input[type=checkbox]").prop('checked')) {
1483
  if (jQuery(this).next().text() === "FTP"){
1484
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp.png");
1485
  }
1486
  else if(jQuery(this).next().text() === "SFTP"){
1487
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp.png");
1488
  }
1489
  else if(jQuery(this).next().text() === "Amazon S3"){
1490
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3.png");
1491
  }
1492
  }
1493
  }
@@ -1855,7 +1855,7 @@ function wpvivid_reset_backup_list(){
1855
  var backup_id = jQuery(this).parent().children('td').eq(0).find("input[type=checkbox]").attr("id");
1856
  var download_btn = "<div id=\"wpvivid_file_part_"+backup_id+"\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1857
  "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('"+backup_id+"');\">" +
1858
- "<img id=\"wpvivid_download_btn_"+backup_id+"\" src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1859
  "<div class=\"spinner\" id=\"wpvivid_download_loading_"+backup_id+"\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1860
  "</div>" +
1861
  "</div>";
@@ -2359,7 +2359,7 @@ function wpvivid_retrieve_log_list(){
2359
  "<td class=\"row-title\"><label for=\"tablecell\">"+log_time+"</label></td>" +
2360
  "<td>"+log_des+"</td>" +
2361
  "<td>"+value.file_name+"</td>" +
2362
- "<td><a onclick='wpvivid_view_log(\""+log_count+"\");' style=\"cursor:pointer;\" ><img src=\""+wpvivid_plugurl+"/wpvivid/admin/partials/images/Log.png\" style=\"vertical-align:middle;\">Log</a></td>" +
2363
  "<td id=\""+log_count+"\" style='display: none'>"+value.path+"</td>"
2364
  "</tr>";
2365
  var log_table = jQuery('#wpvivid_loglist');
@@ -2466,68 +2466,7 @@ function wpvivid_set_default_remote_storage(){
2466
  * Retrieve the default remote storage while backing up.
2467
  */
2468
  function wpvivid_retrieve_default_remote_storage(){
2469
- var ajax_data = {
2470
- 'action': 'wpvivid_get_default_remote_storage'
2471
- };
2472
- var find_storage = false;
2473
- wpvivid_post_request(ajax_data, function(data){
2474
- var jsonarray = jQuery.parseJSON(data);
2475
- if(jsonarray.result === "success") {
2476
- jQuery.each(jsonarray.remote_storage, function (index, value) {
2477
- jQuery('#wpvivid_remote_storage_list tr').each(function (i) {
2478
- jQuery(this).children('td').each(function (j) {
2479
- if (j === 1) {
2480
- if(jQuery(this).find("input[type=checkbox]").val() === value){
2481
- find_storage = true;
2482
- wpvivid_default_remote_storage = value;
2483
- if (jQuery(this).next().text() === "FTP"){
2484
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp.png");
2485
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2486
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2487
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp.png");
2488
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2489
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2490
- }
2491
- else if(jQuery(this).next().text() === "SFTP"){
2492
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp.png");
2493
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2494
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2495
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2496
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp.png");
2497
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2498
- }
2499
- else if(jQuery(this).next().text() === "Amazon S3"){
2500
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3.png");
2501
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2502
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2503
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2504
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2505
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3.png");
2506
- }
2507
- }
2508
- }
2509
- });
2510
- });
2511
- });
2512
- if(find_storage === false){
2513
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2514
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2515
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2516
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-ftp(gray).png");
2517
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-sftp(gray).png");
2518
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/wpvivid/admin/partials/images/storage-amazon-s3(gray).png");
2519
- }
2520
- }
2521
- else{
2522
- setTimeout(function () {
2523
- wpvivid_retrieve_default_remote_storage();
2524
- }, 3000);
2525
- }
2526
- }, function(XMLHttpRequest, textStatus, errorThrown) {
2527
- setTimeout(function () {
2528
- wpvivid_retrieve_default_remote_storage();
2529
- }, 3000);
2530
- });
2531
  }
2532
 
2533
  function wpvivid_pre_log_page(){
950
  check_status = "checked";
951
  if (value.type === "ftp") {
952
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
953
+ jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp.png");
954
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
955
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
956
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp.png");
957
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
958
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
959
  }
960
  else if (value.type === "sftp") {
961
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
962
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp.png");
963
+ jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
964
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
965
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
966
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp.png");
967
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
968
  }
969
  else if (value.type === "amazonS3") {
970
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.s3Path);
971
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3.png");
972
+ jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
973
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
974
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
975
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
976
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3.png");
977
  }
978
  }
979
  });
981
  else{
982
  wpvivid_default_remote_storage = '';
983
  jQuery('#wpvivid_out_of_date_remote_path').html("There is no path for remote storage, please set it up first.");
984
+ jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
985
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
986
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
987
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
988
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
989
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
990
  }
991
  if(index !== "remote_selected") {
992
  var storage_type = '';
1005
  "<td>" + storage_type + "</td>" +
1006
  "<td class=\"row-title\"><label for=\"tablecell\">" + value.options.name + "</label></td>" +
1007
  "<td onclick=\"wpvivid_delete_remote_storage('" + index + "');\">" +
1008
+ "<img src=\"" + wpvivid_plugurl + "/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1009
  "</td>" +
1010
  "</tr>");
1011
  var $remote_storage_table = jQuery('#wpvivid_remote_storage_list');
1051
  wpvivid_post_request(ajax_data, function(data){
1052
  jQuery('#wpvivid_backuplist').html("");
1053
  var jsonarray = jQuery.parseJSON(data);
1054
+ var amazon_s3_url = "/images/storage-amazon-s3(gray).png";
1055
+ var ftp_url = "/images/storage-ftp(gray).png";
1056
+ var sftp_url = "/images/storage-sftp(gray).png";
1057
+ var backup_lock_img = "/images/unlocked.png";
1058
  var backup_lock_status = "unlock";
1059
  if(jsonarray.result === "success") {
1060
  jQuery.each(jsonarray.data, function (index, value1) {
1061
+ amazon_s3_url = "/images/storage-amazon-s3(gray).png";
1062
+ ftp_url = "/images/storage-ftp(gray).png";
1063
+ sftp_url = "/images/storage-sftp(gray).png";
1064
  if (typeof(value1.lock) == "undefined"){
1065
+ backup_lock_img = "/images/unlocked.png";
1066
  backup_lock_status = "unlock";
1067
  }
1068
  else{
1069
  if(value1.lock === 0){
1070
+ backup_lock_img = "/images/unlocked.png";
1071
  backup_lock_status = "unlock";
1072
  }
1073
  else{
1074
+ backup_lock_img = "/images/locked.png";
1075
  backup_lock_status = "lock";
1076
  }
1077
  }
1078
  jQuery.each(value1.remote, function (index2, value2){
1079
  if(value2.type === "amazonS3"){
1080
+ amazon_s3_url = "/images/storage-amazon-s3.png";
1081
  }
1082
  if(value2.type === "ftp"){
1083
+ ftp_url = "/images/storage-ftp.png";
1084
  }
1085
  if(value2.type === "sftp"){
1086
+ sftp_url = "/images/storage-sftp.png";
1087
  }
1088
  });
1089
  var $backuptr = jQuery("<tr>" +
1094
  "<span title=\"Lock the backup, it won\'t be deleted automatically\">" +
1095
  "<img src=\""+wpvivid_plugurl+backup_lock_img+"\" name=\""+backup_lock_status+"\" onclick=\"wpvivid_set_backup_lock('"+index+"','"+backup_lock_status+"');\" style=\"vertical-align:middle; cursor:pointer;\"/>" +
1096
  "</span> | <span>Type: </span><span>"+value1.type+"</span></br>" +
1097
+ "<span><span><a href=\"#\" onclick=\"wpvivid_initialize_log('"+index+"');\"><img src=\""+wpvivid_plugurl+"/images/Log.png\" name=\""+backup_lock_status+"\" style=\"vertical-align:middle;cursor:pointer;\"/>Log</a></span>|<a href=\"#\" onclick=\"wpvivid_initialize_restore('"+index+"', '"+value1.create_time+"');\"><img src=\""+wpvivid_plugurl+"/images/Restore.png\" style=\"vertical-align:middle;cursor:pointer;\"/>Restore</a></span>" +
1098
  "</td>" +
1099
  "<td style=\"min-width:300px;\">" +
1100
  "<div style=\"float:left;padding:10px 10px 10px 0px;\">" +
1106
  "<td>" +
1107
  "<div id=\"wpvivid_file_part_"+index+"\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1108
  "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('"+index+"');\">" +
1109
+ "<img id=\"wpvivid_download_btn_"+index+"\" src=\""+wpvivid_plugurl+"/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1110
  "<div class=\"spinner\" id=\"wpvivid_download_loading_"+index+"\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1111
  "</div>" +
1112
  "</div>" +
1113
  "</td>" +
1114
  "<td>" +
1115
  "<div onclick=\"wpvivid_delete_selected_backup('"+index+"');\">" +
1116
+ "<img src=\""+wpvivid_plugurl+"/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1117
  "</div>" +
1118
  "</td>" +
1119
  "</tr>");
1481
  if(j == 0){
1482
  if (jQuery(this).find("input[type=checkbox]").prop('checked')) {
1483
  if (jQuery(this).next().text() === "FTP"){
1484
+ jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/images/storage-ftp.png");
1485
  }
1486
  else if(jQuery(this).next().text() === "SFTP"){
1487
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/images/storage-sftp.png");
1488
  }
1489
  else if(jQuery(this).next().text() === "Amazon S3"){
1490
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/images/storage-amazon-s3.png");
1491
  }
1492
  }
1493
  }
1855
  var backup_id = jQuery(this).parent().children('td').eq(0).find("input[type=checkbox]").attr("id");
1856
  var download_btn = "<div id=\"wpvivid_file_part_"+backup_id+"\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1857
  "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('"+backup_id+"');\">" +
1858
+ "<img id=\"wpvivid_download_btn_"+backup_id+"\" src=\""+wpvivid_plugurl+"/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1859
  "<div class=\"spinner\" id=\"wpvivid_download_loading_"+backup_id+"\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1860
  "</div>" +
1861
  "</div>";
2359
  "<td class=\"row-title\"><label for=\"tablecell\">"+log_time+"</label></td>" +
2360
  "<td>"+log_des+"</td>" +
2361
  "<td>"+value.file_name+"</td>" +
2362
+ "<td><a onclick='wpvivid_view_log(\""+log_count+"\");' style=\"cursor:pointer;\" ><img src=\""+wpvivid_plugurl+"/images/Log.png\" style=\"vertical-align:middle;\">Log</a></td>" +
2363
  "<td id=\""+log_count+"\" style='display: none'>"+value.path+"</td>"
2364
  "</tr>";
2365
  var log_table = jQuery('#wpvivid_loglist');
2466
  * Retrieve the default remote storage while backing up.
2467
  */
2468
  function wpvivid_retrieve_default_remote_storage(){
2469
+ wpvivid_retrieve_storage_list();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2470
  }
2471
 
2472
  function wpvivid_pre_log_page(){
admin/partials/wpvivid-admin-display.php CHANGED
@@ -1029,7 +1029,7 @@ $backup_task=$wpvivid_pulgin->_list_tasks(false);
1029
  <div class="meta-box-sortables">
1030
  <div class="postbox">
1031
  <h2><span><?php _e(
1032
- 'Current Version: 0.9.1', 'wpvivid'
1033
  ); ?></span></h2>
1034
  </div>
1035
  </div>
@@ -1115,9 +1115,7 @@ $backup_task=$wpvivid_pulgin->_list_tasks(false);
1115
  echo esc_url($wpvivid_siteurl['home_url']);
1116
  ?>';
1117
  var wpvivid_plugurl = '<?php
1118
- $wpvivid_siteurl = array();
1119
- $wpvivid_siteurl=WPvivid_Admin::wpvivid_get_siteurl();
1120
- echo esc_url($wpvivid_siteurl['plug_url']);
1121
  ?>';
1122
  var wpvivid_log_count = '<?php
1123
  _e(sizeof($loglist['log_list']['file']), 'wpvivid');
1029
  <div class="meta-box-sortables">
1030
  <div class="postbox">
1031
  <h2><span><?php _e(
1032
+ 'Current Version: 0.9.2', 'wpvivid'
1033
  ); ?></span></h2>
1034
  </div>
1035
  </div>
1115
  echo esc_url($wpvivid_siteurl['home_url']);
1116
  ?>';
1117
  var wpvivid_plugurl = '<?php
1118
+ echo plugins_url( '', __FILE__ );
 
 
1119
  ?>';
1120
  var wpvivid_log_count = '<?php
1121
  _e(sizeof($loglist['log_list']['file']), 'wpvivid');
includes/class-wpvivid.php CHANGED
@@ -47,7 +47,7 @@ class WPvivid {
47
  {
48
  $this->version = WPVIVID_PLUGIN_VERSION;
49
  } else {
50
- $this->version = '0.9.1';
51
  }
52
  $this->plugin_name = 'WPvivid';
53
 
@@ -3557,7 +3557,7 @@ class WPvivid {
3557
  {
3558
  $this->ajax_check_security('manage_options');
3559
 
3560
- if(isset( $_POST['data'])&&empty( $_POST['data'])&&is_string( $_POST['data']))
3561
  {
3562
  $data = $_POST['data'];
3563
  $data =stripslashes($data);
47
  {
48
  $this->version = WPVIVID_PLUGIN_VERSION;
49
  } else {
50
+ $this->version = '0.9.2';
51
  }
52
  $this->plugin_name = 'WPvivid';
53
 
3557
  {
3558
  $this->ajax_check_security('manage_options');
3559
 
3560
+ if(isset( $_POST['data'])&&!empty( $_POST['data'])&&is_string( $_POST['data']))
3561
  {
3562
  $data = $_POST['data'];
3563
  $data =stripslashes($data);
readme.txt CHANGED
Binary file
uninstall.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // If uninstall not called from WordPress, then exit.
4
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5
+ exit;
6
+ }
7
+
8
+ delete_option('wpvivid_schedule_setting');
9
+ delete_option('wpvivid_email_setting');
10
+ delete_option('wpvivid_compress_setting');
11
+ delete_option('wpvivid_local_setting');
12
+ delete_option('wpvivid_upload_setting');
13
+ delete_option('wpvivid_common_setting');
14
+ delete_option('wpvivid_backup_list');
15
+ delete_option('wpvivid_task_list');
16
+ delete_option('wpvivid_init');
17
+ delete_option('wpvivid_last_msg');
18
+ delete_option('wpvivid_download_cache');
19
+ delete_option('wpvivid_download_task');
20
+ delete_option('wpvivid_user_history');
21
+
22
+ define('WPVIVID_MAIN_SCHEDULE_EVENT','wpvivid_main_schedule_event');
23
+
24
+ if(wp_get_schedule(WPVIVID_MAIN_SCHEDULE_EVENT))
25
+ {
26
+ wp_clear_scheduled_hook(WPVIVID_MAIN_SCHEDULE_EVENT);
27
+ $timestamp = wp_next_scheduled(WPVIVID_MAIN_SCHEDULE_EVENT);
28
+ wp_unschedule_event($timestamp,WPVIVID_MAIN_SCHEDULE_EVENT);
29
+ }
wpvivid.php → wpvivid-backuprestore.php RENAMED
@@ -7,7 +7,7 @@
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid - Backup/Restore
9
  * Description: WPvivid is a backup plugin for Wordpress that provides stable backup and restore functionality yet simple interface and configuration to help everyone back up with minimal effort and cost.
10
- * Version: 0.9.1
11
  * Author: wpvivid.com
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
21
  die;
22
  }
23
 
24
- define( 'WPVIVID_PLUGIN_VERSION', '0.9.1' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid - Backup/Restore
9
  * Description: WPvivid is a backup plugin for Wordpress that provides stable backup and restore functionality yet simple interface and configuration to help everyone back up with minimal effort and cost.
10
+ * Version: 0.9.2
11
  * Author: wpvivid.com
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
21
  die;
22
  }
23
 
24
+ define( 'WPVIVID_PLUGIN_VERSION', '0.9.2' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');