WP Migrate DB - Version 0.7.2

Version Description

Download this release

Release Info

Developer bradt
Plugin Icon 128x128 WP Migrate DB
Version 0.7.2
Comparing to
See all releases

Code changes from version 0.7.1 to 0.7.2

asset/css/plugin-manager-styles.css DELETED
@@ -1 +0,0 @@
1
- .plugin-update-tr.wpmdbpro-custom-visible .update-message{padding-left:40px}.plugin-update-tr.wpmdbpro-custom-visible .update-message::before{margin-left:-30px}.plugin-update-tr.wpmdbpro-custom-visible .update-message span{display:inline-block}
 
asset/css/styles.css CHANGED
@@ -1 +1 @@
1
- #wpmdb-main{width:742px;position:relative;min-height:950px}#overlay{background-color:rgba(255,255,255,0.9)}.wpmdb h2 ~ .error,.wpmdb h2 ~ .notice,.wpmdb h2 ~ .updated{clear:both}.wpmdb div.updated.warning{max-width:742px;box-sizing:border-box;margin:10px 0}.wpmdb div.updated.warning p{font-size:13px;margin:0.5em 0}.wpmdb a{text-decoration:none}.wpmdb li{margin-bottom:5px;position:relative}.wpmdb ul{margin:0}.wpmdb input[type=checkbox],.wpmdb input[type=radio]{margin-right:5px;vertical-align:baseline;margin-top:0}.wpmdb input[type=text],.wpmdb input[type=password]{padding:5px}.wpmdb input[disabled=disabled]{cursor:default}.wpmdb label.disabled{color:#888;cursor:default}.wpmdb .option-section{border-bottom:1px solid #ccc;padding-bottom:20px;margin-bottom:20px}.wpmdb .option-section h3{font-size:18px;font-weight:normal}.wpmdb p.migrate-db{overflow:hidden}.wpmdb p.migrate-db input{float:left}.wpmdb p.migrate-db img{float:left;margin:3px 0 0 5px}.wpmdb p.migrate-db .save-settings-button{margin-left:10px;display:none}.wpmdb .indent-wrap{margin-left:24px}.wpmdb .expandable-content{display:none;margin-top:10px}.wpmdb .expandable-content li:last-child{margin-bottom:0px}.wpmdb .header-wrapper{margin-bottom:10px}.wpmdb .header-expand-collapse{cursor:pointer;display:inline-block}.wpmdb .option-description{font-size:12px;color:#999;margin-left:8px;font-weight:normal}.wpmdb .option-group li:last-child{margin-bottom:0}.wpmdb .connection-status{display:none;overflow:auto}.wpmdb .connection-status.error{color:#9D1818}.wpmdb .copy-licence-to-remote-site{display:inline-block}.wpmdb .ajax-spinner{left:6px;position:relative;top:3px}.wpmdb div.message{margin:15px 0 0}.wpmdb .licence-wrap h3{margin:0 0 10px 0}.wpmdb .licence-input{clear:both;display:block;font-family:Consolas, Monaco, monospace;font-size:14px;margin-bottom:7px;padding:10px;width:418px}.wpmdb .register-licence{float:left;outline:none}.wpmdb .licence-status{color:#A21B1B;font-weight:bold;clear:both;padding-top:0.5em;margin:0}.wpmdb .licence-status.success{color:#333}.wpmdb .register-licence-ajax-spinner{margin:4px 0 0 8px}.wpmdb .return-to-profile-selection{margin-bottom:15px;display:inline-block}.wpmdb .return-to-profile-selection.bottom{margin-top:10px}.wpmdb h2.nav-tab-wrapper{margin-top:10px;margin-bottom:20px;padding-left:5px}.wpmdb h2.nav-tab-wrapper a.nav-tab-active{color:#464646;cursor:default}.wpmdb label{display:inline-block;clear:both}.wpmdb .migration-profile-options li{position:relative;width:520px}.wpmdb .migration-profile-options li a{padding:5px 10px;width:500px;border:1px solid #ddd;margin:0px 0px 7px;display:block;font-size:14px;color:#333}.wpmdb .migration-profile-options li a:hover{border-color:#bbb}.wpmdb .main-list-delete-profile-link{color:#999999;font-family:"Times New Roman", serif;font-size:26px;font-weight:200;position:absolute;right:7px;top:6px;cursor:pointer}.wpmdb .main-list-delete-profile-link:hover{color:#444}.wpmdb .crumbs{overflow:hidden;border-bottom:1px solid #ccc;padding:12px 0}.wpmdb .crumbs .crumb{position:relative;display:block;float:left;margin-right:4px;padding-right:3px;font-size:13px;font-weight:bold}.wpmdb .crumbs span.crumb{padding-left:25px}.wpmdb .crumbs span.crumb:before{content:"\f345";position:absolute;left:0;top:0;display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:middle}.wpmdb .option-group li{margin-bottom:5px}.wpmdb .option-group>li{margin-bottom:8px}.wpmdb .option-group li>label{font-size:14px;font-weight:bold}.wpmdb .option-group ul{display:none;margin:10px 0px 10px 25px}.wpmdb .option-group ul label{font-size:12px;font-weight:normal}.wpmdb .option-heading,.wpmdb .checkbox-label{font-size:14px;font-weight:bold}.wpmdb .checkbox-label input[type=checkbox]{margin-right:7px;position:relative;top:-1px}.wpmdb .expand-collapse-arrow{margin-right:9px}.wpmdb .migrate-selection{padding-top:20px}.wpmdb .migrate-connection-info{min-width:675px;margin:0}.wpmdb .migrate-tab .pull-push-connection-info{width:418px;height:65px;color:#333;font-family:Consolas, Monaco, monospace;font-size:15px;line-height:21px;padding:10px}.wpmdb .basic-access-auth-wrapper{display:none;margin-bottom:5px}.wpmdb .auth-username,.wpmdb .auth-password{width:206px;margin-top:3px}.wpmdb .auth-password{width:207px}.wpmdb .connection-info-wrapper{display:none;width:670px}.wpmdb .connect-button{margin-top:2px}.wpmdb .temp-disabled{background-color:#EEEEEE;color:#888888;font-family:Consolas, Monaco, monospace;text-shadow:0 1px 0 #FFFFFF}.wpmdb .push-list ul{margin-bottom:0px}.wpmdb .find-heading,.wpmdb .replace-heading{float:left}.wpmdb .find-heading{width:400px}.wpmdb .replace-fields{border-collapse:collapse;border-spacing:0px}.wpmdb .replace-fields input{width:295px}.wpmdb .replace-fields tr td{padding-bottom:7px}.wpmdb .replace-fields tr:last-child td{padding-bottom:0px}.wpmdb .arrow-col{width:93px;text-align:center;vertical-align:middle}.wpmdb .right-arrow{font-size:36px;color:#aaa;font-family:arial, sans-serif}.wpmdb .replace-right-col span{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:16px;height:16px;display:inline-block;position:relative;top:4px;cursor:pointer}.wpmdb .replace-right-col span:hover{border-color:#aaa}.wpmdb .pin .sort-handle-col{opacity:0.5;cursor:default}.wpmdb .pin .sort-handle{cursor:default !important}.wpmdb .sort-handle-col{width:20px;cursor:-webkit-grab;cursor:-moz-grab}.wpmdb .sort-handle:before{content:"\f214";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1 'dashicons';vertical-align:top;color:#aaa;background-color:transparent !important;margin-right:4px}.wpmdb .original-repeatable-field{display:none}.wpmdb .no-replaces-message{display:none;margin-bottom:0px}.wpmdb .inline-message.missing-replace{margin-top:15px;display:none}.wpmdb #new-path-missing-warning{margin-top:5px}.wpmdb .tables-header{display:inline-block}.wpmdb .expand-collapse-arrow{display:inline-block;position:relative;top:-2px;font-size:11px}.wpmdb .collapsed{-webkit-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);-ms-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg)}.wpmdb .select-deselect-divider{margin:0 6px}.wpmdb .select-wrap{display:none;margin-top:12px}.wpmdb .select-post-types-wrap{display:block}.wpmdb .multiselect{min-width:420px;min-height:180px;margin-bottom:10px}.wpmdb .table-migrate-options li label{font-size:12px;font-weight:normal}.wpmdb .table-migrate-options li{margin-bottom:5px}.wpmdb .general-helper{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:15px;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.wpmdb .general-helper:hover{border-color:#aaa}.wpmdb .general-helper:after{content:"?";color:#999999;font-size:10px;font-weight:bold;left:4px;position:absolute;top:-1px}.wpmdb .helper-message{padding:10px;border:1px solid #ccc;border-radius:3px;background-color:#fff;position:absolute;width:500px;z-index:9999;display:none;box-shadow:0px 0px 5px rgba(0,0,0,0.2)}.wpmdb .inline-message{padding:10px;border-radius:3px;margin-top:5px}.wpmdb .inline-message.error{border:1px solid #CC0000;background-color:#FFEBE8}.wpmdb .inline-message.warning{background-color:#FFFFE0;border:1px solid #E6DB55}.wpmdb .helper-message:before{content:'';border-bottom:8px solid transparent;border-right:8px solid #aaa;border-top:8px solid transparent;display:block;height:0;left:-8px;position:absolute;top:11px;width:0}.wpmdb .helper-message:after{content:'';border-bottom:8px solid transparent;border-right:8px solid #fff;border-top:8px solid transparent;display:block;height:0;left:-7px;position:absolute;top:11px;width:0}.wpmdb .helper-message.bottom:before{content:'';border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #aaa;border-top:0;display:block;height:0;left:50%;margin-left:-8px;position:absolute;top:-9px;width:0}.wpmdb .helper-message.bottom:after{content:'';border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #fff;border-top:0;display:block;height:0;left:50%;margin-left:-8px;position:absolute;top:-8px;width:0}.wpmdb .label-disabled{color:#888}.wpmdb .prefix-notice,.wpmdb .ssl-notice,.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice{background-color:#FFFFE0;border:1px solid #E6DB55;padding:15px;border-radius:3px;margin-bottom:15px;display:none}.wpmdb .prefix-notice p,.wpmdb .ssl-notice p,.wpmdb .different-plugin-version-notice p,.wpmdb .directory-permission-notice p{margin-top:0px}.wpmdb .prefix-notice p:last-child,.wpmdb .ssl-notice p:last-child,.wpmdb .different-plugin-version-notice p:last-child,.wpmdb .directory-permission-notice p:last-child{margin:0px}.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice{background-color:#FFEBE8;border-color:#CC0000}.wpmdb .different-plugin-version-notice a,.wpmdb .directory-permission-notice a{color:#CC0000;text-decoration:underline}.wpmdb .mixed-case-table-name-notice{display:none}.wpmdb .save-migration-profile-wrap li label{font-size:12px;font-weight:normal}.wpmdb .save-migration-profile-wrap li{margin-bottom:5px;padding-left:25px}.wpmdb .save-migration-profile-wrap .indent-wrap{margin-left:0px}.wpmdb .create-new-label{margin-right:8px}.wpmdb .create-new-profile{position:absolute;top:-5px}.wpmdb .replace-remove-row,.wpmdb .delete-profile{background-color:#eee;border:1px solid #ccc;border-radius:50% 50% 50% 50%;cursor:pointer;height:11px;left:5px;margin-left:2px;position:absolute;margin-top:-6px;top:50%;width:11px;display:block;background-position:50% 50%;background-size:6px 6px;background-repeat:no-repeat}.wpmdb .replace-remove-row:after,.wpmdb .delete-profile:after{content:"\00d7";left:2px;position:absolute;top:-3px;color:#aaa;font-size:12px}.wpmdb .replace-remove-row:after{position:relative}.wpmdb .replace-remove-row:hover,.wpmdb .delete-profile:hover{border-color:#aaa}.wpmdb .migrate-db .ajax-success-msg{font-weight:bold;margin:3px 0 0 9px;display:inline-block}.wpmdb p img.save-profile-ajax-spinner{margin-left:10px}.wpmdb .backup-description{left:20px;position:relative}.wpmdb .backup-option-disabled{margin-bottom:0px !important}.wpmdb .settings-tab{display:none}.wpmdb .settings-tab .slider{max-width:416px}.wpmdb .settings-tab .slider-label{display:block;margin-bottom:10px;float:left;width:50%}.wpmdb .settings-tab .slider-label-wrapper{max-width:416px;width:100%;position:relative}.wpmdb .settings-tab .amount{width:50%;text-align:right;display:block;text-align:right;float:left}.wpmdb .settings-tab .slider-spinner{position:absolute;right:-35px;bottom:-13px}.wpmdb .settings-tab .slider-success-msg{display:none;right:-53px;bottom:-13px;position:absolute;font-weight:bold}.wpmdb .settings-tab .ui-slider{border:1px solid #dfdfdf;height:10px;border-radius:2px;position:relative}.wpmdb .settings-tab .ui-slider-handle{width:7px;height:20px;background-color:#aaa;display:block;position:absolute;top:-5px;outline:none}.wpmdb .settings-tab .ui-slider-handle:active{background-color:#999}.wpmdb .settings-tab .ui-slider-range{background-color:#eee;height:100%}.wpmdb .settings-tab .option-section label{font-weight:normal;position:relative}.wpmdb .settings-tab .option-section li{margin-bottom:5px}.wpmdb .settings-tab .option-section li:last-child{margin-bottom:0px}.wpmdb .settings-tab .option-section.allow-remote-requests-wrap .ajax-spinner,.wpmdb .settings-tab .option-section.plugin-compatibility-section .ajax-spinner{right:-23px;left:inherit;top:0px;position:absolute}.wpmdb .settings-tab .option-section .ajax-success-msg{right:-42px;left:inherit;top:0px;position:absolute;font-weight:bold}.wpmdb .settings-tab .option-section .bubble .ajax-spinner{right:-45px}.wpmdb .settings-tab .option-section .bubble .ajax-success-msg{right:-65px}.wpmdb .allow-remote-reqeusts{font-size:14px;font-weight:bold}.wpmdb .connection-info-label{margin-top:15px;margin-bottom:5px;display:block}.wpmdb .connection-info{clear:both;font-size:15px;line-height:21px;font-family:Consolas, Monaco, monospace;padding:10px 10px;height:67px;text-shadow:0px 1px 0px #fff;display:block;margin-bottom:7px;width:418px}.wpmdb .reset-button-wrap{width:418px}.wpmdb .reset-api-key{float:left}.wpmdb .reset-api-key-ajax-spinner{float:left;margin:4px 7px}.wpmdb .masked-licence{margin-top:0px}.wpmdb .bull{font-size:22px;position:relative;top:4px}.wpmdb .plugin-compatibility-wrap{padding:18px 18px 18px 24px;background-color:#e6e6e6;margin-left:0}.wpmdb .plugin-compatibility-wrap p:last-of-type{margin-bottom:0}.wpmdb ul.plugin-compatibility-options{display:block;margin:10px 0 10px 0px}.wpmdb .plugin-compatibility-spinner{position:relative;top:3px;left:10px}.wpmdb .plugin-compatibility-success-msg{position:relative;left:10px;font-weight:bold;display:none}.wpmdb .help-tab{display:none}.wpmdb .help-tab h3{font-size:18px;font-weight:normal}.wpmdb .help-tab .support{border-bottom:1px solid #ccc;margin-bottom:25px;padding-bottom:18px}.wpmdb .help-tab .support p{width:640px}.wpmdb .help-tab .support .email a{font-size:12px}.wpmdb .help-tab .support .upgrade-to-pro{font-size:16px;font-weight:bold}.wpmdb .help-tab .support .upgrade-to-pro a{white-space:nowrap}.wpmdb .help-tab .support .ajax-spinner{top:2px}.wpmdb .help-tab .video-viewer{margin-bottom:30px;border:1px solid #ccc}.wpmdb .help-tab .videos{width:640px}.wpmdb .help-tab .videos ul>li{margin-bottom:30px;overflow:hidden;position:relative}.wpmdb .help-tab .videos ul>li a{overflow:hidden;display:block;width:320px;height:180px;float:left;margin-right:15px;position:relative;z-index:1;border:1px solid #ccc}.wpmdb .help-tab .videos ul>li a:before,.wpmdb .help-tab .videos ul>li a:after{position:absolute;content:" ";margin:auto;left:0;right:0;top:0;bottom:0}.wpmdb .help-tab .videos ul>li a:before{width:64px;height:64px;border-radius:64px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;border:1px solid #ddd;background-color:#fff;z-index:2}.wpmdb .help-tab .videos ul>li a:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;border:21.33333px solid transparent;border-top-width:12.8px;border-bottom-width:12.8px;border-left-color:#333;background:transparent;display:block;left:25px;width:0px;height:0px;z-index:3}.wpmdb .help-tab .videos .video:last-child{margin-bottom:0px}.wpmdb .help-tab .videos img{width:320px;height:240px;position:relative;top:50%;margin-top:-120px}.wpmdb .help-tab .debug{width:640px;border-bottom:1px solid #CCCCCC;margin-bottom:25px;padding-bottom:28px}.wpmdb .help-tab .debug textarea{width:100%;min-height:200px;font-family:Consolas, Monaco, monospace;margin-bottom:5px}.wpmdb .help-tab h4{margin:0 0 0.2em 0}.wpmdb .help-tab p{margin:0 0 0.5em 0}.wpmdb .help-tab iframe{display:none}.wpmdb .addons-tab{display:none}.wpmdb .addons-tab .addon{position:relative;width:100%;min-height:138px;padding:25px 30px 30px 165px;box-sizing:border-box;color:#fff;margin-bottom:15px}.wpmdb .addons-tab .addon .actions{float:right;font-size:14px}.wpmdb .addons-tab .addon .actions>*{margin-right:10px}.wpmdb .addons-tab .addon .actions *:last-child{margin-right:0}.wpmdb .addons-tab .addon .actions .action{background-color:#fff;font-weight:bold;display:inline-block;padding:0.2em 0.4em}.wpmdb .addons-tab .addon .actions .action:hover{background-color:rgba(255,255,255,0.92)}.wpmdb .addons-tab .addon .actions .status{border-bottom:2px solid #fff;padding-bottom:0.1em}.wpmdb .addons-tab .addon h1{font-family:"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;font-weight:normal;float:left;margin:0;margin-top:5px}.wpmdb .addons-tab .addon p{font-size:16px;line-height:1.2em;clear:both;padding-top:15px;margin:0}.wpmdb .addons-tab .addon p a{text-decoration:underline;color:#fff}.wpmdb .addons-tab .addon p a:hover{color:rgba(255,255,255,0.9)}.wpmdb .addons-tab .addon.wp-migrate-db-pro-media-files{background:#3fab3f url(../img/icon-media-files.svg) no-repeat 30px 30px;background-size:110px 85px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-media-files .action{color:#3fab3f}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli{background:#272822 url(../img/icon-cli.svg) no-repeat 30px 30px;background-size:110px 97px;min-height:157px;color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .action{color:#272822;background-color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .action:hover{color:#272822;background-color:#eee}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .status{border-bottom-color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli p a{color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli p a:hover{color:#f7f7f7}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli code{white-space:nowrap;margin:0;padding:0}.wpmdb .addons-tab .addon.wp-migrate-db-pro-multisite-tools{background:#a90000 url(../img/icon-multisite-tools.svg) no-repeat 30px 20px;background-size:110px 118px;min-height:157px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-multisite-tools .action{color:#a90000}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1}.general-spinner{width:16px;height:16px}.migration-error{color:#A21B1B;display:block;max-height:400px;max-width:100%;overflow:auto;word-wrap:break-word}.migration-php-errors{display:none;margin:20px 0;overflow-y:scroll;height:180px}.progress-content{display:none;position:relative;margin:0 auto;background-color:#fff;padding:50px;box-shadow:0 0 10px #ccc;cursor:default;width:80%;z-index:99999;position:fixed;left:50%;margin-left:-40%;box-sizing:border-box;max-height:100%;overflow-y:auto}.progress-content .progress-bar{height:10px;background-color:#8cc1e9;margin-bottom:5px;background-image:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #72a7cf), color-stop(100%, #8cc1e9));background-image:-webkit-linear-gradient(bottom, #72a7cf,#8cc1e9);background-image:-webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:linear-gradient(bottom, #72a7cf,#8cc1e9)}.progress-content .progress-title{font-size:18px;font-family:"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;font-weight:normal;float:left}.progress-content .progress-bar{width:0%}.progress-content .progress-info-wrapper{margin-bottom:10px}.progress-content .progress-text{clear:left;float:left;width:100%}.progress-content .timer{float:right}.progress-content .progress-tables{overflow:hidden;margin-bottom:2px;padding:0 0 20px 0}.progress-content .progress-bar-wrapper{position:relative}.progress-content .progress-bar-wrapper:before{content:'';display:block;height:5px;width:1px;background-color:#ccc;position:absolute;top:15px;left:0px}.progress-content .progress-tables-hover-boxes{position:absolute;top:0px;left:0px;display:block;width:100%}.progress-content .progress-chunk-hover{display:block;float:left;height:35px;position:relative;top:-5px;z-index:1}.progress-content .progress-chunk{box-sizing:border-box;float:left;display:block;height:6px;border-right:1px solid #ccc;border-bottom:1px solid #ccc;color:#999;position:relative;text-align:center}.progress-content .progress-chunk>span{padding:0px 3px;white-space:nowrap;text-overflow:ellipsis;margin-top:10px;display:inline-block}.progress-content .progress-label{padding:5px 10px;border:1px solid #ccc;border-radius:3px;background-color:#fff;font-family:Consolas, Monaco, monospace;font-size:12px;display:inline-block;top:-35px;position:absolute;opacity:0;-webkit-transition:opacity 200ms ease-in-out;transition:opacity 200ms ease-in-out}.progress-content .label-visible{opacity:1}.progress-content .progress-label:before{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ccc;display:block;position:absolute;bottom:-5px;left:50%;margin-left:-2px}.progress-content .progress-label:after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #fff;display:block;position:absolute;bottom:-4px;left:50%;margin-left:-2px}.progress-content .migration-progress-ajax-spinner{left:7px;position:relative;top:15px}.progress-content .close-progress-content{color:#999999;cursor:pointer;font-family:"Times New Roman",serif;font-size:26px;font-weight:200;position:absolute;right:20px;top:20px;padding:5px;display:none}.progress-content .close-progress-content:hover{color:#666;border-color:#aaa}.progress-content .migration-controls{display:block;margin-top:45px;overflow:hidden}.progress-content .migration-controls span{float:left;text-align:center;display:block}.progress-content .migration-controls span:first-child{margin-right:10px;width:71px}.progress-content .pro-version{margin-top:45px;padding-top:40px;position:relative;border-top:1px solid #ccc}.progress-content .pro-version iframe{position:absolute;top:40px;right:0;display:block}.progress-content .pro-version-content{padding-right:460px;min-height:255px}.progress-content .pro-version-content h1{line-height:1em;margin-top:0;font-size:20px}.progress-content .pro-version-content ul{margin-left:24px}.progress-content .pro-version-content li{position:relative;font-size:14px;line-height:1.4em;margin-bottom:15px;max-width:580px}.progress-content .pro-version-content li:before{content:"\f147";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 30px/1 'dashicons';position:absolute;top:-3px;left:-32px;vertical-align:top;font-family:'dashicons'}.progress-content .pro-version-content .pro-quote{margin:0 0 20px 0;max-width:570px}.progress-content .pro-version-content .pro-quote .dashicons-star-filled{font-size:16px;width:16px;height:16px;position:relative;top:2px}.progress-content .pro-version-content .pro-quote-author{font-style:italic;white-space:nowrap}@media screen and (max-width: 1096px){.progress-content .pro-version iframe{position:relative;top:auto;right:auto}.progress-content .pro-version-content{min-height:0;padding:0 0 20px 0}}.wpmdb-not-pro .wpmdb .wpmdb-main{margin-top:15px}.wpmdb-not-pro .wpmdb .migrate-selection ul{margin:0px}.wpmdb-not-pro .wpmdb .help-tab .support p{width:auto}#wpmdb-sidebar{position:absolute;top:-21px;right:-312px;width:292px}#wpmdb-sidebar .block{padding:20px;border:1px solid #ccc}#wpmdb-sidebar .subscribe{border-top:none}#wpmdb-sidebar .subscribe h2{padding:0;margin:0;margin-bottom:0.5em;color:#666;font-size:20px;line-height:1.2em;float:none}#wpmdb-sidebar .subscribe h3{font-size:16px;margin:0}#wpmdb-sidebar .subscribe p{margin:0}#wpmdb-sidebar .subscribe p.interesting{margin-bottom:1em;line-height:1.4}#wpmdb-sidebar .subscribe .links{margin-bottom:2em}#wpmdb-sidebar .subscribe .links a{text-decoration:none}#wpmdb-sidebar .subscribe .promise{color:#999;font-size:12px;line-height:1.4em}#wpmdb-sidebar .subscribe .field{margin-bottom:0.5em}#wpmdb-sidebar .subscribe .field p{margin-bottom:0.3em}#wpmdb-sidebar .subscribe .field.submit-button{margin-bottom:1em}#wpmdb-sidebar .testimonial{border-top:none}#wpmdb-sidebar .testimonial p{margin:0}#wpmdb-sidebar .testimonial .quote{font-size:20px}#wpmdb-sidebar .testimonial .author{white-space:nowrap;text-align:right}#wpmdb-sidebar .testimonial .stars{white-space:nowrap;margin-bottom:5px}#wpmdb-sidebar .testimonial .via{text-align:right;font-size:12px}#wpmdb-sidebar .testimonial .via a{color:#666}#wpmdb-sidebar .testimonial .via a:before{content:"\f301";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:top;margin-right:3px}@media (min--moz-device-pixel-ratio: 1.3), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx){#wpmdb-sidebar .wpmdb-banner{background-image:url(../img/wp-migrate-db-pro@2x.jpg);background-size:292px 292px;width:292px;height:292px;display:block}#wpmdb-sidebar .wpmdb-banner img{display:none}}@media screen and (max-width: 1252px){#wpmdb-sidebar{position:relative;top:auto;right:auto;margin-top:50px}}body.mp6 input[type=checkbox]:disabled{opacity:1;border-color:#ccc}body.mp6 #wpmdb-main{font-size:14px}body.mp6 p{font-size:14px}body.mp6 .wrap h2{float:left}body.mp6 .wpmdb .content-tab{padding-top:20px}body.mp6 .wpmdb .migrate-tab{padding-top:0}body.mp6 .wpmdb input[type=checkbox],body.mp6 .wpmdb input[type=radio]{vertical-align:middle;margin-top:-4px}body.mp6 .wpmdb input[type=text],body.mp6 .wpmdb input[type=password]{padding:3px 5px}body.mp6 .wpmdb input.code{padding-top:6px}body.mp6 .wpmdb label{font-size:14px}body.mp6 .wpmdb h2.nav-tab-wrapper{float:none;margin-bottom:0;width:722px}body.mp6 .wpmdb .help-tab h3{margin-top:0}body.mp6 .wpmdb .temp-disabled{background-color:#f9f9f9}body.mp6 .wpmdb .migration-profile-options li a{border-color:#ccc;color:#555;background-color:#e4e4e4}body.mp6 .wpmdb .migration-profile-options li a:hover{background-color:#fff;color:#464646}body.mp6 .wpmdb .settings-tab .slider-label span{vertical-align:middle}body.mp6 .wpmdb .settings-tab .slider-label-wrapper{font-size:14px}body.mp6 .wpmdb .settings-tab .ui-slider{border-color:#ccc;background-color:#fff}body.mp6 .wpmdb .settings-tab .ui-slider-range{background-color:#d8fcd1}body.mp6 .wpmdb .settings-tab .option-section li label{font-size:14px}body.mp6 .wpmdb .connection-info,body.mp6 .wpmdb .migrate-tab .pull-push-connection-info{font-weight:bold;font-size:14px}body.mp6 .wpmdb .general-helper{border:0;width:auto;height:auto;top:auto;margin:0}body.mp6 .wpmdb .general-helper:after{content:"\f223";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 'dashicons';vertical-align:top;top:auto;left:auto;position:relative}body.mp6 .wpmdb .helper-message{font-size:14px;line-height:1.4em}body.mp6 .wpmdb .right-arrow{display:none}body.mp6 .wpmdb .arrow-col{width:75px}body.mp6 .wpmdb .arrow-col:after{content:"\f344";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 'dashicons';vertical-align:top;color:#999}body.mp6 .wpmdb .arrow-col:hover{cursor:pointer}body.mp6 .wpmdb .arrow-col:hover:after{color:#666}body.mp6 .wpmdb .find-heading{width:409px}body.mp6 .wpmdb .replace-fields input{width:304px}body.mp6 .wpmdb .replace-right-col span{border-color:#999}body.mp6 .wpmdb .replace-right-col span:hover{border-color:#666}body.mp6 .wpmdb .replace-add-row:after,body.mp6 .wpmdb .replace-add-row:before{background-color:#999}body.mp6 .wpmdb .replace-add-row:hover:after,body.mp6 .wpmdb .replace-add-row:hover:before{background-color:#666}body.mp6 .wpmdb .option-group.migrate-selection>li>label{font-size:16px}body.mp6 .wpmdb .saved-migration-profile-label{font-size:16px}body.mp6 .wpmdb .option-heading,body.mp6 .wpmdb .checkbox-label{font-size:16px}body.mp6 .wpmdb .checkbox-label input[type=checkbox]{top:auto}body.mp6 .wpmdb .return-to-profile-selection{font-size:14px}body.mp6 .wpmdb .option-description{font-size:13px}body.mp6 .wpmdb .save-migration-profile-wrap li{position:relative}body.mp6 .wpmdb .replace-remove-row,body.mp6 .wpmdb .delete-profile{border:0;border-radius:0;height:auto;width:auto;left:0;top:50%;margin-left:0}body.mp6 .wpmdb .replace-remove-row:after,body.mp6 .wpmdb .delete-profile:after{content:"\f153";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:middle;color:#999}body.mp6 .wpmdb .replace-remove-row:hover:after,body.mp6 .wpmdb .delete-profile:hover:after{color:#666}body.mp6 .wpmdb .delete-profile:after{color:#ccc}body.mp6 .wpmdb .delete-profile:hover:after{color:#aaa}body.mp6 .wpmdb .addons-tab .addon h1{font-family:'Open Sans', sans-serif;font-weight:200;font-size:24px;margin-top:2px}body.mp6 .wpmdb .addons-tab .addon.wp-migrate-db-pro-cli h1{margin-top:5px}body.mp6 .wpmdb .addons-tab .addon p{font-size:14px;line-height:1.4em}body.mp6 .wpmdb .help-tab .support p,body.mp6 .wpmdb .help-tab .support .email a{font-size:14px}body.mp6 .wpmdb .help-tab div.warning p{font-size:13px}body.mp6 .wpmdb .help-tab .videos h4,body.mp6 .wpmdb .help-tab .videos p{font-size:14px}body.mp6 .wpmdb .inline-message,body.mp6 .wpmdb .notification-message{border-radius:0;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:10px 14px;font-size:13px}body.mp6 .wpmdb .notification-message{margin-bottom:20px;background-color:#fff}body.mp6 .wpmdb .notification-message.ssl-notice,body.mp6 .wpmdb .notification-message.invalid-licence{margin-bottom:0;margin-top:15px}body.mp6 .wpmdb .notification-message p{font-size:13px;margin-top:0}body.mp6 .wpmdb .notification-message p:last-child{margin:0}body.mp6 .wpmdb .notification-message h4{margin-top:0}body.mp6 .wpmdb .notification-message a{color:#0074a2;text-decoration:none}body.mp6 .wpmdb .notification-message a:hover{color:#2ea2cc}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child{margin:0.5em 0}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child a.button{color:#555555}body.mp6 .wpmdb .inline-message.error,body.mp6 .wpmdb .notification-message.error-notice{border-left:4px solid #dd3d36;background-color:#fff}body.mp6 .wpmdb .inline-message.warning,body.mp6 .wpmdb .notification-message.warning-notice{background-color:#fff;border-left:4px solid #ffba00}body.mp6 .wpmdb .inline-message.success,body.mp6 .wpmdb .notification-message.success-notice{border-left:4px solid #7ad03a}body.mp6 .wpmdb .ssl-notice{margin-bottom:0}body.mp6 .wpmdb .different-plugin-version-notice,body.mp6 .wpmdb .directory-permission-notice{margin-bottom:10px}body.mp6 .wpmdb .licence-status{color:#444;float:left;font-weight:normal}body.mp6 .progress-content{font-size:14px;box-shadow:0 0 10px rgba(0,0,0,0.5);background-color:#eee}body.mp6 .progress-content .progress-title{font-family:'Open Sans', sans-serif;font-weight:normal;font-size:22px}body.mp6 .progress-content .dashicons-yes{font-size:42px;line-height:0.5em}body.mp6 .progress-content .progress-bar{background-image:none;background-color:#0074a2}body.mp6 #overlay{background-color:rgba(0,0,0,0.5)}body.mp6 .migration-progress-ajax-spinner{top:20px}
1
+ #wpmdb-main{width:742px;position:relative;min-height:950px}#overlay{background-color:rgba(255,255,255,0.9)}.wpmdb h2 ~ .error,.wpmdb h2 ~ .notice,.wpmdb h2 ~ .updated{clear:both}.wpmdb div.updated.warning{max-width:742px;box-sizing:border-box;margin:10px 0}.wpmdb div.updated.warning p{font-size:13px;margin:0.5em 0}.wpmdb a{text-decoration:none}.wpmdb li{margin-bottom:5px;position:relative}.wpmdb ul{margin:0}.wpmdb input[type=checkbox],.wpmdb input[type=radio]{margin-right:5px;vertical-align:baseline;margin-top:0}.wpmdb input[type=text],.wpmdb input[type=password]{padding:5px}.wpmdb input[disabled=disabled]{cursor:default}.wpmdb label.disabled{color:#888;cursor:default}.wpmdb .option-section{border-bottom:1px solid #ccc;padding-bottom:20px;margin-bottom:20px}.wpmdb .option-section h3{font-size:18px;font-weight:normal}.wpmdb p.migrate-db{overflow:hidden}.wpmdb p.migrate-db input{float:left}.wpmdb p.migrate-db img{float:left;margin:3px 0 0 5px}.wpmdb p.migrate-db .save-settings-button{margin-left:10px;display:none}.wpmdb .indent-wrap{margin-left:24px}.wpmdb .expandable-content{display:none;margin-top:10px}.wpmdb .expandable-content li:last-child{margin-bottom:0px}.wpmdb .header-wrapper{margin-bottom:10px}.wpmdb .header-expand-collapse{cursor:pointer;display:inline-block}.wpmdb .option-description{font-size:12px;color:#999;margin-left:8px;font-weight:normal}.wpmdb .option-group li:last-child{margin-bottom:0}.wpmdb .connection-status{display:none;overflow:auto}.wpmdb .connection-status.error{color:#9D1818}.wpmdb .copy-licence-to-remote-site{display:inline-block}.wpmdb .ajax-spinner{left:6px;position:relative;top:3px}.wpmdb div.message{margin:15px 0 0}.wpmdb .licence-wrap h3{margin:0 0 10px 0}.wpmdb .licence-input{clear:both;display:block;font-family:Consolas, Monaco, monospace;font-size:14px;margin-bottom:7px;padding:10px;width:418px}.wpmdb .register-licence{float:left;outline:none}.wpmdb .licence-status{color:#A21B1B;font-weight:bold;clear:both;padding-top:0.5em;margin:0}.wpmdb .licence-status.success{color:#333}.wpmdb .register-licence-ajax-spinner{margin:4px 0 0 8px}.wpmdb .return-to-profile-selection{margin-bottom:15px;display:inline-block}.wpmdb .return-to-profile-selection.bottom{margin-top:10px}.wpmdb h2.nav-tab-wrapper{margin-top:10px;margin-bottom:20px;padding-left:5px}.wpmdb h2.nav-tab-wrapper a.nav-tab-active{color:#464646;cursor:default}.wpmdb label{display:inline-block;clear:both}.wpmdb .migration-profile-options li{position:relative;width:520px}.wpmdb .migration-profile-options li a{padding:5px 10px;width:500px;border:1px solid #ddd;margin:0px 0px 7px;display:block;font-size:14px;color:#333}.wpmdb .migration-profile-options li a:hover{border-color:#bbb}.wpmdb .main-list-delete-profile-link{color:#999999;font-family:"Times New Roman", serif;font-size:26px;font-weight:200;position:absolute;right:7px;top:6px;cursor:pointer}.wpmdb .main-list-delete-profile-link:hover{color:#444}.wpmdb .crumbs{overflow:hidden;border-bottom:1px solid #ccc;padding:12px 0}.wpmdb .crumbs .crumb{position:relative;display:block;float:left;margin-right:4px;padding-right:3px;font-size:13px;font-weight:bold}.wpmdb .crumbs span.crumb{padding-left:25px}.wpmdb .crumbs span.crumb:before{content:"\f345";position:absolute;left:0;top:0;display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:middle}.wpmdb .option-group li{margin-bottom:5px}.wpmdb .option-group>li{margin-bottom:8px}.wpmdb .option-group li>label{font-size:14px;font-weight:bold}.wpmdb .option-group ul{display:none;margin:10px 0px 10px 25px}.wpmdb .option-group ul label{font-size:12px;font-weight:normal}.wpmdb .option-heading,.wpmdb .checkbox-label{font-size:14px;font-weight:bold}.wpmdb .checkbox-label input[type=checkbox]{margin-right:7px;position:relative;top:-1px}.wpmdb .expand-collapse-arrow{margin-right:9px}.wpmdb .migrate-selection{padding-top:20px}.wpmdb .migrate-connection-info{min-width:675px;margin:0}.wpmdb .migrate-tab .pull-push-connection-info{width:418px;height:65px;color:#333;font-family:Consolas, Monaco, monospace;font-size:15px;line-height:21px;padding:10px}.wpmdb .basic-access-auth-wrapper{display:none;margin-bottom:5px}.wpmdb .auth-username,.wpmdb .auth-password{width:206px;margin-top:3px}.wpmdb .auth-password{width:207px}.wpmdb .connection-info-wrapper{display:none;width:670px}.wpmdb .connect-button{margin-top:2px}.wpmdb .temp-disabled{background-color:#EEEEEE;color:#888888;font-family:Consolas, Monaco, monospace;text-shadow:0 1px 0 #FFFFFF}.wpmdb .push-list ul{margin-bottom:0px}.wpmdb .find-heading,.wpmdb .replace-heading{float:left}.wpmdb .find-heading{width:400px}.wpmdb .replace-fields{border-collapse:collapse;border-spacing:0px}.wpmdb .replace-fields input{width:295px}.wpmdb .replace-fields tr td{padding-bottom:7px}.wpmdb .replace-fields tr:last-child td{padding-bottom:0px}.wpmdb .arrow-col{width:93px;text-align:center;vertical-align:middle}.wpmdb .right-arrow{font-size:36px;color:#aaa;font-family:arial, sans-serif}.wpmdb .replace-right-col span{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:16px;height:16px;display:inline-block;position:relative;top:4px;cursor:pointer}.wpmdb .replace-right-col span:hover{border-color:#aaa}.wpmdb .pin .sort-handle-col{opacity:0.5;cursor:default}.wpmdb .pin .sort-handle{cursor:default !important}.wpmdb .sort-handle-col{width:20px;cursor:-webkit-grab;cursor:-moz-grab}.wpmdb .sort-handle:before{content:"\f214";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1 'dashicons';vertical-align:top;color:#aaa;background-color:transparent !important;margin-right:4px}.wpmdb .original-repeatable-field{display:none}.wpmdb .no-replaces-message{display:none;margin-bottom:0px}.wpmdb .inline-message.missing-replace{margin-top:15px;display:none}.wpmdb #new-path-missing-warning{margin-top:5px}.wpmdb .tables-header{display:inline-block}.wpmdb .expand-collapse-arrow{display:inline-block;position:relative;top:-2px;font-size:11px}.wpmdb .collapsed{-webkit-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);-ms-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg)}.wpmdb .select-deselect-divider{margin:0 6px}.wpmdb .select-wrap{display:none;margin-top:12px}.wpmdb .select-post-types-wrap{display:block}.wpmdb .multiselect{min-width:420px;min-height:180px;margin-bottom:10px}.wpmdb .table-migrate-options li label{font-size:12px;font-weight:normal}.wpmdb .table-migrate-options li{margin-bottom:5px}.wpmdb .general-helper{border-radius:50%;border:1px solid #ccc;background-color:#eee;width:15px;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.wpmdb .general-helper:hover{border-color:#aaa}.wpmdb .general-helper:after{content:"?";color:#999999;font-size:10px;font-weight:bold;left:4px;position:absolute;top:-1px}.wpmdb .helper-message{padding:10px;border:1px solid #ccc;border-radius:3px;background-color:#fff;position:absolute;width:500px;z-index:9999;display:none;box-shadow:0px 0px 5px rgba(0,0,0,0.2)}.wpmdb .inline-message{padding:10px;border-radius:3px;margin-top:5px}.wpmdb .inline-message.error{border:1px solid #CC0000;background-color:#FFEBE8}.wpmdb .inline-message.warning{background-color:#FFFFE0;border:1px solid #E6DB55}.wpmdb .helper-message:before{content:'';border-bottom:8px solid transparent;border-right:8px solid #aaa;border-top:8px solid transparent;display:block;height:0;left:-8px;position:absolute;top:11px;width:0}.wpmdb .helper-message:after{content:'';border-bottom:8px solid transparent;border-right:8px solid #fff;border-top:8px solid transparent;display:block;height:0;left:-7px;position:absolute;top:11px;width:0}.wpmdb .helper-message.bottom:before{content:'';border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #aaa;border-top:0;display:block;height:0;left:50%;margin-left:-8px;position:absolute;top:-9px;width:0}.wpmdb .helper-message.bottom:after{content:'';border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #fff;border-top:0;display:block;height:0;left:50%;margin-left:-8px;position:absolute;top:-8px;width:0}.wpmdb .label-disabled{color:#888}.wpmdb .prefix-notice,.wpmdb .ssl-notice,.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice{background-color:#FFFFE0;border:1px solid #E6DB55;padding:15px;border-radius:3px;margin-bottom:15px;display:none}.wpmdb .prefix-notice p,.wpmdb .ssl-notice p,.wpmdb .different-plugin-version-notice p,.wpmdb .directory-permission-notice p{margin-top:0px}.wpmdb .prefix-notice p:last-child,.wpmdb .ssl-notice p:last-child,.wpmdb .different-plugin-version-notice p:last-child,.wpmdb .directory-permission-notice p:last-child{margin:0px}.wpmdb .different-plugin-version-notice,.wpmdb .directory-permission-notice{background-color:#FFEBE8;border-color:#CC0000}.wpmdb .different-plugin-version-notice a,.wpmdb .directory-permission-notice a{color:#CC0000;text-decoration:underline}.wpmdb .mixed-case-table-name-notice{display:none}.wpmdb .save-migration-profile-wrap li label{font-size:12px;font-weight:normal}.wpmdb .save-migration-profile-wrap li{margin-bottom:5px;padding-left:25px}.wpmdb .save-migration-profile-wrap .indent-wrap{margin-left:0px}.wpmdb .create-new-label{margin-right:8px}.wpmdb .create-new-profile{position:absolute;top:-5px}.wpmdb .replace-remove-row,.wpmdb .delete-profile{background-color:#eee;border:1px solid #ccc;border-radius:50% 50% 50% 50%;cursor:pointer;height:11px;left:5px;margin-left:2px;position:absolute;margin-top:-6px;top:50%;width:11px;display:block;background-position:50% 50%;background-size:6px 6px;background-repeat:no-repeat}.wpmdb .replace-remove-row:after,.wpmdb .delete-profile:after{content:"\00d7";left:2px;position:absolute;top:-3px;color:#aaa;font-size:12px}.wpmdb .replace-remove-row:after{position:relative}.wpmdb .replace-remove-row:hover,.wpmdb .delete-profile:hover{border-color:#aaa}.wpmdb .migrate-db .ajax-success-msg{font-weight:bold;margin:3px 0 0 9px;display:inline-block}.wpmdb p img.save-profile-ajax-spinner{margin-left:10px}.wpmdb .backup-description{left:20px;position:relative}.wpmdb .backup-option-disabled{margin-bottom:0px !important}.wpmdb .settings-tab{display:none}.wpmdb .settings-tab .slider{max-width:416px}.wpmdb .settings-tab .slider-label{display:block;margin-bottom:10px;float:left;width:50%}.wpmdb .settings-tab .slider-label-wrapper{max-width:416px;width:100%;position:relative}.wpmdb .settings-tab .amount{width:50%;text-align:right;display:block;text-align:right;float:left}.wpmdb .settings-tab .slider-spinner{position:absolute;right:-35px;bottom:-13px}.wpmdb .settings-tab .slider-success-msg{display:none;right:-53px;bottom:-13px;position:absolute;font-weight:bold}.wpmdb .settings-tab .ui-slider{border:1px solid #dfdfdf;height:10px;border-radius:2px;position:relative}.wpmdb .settings-tab .ui-slider-handle{width:7px;height:20px;background-color:#aaa;display:block;position:absolute;top:-5px;outline:none}.wpmdb .settings-tab .ui-slider-handle:active{background-color:#999}.wpmdb .settings-tab .ui-slider-range{background-color:#eee;height:100%}.wpmdb .settings-tab .option-section label{font-weight:normal;position:relative}.wpmdb .settings-tab .option-section li{margin-bottom:5px}.wpmdb .settings-tab .option-section li:last-child{margin-bottom:0px}.wpmdb .settings-tab .option-section.allow-remote-requests-wrap .ajax-spinner,.wpmdb .settings-tab .option-section.plugin-compatibility-section .ajax-spinner{right:-23px;left:inherit;top:0px;position:absolute}.wpmdb .settings-tab .option-section .ajax-success-msg{right:-42px;left:inherit;top:0px;position:absolute;font-weight:bold}.wpmdb .settings-tab .option-section .bubble .ajax-spinner{right:-45px}.wpmdb .settings-tab .option-section .bubble .ajax-success-msg{right:-65px}.wpmdb .allow-remote-reqeusts{font-size:14px;font-weight:bold}.wpmdb .connection-info-label{margin-top:15px;margin-bottom:5px;display:block}.wpmdb .connection-info{clear:both;font-size:15px;line-height:21px;font-family:Consolas, Monaco, monospace;padding:10px 10px;height:67px;text-shadow:0px 1px 0px #fff;display:block;margin-bottom:7px;width:418px}.wpmdb .reset-button-wrap{width:418px}.wpmdb .reset-api-key{float:left}.wpmdb .reset-api-key-ajax-spinner{float:left;margin:4px 7px}.wpmdb .masked-licence{margin-top:0px}.wpmdb .bull{font-size:22px;position:relative;top:4px}.wpmdb .plugin-compatibility-wrap{padding:18px 18px 18px 24px;background-color:#e6e6e6;margin-left:0}.wpmdb .plugin-compatibility-wrap p:last-of-type{margin-bottom:0}.wpmdb ul.plugin-compatibility-options{display:block;margin:10px 0 10px 0px}.wpmdb .plugin-compatibility-spinner{position:relative;top:3px;left:10px}.wpmdb .plugin-compatibility-success-msg{position:relative;left:10px;font-weight:bold;display:none}.wpmdb .help-tab{display:none}.wpmdb .help-tab h3{font-size:18px;font-weight:normal}.wpmdb .help-tab .support{border-bottom:1px solid #ccc;margin-bottom:25px;padding-bottom:18px}.wpmdb .help-tab .support p{width:640px}.wpmdb .help-tab .support .email a{font-size:12px}.wpmdb .help-tab .support .upgrade-to-pro{font-size:16px;font-weight:bold}.wpmdb .help-tab .support .upgrade-to-pro a{white-space:nowrap}.wpmdb .help-tab .support .ajax-spinner{top:2px}.wpmdb .help-tab .video-viewer{margin-bottom:30px;border:1px solid #ccc}.wpmdb .help-tab .videos{width:640px}.wpmdb .help-tab .videos ul>li{margin-bottom:30px;overflow:hidden;position:relative}.wpmdb .help-tab .videos ul>li a{overflow:hidden;display:block;width:320px;height:180px;float:left;margin-right:15px;position:relative;z-index:1;border:1px solid #ccc}.wpmdb .help-tab .videos ul>li a:before,.wpmdb .help-tab .videos ul>li a:after{position:absolute;content:" ";margin:auto;left:0;right:0;top:0;bottom:0}.wpmdb .help-tab .videos ul>li a:before{width:64px;height:64px;border-radius:64px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;border:1px solid #ddd;background-color:#fff;z-index:2}.wpmdb .help-tab .videos ul>li a:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;border:21.33333px solid transparent;border-top-width:12.8px;border-bottom-width:12.8px;border-left-color:#333;background:transparent;display:block;left:25px;width:0px;height:0px;z-index:3}.wpmdb .help-tab .videos .video:last-child{margin-bottom:0px}.wpmdb .help-tab .videos img{width:320px;height:240px;position:relative;top:50%;margin-top:-120px}.wpmdb .help-tab .debug{width:640px;border-bottom:1px solid #CCCCCC;margin-bottom:25px;padding-bottom:28px}.wpmdb .help-tab .debug textarea{width:100%;min-height:200px;font-family:Consolas, Monaco, monospace;margin-bottom:5px}.wpmdb .help-tab h4{margin:0 0 0.2em 0}.wpmdb .help-tab p{margin:0 0 0.5em 0}.wpmdb .help-tab iframe{display:none}.wpmdb .addons-tab{display:none}.wpmdb .addons-tab .addon{position:relative;width:100%;min-height:138px;padding:25px 30px 30px 165px;box-sizing:border-box;color:#fff;margin-top:15px}.wpmdb .addons-tab .addon .actions{float:right;font-size:14px}.wpmdb .addons-tab .addon .actions>*{margin-right:10px}.wpmdb .addons-tab .addon .actions *:last-child{margin-right:0}.wpmdb .addons-tab .addon .actions .action{background-color:#fff;font-weight:bold;display:inline-block;padding:0.2em 0.4em}.wpmdb .addons-tab .addon .actions .action:hover{background-color:rgba(255,255,255,0.92)}.wpmdb .addons-tab .addon .actions .status{border-bottom:2px solid #fff;padding-bottom:0.1em}.wpmdb .addons-tab .addon h1{font-family:"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;font-weight:normal;float:left;margin:0;margin-top:5px;color:#fff}.wpmdb .addons-tab .addon p{font-size:16px;line-height:1.2em;clear:both;margin:0}.wpmdb .addons-tab .addon p a{text-decoration:underline;color:#fff}.wpmdb .addons-tab .addon p a:hover{color:rgba(255,255,255,0.9)}.wpmdb .addons-tab .addon.wp-migrate-db-pro-media-files{background:#3fab3f url(../img/icon-media-files.svg) no-repeat 30px 30px;background-size:110px 85px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-media-files .action{color:#3fab3f}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli{background:#272822 url(../img/icon-cli.svg) no-repeat 30px 30px;background-size:110px 97px;min-height:157px;color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .action{color:#272822;background-color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .action:hover{color:#272822;background-color:#eee}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli .status{border-bottom-color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli p a{color:#ddd}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli p a:hover{color:#f7f7f7}.wpmdb .addons-tab .addon.wp-migrate-db-pro-cli code{white-space:nowrap;margin:0;padding:0}.wpmdb .addons-tab .addon.wp-migrate-db-pro-multisite-tools{background:#a90000 url(../img/icon-multisite-tools.svg) no-repeat 30px 20px;background-size:110px 118px;min-height:157px}.wpmdb .addons-tab .addon.wp-migrate-db-pro-multisite-tools .action{color:#a90000}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1}.general-spinner{width:16px;height:16px}.migration-error{color:#A21B1B;display:block;max-height:400px;max-width:100%;overflow:auto;word-wrap:break-word}.migration-php-errors{display:none;margin:20px 0;overflow-y:scroll;height:180px}.progress-content{display:none;position:relative;margin:0 auto;background-color:#fff;padding:50px;box-shadow:0 0 10px #ccc;cursor:default;width:80%;z-index:99999;position:fixed;left:50%;margin-left:-40%;box-sizing:border-box;max-height:100%;overflow-y:auto}.progress-content .progress-bar{height:10px;background-color:#8cc1e9;margin-bottom:5px;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzcyYTdjZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYzFlOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #72a7cf),color-stop(100%, #8cc1e9));background-image:-webkit-linear-gradient(bottom, #72a7cf,#8cc1e9);background-image:-webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:linear-gradient(to top, #72a7cf,#8cc1e9)}.progress-content .progress-title{font-size:18px;font-family:"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;font-weight:normal;float:left}.progress-content .progress-bar{width:0%}.progress-content .progress-info-wrapper{margin-bottom:10px}.progress-content .progress-text{clear:left;float:left;width:100%}.progress-content .timer{float:right}.progress-content .progress-tables{overflow:hidden;margin-bottom:2px;padding:0 0 20px 0}.progress-content .progress-bar-wrapper{position:relative}.progress-content .progress-bar-wrapper:before{content:'';display:block;height:5px;width:1px;background-color:#ccc;position:absolute;top:15px;left:0px}.progress-content .progress-tables-hover-boxes{position:absolute;top:0px;left:0px;display:block;width:100%}.progress-content .progress-chunk-hover{display:block;float:left;height:35px;position:relative;top:-5px;z-index:1}.progress-content .progress-chunk{box-sizing:border-box;float:left;display:block;height:6px;border-right:1px solid #ccc;border-bottom:1px solid #ccc;color:#999;position:relative;text-align:center}.progress-content .progress-chunk>span{padding:0px 3px;white-space:nowrap;text-overflow:ellipsis;margin-top:10px;display:inline-block}.progress-content .progress-label{padding:5px 10px;border:1px solid #ccc;border-radius:3px;background-color:#fff;font-family:Consolas, Monaco, monospace;font-size:12px;display:inline-block;top:-35px;position:absolute;opacity:0;-webkit-transition:opacity 200ms ease-in-out;transition:opacity 200ms ease-in-out}.progress-content .label-visible{opacity:1}.progress-content .progress-label:before{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ccc;display:block;position:absolute;bottom:-5px;left:50%;margin-left:-2px}.progress-content .progress-label:after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #fff;display:block;position:absolute;bottom:-4px;left:50%;margin-left:-2px}.progress-content .migration-progress-ajax-spinner{left:7px;position:relative;top:15px}.progress-content .close-progress-content{color:#999999;cursor:pointer;font-family:"Times New Roman",serif;font-size:26px;font-weight:200;position:absolute;right:20px;top:20px;padding:5px;display:none}.progress-content .close-progress-content:hover{color:#666;border-color:#aaa}.progress-content .migration-controls{display:block;margin-top:45px;overflow:hidden}.progress-content .migration-controls span{float:left;text-align:center;display:block}.progress-content .migration-controls span:first-child{margin-right:10px;width:71px}.progress-content .pro-version{margin-top:45px;padding-top:40px;position:relative;border-top:1px solid #ccc}.progress-content .pro-version iframe{position:absolute;top:40px;right:0;display:block}.progress-content .pro-version-content{padding-right:460px;min-height:255px}.progress-content .pro-version-content h1{line-height:1em;margin-top:0;font-size:20px}.progress-content .pro-version-content ul{margin-left:24px}.progress-content .pro-version-content li{position:relative;font-size:14px;line-height:1.4em;margin-bottom:15px;max-width:580px}.progress-content .pro-version-content li:before{content:"\f147";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 30px/1 'dashicons';position:absolute;top:-3px;left:-32px;vertical-align:top;font-family:'dashicons'}.progress-content .pro-version-content .pro-quote{margin:0 0 20px 0;max-width:570px}.progress-content .pro-version-content .pro-quote .dashicons-star-filled{font-size:16px;width:16px;height:16px;position:relative;top:2px}.progress-content .pro-version-content .pro-quote-author{font-style:italic;white-space:nowrap}@media screen and (max-width: 1096px){.progress-content .pro-version iframe{position:relative;top:auto;right:auto}.progress-content .pro-version-content{min-height:0;padding:0 0 20px 0}}.wpmdb-not-pro .wpmdb .wpmdb-main{margin-top:15px}.wpmdb-not-pro .wpmdb .migrate-selection ul{margin:0px}.wpmdb-not-pro .wpmdb .help-tab .support p{width:auto}#wpmdb-sidebar{position:absolute;top:-21px;right:-312px;width:292px}#wpmdb-sidebar .block{padding:20px;border:1px solid #ccc}#wpmdb-sidebar .subscribe{border-top:none}#wpmdb-sidebar .subscribe h2{padding:0;margin:0;margin-bottom:0.5em;color:#666;font-size:20px;line-height:1.2em;float:none}#wpmdb-sidebar .subscribe h3{font-size:16px;margin:0}#wpmdb-sidebar .subscribe p{margin:0}#wpmdb-sidebar .subscribe p.interesting{margin-bottom:1em;line-height:1.4}#wpmdb-sidebar .subscribe .links{margin-bottom:2em}#wpmdb-sidebar .subscribe .links a{text-decoration:none}#wpmdb-sidebar .subscribe .promise{color:#999;font-size:12px;line-height:1.4em}#wpmdb-sidebar .subscribe .field{margin-bottom:0.5em}#wpmdb-sidebar .subscribe .field p{margin-bottom:0.3em}#wpmdb-sidebar .subscribe .field.submit-button{margin-bottom:1em}#wpmdb-sidebar .testimonial{border-top:none}#wpmdb-sidebar .testimonial p{margin:0}#wpmdb-sidebar .testimonial .quote{font-size:20px}#wpmdb-sidebar .testimonial .author{white-space:nowrap;text-align:right}#wpmdb-sidebar .testimonial .stars{white-space:nowrap;margin-bottom:5px}#wpmdb-sidebar .testimonial .via{text-align:right;font-size:12px}#wpmdb-sidebar .testimonial .via a{color:#666}#wpmdb-sidebar .testimonial .via a:before{content:"\f301";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:top;margin-right:3px}@media (min--moz-device-pixel-ratio: 1.3), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx){#wpmdb-sidebar .wpmdb-banner{background-image:url(../img/wp-migrate-db-pro@2x.jpg);background-size:292px 292px;width:292px;height:292px;display:block}#wpmdb-sidebar .wpmdb-banner img{display:none}}@media screen and (max-width: 1252px){#wpmdb-sidebar{position:relative;top:auto;right:auto;margin-top:50px}}body.mp6 input[type=checkbox]:disabled{opacity:1;border-color:#ccc}body.mp6 #wpmdb-main{font-size:14px}body.mp6 p{font-size:14px}body.mp6 .wrap>h1{float:left}body.mp6 .wrap h2{float:left}body.mp6 .wpmdb .content-tab{padding-top:15px}body.mp6 .wpmdb .migrate-tab{padding-top:0}body.mp6 .wpmdb input[type=checkbox],body.mp6 .wpmdb input[type=radio]{vertical-align:middle;margin-top:-4px}body.mp6 .wpmdb input[type=text],body.mp6 .wpmdb input[type=password]{padding:3px 5px}body.mp6 .wpmdb input.code{padding-top:6px}body.mp6 .wpmdb label{font-size:14px}body.mp6 .wpmdb h2.nav-tab-wrapper{float:none;margin-bottom:0;width:722px;font-size:23px;line-height:29px;padding:9px 0 0 5px}body.mp6 .wpmdb .help-tab h3{margin-top:0}body.mp6 .wpmdb .temp-disabled{background-color:#f9f9f9}body.mp6 .wpmdb .migration-profile-options li a{border-color:#ccc;color:#555;background-color:#e4e4e4}body.mp6 .wpmdb .migration-profile-options li a:hover{background-color:#fff;color:#464646}body.mp6 .wpmdb .settings-tab .slider-label span{vertical-align:middle}body.mp6 .wpmdb .settings-tab .slider-label-wrapper{font-size:14px}body.mp6 .wpmdb .settings-tab .ui-slider{border-color:#ccc;background-color:#fff}body.mp6 .wpmdb .settings-tab .ui-slider-range{background-color:#d8fcd1}body.mp6 .wpmdb .settings-tab .option-section li label{font-size:14px}body.mp6 .wpmdb .connection-info,body.mp6 .wpmdb .migrate-tab .pull-push-connection-info{font-weight:bold;font-size:14px}body.mp6 .wpmdb .general-helper{border:0;width:auto;height:auto;top:auto;margin:0}body.mp6 .wpmdb .general-helper:after{content:"\f223";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 'dashicons';vertical-align:top;top:auto;left:auto;position:relative}body.mp6 .wpmdb .helper-message{font-size:14px;line-height:1.4em}body.mp6 .wpmdb .right-arrow{display:none}body.mp6 .wpmdb .arrow-col{width:75px}body.mp6 .wpmdb .arrow-col:after{content:"\f344";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 22px/1 'dashicons';vertical-align:top;color:#999}body.mp6 .wpmdb .arrow-col:hover{cursor:pointer}body.mp6 .wpmdb .arrow-col:hover:after{color:#666}body.mp6 .wpmdb .find-heading{width:409px}body.mp6 .wpmdb .replace-fields input{width:304px}body.mp6 .wpmdb .replace-right-col span{border-color:#999}body.mp6 .wpmdb .replace-right-col span:hover{border-color:#666}body.mp6 .wpmdb .replace-add-row:after,body.mp6 .wpmdb .replace-add-row:before{background-color:#999}body.mp6 .wpmdb .replace-add-row:hover:after,body.mp6 .wpmdb .replace-add-row:hover:before{background-color:#666}body.mp6 .wpmdb .option-group.migrate-selection>li>label{font-size:16px}body.mp6 .wpmdb .saved-migration-profile-label{font-size:16px}body.mp6 .wpmdb .option-heading,body.mp6 .wpmdb .checkbox-label{font-size:16px}body.mp6 .wpmdb .checkbox-label input[type=checkbox]{top:auto}body.mp6 .wpmdb .return-to-profile-selection{font-size:14px}body.mp6 .wpmdb .option-description{font-size:13px}body.mp6 .wpmdb .save-migration-profile-wrap li{position:relative}body.mp6 .wpmdb .replace-remove-row,body.mp6 .wpmdb .delete-profile{border:0;border-radius:0;height:auto;width:auto;left:0;top:50%;margin-left:0}body.mp6 .wpmdb .replace-remove-row:after,body.mp6 .wpmdb .delete-profile:after{content:"\f153";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 'dashicons';vertical-align:middle;color:#999}body.mp6 .wpmdb .replace-remove-row:hover:after,body.mp6 .wpmdb .delete-profile:hover:after{color:#666}body.mp6 .wpmdb .delete-profile:after{color:#ccc}body.mp6 .wpmdb .delete-profile:hover:after{color:#aaa}body.mp6 .wpmdb .addons-tab .addons-content>div:nth-child(1),body.mp6 .wpmdb .addons-tab .addons-content>article:nth-child(1){margin-top:0px}body.mp6 .wpmdb .addons-tab .addon h1{font-family:'Open Sans', sans-serif;font-weight:200;font-size:24px;margin-top:2px}body.mp6 .wpmdb .addons-tab .addon.wp-migrate-db-pro-cli h1{margin-top:5px}body.mp6 .wpmdb .addons-tab .addon p{font-size:14px;line-height:1.4em}body.mp6 .wpmdb .help-tab .support p,body.mp6 .wpmdb .help-tab .support .email a{font-size:14px}body.mp6 .wpmdb .help-tab div.warning p{font-size:13px}body.mp6 .wpmdb .help-tab .videos h4,body.mp6 .wpmdb .help-tab .videos p{font-size:14px}body.mp6 .wpmdb .inline-message,body.mp6 .wpmdb .notification-message{border-radius:0;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:10px 14px;font-size:13px}body.mp6 .wpmdb .notification-message{margin-bottom:20px;background-color:#fff}body.mp6 .wpmdb .notification-message.ssl-notice,body.mp6 .wpmdb .notification-message.invalid-licence{margin-bottom:0;margin-top:15px}body.mp6 .wpmdb .notification-message p{font-size:13px;margin-top:0}body.mp6 .wpmdb .notification-message p:last-child{margin:0}body.mp6 .wpmdb .notification-message h4{margin-top:0}body.mp6 .wpmdb .notification-message a{color:#0074a2;text-decoration:none}body.mp6 .wpmdb .notification-message a:hover{color:#2ea2cc}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child{margin:0.5em 0}body.mp6 .wpmdb div.notification-message.invalid-licence p:last-child a.button{color:#555555}body.mp6 .wpmdb .inline-message.error,body.mp6 .wpmdb .notification-message.error-notice{border-left:4px solid #dd3d36;background-color:#fff}body.mp6 .wpmdb .inline-message.warning,body.mp6 .wpmdb .notification-message.warning-notice{background-color:#fff;border-left:4px solid #ffba00}body.mp6 .wpmdb .inline-message.success,body.mp6 .wpmdb .notification-message.success-notice{border-left:4px solid #7ad03a}body.mp6 .wpmdb .ssl-notice{margin-bottom:0}body.mp6 .wpmdb .different-plugin-version-notice,body.mp6 .wpmdb .directory-permission-notice{margin-bottom:10px}body.mp6 .wpmdb .licence-status{color:#444;float:left;font-weight:normal}body.mp6 .progress-content{font-size:14px;box-shadow:0 0 10px rgba(0,0,0,0.5);background-color:#eee}body.mp6 .progress-content .progress-title{font-family:'Open Sans', sans-serif;font-weight:normal;font-size:22px}body.mp6 .progress-content .dashicons-yes{font-size:42px;line-height:0.5em}body.mp6 .progress-content .progress-bar{background-image:none;background-color:#0074a2}body.mp6 #overlay{background-color:rgba(0,0,0,0.5)}body.mp6 .migration-progress-ajax-spinner{top:20px}
asset/js/common.js CHANGED
@@ -99,7 +99,7 @@ function wpmdbGetAjaxErrors( title, code, text, jqXHR ) {
99
  }
100
 
101
  // Only add extra error details if not php errors (#144) and jqXHR has been provided
102
- if ( !jsonErrors && 'undefined' !== jqXHR ) {
103
  html += wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText;
104
  html += '<br /><br />' + wpmdb_strings.response + ':<br />';
105
  }
@@ -115,6 +115,48 @@ function wpmdbGetAjaxErrors( title, code, text, jqXHR ) {
115
  return html;
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  (function( $ ) {
119
 
120
  // jQuery code here
99
  }
100
 
101
  // Only add extra error details if not php errors (#144) and jqXHR has been provided
102
+ if ( !jsonErrors && 'undefined' !== jqXHR ) {
103
  html += wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText;
104
  html += '<br /><br />' + wpmdb_strings.response + ':<br />';
105
  }
115
  return html;
116
  }
117
 
118
+ wpmdb.preg_quote = function( str, delimiter ) {
119
+
120
+ // discuss at: http://phpjs.org/functions/preg_quote/
121
+ // original by: booeyOH
122
+ // improved by: Ates Goral (http://magnetiq.com)
123
+ // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
124
+ // improved by: Brett Zamir (http://brett-zamir.me)
125
+ // bugfixed by: Onno Marsman
126
+ // example 1: preg_quote("$40");
127
+ // returns 1: '\\$40'
128
+ // example 2: preg_quote("*RRRING* Hello?");
129
+ // returns 2: '\\*RRRING\\* Hello\\?'
130
+ // example 3: preg_quote("\\.+*?[^]$(){}=!<>|:");
131
+ // returns 3: '\\\\\\.\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:'
132
+
133
+ return String( str )
134
+ .replace( new RegExp( '[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + ( delimiter || '' ) + '-]', 'g' ), '\\$&' );
135
+ };
136
+
137
+ wpmdb.table_is = function( table_prefix, desired_table, given_table ) {
138
+ if ( ( table_prefix + desired_table ).toLowerCase() === given_table.toLowerCase() ) {
139
+ return true;
140
+ }
141
+
142
+ var escaped_given_table = wpmdb.preg_quote( given_table );
143
+ var regex = new RegExp( table_prefix + '([0-9]+)_' + desired_table, 'i' );
144
+ var results = regex.exec( escaped_given_table );
145
+ return null != results;
146
+ };
147
+
148
+ wpmdb.subsite_for_table = function( table_prefix, table_name ) {
149
+ var escaped_table_name = wpmdb.preg_quote( table_name );
150
+ var regex = new RegExp( table_prefix + '([0-9]+)_', 'i' );
151
+ var results = regex.exec( escaped_table_name );
152
+
153
+ if ( null === results ) {
154
+ return 1;
155
+ } else {
156
+ return results[ 1 ];
157
+ }
158
+ };
159
+
160
  (function( $ ) {
161
 
162
  // jQuery code here
asset/js/common.min.js CHANGED
@@ -1 +1 @@
1
- function wpmdb_toggle_migration_action_text(){jQuery(".action-text").hide(),jQuery(".action-text."+jQuery("input[name=action]:checked").val()).show()}function wpmdb_migration_type(){return jQuery("input[name=action]:checked").val()}function wpmdb_call_next_hook(){wpmdb.common.call_stack.length||(wpmdb.common.call_stack=wpmdb.common.hooks);var a=wpmdb.common.call_stack[0];wpmdb.common.call_stack.shift(),a.call(this)}function wpmdb_add_commas(a){a+="";for(var b=a.split("."),c=b[0],d=1<b.length?"."+b[1]:"",e=/(\d+)(\d{3})/;e.test(c);)c=c.replace(e,"$1,$2");return c+d}function wpmdb_parse_json(a){var b={};try{b=jQuery.parseJSON(a)}catch(c){return!1}return b}function wpmdbGetAjaxErrors(a,b,c,d){var e=!1,f="",g=wpmdb_parse_json(c);if(!1===g){e=!0,a=wpmdb_strings.ajax_json_message,b="(#144)";var h=c;c=wpmdb_strings.ajax_json_errors+" "+b,c+='<br><a class="show-errors-toggle" href="#">'+wpmdb_strings.view_error_messages+"</a> ",c+='<div class="migration-php-errors">'+h+"</div>"}return(e||"undefined"!==d)&&(f+="<strong>"+a+"</strong> &mdash; "),e||"undefined"===d||(f+=wpmdb_strings.status+": "+d.status+" "+d.statusText,f+="<br /><br />"+wpmdb_strings.response+":<br />"),e||(c+=" "+b),f+=c}var wpmdb=wpmdb||{};wpmdb.common={hooks:[],call_stack:[],non_fatal_errors:"",migration_error:!1},wpmdb.functions={},function(){}(jQuery);
1
+ function wpmdb_toggle_migration_action_text(){jQuery(".action-text").hide(),jQuery(".action-text."+jQuery("input[name=action]:checked").val()).show()}function wpmdb_migration_type(){return jQuery("input[name=action]:checked").val()}function wpmdb_call_next_hook(){wpmdb.common.call_stack.length||(wpmdb.common.call_stack=wpmdb.common.hooks);var a=wpmdb.common.call_stack[0];wpmdb.common.call_stack.shift(),a.call(this)}function wpmdb_add_commas(a){a+="";for(var b=a.split("."),c=b[0],d=1<b.length?"."+b[1]:"",e=/(\d+)(\d{3})/;e.test(c);)c=c.replace(e,"$1,$2");return c+d}function wpmdb_parse_json(a){var b={};try{b=jQuery.parseJSON(a)}catch(c){return!1}return b}function wpmdbGetAjaxErrors(a,b,c,d){var e=!1,f="",g=wpmdb_parse_json(c);if(!1===g){e=!0,a=wpmdb_strings.ajax_json_message,b="(#144)";var h=c;c=wpmdb_strings.ajax_json_errors+" "+b,c+='<br><a class="show-errors-toggle" href="#">'+wpmdb_strings.view_error_messages+"</a> ",c+='<div class="migration-php-errors">'+h+"</div>"}return(e||"undefined"!==d)&&(f+="<strong>"+a+"</strong> &mdash; "),e||"undefined"===d||(f+=wpmdb_strings.status+": "+d.status+" "+d.statusText,f+="<br /><br />"+wpmdb_strings.response+":<br />"),e||(c+=" "+b),f+=c}var wpmdb=wpmdb||{};wpmdb.common={hooks:[],call_stack:[],non_fatal_errors:"",migration_error:!1},wpmdb.functions={},wpmdb.preg_quote=function(a,b){return String(a).replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(b||"")+"-]","g"),"\\$&")},wpmdb.table_is=function(a,b,c){if((a+b).toLowerCase()===c.toLowerCase())return!0;var d=wpmdb.preg_quote(c),e=new RegExp(a+"([0-9]+)_"+b,"i"),f=e.exec(d);return null!=f},wpmdb.subsite_for_table=function(a,b){var c=wpmdb.preg_quote(b),d=new RegExp(a+"([0-9]+)_","i"),e=d.exec(c);return null===e?1:e[1]},function(a){}(jQuery);
asset/js/multisite.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var wpmdb = wpmdb || {};
2
+
3
+ wpmdb.multisite = {};
4
+
5
+ (function( $, wpmdb ) {
6
+ wpmdb.multisite.update_multiselect = function( element, subsites, selected_subsite_ids ) {
7
+ $( element ).empty();
8
+
9
+ if ( 0 < Object.keys( subsites ).length ) {
10
+ var table_prefix = $.wpmdb.apply_filters( 'wpmdb_get_table_prefix', null, null );
11
+ var site_selected = false;
12
+ $.each( subsites, function( blog_id, subsite_path ) {
13
+ if ( $.wpmdb.apply_filters( 'wpmdb_exclude_subsite', false, blog_id ) ) {
14
+ return;
15
+ }
16
+
17
+ var selected = ' ';
18
+ if ( ( undefined === selected_subsite_ids || null === selected_subsite_ids || 0 === selected_subsite_ids.length ) ||
19
+ ( undefined !== selected_subsite_ids && null !== selected_subsite_ids && 0 < selected_subsite_ids.length && -1 !== $.inArray( blog_id, selected_subsite_ids ) )
20
+ ) {
21
+ selected = ' selected="selected" ';
22
+ site_selected = true;
23
+ }
24
+ subsite_path += ' (' + table_prefix + ( ( '1' !== blog_id ) ? blog_id + '_' : '' ) + ')';
25
+ $( element ).append( '<option' + selected + 'value="' + blog_id + '">' + subsite_path + '</option>' );
26
+ } );
27
+
28
+ // If nothing selected (maybe IDs differ between saved profile and current config) revert to default of all selected.
29
+ if ( false === site_selected ) {
30
+ wpmdb.multisite.update_multiselect( element, subsites, [] );
31
+ }
32
+ }
33
+ };
34
+
35
+ })( jQuery, wpmdb );
asset/js/multisite.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var wpmdb=wpmdb||{};wpmdb.multisite={},function(a,b){b.multisite.update_multiselect=function(c,d,e){if(a(c).empty(),0<Object.keys(d).length){var f=a.wpmdb.apply_filters("wpmdb_get_table_prefix",null,null),g=!1;a.each(d,function(b,d){if(!a.wpmdb.apply_filters("wpmdb_exclude_subsite",!1,b)){var h=" ";(void 0===e||null===e||0===e.length||void 0!==e&&null!==e&&0<e.length&&-1!==a.inArray(b,e))&&(h=' selected="selected" ',g=!0),d+=" ("+f+("1"!==b?b+"_":"")+")",a(c).append("<option"+h+'value="'+b+'">'+d+"</option>")}}),!1===g&&b.multisite.update_multiselect(c,d,[])}}}(jQuery,wpmdb);
asset/js/script.js CHANGED
@@ -1,6 +1,5 @@
1
  (function( $, wpmdb ) {
2
 
3
- var migration_state_id = '';
4
  var connection_established = false;
5
  var last_replace_switch = '';
6
  var doing_ajax = false;
@@ -27,7 +26,8 @@
27
  var tables_to_migrate = '';
28
  var migration_paused = false;
29
  var previous_progress_title = '';
30
- var previous_progress_text = '';
 
31
  var timer_count = 0;
32
  var overall_percent = 0;
33
  var migration_cancelled = false;
@@ -36,6 +36,8 @@
36
  var flag_skip_delay = false;
37
  var delay_between_requests = 0;
38
  var fade_duration = 400;
 
 
39
 
40
  var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ), spinner_url = admin_url + '/images/spinner';
41
 
@@ -67,7 +69,7 @@
67
 
68
  function is_int( n ) {
69
  n = parseInt( n );
70
- return 'number' === typeof n && 0 === n % 1;
71
  }
72
 
73
  function setup_counter() {
@@ -144,21 +146,10 @@
144
  }
145
 
146
  var migration_intent = wpmdb_migration_type();
147
- var table_intent = $( 'input[name=table_migrate_option]:checked' ).val();
148
- var tables_to_migrate;
149
 
150
  $( '.mixed-case-table-name-notice' ).hide();
151
 
152
- if ( 'migrate_select' === table_intent ) {
153
- tables_to_migrate = $( '#select-tables' ).val();
154
- } else {
155
- if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
156
- tables_to_migrate = wpmdb_data.this_prefixed_tables;
157
- } else {
158
- tables_to_migrate = wpmdb.common.connection_data.prefixed_tables;
159
- }
160
- }
161
-
162
  if ( null === tables_to_migrate ) {
163
  return;
164
  }
@@ -255,7 +246,8 @@
255
  migration_paused = false;
256
  doing_ajax = true;
257
  $( '.progress-title' ).html( previous_progress_title );
258
- $( '.progress-text' ).html( previous_progress_text );
 
259
  $( '.migration-progress-ajax-spinner' ).show();
260
  $( '.pause-resume' ).html( wpmdb_strings.pause );
261
 
@@ -266,7 +258,8 @@
266
  migration_paused = true;
267
  doing_ajax = false;
268
  previous_progress_title = $( '.progress-title' ).html();
269
- previous_progress_text = $( '.progress-text' ).html();
 
270
  $( '.progress-title' ).html( wpmdb_strings.migration_paused );
271
  $( '.progress-text' ).html( wpmdb_strings.completing_current_request );
272
  $( 'body' ).off( 'click', '.pause-resume' ); // Is re-bound at execute_next_step when migration is finally paused
@@ -300,7 +293,40 @@
300
  return $table_select;
301
  }
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  $( document ).ready( function() {
 
304
 
305
  $( '#plugin-compatibility' ).change( function( e ) {
306
  var install = '1';
@@ -907,7 +933,7 @@
907
  // select all tables
908
  $( '.multiselect-select-all' ).click( function() {
909
  var multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );
910
- $( 'option', multiselect ).attr( 'selected', 1 );
911
  $( multiselect ).focus().trigger( 'change' );
912
  } );
913
 
@@ -966,24 +992,22 @@
966
 
967
  // special expand and collapse content on click for save migration profile
968
  $( '#save-migration-profile' ).change( function() {
 
969
  if ( $( this ).is( ':checked' ) ) {
970
  $( '.save-settings-button' ).show();
971
- $( '.migrate-db .button-primary' ).val( wpmdb_strings.migrate_db_save );
972
  } else {
973
  $( '.save-settings-button' ).hide();
974
- $( '.migrate-db .button-primary' ).val( wpmdb_strings.migrate_db );
975
  }
976
  } );
977
 
978
- $( '.create-new-profile' ).focus( function() {
979
- $( '#create_new' ).prop( 'checked', true );
980
- } );
981
-
982
  if ( $( '#save-migration-profile' ).is( ':checked' ) ) {
983
  $( '.save-settings-button' ).show();
984
- $( '.migrate-db .button-primary' ).val( wpmdb_strings.migrate_db_save );
985
  }
986
 
 
 
 
 
987
  $( '.checkbox-label input[type=checkbox]' ).each( function() {
988
  if ( $( this ).is( ':checked' ) ) {
989
  $( this ).parent().next().show();
@@ -994,7 +1018,7 @@
994
  $( '.migrate-db-button' ).click( function( event ) {
995
  $( this ).blur();
996
  event.preventDefault();
997
- migration_state_id = '';
998
 
999
  if ( false === $.wpmdb.apply_filters( 'wpmdb_migration_profile_ready', true ) ) {
1000
  return;
@@ -1006,6 +1030,12 @@
1006
  return;
1007
  }
1008
 
 
 
 
 
 
 
1009
  var new_url_missing = false;
1010
  var new_file_path_missing = false;
1011
  if ( $( '#new-url' ).length && !$( '#new-url' ).val() ) {
@@ -1116,27 +1146,15 @@
1116
  }
1117
  }
1118
  } else {
1119
- if ( 'migrate_select' === table_intent ) { // User has elected to migrate only certain tables
1120
 
1121
- // Grab tables as per what the user has selected from the multiselect box
1122
- tables_to_migrate = $( '#select-tables' ).val();
1123
 
1124
- // User is pushing or exporting
1125
- if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1126
-
1127
- // Default value, assuming we're not backing up
1128
- table_rows = wpmdb_data.this_table_rows;
1129
- } else {
1130
- table_rows = wpmdb.common.connection_data.table_rows;
1131
- }
1132
  } else {
1133
- if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1134
- tables_to_migrate = wpmdb_data.this_prefixed_tables;
1135
- table_rows = wpmdb_data.this_table_rows;
1136
- } else {
1137
- tables_to_migrate = wpmdb.common.connection_data.prefixed_tables;
1138
- table_rows = wpmdb.common.connection_data.table_rows;
1139
- }
1140
  }
1141
  }
1142
 
@@ -1177,7 +1195,7 @@
1177
  } );
1178
 
1179
  // Only enumerate progress-chunk classed elements from core
1180
- $( '.progress-tables' ).not( '.media' ).find( '.progress-chunk' ).each( function( index ) {
1181
  if ( 1 > $( this ).width() ) {
1182
  $( this ).hide();
1183
  $( '.progress-chunk-hover[data-table=' + tables_to_migrate[ index ] + ']' ).hide();
@@ -1261,7 +1279,7 @@
1261
  return;
1262
  }
1263
 
1264
- migration_state_id = data.migration_state_id;
1265
 
1266
  var i = 0;
1267
  var progress_size = 0;
@@ -1287,21 +1305,15 @@
1287
  overall_percent = 0;
1288
  $( '.progress-bar' ).width( '0px' );
1289
 
1290
- if ( 'migrate_select' === table_intent ) {
1291
- tables_to_migrate = $( '#select-tables' ).val();
1292
- if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1293
- table_rows = wpmdb_data.this_table_rows;
1294
- } else {
1295
- table_rows = wpmdb.common.connection_data.table_rows;
1296
- }
1297
  } else {
1298
- if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1299
- tables_to_migrate = wpmdb_data.this_prefixed_tables;
1300
- table_rows = wpmdb_data.this_table_rows;
1301
- } else {
1302
- tables_to_migrate = wpmdb.common.connection_data.prefixed_tables;
1303
- table_rows = wpmdb.common.connection_data.table_rows;
1304
- }
1305
  }
1306
 
1307
  $( '.progress-tables' ).empty();
@@ -1337,13 +1349,13 @@
1337
  }
1338
 
1339
  var gzip = 0;
1340
- if ( 'savefile' !== migration_intent && 1 === parseInt( wpmdb.common.connection_data.gzip ) ) {
1341
  gzip = 1;
1342
  }
1343
 
1344
  var request_data = {
1345
  action: 'wpmdb_migrate_table',
1346
- migration_state_id: migration_state_id,
1347
  table: tables_to_migrate[ i ],
1348
  stage: stage,
1349
  current_row: current_row,
@@ -1402,7 +1414,7 @@
1402
  return;
1403
  }
1404
 
1405
- if ( 'undefined' !== typeof row_information.wpmdb_error && 1 === row_information.wpmdb_error ) {
1406
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1407
  $( '.progress-text' ).addClass( 'migration-error' );
1408
  $( '.progress-text' ).html( row_information.body );
@@ -1497,7 +1509,9 @@
1497
  };
1498
 
1499
  wpmdb.functions.migration_complete = function() {
 
1500
  $( '.migration-controls' ).fadeOut();
 
1501
  if ( 'savefile' === migration_intent ) {
1502
  currently_migrating = false;
1503
  var migrate_complete_text = wpmdb_strings.migration_complete;
@@ -1527,7 +1541,7 @@
1527
  cache: false,
1528
  data: {
1529
  action: 'wpmdb_finalize_migration',
1530
- migration_state_id: migration_state_id,
1531
  prefix: wpmdb.common.connection_data.prefix,
1532
  tables: tables_to_migrate.join( ',' ),
1533
  nonce: wpmdb_data.nonces.finalize_migration
@@ -1570,7 +1584,7 @@
1570
  cache: false,
1571
  data: {
1572
  action: 'wpmdb_flush',
1573
- migration_state_id: migration_state_id,
1574
  nonce: wpmdb_data.nonces.flush
1575
  },
1576
  error: function( jqXHR, textStatus, errorThrown ) {
@@ -1600,6 +1614,15 @@
1600
  }
1601
  };
1602
 
 
 
 
 
 
 
 
 
 
1603
  // close progress pop up once migration is completed
1604
  $( 'body' ).on( 'click', '.close-progress-content-button', function( e ) {
1605
  hide_overlay();
@@ -1645,6 +1668,12 @@
1645
  return;
1646
  }
1647
 
 
 
 
 
 
 
1648
  var create_new_profile = false;
1649
 
1650
  if ( $( '#create_new' ).is( ':checked' ) ) {
@@ -1756,6 +1785,7 @@
1756
  $( '#create-backup-label' ).removeClass( 'disabled' );
1757
  $( '.backup-option-disabled' ).hide();
1758
  $( '.compatibility-older-mysql' ).hide();
 
1759
  var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
1760
  var profile_name;
1761
  wpmdb_toggle_migration_action_text();
@@ -1847,6 +1877,7 @@
1847
  }
1848
  $( '.backup-options' ).hide();
1849
  $( '.keep-active-plugins' ).hide();
 
1850
  if ( false === wpmdb_data.write_permission ) {
1851
  $( '.directory-permission-notice' ).show();
1852
  $( '.step-two' ).hide();
@@ -1868,6 +1899,7 @@
1868
  if ( connection_established ) {
1869
  change_replace_values();
1870
  }
 
1871
  } );
1872
 
1873
  function change_replace_values() {
@@ -1947,12 +1979,12 @@
1947
  if ( bubble.hasClass( 'bottom' ) ) {
1948
  bubble.css( {
1949
  'left': ( position.left - bubble.width() / 2 ) + 'px',
1950
- 'top': ( position.top + icon.height() + 9 ) + 'px'
1951
  } );
1952
  } else {
1953
  bubble.css( {
1954
  'left': ( position.left + icon.width() + 9 ) + 'px',
1955
- 'top': ( position.top + icon.height() / 2 - 18 ) + 'px'
1956
  } );
1957
  }
1958
 
@@ -2654,7 +2686,13 @@
2654
 
2655
  // Pause the timer
2656
  clearInterval( elapsed_interval );
2657
- $( '.progress-text' ).html( wpmdb_strings.paused );
 
 
 
 
 
 
2658
 
2659
  // Re-bind Pause/Resume button to Resume when we are finally Paused
2660
  $( 'body' ).on( 'click', '.pause-resume', function( event ) {
@@ -2689,7 +2727,7 @@
2689
 
2690
  var request_data = {
2691
  action: 'wpmdb_cancel_migration',
2692
- migration_state_id: migration_state_id
2693
  };
2694
 
2695
  doing_ajax = true;
@@ -2827,10 +2865,24 @@
2827
 
2828
  $( 'input[name=table_migrate_option]' ).change( function() {
2829
  maybe_show_mixed_cased_table_name_warning();
 
2830
  } );
2831
 
2832
  $( 'body' ).on( 'change', '#select-tables', function() {
2833
  maybe_show_mixed_cased_table_name_warning();
 
 
 
 
 
 
 
 
 
 
 
 
 
2834
  } );
2835
  } );
2836
 
1
  (function( $, wpmdb ) {
2
 
 
3
  var connection_established = false;
4
  var last_replace_switch = '';
5
  var doing_ajax = false;
26
  var tables_to_migrate = '';
27
  var migration_paused = false;
28
  var previous_progress_title = '';
29
+ var previous_progress_text_primary = '';
30
+ var previous_progress_text_secondary = '';
31
  var timer_count = 0;
32
  var overall_percent = 0;
33
  var migration_cancelled = false;
36
  var flag_skip_delay = false;
37
  var delay_between_requests = 0;
38
  var fade_duration = 400;
39
+ var pause_before_finalize = false;
40
+ var is_auto_pause_before_finalize = false;
41
 
42
  var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ), spinner_url = admin_url + '/images/spinner';
43
 
69
 
70
  function is_int( n ) {
71
  n = parseInt( n );
72
+ return 'number' === typeof n && 0 === n % 1;
73
  }
74
 
75
  function setup_counter() {
146
  }
147
 
148
  var migration_intent = wpmdb_migration_type();
149
+ var tables_to_migrate = get_tables_to_migrate( null, null );
 
150
 
151
  $( '.mixed-case-table-name-notice' ).hide();
152
 
 
 
 
 
 
 
 
 
 
 
153
  if ( null === tables_to_migrate ) {
154
  return;
155
  }
246
  migration_paused = false;
247
  doing_ajax = true;
248
  $( '.progress-title' ).html( previous_progress_title );
249
+ $( '.progress-text', '.progress-wrapper-primary' ).html( previous_progress_text_primary );
250
+ $( '.progress-text', '.progress-wrapper-secondary' ).html( previous_progress_text_secondary );
251
  $( '.migration-progress-ajax-spinner' ).show();
252
  $( '.pause-resume' ).html( wpmdb_strings.pause );
253
 
258
  migration_paused = true;
259
  doing_ajax = false;
260
  previous_progress_title = $( '.progress-title' ).html();
261
+ previous_progress_text_primary = $( '.progress-text', '.progress-wrapper-primary' ).html();
262
+ previous_progress_text_secondary = $( '.progress-text', '.progress-wrapper-secondary ' ).html();
263
  $( '.progress-title' ).html( wpmdb_strings.migration_paused );
264
  $( '.progress-text' ).html( wpmdb_strings.completing_current_request );
265
  $( 'body' ).off( 'click', '.pause-resume' ); // Is re-bound at execute_next_step when migration is finally paused
293
  return $table_select;
294
  }
295
 
296
+ /**
297
+ * Returns tables selected for migration.
298
+ *
299
+ * @param value
300
+ * @param args
301
+ * @returns {string}
302
+ *
303
+ * Also handler for wpmdb_get_tables_to_migrate filter, disregards input values as it is the primary source.
304
+ */
305
+ function get_tables_to_migrate( value, args ) {
306
+ var tables = '';
307
+ var mig_type = wpmdb_migration_type();
308
+ var table_intent = $( 'input[name=table_migrate_option]:checked' ).val();
309
+
310
+ // Grab tables as per what the user has selected from the multiselect box or all prefixed tables.
311
+ if ( 'migrate_select' === table_intent ) {
312
+ tables = $( '#select-tables' ).val();
313
+ } else {
314
+ if ( 'push' === mig_type || 'savefile' === mig_type ) {
315
+ tables = wpmdb_data.this_prefixed_tables;
316
+ } else {
317
+ tables = wpmdb.common.connection_data.prefixed_tables;
318
+ }
319
+ }
320
+
321
+ return tables;
322
+ }
323
+
324
+ function get_table_prefix( value, args ) {
325
+ return $( '.table-select-wrap .table-prefix' ).text();
326
+ }
327
+
328
  $( document ).ready( function() {
329
+ wpmdb.migration_state_id = '';
330
 
331
  $( '#plugin-compatibility' ).change( function( e ) {
332
  var install = '1';
933
  // select all tables
934
  $( '.multiselect-select-all' ).click( function() {
935
  var multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );
936
+ $( 'option', multiselect ).prop( 'selected', 1 );
937
  $( multiselect ).focus().trigger( 'change' );
938
  } );
939
 
992
 
993
  // special expand and collapse content on click for save migration profile
994
  $( '#save-migration-profile' ).change( function() {
995
+ wpmdb.functions.update_migrate_button_text();
996
  if ( $( this ).is( ':checked' ) ) {
997
  $( '.save-settings-button' ).show();
 
998
  } else {
999
  $( '.save-settings-button' ).hide();
 
1000
  }
1001
  } );
1002
 
 
 
 
 
1003
  if ( $( '#save-migration-profile' ).is( ':checked' ) ) {
1004
  $( '.save-settings-button' ).show();
 
1005
  }
1006
 
1007
+ $( '.create-new-profile' ).focus( function() {
1008
+ $( '#create_new' ).prop( 'checked', true );
1009
+ } );
1010
+
1011
  $( '.checkbox-label input[type=checkbox]' ).each( function() {
1012
  if ( $( this ).is( ':checked' ) ) {
1013
  $( this ).parent().next().show();
1018
  $( '.migrate-db-button' ).click( function( event ) {
1019
  $( this ).blur();
1020
  event.preventDefault();
1021
+ wpmdb.migration_state_id = '';
1022
 
1023
  if ( false === $.wpmdb.apply_filters( 'wpmdb_migration_profile_ready', true ) ) {
1024
  return;
1030
  return;
1031
  }
1032
 
1033
+ // check that they've selected some tables to backup
1034
+ if ( 'savefile' !== wpmdb_migration_type() && $( '#backup-manual-select' ).is( ':checked' ) && null === $( '#select-backup' ).val() ) {
1035
+ alert( wpmdb_strings.please_select_one_table_backup );
1036
+ return;
1037
+ }
1038
+
1039
  var new_url_missing = false;
1040
  var new_file_path_missing = false;
1041
  if ( $( '#new-url' ).length && !$( '#new-url' ).val() ) {
1146
  }
1147
  }
1148
  } else {
1149
+ tables_to_migrate = get_tables_to_migrate( null, null );
1150
 
1151
+ // User is pushing or exporting
1152
+ if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1153
 
1154
+ // Default value, assuming we're not backing up
1155
+ table_rows = wpmdb_data.this_table_rows;
 
 
 
 
 
 
1156
  } else {
1157
+ table_rows = wpmdb.common.connection_data.table_rows;
 
 
 
 
 
 
1158
  }
1159
  }
1160
 
1195
  } );
1196
 
1197
  // Only enumerate progress-chunk classed elements from core
1198
+ $( '.progress-tables', '.progress-wrapper-primary' ).find( '.progress-chunk' ).each( function( index ) {
1199
  if ( 1 > $( this ).width() ) {
1200
  $( this ).hide();
1201
  $( '.progress-chunk-hover[data-table=' + tables_to_migrate[ index ] + ']' ).hide();
1279
  return;
1280
  }
1281
 
1282
+ wpmdb.migration_state_id = data.migration_state_id;
1283
 
1284
  var i = 0;
1285
  var progress_size = 0;
1305
  overall_percent = 0;
1306
  $( '.progress-bar' ).width( '0px' );
1307
 
1308
+ tables_to_migrate = get_tables_to_migrate( null, null );
1309
+
1310
+ // User is pushing or exporting
1311
+ if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
1312
+
1313
+ // Default value, assuming we're not backing up
1314
+ table_rows = wpmdb_data.this_table_rows;
1315
  } else {
1316
+ table_rows = wpmdb.common.connection_data.table_rows;
 
 
 
 
 
 
1317
  }
1318
 
1319
  $( '.progress-tables' ).empty();
1349
  }
1350
 
1351
  var gzip = 0;
1352
+ if ( 'savefile' !== migration_intent && 1 === parseInt( wpmdb.common.connection_data.gzip ) ) {
1353
  gzip = 1;
1354
  }
1355
 
1356
  var request_data = {
1357
  action: 'wpmdb_migrate_table',
1358
+ migration_state_id: wpmdb.migration_state_id,
1359
  table: tables_to_migrate[ i ],
1360
  stage: stage,
1361
  current_row: current_row,
1414
  return;
1415
  }
1416
 
1417
+ if ( 'undefined' !== typeof row_information.wpmdb_error && 1 === row_information.wpmdb_error ) {
1418
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1419
  $( '.progress-text' ).addClass( 'migration-error' );
1420
  $( '.progress-text' ).html( row_information.body );
1509
  };
1510
 
1511
  wpmdb.functions.migration_complete = function() {
1512
+
1513
  $( '.migration-controls' ).fadeOut();
1514
+
1515
  if ( 'savefile' === migration_intent ) {
1516
  currently_migrating = false;
1517
  var migrate_complete_text = wpmdb_strings.migration_complete;
1541
  cache: false,
1542
  data: {
1543
  action: 'wpmdb_finalize_migration',
1544
+ migration_state_id: wpmdb.migration_state_id,
1545
  prefix: wpmdb.common.connection_data.prefix,
1546
  tables: tables_to_migrate.join( ',' ),
1547
  nonce: wpmdb_data.nonces.finalize_migration
1584
  cache: false,
1585
  data: {
1586
  action: 'wpmdb_flush',
1587
+ migration_state_id: wpmdb.migration_state_id,
1588
  nonce: wpmdb_data.nonces.flush
1589
  },
1590
  error: function( jqXHR, textStatus, errorThrown ) {
1614
  }
1615
  };
1616
 
1617
+ wpmdb.functions.update_migrate_button_text = function() {
1618
+ var migration_intent = wpmdb_migration_type();
1619
+ var save_string = ( $( '#save-migration-profile' ).is( ':checked' ) ) ? '_save' : '';
1620
+ var migrate_string = 'migrate_button_' + ( ( 'savefile' === migration_intent ) ? 'export' : migration_intent ) + save_string;
1621
+ $( '.migrate-db .button-primary' ).val( wpmdb_strings[ migrate_string ] );
1622
+ };
1623
+
1624
+ wpmdb.functions.update_migrate_button_text();
1625
+
1626
  // close progress pop up once migration is completed
1627
  $( 'body' ).on( 'click', '.close-progress-content-button', function( e ) {
1628
  hide_overlay();
1668
  return;
1669
  }
1670
 
1671
+ // check that they've selected some tables to backup
1672
+ if ( 'savefile' !== wpmdb_migration_type() && $( '#backup-manual-select' ).is( ':checked' ) && null === $( '#select-backup' ).val() ) {
1673
+ alert( wpmdb_strings.please_select_one_table_backup );
1674
+ return;
1675
+ }
1676
+
1677
  var create_new_profile = false;
1678
 
1679
  if ( $( '#create_new' ).is( ':checked' ) ) {
1785
  $( '#create-backup-label' ).removeClass( 'disabled' );
1786
  $( '.backup-option-disabled' ).hide();
1787
  $( '.compatibility-older-mysql' ).hide();
1788
+ $( '.pause-before-finalize' ).show();
1789
  var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
1790
  var profile_name;
1791
  wpmdb_toggle_migration_action_text();
1877
  }
1878
  $( '.backup-options' ).hide();
1879
  $( '.keep-active-plugins' ).hide();
1880
+ $( '.pause-before-finalize' ).hide();
1881
  if ( false === wpmdb_data.write_permission ) {
1882
  $( '.directory-permission-notice' ).show();
1883
  $( '.step-two' ).hide();
1899
  if ( connection_established ) {
1900
  change_replace_values();
1901
  }
1902
+ wpmdb.functions.update_migrate_button_text();
1903
  } );
1904
 
1905
  function change_replace_values() {
1979
  if ( bubble.hasClass( 'bottom' ) ) {
1980
  bubble.css( {
1981
  'left': ( position.left - bubble.width() / 2 ) + 'px',
1982
+ 'top': ( position.top + icon.height() + 9 ) + 'px'
1983
  } );
1984
  } else {
1985
  bubble.css( {
1986
  'left': ( position.left + icon.width() + 9 ) + 'px',
1987
+ 'top': ( position.top + icon.height() / 2 - 18 ) + 'px'
1988
  } );
1989
  }
1990
 
2686
 
2687
  // Pause the timer
2688
  clearInterval( elapsed_interval );
2689
+
2690
+ if ( true === is_auto_pause_before_finalize ) {
2691
+ $( '.progress-text' ).html( wpmdb_strings.paused_before_finalize );
2692
+ is_auto_pause_before_finalize = false;
2693
+ } else {
2694
+ $( '.progress-text' ).html( wpmdb_strings.paused );
2695
+ }
2696
 
2697
  // Re-bind Pause/Resume button to Resume when we are finally Paused
2698
  $( 'body' ).on( 'click', '.pause-resume', function( event ) {
2727
 
2728
  var request_data = {
2729
  action: 'wpmdb_cancel_migration',
2730
+ migration_state_id: wpmdb.migration_state_id
2731
  };
2732
 
2733
  doing_ajax = true;
2865
 
2866
  $( 'input[name=table_migrate_option]' ).change( function() {
2867
  maybe_show_mixed_cased_table_name_warning();
2868
+ $.wpmdb.do_action( 'wpmdb_tables_to_migrate_changed' );
2869
  } );
2870
 
2871
  $( 'body' ).on( 'change', '#select-tables', function() {
2872
  maybe_show_mixed_cased_table_name_warning();
2873
+ $.wpmdb.do_action( 'wpmdb_tables_to_migrate_changed' );
2874
+ } );
2875
+
2876
+ $.wpmdb.add_filter( 'wpmdb_get_table_prefix', get_table_prefix );
2877
+ $.wpmdb.add_filter( 'wpmdb_get_tables_to_migrate', get_tables_to_migrate );
2878
+
2879
+ $.wpmdb.add_filter( 'wpmdb_before_migration_complete_hooks', function( hooks ) {
2880
+ pause_before_finalize = $( 'input[name=pause_before_finalize]:checked' ).length ? true : false;
2881
+ if ( true === pause_before_finalize && 'savefile' !== migration_intent ) {
2882
+ set_pause_resume_button( null ); // don't just set migration_paused to true, since `set_pause_resume_button` will get double bound to clicking resume
2883
+ is_auto_pause_before_finalize = true;
2884
+ }
2885
+ return hooks;
2886
  } );
2887
  } );
2888
 
asset/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(a,b){function c(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a}function d(){V=0,Y=a(".timer"),Z=wpmdb_strings.time_elapsed+" ",y=setInterval(f,1e3)}function e(){var a=Math.floor(V/3600)%24,b=Math.floor(V/60)%60,d=V%60,e=Z+c(a,2,0)+":"+c(b,2,0)+":"+c(d,2,0);Y.html(e)}function f(){V+=1,e()}function g(a,b){var c,d,e=[],f={},g=b.length;for(c=0;g>c;c++)f[b[c]]=!0;for(g=a.length,c=0;g>c;c++)d=a[c],d in f&&e.push(d);return e}function h(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function i(b,c,d){var e=b.substr(0,b.indexOf(":"));return d!==e&&-1!==b.indexOf("https")?(a(".ssl-notice").show(),L=!0,b=b.replace("https","http"),void a(".pull-push-connection-info").val(b+"\n"+c)):void(L=!1)}function j(b){b!==wpmdb_data.this_prefix&&(a(".remote-prefix").html(b),K=!0,"pull"===wpmdb_migration_type()?a(".prefix-notice.pull").show():a(".prefix-notice.push").show())}function k(){if("undefined"!=typeof b.common.connection_data&&!1!==b.common.connection_data){var c,d=wpmdb_migration_type(),e=a("input[name=table_migrate_option]:checked").val();a(".mixed-case-table-name-notice").hide(),c="migrate_select"===e?a("#select-tables").val():"push"===d||"savefile"===d?wpmdb_data.this_prefixed_tables:b.common.connection_data.prefixed_tables,null!==c&&(c=c.join(""),c!==c.toLowerCase()&&("1"===b.common.connection_data.lower_case_table_names||"push"!==d&&"savefile"!==d)&&("1"===wpmdb_data.lower_case_table_names||"pull"!==d)&&("push"===d||"savefile"===d?a(".mixed-case-table-name-notice.push").show():a(".mixed-case-table-name-notice.pull").show()))}}function l(a){var b=a,c=b.replace(/\/\/(.*)@/,"//").replace("http://","").replace("https://","").replace("www.","");return c}function m(a,b,c){var d,e,f=l(a);return"pull"===b?(d=wpmdb_strings.pull_migration_label_migrating,e=wpmdb_strings.pull_migration_label_completed):(d=wpmdb_strings.push_migration_label_migrating,e=wpmdb_strings.push_migration_label_completed),d=d.replace("%s",f),e=e.replace("%s",f),"migrating"===c?d:e}function n(a){return a.replace(/^https?:/i,"")}function o(){a(".option-group").each(function(){a("input",this).attr("disabled","disabled"),a("label",this).css("cursor","default")})}function p(){a(".option-group").each(function(){a("input",this).removeAttr("disabled"),a("label",this).css("cursor","pointer")})}function q(b,c,d){a(".slider",b).slider("value",c),a(".amount",b).html(wpmdb_add_commas(c)+" "+d)}function r(){!0===S?(S=!1,D=!0,a(".progress-title").html(T),a(".progress-text").html(U),a(".migration-progress-ajax-spinner").show(),a(".pause-resume").html(wpmdb_strings.pause),y=setInterval(f,1e3),b.functions.execute_next_step()):(S=!0,D=!1,T=a(".progress-title").html(),U=a(".progress-text").html(),a(".progress-title").html(wpmdb_strings.migration_paused),a(".progress-text").html(wpmdb_strings.completing_current_request),a("body").off("click",".pause-resume"),a("body").off("click",".cancel"))}function s(b,c,d){var e=document.createElement("select");return a(e).attr({multiple:"multiple",name:"select_tables[]",id:"select-tables","class":"multiselect"}),0<b.length&&a.each(b,function(b,f){if(!a.wpmdb.apply_filters("wpmdb_exclude_table",!1,f)){var g=" ";void 0!==d&&null!==d&&0<d.length&&-1!==a.inArray(f,d)&&(g=' selected="selected" '),a(e).append("<option"+g+'value="'+f+'">'+f+" ("+c[f]+")</option>")}}),e}var t,u,v,w,x,y,z,A="",B=!1,C="",D=!1,E=!1,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!1,P="",Q="",R="",S=!1,T="",U="",V=0,W=0,X=!1,Y=!1,Z="",$=!1,_=0,ab=400,bb=ajaxurl.replace("/admin-ajax.php",""),cb=bb+"/images/spinner";2<window.devicePixelRatio&&(cb+="-2x"),cb+=".gif";var db='<img src="'+cb+'" alt="" class="ajax-spinner general-spinner" />';window.onbeforeunload=function(a){return O?(a=a||window.event,a&&(a.returnValue=wpmdb_strings.sure),wpmdb_strings.sure):void 0},a(document).ready(function(){function c(b){J=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_check_licence",licence:b,context:"all",nonce:wpmdb_data.nonces.check_licence},error:function(){alert(wpmdb_strings.license_check_problem)},success:function(b){var c,d,e,f=a(".support-content"),g=a(".addons-content"),h=a(".licence-status:not(.notification-message)");if("undefined"!=typeof b.dbrains_api_down)d=b.dbrains_api_down+b.message,e=b.dbrains_api_down;else if("undefined"!=typeof b.errors){if("undefined"!=typeof b.errors.subscription_expired)c=b.errors.subscription_expired.licence,d=b.errors.subscription_expired.support,e=b.errors.subscription_expired.addons;else{var i="";for(var j in b.errors)i+=b.errors[j];d=i,e=i}"undefined"!=typeof b.addon_content&&(e+="\n"+b.addon_content)}else d=b.message,e=b.addon_content;h.stop().fadeOut(ab,function(){a(this).empty().html(c).stop().fadeIn(ab)}),f.stop().fadeOut(ab,function(){a(this).empty().html(d).stop().fadeIn(ab)}),g.stop().fadeOut(ab,function(){a(this).empty().html(e).stop().fadeIn(ab)})}})}function e(){void 0!==wpmdb_data&&void 0!==wpmdb_data.this_tables&&void 0!==wpmdb_data.this_table_sizes_hr&&(ub=s(wpmdb_data.this_tables,wpmdb_data.this_table_sizes_hr,a(ub).val())),void 0!==b.common.connection_data&&void 0!==b.common.connection_data.tables&&void 0!==b.common.connection_data.table_sizes_hr&&(vb=s(b.common.connection_data.tables,b.common.connection_data.table_sizes_hr,a(vb).val()))}function f(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(ub)}function T(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(vb)}function U(){a("#migrate-selected").parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),a(".table-select-wrap").show(),a("#migrate-only-with-prefix").prop("checked",!1),a("#migrate-selected").prop("checked",!0),a(".table-migrate-options").hide(),a(".select-tables-wrap").show()}function V(){a(".table-migrate-options").show()}function Y(){a("#select-tables").children("option").prop("selected",!0)}function Z(){return n(wpmdb_data.this_url)}function bb(){var c=wpmdb_migration_type(),d=a.trim(a(".pull-push-connection-info").val()).split("\n");if("undefined"!=typeof wpmdb_default_profile&&!0!==wpmdb_default_profile&&"savefile"!==c&&!D&&wpmdb_data.is_pro){D=!0,o(),a(".connection-status").html(wpmdb_strings.establishing_remote_connection),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(db);var e=wpmdb_migration_type();a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:d[0],key:d[1],intent:e,nonce:wpmdb_data.nonces.verify_connection_to_remote_site,convert_post_type_selection:wpmdb_convert_post_type_selection,profile:wpmdb_data.profile},error:function(b){a(".connection-status").html(kb(b.responseText,"(#102)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),D=!1,p()},success:function(c){if(a(".ajax-spinner").remove(),D=!1,p(),"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return a(".connection-status").html(c.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(c.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show());i(d[0],d[1],c.scheme),j(c.prefix),a(".pull-push-connection-info").addClass("temp-disabled"),a(".pull-push-connection-info").attr("readonly","readonly"),a(".connect-button").hide(),a(".connection-status").hide(),a(".step-two").show(),B=!0,b.common.connection_data=c,ib(),k();var e="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables&&(e=wpmdb_loaded_tables),vb=s(b.common.connection_data.tables,b.common.connection_data.table_sizes_hr,e);var f="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_post_types&&("undefined"!=typeof c.select_post_types?(a("#exclude-post-types").attr("checked","checked"),a(".post-type-select-wrap").show(),f=c.select_post_types):f=wpmdb_loaded_post_types);var g=document.createElement("select");a(g).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(b.common.connection_data.post_types,function(b,c){var d=a.inArray(c,f);d=-1!==d||!0===wpmdb_convert_exclude_revisions&&"revision"!==c?' selected="selected" ':" ",a(g).append("<option"+d+'value="'+c+'">'+c+"</option>")}),xb=g;var h="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables_backup&&(h=wpmdb_loaded_tables_backup);var l=document.createElement("select");a(l).attr({multiple:"multiple",name:"select_backup[]",id:"select-backup","class":"multiselect"}),a.each(b.common.connection_data.tables,function(c,d){var e=a.inArray(d,h);e=-1!==e?' selected="selected" ':" ",a(l).append("<option"+e+'value="'+d+'">'+d+" ("+b.common.connection_data.table_sizes_hr[d]+")</option>")}),yb=l,"pull"===wpmdb_migration_type()?(a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(xb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(zb),a(".table-prefix").html(c.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#select-backup").remove(),a(".backup-tables-wrap").prepend(yb)),a.wpmdb.do_action("verify_connection_to_remote_site",b.common.connection_data)}})}}function eb(b,d){a(".licence-input, .register-licence").remove(),a(".licence-not-entered").prepend(b.masked_licence),a(".support-content").empty().html("<p>"+wpmdb_strings.fetching_license+'<img src="'+cb+'" alt="" class="ajax-spinner general-spinner" /></p>'),c(d),a(".migrate-selection label").removeClass("disabled"),a(".migrate-selection input").removeAttr("disabled")}function fb(){a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_get_log",nonce:wpmdb_data.nonces.get_log},error:function(){alert(wpmdb_strings.update_log_problem)},success:function(b){a(".debug-log-textarea").val(b)}})}function gb(){var b=a(".progress-content").outerHeight();a(".progress-content").animate({top:"-"+b+"px"},400,"swing",function(){a("#overlay").remove(),a(".progress-content").remove()}),N=!1}function hb(){var b;if(a(".save-settings-button").blur(),!G){if(a("#migrate-selected").is(":checked")&&null===a("#select-tables").val())return void alert(wpmdb_strings.please_select_one_table);var c=!1;a("#create_new").is(":checked")&&(c=!0);var d=a(".create-new-profile").val();G=!0,b=a("#migrate-form").serialize(),a(".save-settings-button").attr("disabled","disabled").after('<img src="'+cb+'" alt="" class="save-profile-ajax-spinner general-spinner" />'),D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_profile",profile:b,nonce:wpmdb_data.nonces.save_profile},error:function(){D=!1,alert(wpmdb_strings.save_profile_problem),a(".save-settings-button").removeAttr("disabled"),a(".save-profile-ajax-spinner").remove(),a(".save-settings-button").after('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()}),G=!1},success:function(b){var e=parseInt(a("#migrate-form input[name=save_migration_profile_option]:checked").val(),10)+1;if(D=!1,a(".save-settings-button").removeAttr("disabled"),a(".save-profile-ajax-spinner").remove(),a(".save-settings-button").after('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()}),G=!1,a(".create-new-profile").val(""),c){var f=parseInt(b,10),g=f+1,h=a('<li><span class="delete-profile" data-profile-id="'+g+'"></span><label for="profile-'+g+'"><input id="profile-'+g+'" value="'+f+'" name="save_migration_profile_option" type="radio"></label></li>');h.find("label").append(document.createTextNode(" "+d)),e=g,a("#create_new").parents("li").before(h),a("#profile-"+g).attr("checked","checked")}var i=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile="+e,j=a("#migrate-form input[name=save_migration_profile_option]:checked").parent().text().trim();if("function"==typeof window.history.pushState){if(a("#migrate-form .crumbs").length)a("#migrate-form .crumbs .crumb:last").text(j);else{var k=a('<div class="crumbs" />').append('<a class="crumb" href="'+wpmdb_data.this_plugin_base+'"> Saved Profiles </a>').append('<span class="crumb">'+j+"</span>");a("#migrate-form").prepend(k)}window.history.pushState({updated_profile_id:e},null,i)}}})}}function ib(){a(".connection-status").hide(),a(".prefix-notice").hide(),a(".ssl-notice").hide(),a(".different-plugin-version-notice").hide(),a(".step-two").show(),a(".backup-options").show(),a(".keep-active-plugins").show(),a(".directory-permission-notice").hide(),a("#create-backup").removeAttr("disabled"),a("#create-backup-label").removeClass("disabled"),a(".backup-option-disabled").hide(),a(".compatibility-older-mysql").hide();{var c;a.trim(a(".pull-push-connection-info").val()).split("\n")}wpmdb_toggle_migration_action_text(),"pull"===wpmdb_migration_type()?(a(".pull-list li").append(Ab),Ab.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),B?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(b.common.connection_data.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir),!1===I&&(c=l(b.common.connection_data.url),a(".create-new-profile").val(c)),!0===K&&a(".prefix-notice.pull").show(),!0===L&&a(".ssl-notice").show(),!0===M&&(a(".different-plugin-version-notice").show(),a(".step-two").hide()),wpmdb_toggle_migration_action_text(),!1===wpmdb_data.write_permission&&(a("#create-backup").prop("checked",!1),a("#create-backup").attr("disabled","disabled"),a("#create-backup-label").addClass("disabled"),a(".backup-option-disabled").show(),a(".upload-directory-location").html(wpmdb_data.this_upload_dir_long))):(a(".connection-status").show(),a(".step-two").hide())):"push"===wpmdb_migration_type()?(a(".push-list li").append(Ab),Ab.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),B?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(wpmdb_data.this_prefix),a(".uploads-dir").html(b.common.connection_data.uploads_dir),!1===I&&(c=l(b.common.connection_data.url),a(".create-new-profile").val(c)),!0===K&&a(".prefix-notice.push").show(),!0===L&&a(".ssl-notice").show(),!0===M&&(a(".different-plugin-version-notice").show(),a(".step-two").hide()),wpmdb_toggle_migration_action_text(),"0"===b.common.connection_data.write_permissions&&(a("#create-backup").prop("checked",!1),a("#create-backup").attr("disabled","disabled"),a("#create-backup-label").addClass("disabled"),a(".backup-option-disabled").show(),a(".upload-directory-location").html(b.common.connection_data.upload_dir_long))):(a(".connection-status").show(),a(".step-two").hide())):"savefile"===wpmdb_migration_type()&&(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(wpmdb_data.this_prefix),a(".compatibility-older-mysql").show(),!1===I&&a(".create-new-profile").val(""),a(".backup-options").hide(),a(".keep-active-plugins").hide(),!1===wpmdb_data.write_permission&&(a(".directory-permission-notice").show(),a(".step-two").hide())),k(),a.wpmdb.do_action("move_connection_info_box",{migration_type:wpmdb_migration_type(),last_migration_type:C})}function jb(){var c=null,d=null;null!==b.common.previous_connection_data&&"object"==typeof b.common.previous_connection_data&&b.common.previous_connection_data.url!==b.common.connection_data.url&&(c=n(b.common.previous_connection_data.url),d=b.common.previous_connection_data.path),"push"===wpmdb_migration_type()||"savefile"===wpmdb_migration_type()?("pull"===C?a(".replace-row").each(function(){var b=a(".old-replace-col input",this).val();a(".old-replace-col input",this).val(a(".replace-right-col input",this).val()),a(".replace-right-col input",this).val(b)}):"push"===C&&"push"===wpmdb_migration_type()&&null!==c&&null!==d&&a(".replace-row").each(function(){var e=a(".replace-right-col input",this).val();e===d&&a(".replace-right-col input",this).val(b.common.connection_data.path),e===c&&a(".replace-right-col input",this).val(n(b.common.connection_data.url))}),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(wb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(yb)):"pull"===wpmdb_migration_type()&&(""===C||"push"===C||"savefile"===C?a(".replace-row").each(function(){var b=a(".old-replace-col input",this).val();a(".old-replace-col input",this).val(a(".replace-right-col input",this).val()),a(".replace-right-col input",this).val(b)}):"pull"===C&&"pull"===wpmdb_migration_type()&&null!==c&&null!==d&&a(".replace-row").each(function(){var e=a(".old-replace-col input",this).val();e===d&&a(".old-replace-col input",this).val(b.common.connection_data.path),e===c&&a(".old-replace-col input",this).val(n(b.common.connection_data.url))}),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(xb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(zb)),C=wpmdb_migration_type()}function kb(a,b,c){return wpmdbGetAjaxErrors(wpmdb_strings.connection_local_server_problem,b,a,c)}function lb(a){return/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}function mb(b,d){a(".nav-tab").removeClass("nav-tab-active"),a(".nav-tab."+b).addClass("nav-tab-active"),a(".content-tab").hide(),a("."+b+"-tab").show(),"settings"===b&&!1===J&&"1"===wpmdb_data.has_licence&&(a("p.licence-status").append("Checking License... ").append(db),c()),"help"===b&&(fb(),!1===J&&"1"===wpmdb_data.has_licence&&(a(".support-content p").append(db),c())),"addons"===b&&!0!==d&&!1===J&&"1"===wpmdb_data.has_licence&&(a(".addons-content p").append(db),c())}function nb(c){var d=a(".pull-push-connection-info");if(!D&&!a(d).hasClass("temp-disabled")){c=a(".pull-push-connection-info").val();var f=a.trim(c).split("\n"),g=!1,h="";if(""===f&&(g=!0,h=wpmdb_strings.connection_info_missing),2===f.length||g||(g=!0,h=wpmdb_strings.connection_info_incorrect),g||lb(f[0])||(g=!0,h=wpmdb_strings.connection_info_url_invalid),!g&&32>=f[1].length&&(g=!0,h=wpmdb_strings.connection_info_key_invalid),g||f[0]!==wpmdb_data.connection_info[0]||(g=!0,h=wpmdb_strings.connection_info_local_url),g||f[1]!==wpmdb_data.connection_info[1]||(g=!0,h=wpmdb_strings.connection_info_local_key),g)return a(".connection-status").html(h),void a(".connection-status").addClass("notification-message error-notice migration-error");var m=f[0]+"\n"+f[1];!1===wpmdb_data.openssl_available&&(f[0]=f[0].replace("https://","http://"),m=f[0]+"\n"+f[1],a(".pull-push-connection-info").val(m)),K=!1,D=!0,o(),a(".basic-access-auth-wrapper").is(":visible")&&(f[0]=f[0].replace(/\/\/(.*)@/,"//"),f[0]=f[0].replace("//","//"+encodeURIComponent(a.trim(a(".auth-username").val()))+":"+encodeURIComponent(a.trim(a(".auth-password").val()))+"@"),m=f[0]+"\n"+f[1],a(".pull-push-connection-info").val(m),a(".basic-access-auth-wrapper").hide()),a(".step-two").hide(),a(".ssl-notice").hide(),a(".prefix-notice").hide(),a(".connection-status").show(),a(".connection-status").html(wpmdb_strings.establishing_remote_connection),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(db);var q=wpmdb_migration_type();I=!1,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:f[0],key:f[1],intent:q,nonce:wpmdb_data.nonces.verify_connection_to_remote_site},error:function(b){a(".connection-status").html(kb(b.responseText,"(#100)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),D=!1,p()},success:function(c){if(a(".ajax-spinner").remove(),D=!1,p(),i(f[0],f[1],c.scheme),"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return a(".connection-status").html(c.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(c.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show());var d=l(c.url);a(".create-new-profile").val(d),a(".pull-push-connection-info").addClass("temp-disabled"),a(".pull-push-connection-info").attr("readonly","readonly"),a(".connect-button").hide(),a(".connection-status").hide(),a(".step-two").show(),j(c.prefix),B=!0,b.common.previous_connection_data=b.common.connection_data,b.common.connection_data=c,ib(),jb(),k(),e(),yb=a(vb).clone(),a(yb).attr({name:"select_backup[]",id:"select-backup"});var g=document.createElement("select");a(g).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(b.common.connection_data.post_types,function(b,c){a(g).append('<option value="'+c+'">'+c+"</option>")}),xb=g,a("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===wpmdb_migration_type()?(a("#new-url").val(n(wpmdb_data.this_url)),a("#new-path").val(wpmdb_data.this_path),"true"===wpmdb_data.is_multisite&&(a("#new-domain").val(wpmdb_data.this_domain),a('.replace-row.pin .old-replace-col input[type="text"]').val(n(c.url))),a("#old-url").val(n(c.url)),a("#old-path").val(c.path),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(xb),a(".table-prefix").html(c.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#new-url").val(n(c.url)),a("#new-path").val(c.path),"true"===wpmdb_data.is_multisite&&a('.replace-row.pin .old-replace-col input[type="text"]').val(n(wpmdb_data.this_url)),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(yb)),b.common.next_step_in_migration={fn:a.wpmdb.do_action,args:["verify_connection_to_remote_site",b.common.connection_data]},b.functions.execute_next_step()}})}}function ob(){X=!0,a(".progress-text").html(wpmdb_strings.completing_current_request),a(".progress-title").html(wpmdb_strings.cancelling_migration),a(".migration-controls").fadeOut(),a(".migration-progress-ajax-spinner").show(),!0===S&&(S=!1,b.functions.execute_next_step())}a("#plugin-compatibility").change(function(){var b="1";if(a(this).is(":checked")){var c=confirm(wpmdb_strings.mu_plugin_confirmation);if(!c)return void a(this).prop("checked",!1)}else b="0";a(".plugin-compatibility-wrap").toggle(),a(this).parent().append(db),a("#plugin-compatibility").attr("disabled","disabled"),a(".plugin-compatibility").addClass("disabled"),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_plugin_compatibility",install:b},error:function(b){alert(wpmdb_strings.plugin_compatibility_settings_problem+"\r\n\r\n"+wpmdb_strings.status+" "+b.status+" "+b.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+b.responseText),a(".ajax-spinner").remove(),a("#plugin-compatibility").removeAttr("disabled"),a(".plugin-compatibility").removeClass("disabled")},success:function(b){""!==a.trim(b)?alert(b):(a(".plugin-compatibility").append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()})),a(".ajax-spinner").remove(),a("#plugin-compatibility").removeAttr("disabled"),a(".plugin-compatibility").removeClass("disabled")}})}),a("#plugin-compatibility").is(":checked")&&a(".plugin-compatibility-wrap").show(),(0<=navigator.userAgent.indexOf("MSIE")||0<=navigator.userAgent.indexOf("Trident"))&&a(".ie-warning").show(),0===wpmdb_data.valid_licence&&a("#savefile").prop("checked",!0);var pb=a(".max-request-size"),qb=a(".slider",pb);qb.slider({range:"min",value:parseInt(wpmdb_data.max_request/1024),min:512,max:parseInt(wpmdb_data.bottleneck/1024),step:1,create:function(){q(pb,wpmdb_data.max_request/1024,"kB")},slide:function(a,b){q(pb,b.value,"kB")},stop:function(b,c){a(".amount",pb).after('<img src="'+cb+'" alt="" class="slider-spinner general-spinner" />'),qb.slider("disable"),a.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_max_request_size",max_request_size:parseInt(c.value),nonce:wpmdb_data.nonces.update_max_request_size},error:function(){qb.slider("enable"),a(".slider-spinner",pb).remove(),alert(wpmdb_strings.max_request_size_problem),q(pb,wpmdb_data.max_request/1024,"kB"),qb.slider("enable")},success:function(){qb.slider("enable"),a(".slider-success-msg",pb).show(),a(".slider-success-msg",pb).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",pb).remove()}})}});var rb=a(".delay-between-requests"),sb=a(".slider",rb);sb.slider({range:"min",value:parseInt(wpmdb_data.delay_between_requests/1e3),min:0,max:10,step:1,create:function(){q(rb,wpmdb_data.delay_between_requests/1e3,"s")},slide:function(a,b){q(rb,b.value,"s")},stop:function(b,c){a(".amount",rb).after('<img src="'+cb+'" alt="" class="slider-spinner general-spinner" />'),sb.slider("disable"),a.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_delay_between_requests",delay_between_requests:parseInt(1e3*c.value),nonce:wpmdb_data.nonces.update_delay_between_requests},error:function(){sb.slider("enable"),a(".slider-spinner",rb).remove(),alert(wpmdb_strings.delay_between_requests_problem),q(rb,wpmdb_data.delay_between_requests/1e3,"s"),sb.slider("enable")},success:function(){wpmdb_data.delay_between_requests=parseInt(1e3*c.value),sb.slider("enable"),a(".slider-success-msg",rb).show(),a(".slider-success-msg",rb).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",rb).remove()}})}});var tb=a(".progress-content").clone();a(".progress-content").remove();var ub=a("#select-tables").clone(),vb=a("#select-tables").clone(),wb=a("#select-post-types").clone(),xb=a("#select-post-types").clone(),yb=a("#select-backup").clone(),zb=a("#select-backup").clone();a(".help-tab .video").each(function(){var b=a(this),c=a(".video-viewer");a("a",this).click(function(d){d.preventDefault(),c.attr("src","//www.youtube.com/embed/"+b.data("video-id")+"?autoplay=1"),c.show();var e=c.offset();a(window).scrollTop(e.top-50)})}),a(".backup-options").show(),a(".keep-active-plugins").show(),"savefile"===wpmdb_migration_type()&&(a(".backup-options").hide(),a(".keep-active-plugins").hide()),C=wpmdb_migration_type(),a(".content-tab").on("click",".check-my-licence-again",function(b){b.preventDefault(),J=!1,a(b.target).replaceWith("Checking... "+db),c(null,"all")}),a.wpmdb.add_action("wpmdb_refresh_table_selects",e),a.wpmdb.add_action("wpmdb_update_push_table_select",f),a.wpmdb.add_action("wpmdb_update_pull_table_select",T),a.wpmdb.add_action("wpmdb_disable_table_migration_options",U),a.wpmdb.add_action("wpmdb_enable_table_migration_options",V),a.wpmdb.add_action("wpmdb_select_all_tables",Y),a.wpmdb.add_filter("wpmdb_base_old_url",Z),bb(),a("body").on("click",".js-action-link",function(b){b.preventDefault(),a(this).blur()}),a(".licence-form").submit(function(b){if(b.preventDefault(),!E){a(".licence-status").removeClass("notification-message error-notice success-notice");var c=a.trim(a(".licence-input").val());if(""===c)return a(".licence-status").addClass("notification-message error-notice"),void a(".licence-status").html(wpmdb_strings.enter_license_key);a(".licence-status").empty().removeClass("success"),E=!0,a(".button.register-licence").after('<img src="'+cb+'" alt="" class="register-licence-ajax-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",cache:!1,data:{action:"wpmdb_activate_licence",licence_key:c,nonce:wpmdb_data.nonces.activate_licence,context:"licence"},error:function(){E=!1,a(".register-licence-ajax-spinner").remove(),a(".licence-status").html(wpmdb_strings.register_license_problem)},success:function(b){if(E=!1,a(".register-licence-ajax-spinner").remove(),"undefined"!=typeof b.errors){var d="";for(var e in b.errors)d+=b.errors[e];a(".licence-status").html(d),"undefined"!=typeof b.masked_licence&&(eb(b,c),a(".migrate-tab .invalid-licence").hide())}else"undefined"!=typeof b.wpmdb_error&&"undefined"!=typeof b.body?a(".licence-status").html(b.body):(a(".licence-status").html(wpmdb_strings.license_registered).delay(5e3).fadeOut(1e3),a(".licence-status").addClass("success notification-message success-notice"),eb(b,c),a(".invalid-licence").hide())}})}}),a(".clear-log").click(function(){a(".debug-log-textarea").val(""),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_clear_log",nonce:wpmdb_data.nonces.clear_log},error:function(){alert(wpmdb_strings.clear_log_problem)},success:function(){}})}),a(".multiselect-select-all").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).attr("selected",1),a(b).focus().trigger("change")}),a(".multiselect-deselect-all").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).removeAttr("selected"),a(b).focus().trigger("change")}),a(".multiselect-invert-selection").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).each(function(){a(this).attr("selected",!a(this).attr("selected"))}),a(b).focus().trigger("change")}),a(".option-group input[type=radio]").change(function(){var b=a(this).closest(".option-group");a("ul",b).hide();var c=a(this).closest("li");a("ul",c).show()}),a(".option-group").each(function(){a(".option-group input[type=radio]").each(function(){if(a(this).is(":checked")){var b=a(this).closest("li");a("ul",b).show()}})}),a(".header-expand-collapse").click(function(){a(".expand-collapse-arrow",this).hasClass("collapsed")?(a(".expand-collapse-arrow",this).removeClass("collapsed"),a(this).next().show()):(a(".expand-collapse-arrow",this).addClass("collapsed"),a(this).next().hide())}),a(".checkbox-label input[type=checkbox]").change(function(){a(this).is(":checked")?a(this).parent().next().show():a(this).parent().next().hide()}),a("#save-migration-profile").change(function(){a(this).is(":checked")?(a(".save-settings-button").show(),a(".migrate-db .button-primary").val(wpmdb_strings.migrate_db_save)):(a(".save-settings-button").hide(),a(".migrate-db .button-primary").val(wpmdb_strings.migrate_db))}),a(".create-new-profile").focus(function(){a("#create_new").prop("checked",!0)}),a("#save-migration-profile").is(":checked")&&(a(".save-settings-button").show(),a(".migrate-db .button-primary").val(wpmdb_strings.migrate_db_save)),a(".checkbox-label input[type=checkbox]").each(function(){a(this).is(":checked")&&a(this).parent().next().show()}),a(".migrate-db-button").click(function(c){function e(b,c){var d=0,e=JSON.parse(JSON.stringify(c));a.each(b,function(a,b){d+=parseInt(e[b])});var f=0,g=0,h=[];a.each(b,function(a,b){var c=Math.round(e[b]/d*100);
2
- h[b]=c,c>f&&(f=c),g+=c});var i="",j=100-g;a.each(b,function(b,c){var d=h[c];0!==j&&d===f&&(d+=j,j=0),a(".progress-tables").append('<div class="progress-chunk '+c+'_chunk" style="width: '+d+'%;" title="'+c+'"><span>'+c+"</span></div>"),a(".progress-tables-hover-boxes").append('<div class="progress-chunk-hover" data-table="'+c+'" style="width: '+d+'%;"></div>'),i=c}),a(".progress-tables").not(".media").find(".progress-chunk").each(function(c){function d(b){a("span",b).innerWidth()>a(b).width()&&a("span",b).hide()}1>a(this).width()&&(a(this).hide(),a(".progress-chunk-hover[data-table="+b[c]+"]").hide(),e[i]=Number(e[i]),e[i]+=Number(e[b[c]]),e[b[c]]=0);var f=this;setTimeout(function(){d(f)},0)});var k=[e,d];return k}if(a(this).blur(),c.preventDefault(),A="",!1!==a.wpmdb.apply_filters("wpmdb_migration_profile_ready",!0)){if(a("#migrate-selected").is(":checked")&&null===a("#select-tables").val())return void alert(wpmdb_strings.please_select_one_table);var f=!1,h=!1;if(a("#new-url").length&&!a("#new-url").val()&&(a("#new-url-missing-warning").show(),a("#new-url").focus(),a("html,body").scrollTop(0),f=!0),a("#new-path").length&&!a("#new-path").val()&&(a("#new-path-missing-warning").show(),!1===f&&(a("#new-path").focus(),a("html,body").scrollTop(0)),h=!0),!0!==f&&!0!==h){a("#save-migration-profile").is(":checked")&&hb(),w=a("#migrate-form").serialize();var i=a(document).height();a("body").append('<div id="overlay"></div>'),a("#overlay").height(i).css({position:"fixed",top:0,left:0,width:"100%","z-index":99999,display:"none"});var j=tb.clone();t=wpmdb_migration_type(),x="backup","savefile"===t&&(x="migrate"),!1===a("#create-backup").is(":checked")&&(x="migrate");var k=a("input[name=table_migrate_option]:checked").val(),l=a.trim(a(".pull-push-connection-info").val()).split("\n"),n="";u=l[0],v=l[1];var o="";a("#overlay").after(j),z=wpmdb_strings.exporting_complete,"savefile"===t?o=wpmdb_strings.exporting_please_wait:(o=m(u,t,"migrating"),z=m(u,t,"completed")),a(".progress-title").html(o),a("#overlay").show();var p=a("input[name=backup_option]:checked").val(),q=a("input[name=table_migrate_option]:checked").val(),r="";"backup"===x?("migrate_only_with_prefix"===q&&"backup_selected"===p&&(p="backup_only_with_prefix"),"push"===t?(n=b.common.connection_data.table_rows,"backup_only_with_prefix"===p?R=b.common.connection_data.prefixed_tables:"backup_selected"===p?(r=a("#select-tables").val(),R=g(r,b.common.connection_data.tables)):"backup_manual_select"===p&&(R=a("#select-backup").val())):(n=wpmdb_data.this_table_rows,"backup_only_with_prefix"===p?R=wpmdb_data.this_prefixed_tables:"backup_selected"===p?(r=a("#select-tables").val(),R=g(r,wpmdb_data.this_tables)):"backup_manual_select"===p&&(R=a("#select-backup").val()))):"migrate_select"===k?(R=a("#select-tables").val(),n="push"===t||"savefile"===t?wpmdb_data.this_table_rows:b.common.connection_data.table_rows):"push"===t||"savefile"===t?(R=wpmdb_data.this_prefixed_tables,n=wpmdb_data.this_table_rows):(R=b.common.connection_data.prefixed_tables,n=b.common.connection_data.table_rows);var s=e(R,n);n=s[0];var y=s[1];a(".progress-title").after('<img src="'+cb+'" alt="" class="migration-progress-ajax-spinner general-spinner" />');var B=a(".progress-content").outerHeight();a(".progress-content").css("top","-"+B+"px").show().animate({top:"0px"}),d(),O=!0;var C={action:"wpmdb_initiate_migration",intent:t,url:u,key:v,form_data:w,stage:x,nonce:wpmdb_data.nonces.initiate_migration};"savefile"!==t&&(C.temp_prefix=b.common.connection_data.temp_prefix),D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:C,error:function(c,d,e){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(kb(c.responseText,"(#112)",c)),a(".progress-text").addClass("migration-error"),console.log(c),console.log(d),console.log(e),D=!1,b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){if(D=!1,"undefined"!=typeof c&&"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return b.common.migration_error=!0,b.functions.migration_complete_events(),a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),void a(".progress-text").html(c.body);A=c.migration_state_id;var d=0,f=0;W=0;var g=0,h=0,i=0,j=0;_=0,"savefile"!==t&&"undefined"!=typeof b.common.connection_data&&"undefined"!=typeof b.common.connection_data.delay_between_requests&&(_=Math.max(parseInt(wpmdb_data.delay_between_requests),parseInt(b.common.connection_data.delay_between_requests))),b.functions.migrate_table_recursive=function(c,l){if(d>=R.length){if("backup"!==x)return a(".progress-label").removeClass("label-visible"),b.common.hooks=a.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",b.common.hooks),b.common.hooks.push(b.functions.migration_complete),b.common.hooks.push(b.functions.wpmdb_flush),b.common.hooks=a.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",b.common.hooks),b.common.hooks.push(b.functions.migration_complete_events),b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step();x="migrate",d=0,f=0,W=0,a(".progress-bar").width("0px"),"migrate_select"===k?(R=a("#select-tables").val(),n="push"===t||"savefile"===t?wpmdb_data.this_table_rows:b.common.connection_data.table_rows):"push"===t||"savefile"===t?(R=wpmdb_data.this_prefixed_tables,n=wpmdb_data.this_table_rows):(R=b.common.connection_data.prefixed_tables,n=b.common.connection_data.table_rows),a(".progress-tables").empty(),a(".progress-tables-hover-boxes").empty(),s=e(R,n),n=s[0],y=s[1]}a(".progress-text").html("backup"===x?W+"% - "+wpmdb_strings.backing_up+' "'+R[d]+'"':W+"% - "+wpmdb_strings.migrating+' "'+R[d]+'"');var m=0;d===R.length-1&&(m=1);var o=0;"savefile"!==t&&1===parseInt(b.common.connection_data.gzip)&&(o=1);var p={action:"wpmdb_migrate_table",migration_state_id:A,table:R[d],stage:x,current_row:c,last_table:m,primary_keys:l,gzip:o,nonce:wpmdb_data.nonces.migrate_table};"savefile"!==t&&(p.bottleneck=b.common.connection_data.bottleneck,p.prefix=b.common.connection_data.prefix),b.common.connection_data&&b.common.connection_data.path_current_site&&b.common.connection_data.domain&&(p.path_current_site=b.common.connection_data.path_current_site,p.domain_current_site=b.common.connection_data.domain),D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,timeout:0,data:p,error:function(c,e,f){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.table_process_problem+" "+R[d]),a(".progress-text").append("<br /><br />"+wpmdb_strings.status+": "+c.status+" "+c.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+c.responseText),a(".progress-text").addClass("migration-error"),D=!1,console.log(c),console.log(e),console.log(f),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){D=!1,c=a.trim(c);var e=wpmdb_parse_json(c);return!1===e||null===e?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(""===c||null===c?wpmdb_strings.table_process_problem_empty_response+" "+R[d]:kb(c,null,null)),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):"undefined"!=typeof e.wpmdb_error&&1===e.wpmdb_error?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),a(".progress-text").html(e.body),b.common.migration_error=!0,void b.functions.migration_complete_events()):(1===m&&"savefile"===t&&("undefined"!=typeof e.dump_filename&&(P=e.dump_filename),"undefined"!=typeof e.dump_path&&(Q=e.dump_path)),-1===e.current_row||"-1"===e.current_row?(f-=j,j=0,i=0,f+=parseInt(n[R[d]]),d++,e.current_row="",e.primary_keys=""):(h=parseInt(e.current_row),g=h-i,i=h,f+=g,j+=g),W=Math.floor(f/y*100),a(".progress-bar").width(W+"%"),b.common.next_step_in_migration={fn:b.functions.migrate_table_recursive,args:[e.current_row,e.primary_keys]},void b.functions.execute_next_step())}})},b.common.next_step_in_migration={fn:b.functions.migrate_table_recursive,args:["-1",""]},b.functions.execute_next_step()}})}}}),b.functions.migration_complete_events=function(){!1===b.common.migration_error&&(""===b.common.non_fatal_errors?("savefile"!==t&&!0===a("#save_computer").is(":checked")&&a(".progress-text").css("visibility","hidden"),a(".progress-title").html(z).append('<div class="dashicons dashicons-yes"></div>')):(a(".progress-text").html(b.common.non_fatal_errors),a(".progress-text").addClass("migration-error"),a(".progress-title").html(wpmdb_strings.completed_with_some_errors)),a(".progress-bar-wrapper").hide()),a(".migration-controls").hide(),b.common.hooks=[],b.common.call_stack=[],b.common.migration_error=!1,O=!1,N=!0,S=!1,X=!1,D=!1,b.common.non_fatal_errors="",a(".progress-label").remove(),a(".migration-progress-ajax-spinner").remove(),a(".close-progress-content").show(),a("#overlay").css("cursor","pointer"),clearInterval(y)},b.functions.migration_complete=function(){if(a(".migration-controls").fadeOut(),"savefile"===t){O=!1;var c=wpmdb_strings.migration_complete;if(a("#save_computer").is(":checked")){var d=wpmdb_data.this_download_url+encodeURIComponent(P);a("#gzip_file").is(":checked")&&(d+="&gzip=1"),window.location=d}else c=wpmdb_strings.completed_dump_located_at+" "+Q;!1===b.common.migration_error&&(a(".progress-text").html(c),b.functions.migration_complete_events(),a(".progress-title").html(z))}else a(".progress-text").html(wpmdb_strings.finalizing_migration),D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_finalize_migration",migration_state_id:A,prefix:b.common.connection_data.prefix,tables:R.join(","),nonce:wpmdb_data.nonces.finalize_migration},error:function(c,d,e){D=!1,a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.finalize_tables_problem),a(".progress-text").addClass("migration-error"),alert(c+" : "+d+" : "+e),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return D=!1,"1"!==a.trim(c)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step())}})},b.functions.wpmdb_flush=function(){"savefile"!==t&&(a(".progress-text").html(wpmdb_strings.flushing),D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:A,nonce:wpmdb_data.nonces.flush},error:function(c,d,e){D=!1,a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.flush_problem),a(".progress-text").addClass("migration-error"),alert(c+" : "+d+" : "+e),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return D=!1,"1"!==a.trim(c)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step())}}))},a("body").on("click",".close-progress-content-button",function(){gb()}),a("body").on("click","#overlay",function(){!0===N&&gb()}),a(".save-settings-button").click(function(b){return b.preventDefault(),""===a.trim(a(".create-new-profile").val())&&a("#create_new").is(":checked")?(alert(wpmdb_strings.enter_name_for_profile),void a(".create-new-profile").focus()):void hb()}),a("body").on("mousemove",".progress-chunk-hover",function(b){var c=b.pageX,d=a(".progress-bar-wrapper").offset(),e=a(".progress-label").outerWidth()/2;c=c-d.left-e,a(".progress-label").css("left",c+"px"),a(".progress-label").html(a(this).attr("data-table"))}),a("body").on("mouseenter mouseleave",".progress-chunk-hover",function(b){"mouseenter"===b.type?a(".progress-label").addClass("label-visible"):a(".progress-label").removeClass("label-visible")});var Ab=a(".connection-info-wrapper");ib(),a(".migrate-selection.option-group input[type=radio]").change(function(){ib(),B&&jb()}),"pull"!==wpmdb_migration_type()&&"push"!==wpmdb_migration_type()||B||(a(".step-two").hide(),a(".connection-status").show()),a(".general-helper").click(function(b){b.preventDefault();var c=a(this),d=a(this).next();a(".helper-message").not(d).hide();var e=c.position();d.css(d.hasClass("bottom")?{left:e.left-d.width()/2+"px",top:e.top+c.height()+9+"px"}:{left:e.left+c.width()+9+"px",top:e.top+c.height()/2-18+"px"}),d.toggle(),b.stopPropagation()}),a("body").click(function(){a(".helper-message").hide()}),a(".helper-message").click(function(a){a.stopPropagation()}),a("body").on("click",".show-errors-toggle",function(b){b.preventDefault(),a(this).next(".migration-php-errors").toggle()}),a(".nav-tab").click(function(){var b=a(this).attr("data-div-name");b=b.replace("-tab",""),window.location.hash=b,mb(b,!1)}),a("body").on("click",'a[href^="#"]',function(b){var c=a(b.target).attr("href"),d=c.substr(1);if(d){var e=a("."+d);1===e.length&&(e.trigger("click"),b.preventDefault())}}),a("body").on("click",".add-row",function(){a(this).parents("tr").before(a(".original-repeatable-field").clone().removeClass("original-repeatable-field"))}),a("body").on("click",".replace-remove-row",function(){a(this).parents("tr").remove(),2>=a(".replace-row").length&&a(".no-replaces-message").show();var b=a(this).prev().attr("id");("new-url"===b||"new-path"===b)&&a("#"+b+"-missing-warning").hide()}),a("body").on("change","#new-url",function(){a("#new-url-missing-warning").hide()}).on("change","#new-path",function(){a("#new-path-missing-warning").hide()}),a("body").on("click",".arrow-col",function(){var b=this,c=a(b).prev("td").find("input").val(),d=a(b).next("td").find("input");d.val(c),"new-url"===d.prop("id")?a("#new-url-missing-warning").hide():"new-path"===d.prop("id")&&a("#new-path-missing-warning").hide()}),a(".add-replace").click(function(){a(".replace-fields").prepend(a(".original-repeatable-field").clone().removeClass("original-repeatable-field")),a(".no-replaces-message").hide()}),a("#find-and-replace-sort tbody").sortable({items:"> tr:not(.pin)",handle:"td:first",start:function(){a(".sort-handle").css("cursor","-webkit-grabbing"),a(".sort-handle").css("cursor","-moz-grabbing")},stop:function(){a(".sort-handle").css("cursor","-webkit-grab"),a(".sort-handle").css("cursor","-moz-grab")}});var Bb="";window.location.hash&&(Bb=window.location.hash.substring(1),mb(Bb,!1)),""!==h("install-plugin")&&(Bb="addons",J=!0,mb(Bb,!0)),a(".notice-link").click(function(b){b.preventDefault(),a(this).closest(".inline-message").hide(),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_process_notice_link",nonce:wpmdb_data.nonces.process_notice_link,notice:a(this).data("notice"),type:a(this).data("type"),reminder:a(this).data("reminder")}})}),a(".reset-api-key").click(function(){var b=confirm(wpmdb_strings.reset_api_key);b&&!F&&(F=!0,a(".reset-api-key").after('<img src="'+cb+'" alt="" class="reset-api-key-ajax-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_reset_api_key",nonce:wpmdb_data.nonces.reset_api_key},error:function(){alert(wpmdb_strings.reset_api_key_problem),a(".reset-api-key-ajax-spinner").remove(),F=!1},success:function(b){a(".reset-api-key-ajax-spinner").remove(),F=!1,a(".connection-info").html(b),wpmdb_data.connection_info=a.trim(b).split("\n")}}))}),a("input.multiselect-toggle").change(function(){a(this).parents(".expandable-content").children(".select-wrap").toggle()}),a(".show-multiselect").each(function(){a(this).is(":checked")&&(a(this).parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),a(this).parents(".expandable-content").show(),a(this).parents(".expandable-content").children(".select-wrap").toggle())}),a("input[name=backup_option]").change(function(){a(".backup-tables-wrap").hide(),"backup_manual_select"===a(this).val()&&a(".backup-tables-wrap").show()}),a("#backup-manual-select").is(":checked")&&a(".backup-tables-wrap").show(),a(".plugin-compatibility-save").click(function(){if(!H){a(this).addClass("disabled");var b=a("#selected-plugins");a(b).attr("disabled","disabled"),H=!0,a(this).after('<img src="'+cb+'" alt="" class="plugin-compatibility-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_blacklist_plugins",blacklist_plugins:a(b).val()},error:function(c){alert(wpmdb_strings.blacklist_problem+"\r\n\r\n"+wpmdb_strings.status+" "+c.status+" "+c.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+c.responseText),a(b).removeAttr("disabled"),a(".plugin-compatibility-save").removeClass("disabled"),H=!1,a(".plugin-compatibility-spinner").remove(),a(".plugin-compatibility-success-msg").show().fadeOut(2e3)},success:function(c){""!==a.trim(c)&&alert(c),a(b).removeAttr("disabled"),a(".plugin-compatibility-save").removeClass("disabled"),H=!1,a(".plugin-compatibility-spinner").remove(),a(".plugin-compatibility-success-msg").show().fadeOut(2e3)}})}}),a("body").on("click",".delete-profile",function(){var b=a(this).next().clone();a("input",b).remove(),b=a.trim(a(b).html());var c=confirm(wpmdb_strings.remove_profile.replace("{{profile}}",b));if(c){var d=a(this).parent();if(d.find("input:checked").length){var e=d.siblings().last();if(e.find("input[type=radio]").prop("checked","checked"),e.find("input[type=text]").focus(),a("#migrate-form .crumbs .crumb:last").text("New Profile"),"function"==typeof window.history.pushState){var f=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile=-1";window.history.pushState({updated_profile_id:-1},null,f)}}d.fadeOut(500),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:a(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(){alert(wpmdb_strings.remove_profile_problem)},success:function(a){"-1"===a&&alert(wpmdb_strings.remove_profile_not_found)}})}}),a(".main-list-delete-profile-link").click(function(){var b=a(this).prev().html(),c=confirm(wpmdb_strings.remove_profile.replace("{{profile}}",b));c&&(a(this).parent().fadeOut(500),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:a(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(){alert(wpmdb_strings.remove_profile_problem)}}))}),a("body").on("click",".temp-disabled",function(){var b=confirm(wpmdb_strings.change_connection_info);b&&(a(".ssl-notice").hide(),a(".different-plugin-version-notice").hide(),a(".migrate-db-button").show(),a(".temp-disabled").removeAttr("readonly"),a(".temp-disabled").removeClass("temp-disabled"),a(".connect-button").show(),a(".step-two").hide(),a(".connection-status").show().html(wpmdb_strings.enter_connection_info),B=!1)}),a(".settings-tab input[type=checkbox]").change(function(){if("plugin-compatibility"!==a(this).attr("id")){var b=a(this).is(":checked"),c=a(this).attr("id");a(this).parent().append(db);var d=a(this).parent();a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",checked:b,setting:c,nonce:wpmdb_data.nonces.save_setting},error:function(){alert(wpmdb_strings.save_settings_problem),a(".ajax-spinner").remove()},success:function(){a(".ajax-spinner").remove(),a(d).append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()})}})}}),a(".migrate-form").submit(function(a){a.preventDefault()}),a(".connect-button").click(function(b){b.preventDefault(),a(this).blur(),nb()}),a(".pull-push-connection-info").bind("paste",function(){setTimeout(function(){nb()},0)}),a("body").on("click",".try-again",function(){nb()}),a("body").on("click",".try-http",function(){var b=a.trim(a(".pull-push-connection-info").val()).split("\n"),c=b[0].replace("https","http"),d=c+"\n"+b[1];a(".pull-push-connection-info").val(d),nb()}),a(".create-new-profile").change(function(){I=!0}),a("body").on("click",".temporarily-disable-ssl",function(){var b="";window.location.hash&&(b=window.location.hash.substring(1)),a(this).attr("href",a(this).attr("href")+"&hash="+b)}),a("body").on("click",".pause-resume",function(a){r(a)}),a("body").on("click",".cancel",function(a){ob(a)}),a(".enter-licence").click(function(){a(".settings").click(),a(".licence-input").focus()}),b.functions.execute_next_step=function(){if(_>0&&!1===$)return void setTimeout(function(){$=!0,b.functions.execute_next_step()},_);if($=!1,!0===S)return a(".migration-progress-ajax-spinner").hide(),clearInterval(y),a(".progress-text").html(wpmdb_strings.paused),a("body").on("click",".pause-resume",function(a){r(a)}),a("body").on("click",".cancel",function(a){ob(a)}),void a(".pause-resume").html(wpmdb_strings.resume);if(!0===X){t=wpmdb_migration_type();var c;"savefile"===t?c=wpmdb_strings.removing_local_sql:"pull"===t?c="backup"===x?wpmdb_strings.removing_local_backup:wpmdb_strings.removing_local_temp_tables:"push"===t&&(c="backup"===x?wpmdb_strings.removing_remote_sql:wpmdb_strings.removing_remote_temp_tables),a(".progress-text").html(c);var d={action:"wpmdb_cancel_migration",migration_state_id:A};D=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:d,error:function(c,d,e){a(".progress-title").html(wpmdb_strings.migration_cancellation_failed),a(".progress-text").html(wpmdb_strings.manually_remove_temp_files),a(".progress-text").append("<br /><br />"+wpmdb_strings.status+": "+c.status+" "+c.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+c.responseText),a(".progress-text").addClass("migration-error"),console.log(c),console.log(d),console.log(e),D=!1,b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return D=!1,c=a.trim(c),"push"===t&&"1"!==c||"push"!==t&&""!==c?(a(".progress-title").html(wpmdb_strings.migration_cancellation_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(z=wpmdb_strings.migration_cancelled,a(".progress-text").hide(),void b.functions.migration_complete_events())}})}else b.common.next_step_in_migration.fn.apply(null,b.common.next_step_in_migration.args)},a("body").on("click",".copy-licence-to-remote-site",function(){a(".connection-status").html(wpmdb_strings.copying_license),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(db);var b=a.trim(a(".pull-push-connection-info").val()).split("\n");D=!0,o(),a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_copy_licence_to_remote_site",url:b[0],key:b[1],nonce:wpmdb_data.nonces.copy_licence_to_remote_site},error:function(b){a(".connection-status").html(kb(b.responseText,"(#143)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),D=!1,p()},success:function(b){return a(".ajax-spinner").remove(),D=!1,p(),"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error?(a(".connection-status").html(b.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(b.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show())):void nb()}})}),a("body").on("click",".reactivate-licence",function(){D=!0,a(".invalid-licence").empty().html(wpmdb_strings.attempting_to_activate_licence),a(".invalid-licence").append(db),a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_reactivate_licence",nonce:wpmdb_data.nonces.reactivate_licence},error:function(b){a(".invalid-licence").html(wpmdb_strings.activate_licence_problem),a(".invalid-licence").append("<br /><br />"+wpmdb_strings.status+": "+b.status+" "+b.statusText+"<br /><br />"+wpmdb_strings.response+"<br />"+b.responseText),a(".ajax-spinner").remove(),D=!1},success:function(b){return a(".ajax-spinner").remove(),D=!1,"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error?void a(".invalid-licence").html(b.body):"undefined"!=typeof b.wpmdb_dbrains_api_down&&1===b.wpmdb_dbrains_api_down?(a(".invalid-licence").html(wpmdb_strings.temporarily_activated_licence),void a(".invalid-licence").append(b.body)):(a(".invalid-licence").empty().html(wpmdb_strings.licence_reactivated),void location.reload())}})}),a("input[name=table_migrate_option]").change(function(){k()}),a("body").on("change","#select-tables",function(){k()})})}(jQuery,wpmdb);
1
+ !function(a,b){function c(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a}function d(){X=0,$=a(".timer"),_=wpmdb_strings.time_elapsed+" ",A=setInterval(f,1e3)}function e(){var a=Math.floor(X/3600)%24,b=Math.floor(X/60)%60,d=X%60,e=_+c(a,2,0)+":"+c(b,2,0)+":"+c(d,2,0);$.html(e)}function f(){X+=1,e()}function g(a,b){var c,d,e=[],f={},g=b.length;for(c=0;g>c;c++)f[b[c]]=!0;for(g=a.length,c=0;g>c;c++)d=a[c],d in f&&e.push(d);return e}function h(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function i(b,c,d){var e=b.substr(0,b.indexOf(":"));return d!==e&&-1!==b.indexOf("https")?(a(".ssl-notice").show(),M=!0,b=b.replace("https","http"),void a(".pull-push-connection-info").val(b+"\n"+c)):void(M=!1)}function j(b){b!==wpmdb_data.this_prefix&&(a(".remote-prefix").html(b),L=!0,"pull"===wpmdb_migration_type()?a(".prefix-notice.pull").show():a(".prefix-notice.push").show())}function k(){if("undefined"!=typeof b.common.connection_data&&!1!==b.common.connection_data){var c=wpmdb_migration_type(),d=t(null,null);a(".mixed-case-table-name-notice").hide(),null!==d&&(d=d.join(""),d!==d.toLowerCase()&&("1"===b.common.connection_data.lower_case_table_names||"push"!==c&&"savefile"!==c)&&("1"===wpmdb_data.lower_case_table_names||"pull"!==c)&&("push"===c||"savefile"===c?a(".mixed-case-table-name-notice.push").show():a(".mixed-case-table-name-notice.pull").show()))}}function l(a){var b=a,c=b.replace(/\/\/(.*)@/,"//").replace("http://","").replace("https://","").replace("www.","");return c}function m(a,b,c){var d,e,f=l(a);return"pull"===b?(d=wpmdb_strings.pull_migration_label_migrating,e=wpmdb_strings.pull_migration_label_completed):(d=wpmdb_strings.push_migration_label_migrating,e=wpmdb_strings.push_migration_label_completed),d=d.replace("%s",f),e=e.replace("%s",f),"migrating"===c?d:e}function n(a){return a.replace(/^https?:/i,"")}function o(){a(".option-group").each(function(b){a("input",this).attr("disabled","disabled"),a("label",this).css("cursor","default")})}function p(){a(".option-group").each(function(b){a("input",this).removeAttr("disabled"),a("label",this).css("cursor","pointer")})}function q(b,c,d){a(".slider",b).slider("value",c),a(".amount",b).html(wpmdb_add_commas(c)+" "+d)}function r(c){!0===T?(T=!1,E=!0,a(".progress-title").html(U),a(".progress-text",".progress-wrapper-primary").html(V),a(".progress-text",".progress-wrapper-secondary").html(W),a(".migration-progress-ajax-spinner").show(),a(".pause-resume").html(wpmdb_strings.pause),A=setInterval(f,1e3),b.functions.execute_next_step()):(T=!0,E=!1,U=a(".progress-title").html(),V=a(".progress-text",".progress-wrapper-primary").html(),W=a(".progress-text",".progress-wrapper-secondary ").html(),a(".progress-title").html(wpmdb_strings.migration_paused),a(".progress-text").html(wpmdb_strings.completing_current_request),a("body").off("click",".pause-resume"),a("body").off("click",".cancel"))}function s(b,c,d){var e=document.createElement("select");return a(e).attr({multiple:"multiple",name:"select_tables[]",id:"select-tables","class":"multiselect"}),0<b.length&&a.each(b,function(b,f){if(!a.wpmdb.apply_filters("wpmdb_exclude_table",!1,f)){var g=" ";void 0!==d&&null!==d&&0<d.length&&-1!==a.inArray(f,d)&&(g=' selected="selected" '),a(e).append("<option"+g+'value="'+f+'">'+f+" ("+c[f]+")</option>")}}),e}function t(c,d){var e="",f=wpmdb_migration_type(),g=a("input[name=table_migrate_option]:checked").val();return e="migrate_select"===g?a("#select-tables").val():"push"===f||"savefile"===f?wpmdb_data.this_prefixed_tables:b.common.connection_data.prefixed_tables}function u(b,c){return a(".table-select-wrap .table-prefix").text()}var v,w,x,y,z,A,B,C=!1,D="",E=!1,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!1,P=!1,Q="",R="",S="",T=!1,U="",V="",W="",X=0,Y=0,Z=!1,$=!1,_="",aa=!1,ba=0,ca=400,da=!1,ea=!1,fa=ajaxurl.replace("/admin-ajax.php",""),ga=fa+"/images/spinner";2<window.devicePixelRatio&&(ga+="-2x"),ga+=".gif";var ha='<img src="'+ga+'" alt="" class="ajax-spinner general-spinner" />';window.onbeforeunload=function(a){return P?(a=a||window.event,a&&(a.returnValue=wpmdb_strings.sure),wpmdb_strings.sure):void 0},a(document).ready(function(){function c(b){K=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_check_licence",licence:b,context:"all",nonce:wpmdb_data.nonces.check_licence},error:function(a,b,c){alert(wpmdb_strings.license_check_problem)},success:function(b){var c,d,e,f=a(".support-content"),g=a(".addons-content"),h=a(".licence-status:not(.notification-message)");if("undefined"!=typeof b.dbrains_api_down)d=b.dbrains_api_down+b.message,e=b.dbrains_api_down;else if("undefined"!=typeof b.errors){if("undefined"!=typeof b.errors.subscription_expired)c=b.errors.subscription_expired.licence,d=b.errors.subscription_expired.support,e=b.errors.subscription_expired.addons;else{var i="";for(var j in b.errors)i+=b.errors[j];d=i,e=i}"undefined"!=typeof b.addon_content&&(e+="\n"+b.addon_content)}else d=b.message,e=b.addon_content;h.stop().fadeOut(ca,function(){a(this).empty().html(c).stop().fadeIn(ca)}),f.stop().fadeOut(ca,function(){a(this).empty().html(d).stop().fadeIn(ca)}),g.stop().fadeOut(ca,function(){a(this).empty().html(e).stop().fadeIn(ca)})}})}function e(){void 0!==wpmdb_data&&void 0!==wpmdb_data.this_tables&&void 0!==wpmdb_data.this_table_sizes_hr&&(xa=s(wpmdb_data.this_tables,wpmdb_data.this_table_sizes_hr,a(xa).val())),void 0!==b.common.connection_data&&void 0!==b.common.connection_data.tables&&void 0!==b.common.connection_data.table_sizes_hr&&(ya=s(b.common.connection_data.tables,b.common.connection_data.table_sizes_hr,a(ya).val()))}function f(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(xa)}function U(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(ya)}function V(){a("#migrate-selected").parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),a(".table-select-wrap").show(),a("#migrate-only-with-prefix").prop("checked",!1),a("#migrate-selected").prop("checked",!0),a(".table-migrate-options").hide(),a(".select-tables-wrap").show()}function W(){a(".table-migrate-options").show()}function X(){a("#select-tables").children("option").prop("selected",!0)}function $(a,b){return n(wpmdb_data.this_url)}function _(){var c=wpmdb_migration_type(),d=a.trim(a(".pull-push-connection-info").val()).split("\n");if("undefined"!=typeof wpmdb_default_profile&&!0!==wpmdb_default_profile&&"savefile"!==c&&!E&&wpmdb_data.is_pro){E=!0,o(),a(".connection-status").html(wpmdb_strings.establishing_remote_connection),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(ha);var e=wpmdb_migration_type();a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:d[0],key:d[1],intent:e,nonce:wpmdb_data.nonces.verify_connection_to_remote_site,convert_post_type_selection:wpmdb_convert_post_type_selection,profile:wpmdb_data.profile},error:function(b,c,d){a(".connection-status").html(na(b.responseText,"(#102)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),E=!1,p()},success:function(c){if(a(".ajax-spinner").remove(),E=!1,p(),"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return a(".connection-status").html(c.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(c.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show());i(d[0],d[1],c.scheme),j(c.prefix),a(".pull-push-connection-info").addClass("temp-disabled"),a(".pull-push-connection-info").attr("readonly","readonly"),a(".connect-button").hide(),a(".connection-status").hide(),a(".step-two").show(),C=!0,b.common.connection_data=c,la(),k();var e="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables&&(e=wpmdb_loaded_tables),ya=s(b.common.connection_data.tables,b.common.connection_data.table_sizes_hr,e);var f="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_post_types&&("undefined"!=typeof c.select_post_types?(a("#exclude-post-types").attr("checked","checked"),a(".post-type-select-wrap").show(),f=c.select_post_types):f=wpmdb_loaded_post_types);var g=document.createElement("select");a(g).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(b.common.connection_data.post_types,function(b,c){var d=a.inArray(c,f);d=-1!==d||!0===wpmdb_convert_exclude_revisions&&"revision"!==c?' selected="selected" ':" ",a(g).append("<option"+d+'value="'+c+'">'+c+"</option>")}),Aa=g;var h="";!1===wpmdb_default_profile&&"undefined"!=typeof wpmdb_loaded_tables_backup&&(h=wpmdb_loaded_tables_backup);var l=document.createElement("select");a(l).attr({multiple:"multiple",name:"select_backup[]",id:"select-backup","class":"multiselect"}),a.each(b.common.connection_data.tables,function(c,d){var e=a.inArray(d,h);e=-1!==e?' selected="selected" ':" ",a(l).append("<option"+e+'value="'+d+'">'+d+" ("+b.common.connection_data.table_sizes_hr[d]+")</option>")}),Ba=l,"pull"===wpmdb_migration_type()?(a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(Aa),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(Ca),a(".table-prefix").html(c.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#select-backup").remove(),a(".backup-tables-wrap").prepend(Ba)),a.wpmdb.do_action("verify_connection_to_remote_site",b.common.connection_data)}})}}function fa(b,d){a(".licence-input, .register-licence").remove(),a(".licence-not-entered").prepend(b.masked_licence),a(".support-content").empty().html("<p>"+wpmdb_strings.fetching_license+'<img src="'+ga+'" alt="" class="ajax-spinner general-spinner" /></p>'),c(d),a(".migrate-selection label").removeClass("disabled"),a(".migrate-selection input").removeAttr("disabled")}function ia(){a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_get_log",nonce:wpmdb_data.nonces.get_log},error:function(a,b,c){alert(wpmdb_strings.update_log_problem)},success:function(b){a(".debug-log-textarea").val(b)}})}function ja(){var b=a(".progress-content").outerHeight();a(".progress-content").animate({top:"-"+b+"px"},400,"swing",function(){a("#overlay").remove(),a(".progress-content").remove()}),O=!1}function ka(){var b;if(a(".save-settings-button").blur(),!H){if(a("#migrate-selected").is(":checked")&&null===a("#select-tables").val())return void alert(wpmdb_strings.please_select_one_table);if("savefile"!==wpmdb_migration_type()&&a("#backup-manual-select").is(":checked")&&null===a("#select-backup").val())return void alert(wpmdb_strings.please_select_one_table_backup);var c=!1;a("#create_new").is(":checked")&&(c=!0);var d=a(".create-new-profile").val();H=!0,b=a("#migrate-form").serialize(),a(".save-settings-button").attr("disabled","disabled").after('<img src="'+ga+'" alt="" class="save-profile-ajax-spinner general-spinner" />'),E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_profile",profile:b,nonce:wpmdb_data.nonces.save_profile},error:function(b,c,d){E=!1,alert(wpmdb_strings.save_profile_problem),a(".save-settings-button").removeAttr("disabled"),a(".save-profile-ajax-spinner").remove(),a(".save-settings-button").after('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()}),H=!1},success:function(b){var e=parseInt(a("#migrate-form input[name=save_migration_profile_option]:checked").val(),10)+1;if(E=!1,a(".save-settings-button").removeAttr("disabled"),a(".save-profile-ajax-spinner").remove(),a(".save-settings-button").after('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()}),H=!1,a(".create-new-profile").val(""),c){var f=parseInt(b,10),g=f+1,h=a('<li><span class="delete-profile" data-profile-id="'+g+'"></span><label for="profile-'+g+'"><input id="profile-'+g+'" value="'+f+'" name="save_migration_profile_option" type="radio"></label></li>');h.find("label").append(document.createTextNode(" "+d)),e=g,a("#create_new").parents("li").before(h),a("#profile-"+g).attr("checked","checked")}var i=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile="+e,j=a("#migrate-form input[name=save_migration_profile_option]:checked").parent().text().trim();if("function"==typeof window.history.pushState){if(a("#migrate-form .crumbs").length)a("#migrate-form .crumbs .crumb:last").text(j);else{var k=a('<div class="crumbs" />').append('<a class="crumb" href="'+wpmdb_data.this_plugin_base+'"> Saved Profiles </a>').append('<span class="crumb">'+j+"</span>");a("#migrate-form").prepend(k)}window.history.pushState({updated_profile_id:e},null,i)}}})}}function la(){a(".connection-status").hide(),a(".prefix-notice").hide(),a(".ssl-notice").hide(),a(".different-plugin-version-notice").hide(),a(".step-two").show(),a(".backup-options").show(),a(".keep-active-plugins").show(),a(".directory-permission-notice").hide(),a("#create-backup").removeAttr("disabled"),a("#create-backup-label").removeClass("disabled"),a(".backup-option-disabled").hide(),a(".compatibility-older-mysql").hide(),a(".pause-before-finalize").show();var c;a.trim(a(".pull-push-connection-info").val()).split("\n");wpmdb_toggle_migration_action_text(),"pull"===wpmdb_migration_type()?(a(".pull-list li").append(Da),Da.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),C?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(b.common.connection_data.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir),!1===J&&(c=l(b.common.connection_data.url),a(".create-new-profile").val(c)),!0===L&&a(".prefix-notice.pull").show(),!0===M&&a(".ssl-notice").show(),!0===N&&(a(".different-plugin-version-notice").show(),a(".step-two").hide()),wpmdb_toggle_migration_action_text(),!1===wpmdb_data.write_permission&&(a("#create-backup").prop("checked",!1),a("#create-backup").attr("disabled","disabled"),a("#create-backup-label").addClass("disabled"),a(".backup-option-disabled").show(),a(".upload-directory-location").html(wpmdb_data.this_upload_dir_long))):(a(".connection-status").show(),a(".step-two").hide())):"push"===wpmdb_migration_type()?(a(".push-list li").append(Da),Da.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),C?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(wpmdb_data.this_prefix),a(".uploads-dir").html(b.common.connection_data.uploads_dir),!1===J&&(c=l(b.common.connection_data.url),a(".create-new-profile").val(c)),!0===L&&a(".prefix-notice.push").show(),!0===M&&a(".ssl-notice").show(),!0===N&&(a(".different-plugin-version-notice").show(),a(".step-two").hide()),wpmdb_toggle_migration_action_text(),"0"===b.common.connection_data.write_permissions&&(a("#create-backup").prop("checked",!1),a("#create-backup").attr("disabled","disabled"),a("#create-backup-label").addClass("disabled"),a(".backup-option-disabled").show(),a(".upload-directory-location").html(b.common.connection_data.upload_dir_long))):(a(".connection-status").show(),a(".step-two").hide())):"savefile"===wpmdb_migration_type()&&(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(wpmdb_data.this_prefix),a(".compatibility-older-mysql").show(),!1===J&&a(".create-new-profile").val(""),a(".backup-options").hide(),a(".keep-active-plugins").hide(),a(".pause-before-finalize").hide(),!1===wpmdb_data.write_permission&&(a(".directory-permission-notice").show(),a(".step-two").hide())),k(),a.wpmdb.do_action("move_connection_info_box",{migration_type:wpmdb_migration_type(),last_migration_type:D})}function ma(){var c=null,d=null;null!==b.common.previous_connection_data&&"object"==typeof b.common.previous_connection_data&&b.common.previous_connection_data.url!==b.common.connection_data.url&&(c=n(b.common.previous_connection_data.url),d=b.common.previous_connection_data.path),"push"===wpmdb_migration_type()||"savefile"===wpmdb_migration_type()?("pull"===D?a(".replace-row").each(function(){var b=a(".old-replace-col input",this).val();a(".old-replace-col input",this).val(a(".replace-right-col input",this).val()),a(".replace-right-col input",this).val(b)}):"push"===D&&"push"===wpmdb_migration_type()&&null!==c&&null!==d&&a(".replace-row").each(function(){var e=a(".replace-right-col input",this).val();e===d&&a(".replace-right-col input",this).val(b.common.connection_data.path),e===c&&a(".replace-right-col input",this).val(n(b.common.connection_data.url))}),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(za),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(Ba)):"pull"===wpmdb_migration_type()&&(""===D||"push"===D||"savefile"===D?a(".replace-row").each(function(){var b=a(".old-replace-col input",this).val();a(".old-replace-col input",this).val(a(".replace-right-col input",this).val()),a(".replace-right-col input",this).val(b)}):"pull"===D&&"pull"===wpmdb_migration_type()&&null!==c&&null!==d&&a(".replace-row").each(function(){var e=a(".old-replace-col input",this).val();e===d&&a(".old-replace-col input",this).val(b.common.connection_data.path),e===c&&a(".old-replace-col input",this).val(n(b.common.connection_data.url))}),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(Aa),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(Ca)),D=wpmdb_migration_type()}function na(a,b,c){return wpmdbGetAjaxErrors(wpmdb_strings.connection_local_server_problem,b,a,c)}function oa(a){return/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}function pa(b,d){a(".nav-tab").removeClass("nav-tab-active"),a(".nav-tab."+b).addClass("nav-tab-active"),a(".content-tab").hide(),a("."+b+"-tab").show(),"settings"===b&&!1===K&&"1"===wpmdb_data.has_licence&&(a("p.licence-status").append("Checking License... ").append(ha),c()),"help"===b&&(ia(),!1===K&&"1"===wpmdb_data.has_licence&&(a(".support-content p").append(ha),c())),"addons"===b&&!0!==d&&!1===K&&"1"===wpmdb_data.has_licence&&(a(".addons-content p").append(ha),c())}function qa(c){var d=a(".pull-push-connection-info");if(!E&&!a(d).hasClass("temp-disabled")){c=a(".pull-push-connection-info").val();var f=a.trim(c).split("\n"),g=!1,h="";if(""===f&&(g=!0,h=wpmdb_strings.connection_info_missing),2===f.length||g||(g=!0,h=wpmdb_strings.connection_info_incorrect),g||oa(f[0])||(g=!0,h=wpmdb_strings.connection_info_url_invalid),!g&&32>=f[1].length&&(g=!0,h=wpmdb_strings.connection_info_key_invalid),g||f[0]!==wpmdb_data.connection_info[0]||(g=!0,h=wpmdb_strings.connection_info_local_url),g||f[1]!==wpmdb_data.connection_info[1]||(g=!0,h=wpmdb_strings.connection_info_local_key),g)return a(".connection-status").html(h),void a(".connection-status").addClass("notification-message error-notice migration-error");var m=f[0]+"\n"+f[1];!1===wpmdb_data.openssl_available&&(f[0]=f[0].replace("https://","http://"),m=f[0]+"\n"+f[1],a(".pull-push-connection-info").val(m)),L=!1,E=!0,o(),a(".basic-access-auth-wrapper").is(":visible")&&(f[0]=f[0].replace(/\/\/(.*)@/,"//"),f[0]=f[0].replace("//","//"+encodeURIComponent(a.trim(a(".auth-username").val()))+":"+encodeURIComponent(a.trim(a(".auth-password").val()))+"@"),m=f[0]+"\n"+f[1],a(".pull-push-connection-info").val(m),a(".basic-access-auth-wrapper").hide()),a(".step-two").hide(),a(".ssl-notice").hide(),a(".prefix-notice").hide(),a(".connection-status").show(),a(".connection-status").html(wpmdb_strings.establishing_remote_connection),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(ha);var q=wpmdb_migration_type();J=!1,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:f[0],key:f[1],intent:q,nonce:wpmdb_data.nonces.verify_connection_to_remote_site},error:function(b,c,d){a(".connection-status").html(na(b.responseText,"(#100)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),E=!1,p()},success:function(c){if(a(".ajax-spinner").remove(),E=!1,p(),i(f[0],f[1],c.scheme),"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return a(".connection-status").html(c.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(c.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show());var d=l(c.url);a(".create-new-profile").val(d),a(".pull-push-connection-info").addClass("temp-disabled"),a(".pull-push-connection-info").attr("readonly","readonly"),a(".connect-button").hide(),a(".connection-status").hide(),a(".step-two").show(),j(c.prefix),C=!0,b.common.previous_connection_data=b.common.connection_data,b.common.connection_data=c,la(),ma(),k(),e(),Ba=a(ya).clone(),a(Ba).attr({name:"select_backup[]",id:"select-backup"});var g=document.createElement("select");a(g).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(b.common.connection_data.post_types,function(b,c){a(g).append('<option value="'+c+'">'+c+"</option>")}),Aa=g,a("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===wpmdb_migration_type()?(a("#new-url").val(n(wpmdb_data.this_url)),a("#new-path").val(wpmdb_data.this_path),"true"===wpmdb_data.is_multisite&&(a("#new-domain").val(wpmdb_data.this_domain),a('.replace-row.pin .old-replace-col input[type="text"]').val(n(c.url))),a("#old-url").val(n(c.url)),a("#old-path").val(c.path),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(Aa),a(".table-prefix").html(c.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#new-url").val(n(c.url)),a("#new-path").val(c.path),"true"===wpmdb_data.is_multisite&&a('.replace-row.pin .old-replace-col input[type="text"]').val(n(wpmdb_data.this_url)),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(Ba)),b.common.next_step_in_migration={fn:a.wpmdb.do_action,args:["verify_connection_to_remote_site",b.common.connection_data]},b.functions.execute_next_step()}})}}function ra(c){Z=!0,a(".progress-text").html(wpmdb_strings.completing_current_request),a(".progress-title").html(wpmdb_strings.cancelling_migration),a(".migration-controls").fadeOut(),a(".migration-progress-ajax-spinner").show(),!0===T&&(T=!1,b.functions.execute_next_step())}b.migration_state_id="",a("#plugin-compatibility").change(function(b){var c="1";if(a(this).is(":checked")){var d=confirm(wpmdb_strings.mu_plugin_confirmation);if(!d)return void a(this).prop("checked",!1)}else c="0";a(".plugin-compatibility-wrap").toggle(),a(this).parent().append(ha),a("#plugin-compatibility").attr("disabled","disabled"),a(".plugin-compatibility").addClass("disabled"),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_plugin_compatibility",install:c},error:function(b,c,d){alert(wpmdb_strings.plugin_compatibility_settings_problem+"\r\n\r\n"+wpmdb_strings.status+" "+b.status+" "+b.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+b.responseText),a(".ajax-spinner").remove(),a("#plugin-compatibility").removeAttr("disabled"),a(".plugin-compatibility").removeClass("disabled")},success:function(b){""!==a.trim(b)?alert(b):(a(".plugin-compatibility").append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()})),a(".ajax-spinner").remove(),a("#plugin-compatibility").removeAttr("disabled"),a(".plugin-compatibility").removeClass("disabled")}})}),a("#plugin-compatibility").is(":checked")&&a(".plugin-compatibility-wrap").show(),(0<=navigator.userAgent.indexOf("MSIE")||0<=navigator.userAgent.indexOf("Trident"))&&a(".ie-warning").show(),0===wpmdb_data.valid_licence&&a("#savefile").prop("checked",!0);var sa=a(".max-request-size"),ta=a(".slider",sa);ta.slider({range:"min",value:parseInt(wpmdb_data.max_request/1024),min:512,max:parseInt(wpmdb_data.bottleneck/1024),step:1,create:function(a,b){q(sa,wpmdb_data.max_request/1024,"kB")},slide:function(a,b){q(sa,b.value,"kB")},stop:function(b,c){a(".amount",sa).after('<img src="'+ga+'" alt="" class="slider-spinner general-spinner" />'),ta.slider("disable"),a.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_max_request_size",max_request_size:parseInt(c.value),nonce:wpmdb_data.nonces.update_max_request_size},error:function(b,c,d){ta.slider("enable"),a(".slider-spinner",sa).remove(),alert(wpmdb_strings.max_request_size_problem),q(sa,wpmdb_data.max_request/1024,"kB"),ta.slider("enable")},success:function(){ta.slider("enable"),a(".slider-success-msg",sa).show(),a(".slider-success-msg",sa).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",sa).remove()}})}});var ua=a(".delay-between-requests"),va=a(".slider",ua);va.slider({range:"min",value:parseInt(wpmdb_data.delay_between_requests/1e3),min:0,max:10,step:1,create:function(a,b){q(ua,wpmdb_data.delay_between_requests/1e3,"s")},slide:function(a,b){q(ua,b.value,"s")},stop:function(b,c){a(".amount",ua).after('<img src="'+ga+'" alt="" class="slider-spinner general-spinner" />'),va.slider("disable"),a.ajax({url:ajaxurl,type:"POST",cache:!1,data:{action:"wpmdb_update_delay_between_requests",delay_between_requests:parseInt(1e3*c.value),nonce:wpmdb_data.nonces.update_delay_between_requests},error:function(b,c,d){va.slider("enable"),a(".slider-spinner",ua).remove(),alert(wpmdb_strings.delay_between_requests_problem),q(ua,wpmdb_data.delay_between_requests/1e3,"s"),va.slider("enable")},success:function(){wpmdb_data.delay_between_requests=parseInt(1e3*c.value),va.slider("enable"),a(".slider-success-msg",ua).show(),a(".slider-success-msg",ua).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",ua).remove()}})}});var wa=a(".progress-content").clone();a(".progress-content").remove();var xa=a("#select-tables").clone(),ya=a("#select-tables").clone(),za=a("#select-post-types").clone(),Aa=a("#select-post-types").clone(),Ba=a("#select-backup").clone(),Ca=a("#select-backup").clone();a(".help-tab .video").each(function(){var b=a(this),c=a(".video-viewer");a("a",this).click(function(d){d.preventDefault(),c.attr("src","//www.youtube.com/embed/"+b.data("video-id")+"?autoplay=1"),c.show();var e=c.offset();a(window).scrollTop(e.top-50)})}),a(".backup-options").show(),a(".keep-active-plugins").show(),"savefile"===wpmdb_migration_type()&&(a(".backup-options").hide(),a(".keep-active-plugins").hide()),D=wpmdb_migration_type(),a(".content-tab").on("click",".check-my-licence-again",function(b){b.preventDefault(),K=!1,a(b.target).replaceWith("Checking... "+ha),c(null,"all")}),a.wpmdb.add_action("wpmdb_refresh_table_selects",e),a.wpmdb.add_action("wpmdb_update_push_table_select",f),a.wpmdb.add_action("wpmdb_update_pull_table_select",U),a.wpmdb.add_action("wpmdb_disable_table_migration_options",V),a.wpmdb.add_action("wpmdb_enable_table_migration_options",W),a.wpmdb.add_action("wpmdb_select_all_tables",X),a.wpmdb.add_filter("wpmdb_base_old_url",$),_(),a("body").on("click",".js-action-link",function(b){b.preventDefault(),a(this).blur()}),a(".licence-form").submit(function(b){if(b.preventDefault(),!F){a(".licence-status").removeClass("notification-message error-notice success-notice");var c=a.trim(a(".licence-input").val());if(""===c)return a(".licence-status").addClass("notification-message error-notice"),void a(".licence-status").html(wpmdb_strings.enter_license_key);a(".licence-status").empty().removeClass("success"),F=!0,a(".button.register-licence").after('<img src="'+ga+'" alt="" class="register-licence-ajax-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"JSON",cache:!1,data:{action:"wpmdb_activate_licence",licence_key:c,nonce:wpmdb_data.nonces.activate_licence,context:"licence"},error:function(b,c,d){F=!1,a(".register-licence-ajax-spinner").remove(),a(".licence-status").html(wpmdb_strings.register_license_problem)},success:function(b){if(F=!1,a(".register-licence-ajax-spinner").remove(),"undefined"!=typeof b.errors){var d="";for(var e in b.errors)d+=b.errors[e];a(".licence-status").html(d),"undefined"!=typeof b.masked_licence&&(fa(b,c),a(".migrate-tab .invalid-licence").hide())}else"undefined"!=typeof b.wpmdb_error&&"undefined"!=typeof b.body?a(".licence-status").html(b.body):(a(".licence-status").html(wpmdb_strings.license_registered).delay(5e3).fadeOut(1e3),a(".licence-status").addClass("success notification-message success-notice"),fa(b,c),a(".invalid-licence").hide())}})}}),a(".clear-log").click(function(){a(".debug-log-textarea").val(""),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_clear_log",nonce:wpmdb_data.nonces.clear_log},error:function(a,b,c){alert(wpmdb_strings.clear_log_problem)},success:function(a){}})}),a(".multiselect-select-all").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).prop("selected",1),a(b).focus().trigger("change")}),a(".multiselect-deselect-all").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).removeAttr("selected"),a(b).focus().trigger("change")}),a(".multiselect-invert-selection").click(function(){var b=a(this).parents(".select-wrap").children(".multiselect");a("option",b).each(function(){a(this).attr("selected",!a(this).attr("selected"))}),a(b).focus().trigger("change")}),a(".option-group input[type=radio]").change(function(){var b=a(this).closest(".option-group");a("ul",b).hide();var c=a(this).closest("li");a("ul",c).show()}),a(".option-group").each(function(){a(".option-group input[type=radio]").each(function(){if(a(this).is(":checked")){var b=a(this).closest("li");a("ul",b).show()}})}),a(".header-expand-collapse").click(function(){a(".expand-collapse-arrow",this).hasClass("collapsed")?(a(".expand-collapse-arrow",this).removeClass("collapsed"),a(this).next().show()):(a(".expand-collapse-arrow",this).addClass("collapsed"),a(this).next().hide())}),a(".checkbox-label input[type=checkbox]").change(function(){a(this).is(":checked")?a(this).parent().next().show():a(this).parent().next().hide()}),a("#save-migration-profile").change(function(){b.functions.update_migrate_button_text(),a(this).is(":checked")?a(".save-settings-button").show():a(".save-settings-button").hide();
2
+ }),a("#save-migration-profile").is(":checked")&&a(".save-settings-button").show(),a(".create-new-profile").focus(function(){a("#create_new").prop("checked",!0)}),a(".checkbox-label input[type=checkbox]").each(function(){a(this).is(":checked")&&a(this).parent().next().show()}),a(".migrate-db-button").click(function(c){function e(b,c){var d=0,e=JSON.parse(JSON.stringify(c));a.each(b,function(a,b){d+=parseInt(e[b])});var f=0,g=0,h=[];a.each(b,function(a,b){var c=Math.round(e[b]/d*100);h[b]=c,c>f&&(f=c),g+=c});var i="",j=100-g;a.each(b,function(b,c){var d=h[c];0!==j&&d===f&&(d+=j,j=0),a(".progress-tables").append('<div class="progress-chunk '+c+'_chunk" style="width: '+d+'%;" title="'+c+'"><span>'+c+"</span></div>"),a(".progress-tables-hover-boxes").append('<div class="progress-chunk-hover" data-table="'+c+'" style="width: '+d+'%;"></div>'),i=c}),a(".progress-tables",".progress-wrapper-primary").find(".progress-chunk").each(function(c){function d(b){a("span",b).innerWidth()>a(b).width()&&a("span",b).hide()}1>a(this).width()&&(a(this).hide(),a(".progress-chunk-hover[data-table="+b[c]+"]").hide(),e[i]=Number(e[i]),e[i]+=Number(e[b[c]]),e[b[c]]=0);var f=this;setTimeout(function(){d(f)},0)});var k=[e,d];return k}if(a(this).blur(),c.preventDefault(),b.migration_state_id="",!1!==a.wpmdb.apply_filters("wpmdb_migration_profile_ready",!0)){if(a("#migrate-selected").is(":checked")&&null===a("#select-tables").val())return void alert(wpmdb_strings.please_select_one_table);if("savefile"!==wpmdb_migration_type()&&a("#backup-manual-select").is(":checked")&&null===a("#select-backup").val())return void alert(wpmdb_strings.please_select_one_table_backup);var f=!1,h=!1;if(a("#new-url").length&&!a("#new-url").val()&&(a("#new-url-missing-warning").show(),a("#new-url").focus(),a("html,body").scrollTop(0),f=!0),a("#new-path").length&&!a("#new-path").val()&&(a("#new-path-missing-warning").show(),!1===f&&(a("#new-path").focus(),a("html,body").scrollTop(0)),h=!0),!0!==f&&!0!==h){a("#save-migration-profile").is(":checked")&&ka(),y=a("#migrate-form").serialize();var i=a(document).height();a("body").append('<div id="overlay"></div>'),a("#overlay").height(i).css({position:"fixed",top:0,left:0,width:"100%","z-index":99999,display:"none"});var j=wa.clone();v=wpmdb_migration_type(),z="backup","savefile"===v&&(z="migrate"),!1===a("#create-backup").is(":checked")&&(z="migrate");var k=(a("input[name=table_migrate_option]:checked").val(),a.trim(a(".pull-push-connection-info").val()).split("\n")),l="";w=k[0],x=k[1];var n="";a("#overlay").after(j),B=wpmdb_strings.exporting_complete,"savefile"===v?n=wpmdb_strings.exporting_please_wait:(n=m(w,v,"migrating"),B=m(w,v,"completed")),a(".progress-title").html(n),a("#overlay").show();var o=a("input[name=backup_option]:checked").val(),p=a("input[name=table_migrate_option]:checked").val(),q="";"backup"===z?("migrate_only_with_prefix"===p&&"backup_selected"===o&&(o="backup_only_with_prefix"),"push"===v?(l=b.common.connection_data.table_rows,"backup_only_with_prefix"===o?S=b.common.connection_data.prefixed_tables:"backup_selected"===o?(q=a("#select-tables").val(),S=g(q,b.common.connection_data.tables)):"backup_manual_select"===o&&(S=a("#select-backup").val())):(l=wpmdb_data.this_table_rows,"backup_only_with_prefix"===o?S=wpmdb_data.this_prefixed_tables:"backup_selected"===o?(q=a("#select-tables").val(),S=g(q,wpmdb_data.this_tables)):"backup_manual_select"===o&&(S=a("#select-backup").val()))):(S=t(null,null),l="push"===v||"savefile"===v?wpmdb_data.this_table_rows:b.common.connection_data.table_rows);var r=e(S,l);l=r[0];var s=r[1];a(".progress-title").after('<img src="'+ga+'" alt="" class="migration-progress-ajax-spinner general-spinner" />');var u=a(".progress-content").outerHeight();a(".progress-content").css("top","-"+u+"px").show().animate({top:"0px"}),d(),P=!0;var A={action:"wpmdb_initiate_migration",intent:v,url:w,key:x,form_data:y,stage:z,nonce:wpmdb_data.nonces.initiate_migration};"savefile"!==v&&(A.temp_prefix=b.common.connection_data.temp_prefix),E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:A,error:function(c,d,e){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(na(c.responseText,"(#112)",c)),a(".progress-text").addClass("migration-error"),console.log(c),console.log(d),console.log(e),E=!1,b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){if(E=!1,"undefined"!=typeof c&&"undefined"!=typeof c.wpmdb_error&&1===c.wpmdb_error)return b.common.migration_error=!0,b.functions.migration_complete_events(),a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),void a(".progress-text").html(c.body);b.migration_state_id=c.migration_state_id;var d=0,f=0;Y=0;var g=0,h=0,i=0,j=0;ba=0,"savefile"!==v&&"undefined"!=typeof b.common.connection_data&&"undefined"!=typeof b.common.connection_data.delay_between_requests&&(ba=Math.max(parseInt(wpmdb_data.delay_between_requests),parseInt(b.common.connection_data.delay_between_requests))),b.functions.migrate_table_recursive=function(c,k){if(d>=S.length){if("backup"!==z)return a(".progress-label").removeClass("label-visible"),b.common.hooks=a.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",b.common.hooks),b.common.hooks.push(b.functions.migration_complete),b.common.hooks.push(b.functions.wpmdb_flush),b.common.hooks=a.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",b.common.hooks),b.common.hooks.push(b.functions.migration_complete_events),b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step();z="migrate",d=0,f=0,Y=0,a(".progress-bar").width("0px"),S=t(null,null),l="push"===v||"savefile"===v?wpmdb_data.this_table_rows:b.common.connection_data.table_rows,a(".progress-tables").empty(),a(".progress-tables-hover-boxes").empty(),r=e(S,l),l=r[0],s=r[1]}"backup"===z?a(".progress-text").html(Y+"% - "+wpmdb_strings.backing_up+' "'+S[d]+'"'):a(".progress-text").html(Y+"% - "+wpmdb_strings.migrating+' "'+S[d]+'"');var m=0;d===S.length-1&&(m=1);var n=0;"savefile"!==v&&1===parseInt(b.common.connection_data.gzip)&&(n=1);var o={action:"wpmdb_migrate_table",migration_state_id:b.migration_state_id,table:S[d],stage:z,current_row:c,last_table:m,primary_keys:k,gzip:n,nonce:wpmdb_data.nonces.migrate_table};"savefile"!==v&&(o.bottleneck=b.common.connection_data.bottleneck,o.prefix=b.common.connection_data.prefix),b.common.connection_data&&b.common.connection_data.path_current_site&&b.common.connection_data.domain&&(o.path_current_site=b.common.connection_data.path_current_site,o.domain_current_site=b.common.connection_data.domain),E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,timeout:0,data:o,error:function(c,e,f){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.table_process_problem+" "+S[d]),a(".progress-text").append("<br /><br />"+wpmdb_strings.status+": "+c.status+" "+c.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+c.responseText),a(".progress-text").addClass("migration-error"),E=!1,console.log(c),console.log(e),console.log(f),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){E=!1,c=a.trim(c);var e=wpmdb_parse_json(c);return!1===e||null===e?(a(".progress-title").html(wpmdb_strings.migration_failed),""===c||null===c?a(".progress-text").html(wpmdb_strings.table_process_problem_empty_response+" "+S[d]):a(".progress-text").html(na(c,null,null)),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):"undefined"!=typeof e.wpmdb_error&&1===e.wpmdb_error?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),a(".progress-text").html(e.body),b.common.migration_error=!0,void b.functions.migration_complete_events()):(1===m&&"savefile"===v&&("undefined"!=typeof e.dump_filename&&(Q=e.dump_filename),"undefined"!=typeof e.dump_path&&(R=e.dump_path)),-1===e.current_row||"-1"===e.current_row?(f-=j,j=0,i=0,f+=parseInt(l[S[d]]),d++,e.current_row="",e.primary_keys=""):(h=parseInt(e.current_row),g=h-i,i=h,f+=g,j+=g),Y=Math.floor(f/s*100),a(".progress-bar").width(Y+"%"),b.common.next_step_in_migration={fn:b.functions.migrate_table_recursive,args:[e.current_row,e.primary_keys]},void b.functions.execute_next_step())}})},b.common.next_step_in_migration={fn:b.functions.migrate_table_recursive,args:["-1",""]},b.functions.execute_next_step()}})}}}),b.functions.migration_complete_events=function(){!1===b.common.migration_error&&(""===b.common.non_fatal_errors?("savefile"!==v&&!0===a("#save_computer").is(":checked")&&a(".progress-text").css("visibility","hidden"),a(".progress-title").html(B).append('<div class="dashicons dashicons-yes"></div>')):(a(".progress-text").html(b.common.non_fatal_errors),a(".progress-text").addClass("migration-error"),a(".progress-title").html(wpmdb_strings.completed_with_some_errors)),a(".progress-bar-wrapper").hide()),a(".migration-controls").hide(),b.common.hooks=[],b.common.call_stack=[],b.common.migration_error=!1,P=!1,O=!0,T=!1,Z=!1,E=!1,b.common.non_fatal_errors="",a(".progress-label").remove(),a(".migration-progress-ajax-spinner").remove(),a(".close-progress-content").show(),a("#overlay").css("cursor","pointer"),clearInterval(A)},b.functions.migration_complete=function(){if(a(".migration-controls").fadeOut(),"savefile"===v){P=!1;var c=wpmdb_strings.migration_complete;if(a("#save_computer").is(":checked")){var d=wpmdb_data.this_download_url+encodeURIComponent(Q);a("#gzip_file").is(":checked")&&(d+="&gzip=1"),window.location=d}else c=wpmdb_strings.completed_dump_located_at+" "+R;!1===b.common.migration_error&&(a(".progress-text").html(c),b.functions.migration_complete_events(),a(".progress-title").html(B))}else a(".progress-text").html(wpmdb_strings.finalizing_migration),E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_finalize_migration",migration_state_id:b.migration_state_id,prefix:b.common.connection_data.prefix,tables:S.join(","),nonce:wpmdb_data.nonces.finalize_migration},error:function(c,d,e){E=!1,a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.finalize_tables_problem),a(".progress-text").addClass("migration-error"),alert(c+" : "+d+" : "+e),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return E=!1,"1"!==a.trim(c)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step())}})},b.functions.wpmdb_flush=function(){"savefile"!==v&&(a(".progress-text").html(wpmdb_strings.flushing),E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:b.migration_state_id,nonce:wpmdb_data.nonces.flush},error:function(c,d,e){E=!1,a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.flush_problem),a(".progress-text").addClass("migration-error"),alert(c+" : "+d+" : "+e),b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return E=!1,"1"!==a.trim(c)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(b.common.next_step_in_migration={fn:wpmdb_call_next_hook},void b.functions.execute_next_step())}}))},b.functions.update_migrate_button_text=function(){var b=wpmdb_migration_type(),c=a("#save-migration-profile").is(":checked")?"_save":"",d="migrate_button_"+("savefile"===b?"export":b)+c;a(".migrate-db .button-primary").val(wpmdb_strings[d])},b.functions.update_migrate_button_text(),a("body").on("click",".close-progress-content-button",function(a){ja()}),a("body").on("click","#overlay",function(){!0===O&&ja()}),a(".save-settings-button").click(function(b){return b.preventDefault(),""===a.trim(a(".create-new-profile").val())&&a("#create_new").is(":checked")?(alert(wpmdb_strings.enter_name_for_profile),void a(".create-new-profile").focus()):void ka()}),a("body").on("mousemove",".progress-chunk-hover",function(b){var c=b.pageX,d=a(".progress-bar-wrapper").offset(),e=a(".progress-label").outerWidth()/2;c=c-d.left-e,a(".progress-label").css("left",c+"px"),a(".progress-label").html(a(this).attr("data-table"))}),a("body").on("mouseenter mouseleave",".progress-chunk-hover",function(b){"mouseenter"===b.type?a(".progress-label").addClass("label-visible"):a(".progress-label").removeClass("label-visible")});var Da=a(".connection-info-wrapper");la(),a(".migrate-selection.option-group input[type=radio]").change(function(){la(),C&&ma(),b.functions.update_migrate_button_text()}),"pull"!==wpmdb_migration_type()&&"push"!==wpmdb_migration_type()||C||(a(".step-two").hide(),a(".connection-status").show()),a(".general-helper").click(function(b){b.preventDefault();var c=a(this),d=a(this).next();a(".helper-message").not(d).hide();var e=c.position();d.hasClass("bottom")?d.css({left:e.left-d.width()/2+"px",top:e.top+c.height()+9+"px"}):d.css({left:e.left+c.width()+9+"px",top:e.top+c.height()/2-18+"px"}),d.toggle(),b.stopPropagation()}),a("body").click(function(){a(".helper-message").hide()}),a(".helper-message").click(function(a){a.stopPropagation()}),a("body").on("click",".show-errors-toggle",function(b){b.preventDefault(),a(this).next(".migration-php-errors").toggle()}),a(".nav-tab").click(function(){var b=a(this).attr("data-div-name");b=b.replace("-tab",""),window.location.hash=b,pa(b,!1)}),a("body").on("click",'a[href^="#"]',function(b){var c=a(b.target).attr("href"),d=c.substr(1);if(d){var e=a("."+d);1===e.length&&(e.trigger("click"),b.preventDefault())}}),a("body").on("click",".add-row",function(){a(this).parents("tr").before(a(".original-repeatable-field").clone().removeClass("original-repeatable-field"))}),a("body").on("click",".replace-remove-row",function(){a(this).parents("tr").remove(),2>=a(".replace-row").length&&a(".no-replaces-message").show();var b=a(this).prev().attr("id");("new-url"===b||"new-path"===b)&&a("#"+b+"-missing-warning").hide()}),a("body").on("change","#new-url",function(){a("#new-url-missing-warning").hide()}).on("change","#new-path",function(){a("#new-path-missing-warning").hide()}),a("body").on("click",".arrow-col",function(){var b=this,c=a(b).prev("td").find("input").val(),d=a(b).next("td").find("input");d.val(c),"new-url"===d.prop("id")?a("#new-url-missing-warning").hide():"new-path"===d.prop("id")&&a("#new-path-missing-warning").hide()}),a(".add-replace").click(function(){a(".replace-fields").prepend(a(".original-repeatable-field").clone().removeClass("original-repeatable-field")),a(".no-replaces-message").hide()}),a("#find-and-replace-sort tbody").sortable({items:"> tr:not(.pin)",handle:"td:first",start:function(){a(".sort-handle").css("cursor","-webkit-grabbing"),a(".sort-handle").css("cursor","-moz-grabbing")},stop:function(){a(".sort-handle").css("cursor","-webkit-grab"),a(".sort-handle").css("cursor","-moz-grab")}});var Ea="";window.location.hash&&(Ea=window.location.hash.substring(1),pa(Ea,!1)),""!==h("install-plugin")&&(Ea="addons",K=!0,pa(Ea,!0)),a(".notice-link").click(function(b){b.preventDefault(),a(this).closest(".inline-message").hide(),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_process_notice_link",nonce:wpmdb_data.nonces.process_notice_link,notice:a(this).data("notice"),type:a(this).data("type"),reminder:a(this).data("reminder")}})}),a(".reset-api-key").click(function(){var b=confirm(wpmdb_strings.reset_api_key);b&&!G&&(G=!0,a(".reset-api-key").after('<img src="'+ga+'" alt="" class="reset-api-key-ajax-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_reset_api_key",nonce:wpmdb_data.nonces.reset_api_key},error:function(b,c,d){alert(wpmdb_strings.reset_api_key_problem),a(".reset-api-key-ajax-spinner").remove(),G=!1},success:function(b){a(".reset-api-key-ajax-spinner").remove(),G=!1,a(".connection-info").html(b),wpmdb_data.connection_info=a.trim(b).split("\n")}}))}),a("input.multiselect-toggle").change(function(){a(this).parents(".expandable-content").children(".select-wrap").toggle()}),a(".show-multiselect").each(function(){a(this).is(":checked")&&(a(this).parents(".option-section").children(".header-expand-collapse").children(".expand-collapse-arrow").removeClass("collapsed"),a(this).parents(".expandable-content").show(),a(this).parents(".expandable-content").children(".select-wrap").toggle())}),a("input[name=backup_option]").change(function(){a(".backup-tables-wrap").hide(),"backup_manual_select"===a(this).val()&&a(".backup-tables-wrap").show()}),a("#backup-manual-select").is(":checked")&&a(".backup-tables-wrap").show(),a(".plugin-compatibility-save").click(function(){if(!I){a(this).addClass("disabled");var b=a("#selected-plugins");a(b).attr("disabled","disabled"),I=!0,a(this).after('<img src="'+ga+'" alt="" class="plugin-compatibility-spinner general-spinner" />'),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_blacklist_plugins",blacklist_plugins:a(b).val()},error:function(c,d,e){alert(wpmdb_strings.blacklist_problem+"\r\n\r\n"+wpmdb_strings.status+" "+c.status+" "+c.statusText+"\r\n\r\n"+wpmdb_strings.response+"\r\n"+c.responseText),a(b).removeAttr("disabled"),a(".plugin-compatibility-save").removeClass("disabled"),I=!1,a(".plugin-compatibility-spinner").remove(),a(".plugin-compatibility-success-msg").show().fadeOut(2e3)},success:function(c){""!==a.trim(c)&&alert(c),a(b).removeAttr("disabled"),a(".plugin-compatibility-save").removeClass("disabled"),I=!1,a(".plugin-compatibility-spinner").remove(),a(".plugin-compatibility-success-msg").show().fadeOut(2e3)}})}}),a("body").on("click",".delete-profile",function(){var b=a(this).next().clone();a("input",b).remove(),b=a.trim(a(b).html());var c=confirm(wpmdb_strings.remove_profile.replace("{{profile}}",b));if(c){var d=a(this).parent();if(d.find("input:checked").length){var e=d.siblings().last();if(e.find("input[type=radio]").prop("checked","checked"),e.find("input[type=text]").focus(),a("#migrate-form .crumbs .crumb:last").text("New Profile"),"function"==typeof window.history.pushState){var f=window.location.href.replace("#migrate","").replace(/&wpmdb-profile=-?\d+/,"")+"&wpmdb-profile=-1";window.history.pushState({updated_profile_id:-1},null,f)}}d.fadeOut(500),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:a(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(a,b,c){alert(wpmdb_strings.remove_profile_problem)},success:function(a){"-1"===a&&alert(wpmdb_strings.remove_profile_not_found)}})}}),a(".main-list-delete-profile-link").click(function(){var b=a(this).prev().html(),c=confirm(wpmdb_strings.remove_profile.replace("{{profile}}",b));c&&(a(this).parent().fadeOut(500),a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_delete_migration_profile",profile_id:a(this).attr("data-profile-id"),nonce:wpmdb_data.nonces.delete_migration_profile},error:function(a,b,c){alert(wpmdb_strings.remove_profile_problem)}}))}),a("body").on("click",".temp-disabled",function(){var b=confirm(wpmdb_strings.change_connection_info);b&&(a(".ssl-notice").hide(),a(".different-plugin-version-notice").hide(),a(".migrate-db-button").show(),a(".temp-disabled").removeAttr("readonly"),a(".temp-disabled").removeClass("temp-disabled"),a(".connect-button").show(),a(".step-two").hide(),a(".connection-status").show().html(wpmdb_strings.enter_connection_info),C=!1)}),a(".settings-tab input[type=checkbox]").change(function(){if("plugin-compatibility"!==a(this).attr("id")){var b=a(this).is(":checked"),c=a(this).attr("id");a(this).parent().append(ha);var d=a(this).parent();a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_save_setting",checked:b,setting:c,nonce:wpmdb_data.nonces.save_setting},error:function(b,c,d){alert(wpmdb_strings.save_settings_problem),a(".ajax-spinner").remove()},success:function(b){a(".ajax-spinner").remove(),a(d).append('<span class="ajax-success-msg">'+wpmdb_strings.saved+"</span>"),a(".ajax-success-msg").fadeOut(2e3,function(){a(this).remove()})}})}}),a(".migrate-form").submit(function(a){a.preventDefault()}),a(".connect-button").click(function(b){b.preventDefault(),a(this).blur(),qa()}),a(".pull-push-connection-info").bind("paste",function(a){setTimeout(function(){qa()},0)}),a("body").on("click",".try-again",function(){qa()}),a("body").on("click",".try-http",function(){var b=a.trim(a(".pull-push-connection-info").val()).split("\n"),c=b[0].replace("https","http"),d=c+"\n"+b[1];a(".pull-push-connection-info").val(d),qa()}),a(".create-new-profile").change(function(){J=!0}),a("body").on("click",".temporarily-disable-ssl",function(){var b="";window.location.hash&&(b=window.location.hash.substring(1)),a(this).attr("href",a(this).attr("href")+"&hash="+b)}),a("body").on("click",".pause-resume",function(a){r(a)}),a("body").on("click",".cancel",function(a){ra(a)}),a(".enter-licence").click(function(){a(".settings").click(),a(".licence-input").focus()}),b.functions.execute_next_step=function(){if(ba>0&&!1===aa)return void setTimeout(function(){aa=!0,b.functions.execute_next_step()},ba);if(aa=!1,!0===T)return a(".migration-progress-ajax-spinner").hide(),clearInterval(A),!0===ea?(a(".progress-text").html(wpmdb_strings.paused_before_finalize),ea=!1):a(".progress-text").html(wpmdb_strings.paused),a("body").on("click",".pause-resume",function(a){r(a)}),a("body").on("click",".cancel",function(a){ra(a)}),void a(".pause-resume").html(wpmdb_strings.resume);if(!0===Z){v=wpmdb_migration_type();var c;"savefile"===v?c=wpmdb_strings.removing_local_sql:"pull"===v?c="backup"===z?wpmdb_strings.removing_local_backup:wpmdb_strings.removing_local_temp_tables:"push"===v&&(c="backup"===z?wpmdb_strings.removing_remote_sql:wpmdb_strings.removing_remote_temp_tables),a(".progress-text").html(c);var d={action:"wpmdb_cancel_migration",migration_state_id:b.migration_state_id};E=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:d,error:function(c,d,e){a(".progress-title").html(wpmdb_strings.migration_cancellation_failed),a(".progress-text").html(wpmdb_strings.manually_remove_temp_files),a(".progress-text").append("<br /><br />"+wpmdb_strings.status+": "+c.status+" "+c.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+c.responseText),a(".progress-text").addClass("migration-error"),console.log(c),console.log(d),console.log(e),E=!1,b.common.migration_error=!0,b.functions.migration_complete_events()},success:function(c){return E=!1,c=a.trim(c),"push"===v&&"1"!==c||"push"!==v&&""!==c?(a(".progress-title").html(wpmdb_strings.migration_cancellation_failed),a(".progress-text").html(c),a(".progress-text").addClass("migration-error"),b.common.migration_error=!0,void b.functions.migration_complete_events()):(B=wpmdb_strings.migration_cancelled,a(".progress-text").hide(),void b.functions.migration_complete_events())}})}else b.common.next_step_in_migration.fn.apply(null,b.common.next_step_in_migration.args)},a("body").on("click",".copy-licence-to-remote-site",function(){a(".connection-status").html(wpmdb_strings.copying_license),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(ha);var b=a.trim(a(".pull-push-connection-info").val()).split("\n");E=!0,o(),a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_copy_licence_to_remote_site",url:b[0],key:b[1],nonce:wpmdb_data.nonces.copy_licence_to_remote_site},error:function(b,c,d){a(".connection-status").html(na(b.responseText,"(#143)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),E=!1,p()},success:function(b){return a(".ajax-spinner").remove(),E=!1,p(),"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error?(a(".connection-status").html(b.body),a(".connection-status").addClass("notification-message error-notice migration-error"),void(b.body.indexOf("401 Unauthorized")>-1&&a(".basic-access-auth-wrapper").show())):void qa()}})}),a("body").on("click",".reactivate-licence",function(b){E=!0,a(".invalid-licence").empty().html(wpmdb_strings.attempting_to_activate_licence),a(".invalid-licence").append(ha),a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_reactivate_licence",nonce:wpmdb_data.nonces.reactivate_licence},error:function(b,c,d){a(".invalid-licence").html(wpmdb_strings.activate_licence_problem),a(".invalid-licence").append("<br /><br />"+wpmdb_strings.status+": "+b.status+" "+b.statusText+"<br /><br />"+wpmdb_strings.response+"<br />"+b.responseText),a(".ajax-spinner").remove(),E=!1},success:function(b){return a(".ajax-spinner").remove(),E=!1,"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error?void a(".invalid-licence").html(b.body):"undefined"!=typeof b.wpmdb_dbrains_api_down&&1===b.wpmdb_dbrains_api_down?(a(".invalid-licence").html(wpmdb_strings.temporarily_activated_licence),void a(".invalid-licence").append(b.body)):(a(".invalid-licence").empty().html(wpmdb_strings.licence_reactivated),void location.reload())}})}),a("input[name=table_migrate_option]").change(function(){k(),a.wpmdb.do_action("wpmdb_tables_to_migrate_changed")}),a("body").on("change","#select-tables",function(){k(),a.wpmdb.do_action("wpmdb_tables_to_migrate_changed")}),a.wpmdb.add_filter("wpmdb_get_table_prefix",u),a.wpmdb.add_filter("wpmdb_get_tables_to_migrate",t),a.wpmdb.add_filter("wpmdb_before_migration_complete_hooks",function(b){return da=a("input[name=pause_before_finalize]:checked").length?!0:!1,!0===da&&"savefile"!==v&&(r(null),ea=!0),b})})}(jQuery,wpmdb);
class/wpmdb-base.php CHANGED
@@ -28,7 +28,9 @@ class WPMDB_Base {
28
  protected $core_slug;
29
  protected $error_log;
30
  protected $state_data;
 
31
  protected $migration_state;
 
32
 
33
  function __construct( $plugin_file_path ) {
34
  $this->load_settings();
@@ -62,6 +64,13 @@ class WPMDB_Base {
62
  }
63
 
64
  add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
 
 
 
 
 
 
 
65
  }
66
 
67
  /**
@@ -88,14 +97,15 @@ class WPMDB_Base {
88
  /**
89
  * Sets $this->state_data from $_POST, potentially un-slashed and sanitized.
90
  *
91
- * @param array $key_rules An optional associative array of expected keys and their sanitization rule(s).
92
- * @param string $context The method that is specifying the sanitization rules. Defaults to calling method.
 
93
  */
94
- function set_post_data( $key_rules = array(), $context = '' ) {
95
  if ( defined( 'DOING_WPMDB_TESTS' ) || $this->doing_cli_migration ) {
96
  $this->state_data = $_POST;
97
  } elseif ( is_null( $this->state_data ) ) {
98
- $this->state_data = wp_unslash( $_POST );
99
  } else {
100
  return;
101
  }
@@ -111,8 +121,8 @@ class WPMDB_Base {
111
  }
112
 
113
  $migration_state_id = null;
114
- if ( ! empty( $this->state_data['migration_state_id'] ) ) {
115
- $migration_state_id = $this->state_data['migration_state_id'];
116
  }
117
 
118
  if ( true !== $this->get_migration_state( $migration_state_id ) ) {
@@ -124,19 +134,25 @@ class WPMDB_Base {
124
  load_plugin_textdomain( 'wp-migrate-db', false, dirname( plugin_basename( $this->plugin_file_path ) ) . '/languages/' );
125
  }
126
 
 
 
 
 
 
 
127
  function pro_addon_construct() {
128
  $this->addons = array(
129
  'wp-migrate-db-pro-media-files/wp-migrate-db-pro-media-files.php' => array(
130
  'name' => 'Media Files',
131
- 'required_version' => '1.3.3',
132
  ),
133
  'wp-migrate-db-pro-cli/wp-migrate-db-pro-cli.php' => array(
134
  'name' => 'CLI',
135
- 'required_version' => '1.2.1',
136
  ),
137
  'wp-migrate-db-pro-multisite-tools/wp-migrate-db-pro-multisite-tools.php' => array(
138
  'name' => 'Multisite Tools',
139
- 'required_version' => '1.0.1',
140
  )
141
  );
142
 
@@ -504,11 +520,20 @@ class WPMDB_Base {
504
  return $value;
505
  }
506
 
 
 
 
 
 
 
 
 
507
  function create_signature( $data, $key ) {
508
  if ( isset( $data['sig'] ) ) {
509
  unset( $data['sig'] );
510
  }
511
- $data = array_map( array( $this, 'sanitize_signature_data' ), $data );
 
512
  $flat_data = implode( '', $data );
513
 
514
  return base64_encode( hash_hmac( 'sha1', $flat_data, $key, true ) );
@@ -1016,7 +1041,7 @@ class WPMDB_Base {
1016
  */
1017
  function get_tables( $scope = 'regular' ) {
1018
  global $wpdb;
1019
- $prefix = ( $scope == 'temp' ? $this->temp_prefix : $wpdb->prefix );
1020
  $tables = $wpdb->get_results( 'SHOW FULL TABLES', ARRAY_N );
1021
  $clean_tables = array();
1022
 
@@ -1537,7 +1562,7 @@ class WPMDB_Base {
1537
  }
1538
 
1539
  global $wpdb;
1540
- $alter_table_name = apply_filters( 'wpmdb_alter_table_name', $wpdb->prefix . 'wpmdb_alter_statements' );
1541
 
1542
  return $alter_table_name;
1543
  }
@@ -1676,4 +1701,144 @@ class WPMDB_Base {
1676
 
1677
  return $input;
1678
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1679
  }
28
  protected $core_slug;
29
  protected $error_log;
30
  protected $state_data;
31
+ protected $form_data;
32
  protected $migration_state;
33
+ protected $filesystem;
34
 
35
  function __construct( $plugin_file_path ) {
36
  $this->load_settings();
64
  }
65
 
66
  add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
67
+
68
+ // in case admin_init isn't run (tests/cli), we'll just instantiate the fs class without wpfs and allow it to be overwritten when/if admin_init is run
69
+ if ( class_exists( 'WPMDB_Filesystem' ) ) {
70
+ $this->filesystem = new WPMDB_Filesystem( true );
71
+ add_action( 'admin_init', array( $this, 'init_wpmdb_filesystem' ) );
72
+ }
73
+
74
  }
75
 
76
  /**
97
  /**
98
  * Sets $this->state_data from $_POST, potentially un-slashed and sanitized.
99
  *
100
+ * @param array $key_rules An optional associative array of expected keys and their sanitization rule(s).
101
+ * @param string $state_key The key in $_POST that contains the migration state id (defaults to 'migration_state_id').
102
+ * @param string $context The method that is specifying the sanitization rules. Defaults to calling method.
103
  */
104
+ function set_post_data( $key_rules = array(), $state_key = 'migration_state_id', $context = '' ) {
105
  if ( defined( 'DOING_WPMDB_TESTS' ) || $this->doing_cli_migration ) {
106
  $this->state_data = $_POST;
107
  } elseif ( is_null( $this->state_data ) ) {
108
+ $this->state_data = WPMDB_Utils::safe_wp_unslash( $_POST );
109
  } else {
110
  return;
111
  }
121
  }
122
 
123
  $migration_state_id = null;
124
+ if ( ! empty( $this->state_data[ $state_key ] ) ) {
125
+ $migration_state_id = $this->state_data[ $state_key ];
126
  }
127
 
128
  if ( true !== $this->get_migration_state( $migration_state_id ) ) {
134
  load_plugin_textdomain( 'wp-migrate-db', false, dirname( plugin_basename( $this->plugin_file_path ) ) . '/languages/' );
135
  }
136
 
137
+ function init_wpmdb_filesystem() {
138
+ if ( ! is_a( $this->filesystem, 'WPMDB_Filesystem' ) || ( is_a( $this->filesystem, 'WPMDB_Filesystem' ) && ! $this->filesystem->using_wp_filesystem() ) ) {
139
+ $this->filesystem = new WPMDB_Filesystem();
140
+ }
141
+ }
142
+
143
  function pro_addon_construct() {
144
  $this->addons = array(
145
  'wp-migrate-db-pro-media-files/wp-migrate-db-pro-media-files.php' => array(
146
  'name' => 'Media Files',
147
+ 'required_version' => '1.4',
148
  ),
149
  'wp-migrate-db-pro-cli/wp-migrate-db-pro-cli.php' => array(
150
  'name' => 'CLI',
151
+ 'required_version' => '1.2.2',
152
  ),
153
  'wp-migrate-db-pro-multisite-tools/wp-migrate-db-pro-multisite-tools.php' => array(
154
  'name' => 'Multisite Tools',
155
+ 'required_version' => '1.0.2',
156
  )
157
  );
158
 
520
  return $value;
521
  }
522
 
523
+ /**
524
+ * Generate a signature string for the supplied data given a key.
525
+ *
526
+ * @param array $data
527
+ * @param string $key
528
+ *
529
+ * @return string
530
+ */
531
  function create_signature( $data, $key ) {
532
  if ( isset( $data['sig'] ) ) {
533
  unset( $data['sig'] );
534
  }
535
+ $data = array_map( array( $this, 'sanitize_signature_data' ), $data );
536
+ ksort( $data );
537
  $flat_data = implode( '', $data );
538
 
539
  return base64_encode( hash_hmac( 'sha1', $flat_data, $key, true ) );
1041
  */
1042
  function get_tables( $scope = 'regular' ) {
1043
  global $wpdb;
1044
+ $prefix = ( $scope == 'temp' ? $this->temp_prefix : $wpdb->base_prefix );
1045
  $tables = $wpdb->get_results( 'SHOW FULL TABLES', ARRAY_N );
1046
  $clean_tables = array();
1047
 
1562
  }
1563
 
1564
  global $wpdb;
1565
+ $alter_table_name = apply_filters( 'wpmdb_alter_table_name', $wpdb->base_prefix . 'wpmdb_alter_statements' );
1566
 
1567
  return $alter_table_name;
1568
  }
1701
 
1702
  return $input;
1703
  }
1704
+
1705
+ /**
1706
+ * Returns HTML for setting a checkbox as checked depending on supplied option value.
1707
+ *
1708
+ * @param string|array $option Options value or array containing $option_name as key.
1709
+ * @param string $option_name If $option is an array, the key that contains the value to be checked.
1710
+ */
1711
+ public function maybe_checked( $option, $option_name = '' ) {
1712
+ if ( is_array( $option ) && ! empty( $option_name ) && ! empty( $option[ $option_name ] ) ) {
1713
+ $option = $option[ $option_name ];
1714
+ }
1715
+ echo esc_html( ( ! empty( $option ) && '1' == $option ) ? ' checked="checked"' : '' );
1716
+ }
1717
+
1718
+ /**
1719
+ * Get array of subsite simple urls keyed by their ID.
1720
+ *
1721
+ * @return array
1722
+ */
1723
+ public function subsites_list() {
1724
+ $subsites = array();
1725
+
1726
+ if ( ! is_multisite() ) {
1727
+ return $subsites;
1728
+ }
1729
+
1730
+ $sites = wp_get_sites( array( 'limit' => 0 ) );
1731
+
1732
+ if ( ! empty( $sites ) ) {
1733
+ foreach ( $sites as $subsite ) {
1734
+ $subsites[ $subsite['blog_id'] ] = $this->simple_site_url( get_blogaddress_by_id( $subsite['blog_id'] ) );
1735
+ }
1736
+ }
1737
+
1738
+ return $subsites;
1739
+ }
1740
+
1741
+ /**
1742
+ * Returns validated and sanitized form data.
1743
+ *
1744
+ * @param array|string $data
1745
+ *
1746
+ * @return array|string
1747
+ *
1748
+ * This is a base implementation that should be overridden and included with a call to parent before validating form_data contents.
1749
+ */
1750
+ function parse_migration_form_data( $data ) {
1751
+ parse_str( $data, $form_data );
1752
+ // As the magic_quotes_gpc setting affects the output of parse_str() we may need to remove any quote escaping.
1753
+ // (it uses the same mechanism that PHP > uses to populate the $_GET, $_POST, etc. variables)
1754
+ if ( get_magic_quotes_gpc() ) {
1755
+ $form_data = WPMDB_Utils::safe_wp_unslash( $form_data );
1756
+ }
1757
+
1758
+ return $form_data;
1759
+ }
1760
+
1761
+ /**
1762
+ * Returns the profile value for a given key.
1763
+ *
1764
+ * @param string $key
1765
+ *
1766
+ * @return mixed
1767
+ */
1768
+ function profile_value( $key ) {
1769
+ if ( ! empty( $key ) && ! empty( $this->form_data ) && isset( $this->form_data[ $key ] ) ) {
1770
+ return $this->form_data[ $key ];
1771
+ }
1772
+
1773
+ return null;
1774
+ }
1775
+
1776
+ /**
1777
+ * Returns a simplified site url (good for identifying subsites).
1778
+ *
1779
+ * @param string $site_url
1780
+ *
1781
+ * @return string
1782
+ */
1783
+ public function simple_site_url( $site_url ) {
1784
+ $site_url = untrailingslashit( $this->scheme_less_url( $site_url ) );
1785
+
1786
+ return $site_url;
1787
+ }
1788
+
1789
+ /**
1790
+ * Checks given subsite id or url to see if it exists and returns its blog id.
1791
+ *
1792
+ * @param int|string $subsite Blog ID or URL
1793
+ * @param array $subsites_list Optional array of blog_id => simple urls to use, defaults to result of subsites_list().
1794
+ *
1795
+ * @return bool|string
1796
+ */
1797
+ public function get_subsite_id( $subsite, $subsites_list = array() ) {
1798
+ if ( ! is_numeric( $subsite ) ) {
1799
+ $subsite = $this->simple_site_url( $subsite );
1800
+ }
1801
+
1802
+ if ( empty( $subsites_list ) ) {
1803
+ $subsites_list = $this->subsites_list();
1804
+ }
1805
+
1806
+ foreach ( $subsites_list as $blog_id => $subsite_path ) {
1807
+ if ( is_numeric( $subsite ) ) {
1808
+ if ( $blog_id == $subsite ) {
1809
+ return $blog_id;
1810
+ }
1811
+ } elseif ( $subsite == $subsite_path ) {
1812
+ return $blog_id;
1813
+ }
1814
+ }
1815
+
1816
+ return false;
1817
+ }
1818
+
1819
+ /**
1820
+ * Checks given array of subsite ids or urls to see if they exist and returns array of blog ids.
1821
+ *
1822
+ * @param array $subsites
1823
+ * @param array $subsites_list Optional array of blog_id => simple urls to use, defaults to result of subsites_list().
1824
+ *
1825
+ * @return array
1826
+ *
1827
+ * Returned array element values will be false if the given value does not correspond to a subsite.
1828
+ */
1829
+ public function get_subsite_ids( $subsites, $subsites_list = array() ) {
1830
+ if ( empty( $subsites ) ) {
1831
+ return array();
1832
+ }
1833
+
1834
+ if ( ! is_array( $subsites ) ) {
1835
+ $subsites = array( $subsites );
1836
+ }
1837
+
1838
+ foreach ( $subsites as $index => $subsite ) {
1839
+ $subsites[ $index ] = $this->get_subsite_id( $subsite, $subsites_list );
1840
+ }
1841
+
1842
+ return $subsites;
1843
+ }
1844
  }
class/wpmdb-cli.php CHANGED
@@ -99,13 +99,19 @@ class WPMDB_CLI extends WPMDB_Base {
99
  return $pre_check;
100
  }
101
 
 
 
 
 
 
 
102
  $this->set_time_limit();
103
  $this->wpmdb->set_cli_migration();
104
 
105
  if ( 'savefile' === $this->profile['action'] ) {
106
  $this->post_data['intent'] = 'savefile';
107
  if ( ! empty( $this->profile['export_dest'] ) ) {
108
- $this->post_data['export_dest'] = $profile['export_dest'];
109
  } else {
110
  $this->post_data['export_dest'] = 'ORIGIN';
111
  }
@@ -126,14 +132,15 @@ class WPMDB_CLI extends WPMDB_Base {
126
 
127
  if ( ! empty( $nonexistent_tables ) ) {
128
  $local_or_remote = ( 'pull' === $this->profile['action'] ) ? 'remote' : 'local';
 
129
  return $this->cli_error( sprintf( __( 'The following table(s) do not exist in the %1$s database: %2$s', 'wp-migrate-db-cli' ), $local_or_remote, implode( ', ', $nonexistent_tables ) ) );
130
  }
131
  }
132
  }
133
 
134
- $profile = apply_filters( 'wpmdb_cli_filter_before_cli_initiate_migration', $profile );
135
- if ( is_wp_error( $profile ) ) {
136
- return $profile;
137
  }
138
 
139
  $this->migration = $this->cli_initiate_migration();
99
  return $pre_check;
100
  }
101
 
102
+ // At this point, $profile has been checked a retrieved into $this->profile, so should not be used in this function any further.
103
+ if ( empty( $this->profile ) ) {
104
+ return $this->cli_error( __( 'Profile not found or unable to be generated from params.', 'wp-migrate-db-cli' ) );
105
+ }
106
+ unset( $profile );
107
+
108
  $this->set_time_limit();
109
  $this->wpmdb->set_cli_migration();
110
 
111
  if ( 'savefile' === $this->profile['action'] ) {
112
  $this->post_data['intent'] = 'savefile';
113
  if ( ! empty( $this->profile['export_dest'] ) ) {
114
+ $this->post_data['export_dest'] = $this->profile['export_dest'];
115
  } else {
116
  $this->post_data['export_dest'] = 'ORIGIN';
117
  }
132
 
133
  if ( ! empty( $nonexistent_tables ) ) {
134
  $local_or_remote = ( 'pull' === $this->profile['action'] ) ? 'remote' : 'local';
135
+
136
  return $this->cli_error( sprintf( __( 'The following table(s) do not exist in the %1$s database: %2$s', 'wp-migrate-db-cli' ), $local_or_remote, implode( ', ', $nonexistent_tables ) ) );
137
  }
138
  }
139
  }
140
 
141
+ $this->profile = apply_filters( 'wpmdb_cli_filter_before_cli_initiate_migration', $this->profile );
142
+ if ( is_wp_error( $this->profile ) ) {
143
+ return $this->profile;
144
  }
145
 
146
  $this->migration = $this->cli_initiate_migration();
class/wpmdb-filesystem.php ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WPMDB_Filesystem {
4
+
5
+ private $wp_filesystem;
6
+ private $credentials;
7
+ private $use_filesystem = false;
8
+ private $chmod_dir;
9
+ private $chmod_file;
10
+
11
+ /**
12
+ * Pass `true` when instantiating to skip using WP_Filesystem
13
+ *
14
+ * @param bool $force_no_fs
15
+ */
16
+ public function __construct( $force_no_fs = false ) {
17
+ if ( ! $force_no_fs && function_exists( 'request_filesystem_credentials' ) ) {
18
+ if ( ( defined( 'WPMDB_WP_FILESYSTEM' ) && WPMDB_WP_FILESYSTEM ) || ! defined( 'WPMDB_WP_FILESYSTEM' ) ) {
19
+ $this->maybe_init_wp_filesystem();
20
+ }
21
+ }
22
+
23
+ // Set default permissions
24
+ if ( defined( 'FS_CHMOD_DIR' ) ) {
25
+ $this->chmod_dir = FS_CHMOD_DIR;
26
+ } else {
27
+ $this->chmod_dir = ( fileperms( ABSPATH ) & 0777 | 0755 );
28
+ }
29
+
30
+ if ( defined( 'FS_CHMOD_FILE' ) ) {
31
+ $this->chmod_file = FS_CHMOD_FILE;
32
+ } else {
33
+ $this->chmod_file = ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 );
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Getter for the instantiated WP_Filesystem
39
+ *
40
+ * @return WP_Filesystem|false
41
+ *
42
+ * This should be used carefully since $wp_filesystem won't always have a value.
43
+ */
44
+ public function get_wp_filesystem() {
45
+ if ( $this->use_filesystem ) {
46
+ return $this->wp_filesystem;
47
+ } else {
48
+ return false;
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Is WP_Filesystem being used?
54
+ *
55
+ * @return bool
56
+ */
57
+ public function using_wp_filesystem() {
58
+ return $this->use_filesystem;
59
+ }
60
+
61
+ /**
62
+ * Attempts to use the correct path for the FS method being used
63
+ *
64
+ * @param string $abs_path
65
+ *
66
+ * @return string
67
+ */
68
+ public function get_sanitized_path( $abs_path ) {
69
+ if ( $this->using_wp_filesystem() ) {
70
+ return str_replace( ABSPATH, $this->wp_filesystem->abspath(), $abs_path );
71
+ }
72
+
73
+ return $abs_path;
74
+ }
75
+
76
+ /**
77
+ * Attempt to initiate WP_Filesystem
78
+ *
79
+ * If this fails, $use_filesystem is set to false and all methods in this class should use native php fallbacks
80
+ * Thwarts `request_filesystem_credentials()` attempt to display a form for obtaining creds from users
81
+ *
82
+ * TODO: provide notice and input in wp-admin for users when this fails
83
+ */
84
+ public function maybe_init_wp_filesystem() {
85
+ ob_start();
86
+ $this->credentials = request_filesystem_credentials( '', '', false, false, null );
87
+ $ob_contents = ob_get_contents();
88
+ ob_end_clean();
89
+
90
+ if ( wp_filesystem( $this->credentials ) ) {
91
+ global $wp_filesystem;
92
+ $this->wp_filesystem = $wp_filesystem;
93
+ $this->use_filesystem = true;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Create file if not exists then set mtime and atime on file
99
+ *
100
+ * @param string $abs_path
101
+ * @param int $time
102
+ * @param int $atime
103
+ *
104
+ * @return bool
105
+ */
106
+ public function touch( $abs_path, $time = 0, $atime = 0 ) {
107
+ $abs_path = $this->get_sanitized_path( $abs_path );
108
+ if ( $this->use_filesystem ) {
109
+ return $this->wp_filesystem->touch( $abs_path, $time, $atime );
110
+ } else {
111
+ if ( 0 == $time ) {
112
+ $time = time();
113
+ }
114
+ if ( 0 == $atime ) {
115
+ $atime = time();
116
+ }
117
+
118
+ return @touch( $abs_path, $time, $atime );
119
+ }
120
+ }
121
+
122
+ /**
123
+ * file_put_contents with chmod
124
+ *
125
+ * @param string $abs_path
126
+ * @param string $contents
127
+ *
128
+ * @return bool
129
+ */
130
+ public function put_contents( $abs_path, $contents ) {
131
+ $abs_path = $this->get_sanitized_path( $abs_path );
132
+
133
+ if ( $this->use_filesystem ) {
134
+ return $this->wp_filesystem->put_contents( $abs_path, $contents, $this->chmod_file );
135
+ } else {
136
+ $return = @file_put_contents( $abs_path, $contents );
137
+ $this->chmod( $abs_path );
138
+
139
+ return (bool) $return;
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Does the specified file or dir exist
145
+ *
146
+ * @param string $abs_path
147
+ *
148
+ * @return bool
149
+ */
150
+ public function file_exists( $abs_path ) {
151
+ $abs_path = $this->get_sanitized_path( $abs_path );
152
+
153
+ if ( $this->use_filesystem ) {
154
+ return $this->wp_filesystem->exists( $abs_path );
155
+ } else {
156
+ return file_exists( $abs_path );
157
+ }
158
+ }
159
+
160
+ /**
161
+ * Get a file's size
162
+ *
163
+ * @param string $abs_path
164
+ *
165
+ * @return int
166
+ */
167
+ public function filesize( $abs_path ) {
168
+ $abs_path = $this->get_sanitized_path( $abs_path );
169
+
170
+ if ( $this->use_filesystem ) {
171
+ return $this->wp_filesystem->size( $abs_path );
172
+ } else {
173
+ return filesize( $abs_path );
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Get the contents of a file as a string
179
+ *
180
+ * @param string $abs_path
181
+ *
182
+ * @return string
183
+ */
184
+ public function get_contents( $abs_path ) {
185
+ $abs_path = $this->get_sanitized_path( $abs_path );
186
+
187
+ if ( $this->use_filesystem ) {
188
+ return $this->wp_filesystem->get_contents( $abs_path );
189
+ } else {
190
+ return @file_get_contents( $abs_path );
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Delete a file
196
+ *
197
+ * @param string $abs_path
198
+ *
199
+ * @return bool
200
+ */
201
+ public function unlink( $abs_path ) {
202
+ $abs_path = $this->get_sanitized_path( $abs_path );
203
+
204
+ if ( $this->use_filesystem ) {
205
+ return $this->wp_filesystem->delete( $abs_path, false, false );
206
+ } else {
207
+ return @unlink( $abs_path );
208
+ }
209
+ }
210
+
211
+ /**
212
+ * chmod a file
213
+ *
214
+ * @param string $abs_path
215
+ * @param int $perms
216
+ *
217
+ * @return bool
218
+ *
219
+ * Leave $perms blank to use $this->chmod_file/DIR or pass value like 0777
220
+ */
221
+ public function chmod( $abs_path, $perms = null ) {
222
+ $abs_path = $this->get_sanitized_path( $abs_path );
223
+
224
+ if ( is_null( $perms ) ) {
225
+ $perms = $this->is_file( $abs_path ) ? $this->chmod_file : $this->chmod_dir;
226
+ }
227
+
228
+ if ( $this->use_filesystem ) {
229
+ return $this->wp_filesystem->chmod( $abs_path, $perms, false );
230
+ } else {
231
+ return @chmod( $abs_path, $perms );
232
+ }
233
+ }
234
+
235
+ /**
236
+ * Is the specified pat a directory?
237
+ *
238
+ * @param string $abs_path
239
+ *
240
+ * @return bool
241
+ */
242
+ public function is_dir( $abs_path ) {
243
+ $abs_path = $this->get_sanitized_path( $abs_path );
244
+
245
+ if ( $this->use_filesystem ) {
246
+ return $this->wp_filesystem->is_dir( $abs_path );
247
+ } else {
248
+ return is_dir( $abs_path );
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Is the specified path a file?
254
+ *
255
+ * @param string $abs_path
256
+ *
257
+ * @return bool
258
+ */
259
+ public function is_file( $abs_path ) {
260
+ $abs_path = $this->get_sanitized_path( $abs_path );
261
+
262
+ if ( $this->use_filesystem ) {
263
+ return $this->wp_filesystem->is_file( $abs_path );
264
+ } else {
265
+ return is_file( $abs_path );
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Is the specified path readable
271
+ *
272
+ * @param string $abs_path
273
+ *
274
+ * @return bool
275
+ */
276
+ public function is_readable( $abs_path ) {
277
+ $abs_path = $this->get_sanitized_path( $abs_path );
278
+
279
+ if ( $this->use_filesystem ) {
280
+ return $this->wp_filesystem->is_readable( $abs_path );
281
+ } else {
282
+ return is_readable( $abs_path );
283
+ }
284
+ }
285
+
286
+ /**
287
+ * Is the specified path writable
288
+ *
289
+ * @param string $abs_path
290
+ *
291
+ * @return bool
292
+ */
293
+ public function is_writable( $abs_path ) {
294
+ $abs_path = $this->get_sanitized_path( $abs_path );
295
+
296
+ if ( $this->use_filesystem ) {
297
+ return $this->wp_filesystem->is_writable( $abs_path );
298
+ } else {
299
+ return is_writable( $abs_path );
300
+ }
301
+ }
302
+
303
+ /**
304
+ * Recursive mkdir
305
+ *
306
+ * @param string $abs_path
307
+ * @param int $perms
308
+ *
309
+ * @return bool
310
+ */
311
+ public function mkdir( $abs_path, $perms = null ) {
312
+ $abs_path = $this->get_sanitized_path( $abs_path );
313
+
314
+ if ( is_null( $perms ) ) {
315
+ $perms = $this->chmod_dir;
316
+ }
317
+
318
+ if ( $this->is_dir( $abs_path ) ) {
319
+ return true;
320
+ } else {
321
+ if ( $this->use_filesystem ) {
322
+ // WP_Filesystem doesn't offer a recursive mkdir()
323
+ $abs_path = str_replace( '//', '/', $abs_path );
324
+ $abs_path = rtrim( $abs_path, '/' );
325
+ if ( empty( $abs_path ) ) {
326
+ $abs_path = '/';
327
+ }
328
+
329
+ $dirs = explode( '/', ltrim( $abs_path, '/' ) );
330
+ $current_dir = '';
331
+
332
+ foreach ( $dirs as $dir ) {
333
+ $current_dir .= '/' . $dir;
334
+ if ( ! $this->is_dir( $current_dir ) ) {
335
+ $this->wp_filesystem->mkdir( $current_dir, $perms );
336
+ }
337
+ }
338
+
339
+ return $this->is_dir( $abs_path );
340
+ } else {
341
+ return @mkdir( $abs_path, $perms, true );
342
+ }
343
+ }
344
+ }
345
+
346
+ /**
347
+ * Delete a directory
348
+ *
349
+ * @param string $abs_path
350
+ * @param bool $recursive
351
+ *
352
+ * @return bool
353
+ */
354
+ public function rmdir( $abs_path, $recursive = false ) {
355
+ $abs_path = $this->get_sanitized_path( $abs_path );
356
+
357
+ if ( ! $this->is_dir( $abs_path ) ) {
358
+ return false;
359
+ }
360
+
361
+ if ( $this->use_filesystem ) {
362
+ return $this->wp_filesystem->rmdir( $abs_path, $recursive );
363
+ } else {
364
+
365
+ // taken from WP_Filesystem_Direct
366
+ if ( ! $recursive ) {
367
+ return @rmdir( $abs_path );
368
+ }
369
+
370
+ // At this point it's a folder, and we're in recursive mode
371
+ $abs_path = trailingslashit( $abs_path );
372
+ $filelist = $this->scandir( $abs_path );
373
+
374
+ $retval = true;
375
+ if ( is_array( $filelist ) ) {
376
+ foreach ( $filelist as $filename => $fileinfo ) {
377
+
378
+ if ( 'd' === $fileinfo['type'] ) {
379
+ $retval = $this->rmdir( $abs_path . $filename, $recursive );
380
+ } else {
381
+ $retval = $this->unlink( $abs_path . $filename );
382
+ }
383
+ }
384
+ }
385
+
386
+ if ( file_exists( $abs_path ) && ! @rmdir( $abs_path ) ) {
387
+ $retval = false;
388
+ }
389
+
390
+ return $retval;
391
+ }
392
+
393
+ return false;
394
+ }
395
+
396
+ /**
397
+ * Get a list of files/folders under specified directory
398
+ *
399
+ * @param $abs_path
400
+ *
401
+ * @return array|bool
402
+ */
403
+ public function scandir( $abs_path ) {
404
+ $abs_path = $this->get_sanitized_path( $abs_path );
405
+
406
+ if ( $this->use_filesystem ) {
407
+ return $this->wp_filesystem->dirlist( $abs_path, true, false );
408
+ } else {
409
+ $dirlist = @scandir( $abs_path );
410
+ if ( false === $dirlist ) {
411
+ return false;
412
+ }
413
+ $return = array();
414
+
415
+ // normalize return to look somewhat like the return value for WP_Filesystem::dirlist
416
+ foreach ( $dirlist as $entry ) {
417
+ if ( '.' === $entry || '..' === $entry ) {
418
+ continue;
419
+ }
420
+ $return[ $entry ] = array(
421
+ 'name' => $entry,
422
+ 'type' => $this->is_dir( $abs_path . '/' . $entry ) ? 'd' : 'f',
423
+ );
424
+ }
425
+
426
+ return $return;
427
+ }
428
+ }
429
+
430
+ /**
431
+ * Light wrapper for move_uploaded_file with chmod
432
+ *
433
+ * @param string $file
434
+ * @param string $destination
435
+ * @param int $perms
436
+ *
437
+ * @return bool
438
+ *
439
+ * TODO: look into replicating more functionality from wp_handle_upload()
440
+ */
441
+ public function move_uploaded_file( $file, $destination, $perms = null ) {
442
+ $return = @move_uploaded_file( $file, $destination );
443
+
444
+ if ( $return ) {
445
+ $this->chmod( $destination, $perms );
446
+ }
447
+
448
+ return $return;
449
+ }
450
+
451
+ /**
452
+ * Copy a file
453
+ *
454
+ * @param string $source_abs_path
455
+ * @param string $destination_abs_path
456
+ * @param bool $overwrite
457
+ * @param int $perms
458
+ *
459
+ * @return bool
460
+ *
461
+ * Taken from WP_Filesystem_Direct
462
+ */
463
+ public function copy( $source_abs_path, $destination_abs_path, $overwrite = false, $perms = false ) {
464
+ $source_abs_path = $this->get_sanitized_path( $source_abs_path );
465
+ $destination_abs_path = $this->get_sanitized_path( $destination_abs_path );
466
+
467
+ // error if source file doesn't exist
468
+ if ( ! $this->file_exists( $source_abs_path ) ) {
469
+ return false;
470
+ }
471
+
472
+ if ( $this->use_filesystem ) {
473
+ return $this->wp_filesystem->copy( $source_abs_path, $destination_abs_path, $overwrite, $perms );
474
+ } else {
475
+ if ( ! $overwrite && $this->file_exists( $destination_abs_path ) ) {
476
+ return false;
477
+ }
478
+
479
+ $rtval = copy( $source_abs_path, $destination_abs_path );
480
+ if ( $perms ) {
481
+ $this->chmod( $destination_abs_path, $perms );
482
+ }
483
+
484
+ return $rtval;
485
+ }
486
+ }
487
+
488
+ /**
489
+ * Move a file
490
+ *
491
+ * @param string $source_abs_path
492
+ * @param string $destination_abs_path
493
+ * @param bool $overwrite
494
+ *
495
+ * @return bool
496
+ */
497
+ public function move( $source_abs_path, $destination_abs_path, $overwrite = false ) {
498
+ $source_abs_path = $this->get_sanitized_path( $source_abs_path );
499
+ $destination_abs_path = $this->get_sanitized_path( $destination_abs_path );
500
+
501
+ // error if source file doesn't exist
502
+ if ( ! $this->file_exists( $source_abs_path ) ) {
503
+ return false;
504
+ }
505
+
506
+ if ( $this->use_filesystem ) {
507
+ return $this->wp_filesystem->move( $source_abs_path, $destination_abs_path, $overwrite );
508
+ } else {
509
+
510
+ // Try using rename first. if that fails (for example, source is read only) try copy.
511
+ // Taken in part from WP_Filesystem_Direct
512
+ if ( ! $overwrite && $this->file_exists( $destination_abs_path ) ) {
513
+ return false;
514
+ } elseif ( @rename( $source_abs_path, $destination_abs_path ) ) {
515
+ return true;
516
+ } else {
517
+ if ( $this->copy( $source_abs_path, $destination_abs_path, $overwrite ) && $this->exists( $destination_abs_path ) ) {
518
+ $this->unlink( $source_abs_path );
519
+
520
+ return true;
521
+ } else {
522
+ return false;
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
class/wpmdb-utils.php CHANGED
@@ -62,4 +62,19 @@ class WPMDB_Utils {
62
  }
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
62
  }
63
  }
64
 
65
+ /**
66
+ * Use wp_unslash if available, otherwise fall back to stripslashes_deep
67
+ *
68
+ * @param string|array $arg
69
+ *
70
+ * @return string|array
71
+ */
72
+ public static function safe_wp_unslash( $arg ){
73
+ if ( function_exists( 'wp_unslash' ) ) {
74
+ return wp_unslash( $arg );
75
+ } else {
76
+ return stripslashes_deep( $arg );
77
+ }
78
+ }
79
+
80
  }
class/wpmdb.php CHANGED
@@ -9,7 +9,6 @@ class WPMDB extends WPMDB_Base {
9
  protected $maximum_chunk_size;
10
  protected $current_chunk = '';
11
  protected $connection_details;
12
- protected $form_data;
13
  protected $max_insert_string_len;
14
  protected $row_tracker;
15
  protected $rows_per_segment = 100;
@@ -78,6 +77,7 @@ class WPMDB extends WPMDB_Base {
78
  'exclude_post_revisions',
79
  'compatibility_older_mysql',
80
  'export_dest',
 
81
  );
82
 
83
  $this->default_profile = array(
@@ -104,6 +104,7 @@ class WPMDB extends WPMDB_Base {
104
  'create_backup' => '0',
105
  'exclude_post_types' => '0',
106
  'compatibility_older_mysql' => '0',
 
107
  );
108
 
109
  $this->plugin_tabs = array(
@@ -277,12 +278,8 @@ class WPMDB extends WPMDB_Base {
277
  * @return array|string
278
  */
279
  function parse_migration_form_data( $data ) {
280
- parse_str( $data, $form_data );
281
- // As the magic_quotes_gpc setting affects the output of parse_str() we may need to remove any quote escaping.
282
- // (it uses the same mechanism that PHP > uses to populate the $_GET, $_POST, etc. variables)
283
- if ( get_magic_quotes_gpc() ) {
284
- $form_data = wp_unslash( $form_data );
285
- }
286
  $this->accepted_fields = apply_filters( 'wpmdb_accepted_profile_fields', $this->accepted_fields );
287
  $form_data = array_intersect_key( $form_data, array_flip( $this->accepted_fields ) );
288
  unset( $form_data['replace_old'][0] );
@@ -305,21 +302,6 @@ class WPMDB extends WPMDB_Base {
305
  return $form_data;
306
  }
307
 
308
- /**
309
- * Returns the profile value for a given key.
310
- *
311
- * @param string $key
312
- *
313
- * @return mixed
314
- */
315
- function profile_value( $key ) {
316
- if ( ! empty( $key ) && ! empty( $this->form_data ) && isset( $this->form_data[ $key ] ) ) {
317
- return $this->form_data[ $key ];
318
- }
319
-
320
- return null;
321
- }
322
-
323
  /**
324
  * Adds settings link to plugin page
325
  *
@@ -380,8 +362,8 @@ class WPMDB extends WPMDB_Base {
380
  * @return void
381
  */
382
  function output_diagnostic_info() {
383
- global $table_prefix;
384
  global $wpdb;
 
385
 
386
  echo 'site_url(): ';
387
  echo esc_html( site_url() );
@@ -541,6 +523,18 @@ class WPMDB extends WPMDB_Base {
541
  echo "\r\n";
542
  }
543
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  echo "Active Plugins:\r\n";
545
 
546
  if ( isset( $GLOBALS['wpmdb_compatibility'] ) ) {
@@ -672,27 +666,20 @@ class WPMDB extends WPMDB_Base {
672
 
673
  // checks if we're performing a backup, if so, continue with the backup and exit immediately after
674
  if ( $this->state_data['stage'] == 'backup' && $this->state_data['intent'] != 'savefile' ) {
675
- if ( empty( $this->state_data['dumpfile_created'] ) ) {
676
- $this->state_data['dumpfile_created'] = true;
677
- $this->save_migration_state( $this->state_data );
678
- }
679
-
680
  // if performing a push we need to backup the REMOTE machine's DB
681
  if ( $this->state_data['intent'] == 'push' ) {
682
- $data = $this->filter_post_elements(
683
  $this->state_data,
684
  array(
685
  'action',
686
- 'intent',
687
  'url',
688
- 'key',
689
  'table',
690
  'form_data',
691
  'stage',
692
  'bottleneck',
693
  'prefix',
694
  'current_row',
695
- 'dump_filename',
696
  'last_table',
697
  'gzip',
698
  'primary_keys',
@@ -700,11 +687,13 @@ class WPMDB extends WPMDB_Base {
700
  'domain_current_site',
701
  )
702
  );
703
- $data['action'] = 'wpmdb_backup_remote_table';
704
- $data['intent'] = 'pull';
705
- $ajax_url = $this->ajax_url();
706
- $data['sig'] = $this->create_signature( $data, $data['key'] );
707
- $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
 
 
708
  ob_start();
709
  $this->display_errors();
710
  $maybe_errors = ob_get_clean();
@@ -776,7 +765,25 @@ class WPMDB extends WPMDB_Base {
776
 
777
  return $result;
778
  } else {
779
- $data = $this->filter_post_elements( $this->state_data, array( 'action', 'intent', 'url', 'key', 'table', 'form_data', 'stage', 'bottleneck', 'prefix', 'current_row', 'dump_filename', 'pull_limit', 'last_table', 'gzip', 'primary_keys', 'path_current_site', 'domain_current_site', 'site_url', 'find_replace_pairs' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
780
  $data['action'] = 'wpmdb_process_pull_request';
781
  $data['pull_limit'] = $this->get_sensible_pull_limit();
782
  $data['db_version'] = $wpdb->db_version();
@@ -786,18 +793,20 @@ class WPMDB extends WPMDB_Base {
786
  $data['domain_current_site'] = $this->get_domain_current_site();
787
  }
788
 
789
- $data['prefix'] = $wpdb->prefix;
790
-
791
- if ( isset( $data['sig'] ) ) {
792
- unset( $data['sig'] );
793
- }
794
 
795
  if ( isset( $data['find_replace_pairs'] ) ) {
796
  $data['find_replace_pairs'] = serialize( $data['find_replace_pairs'] );
797
  }
798
 
799
- $ajax_url = $this->ajax_url();
800
- $data['sig'] = $this->create_signature( $data, $data['key'] );
 
 
 
 
 
 
801
 
802
  $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
803
  ob_start();
@@ -882,7 +891,7 @@ class WPMDB extends WPMDB_Base {
882
  $return['dump_path'] = $this->get_sql_dump_info( 'migrate', 'path' );
883
  $return['dump_filename'] = basename( $return['dump_path'] );
884
  $return['dump_url'] = $this->get_sql_dump_info( 'migrate', 'url' );
885
- $dump_filename_no_extension = substr( $return['dump_filename'], 0, - 4 );
886
 
887
  $create_alter_table_query = $this->get_create_alter_table_query();
888
  // sets up our table to store 'ALTER' queries
@@ -954,7 +963,7 @@ class WPMDB extends WPMDB_Base {
954
 
955
  if ( ! empty( $this->form_data['create_backup'] ) && $this->state_data['intent'] == 'pull' ) {
956
  $return['dump_filename'] = basename( $this->get_sql_dump_info( 'backup', 'path' ) );
957
- $return['dump_filename'] = substr( $return['dump_filename'], 0, - 4 );
958
  $return['dump_url'] = $this->get_sql_dump_info( 'backup', 'url' );
959
  }
960
  }
@@ -1035,7 +1044,7 @@ class WPMDB extends WPMDB_Base {
1035
  $this->set_post_data( $key_rules );
1036
 
1037
  $key = absint( $this->state_data['profile_id'] );
1038
- -- $key;
1039
  $return = '';
1040
 
1041
  if ( isset( $this->settings['profiles'][ $key ] ) ) {
@@ -1066,22 +1075,22 @@ class WPMDB extends WPMDB_Base {
1066
 
1067
  if ( is_multisite() ) {
1068
  $tables = $this->get_tables();
1069
- $sql = "SELECT `post_type` FROM `{$wpdb->prefix}posts` ";
1070
- $prefix_escaped = preg_quote( $wpdb->prefix, '/' );
1071
 
1072
  foreach ( $tables as $table ) {
1073
  if ( 0 == preg_match( '/' . $prefix_escaped . '[0-9]+_posts/', $table ) ) {
1074
  continue;
1075
  }
1076
- $blog_id = str_replace( array( $wpdb->prefix, '_posts' ), array( '', '' ), $table );
1077
- $sql .= "UNION SELECT `post_type` FROM `{$wpdb->prefix}" . $blog_id . '_posts` ';
1078
  }
1079
  $sql .= ';';
1080
  $post_types = $wpdb->get_results( $sql, ARRAY_A );
1081
  } else {
1082
  $post_types = $wpdb->get_results(
1083
  "SELECT DISTINCT `post_type`
1084
- FROM `{$wpdb->prefix}posts`
1085
  WHERE 1;",
1086
  ARRAY_A
1087
  );
@@ -1098,7 +1107,7 @@ class WPMDB extends WPMDB_Base {
1098
 
1099
  // Retrieves the specified profile, if -1, returns the default profile
1100
  function get_profile( $profile_id ) {
1101
- -- $profile_id;
1102
 
1103
  if ( $profile_id == '-1' || ! isset( $this->settings['profiles'][ $profile_id ] ) ) {
1104
  return $this->default_profile;
@@ -1202,7 +1211,7 @@ class WPMDB extends WPMDB_Base {
1202
  $this->domain_replace = $this->state_data['domain_current_site'];
1203
  } elseif ( is_multisite() && ! empty( $this->form_data['replace_new'][1] ) ) {
1204
  $url = $this->form_data['replace_new'][1];
1205
- $url = parse_url( $url );
1206
 
1207
  if ( isset( $url['host'] ) ) {
1208
  $this->domain_replace = $url['host'];
@@ -1239,7 +1248,7 @@ class WPMDB extends WPMDB_Base {
1239
  $sql_count = count( $sql_lines );
1240
 
1241
  // lets find first line with constraints
1242
- for ( $i = 0; $i < $sql_count; $i ++ ) {
1243
  if ( preg_match(
1244
  '@^[\s]*(CONSTRAINT|FOREIGN[\s]+KEY)@',
1245
  $sql_lines[ $i ]
@@ -1261,7 +1270,7 @@ class WPMDB extends WPMDB_Base {
1261
  $sql_constraints_query .= 'ALTER TABLE ' . $this->backquote( $table ) . $crlf;
1262
 
1263
  $first = true;
1264
- for ( $j = $i; $j < $sql_count; $j ++ ) {
1265
  if ( preg_match(
1266
  '@CONSTRAINT|FOREIGN[\s]+KEY@',
1267
  $sql_lines[ $j ]
@@ -1335,8 +1344,7 @@ class WPMDB extends WPMDB_Base {
1335
  $this->form_data = $this->parse_migration_form_data( $this->state_data['form_data'] );
1336
  }
1337
 
1338
- $temp_prefix = ( isset( $this->state_data['temp_prefix'] ) ? $this->state_data['temp_prefix'] : $this->temp_prefix );
1339
- $remote_prefix = ( isset( $this->state_data['prefix'] ) ? $this->state_data['prefix'] : $wpdb->prefix );
1340
 
1341
  $table_structure = $wpdb->get_results( 'DESCRIBE ' . $this->backquote( $table ) );
1342
 
@@ -1347,13 +1355,14 @@ class WPMDB extends WPMDB_Base {
1347
  }
1348
 
1349
  $table_name = $table;
1350
- $table_name = apply_filters( 'wpmdb_target_table_name', $table_name, $this->form_data['action'], $this->state_data['stage'] );
 
1351
 
1352
  if ( 'savefile' !== $this->form_data['action'] && 'backup' !== $this->state_data['stage'] ) {
1353
  $table_name = $temp_prefix . $table;
1354
  }
1355
 
1356
- $current_row = - 1;
1357
 
1358
  if ( ! empty( $this->state_data['current_row'] ) ) {
1359
  $temp_current_row = trim( $this->state_data['current_row'] );
@@ -1362,25 +1371,28 @@ class WPMDB extends WPMDB_Base {
1362
  }
1363
  }
1364
 
1365
- if ( $current_row == - 1 ) {
 
 
 
1366
  // Add SQL statement to drop existing table
1367
  if ( $this->form_data['action'] == 'savefile' || $this->state_data['stage'] == 'backup' ) {
1368
- $this->stow( "\n\n" );
1369
- $this->stow( "#\n" );
1370
- $this->stow( '# ' . sprintf( __( 'Delete any existing table %s', 'wp-migrate-db' ), $this->backquote( $table_name ) ) . "\n" );
1371
- $this->stow( "#\n" );
1372
- $this->stow( "\n" );
1373
  }
1374
- $this->stow( 'DROP TABLE IF EXISTS ' . $this->backquote( $table_name ) . ";\n" );
1375
 
1376
  // Table structure
1377
  // Comment in SQL-file
1378
  if ( $this->form_data['action'] == 'savefile' || $this->state_data['stage'] == 'backup' ) {
1379
- $this->stow( "\n\n" );
1380
- $this->stow( "#\n" );
1381
- $this->stow( '# ' . sprintf( __( 'Table structure of table %s', 'wp-migrate-db' ), $this->backquote( $table_name ) ) . "\n" );
1382
- $this->stow( "#\n" );
1383
- $this->stow( "\n" );
1384
  }
1385
 
1386
  $create_table = $wpdb->get_results( 'SHOW CREATE TABLE ' . $this->backquote( $table ), ARRAY_N );
@@ -1395,11 +1407,12 @@ class WPMDB extends WPMDB_Base {
1395
  $create_table[0][1] = str_replace( 'TYPE=', 'ENGINE=', $create_table[0][1] );
1396
 
1397
  $alter_table_query = '';
1398
- $create_table[0][1] = $this->process_sql_constraint( $create_table[0][1], $table_name, $alter_table_query );
1399
 
1400
  $create_table[0][1] = apply_filters( 'wpmdb_create_table_query', $create_table[0][1], $table_name, $db_version, $this->form_data['action'], $this->state_data['stage'] );
 
1401
 
1402
- $this->stow( $create_table[0][1] . ";\n" );
1403
 
1404
  if ( ! empty( $alter_table_query ) ) {
1405
  $alter_table_name = $this->get_alter_table_name();
@@ -1472,7 +1485,7 @@ class WPMDB extends WPMDB_Base {
1472
 
1473
  $row_inc = $this->rows_per_segment;
1474
  $row_start = 0;
1475
- if ( $current_row != - 1 ) {
1476
  $row_start = $current_row;
1477
  }
1478
 
@@ -1504,7 +1517,7 @@ class WPMDB extends WPMDB_Base {
1504
  if ( ! empty( $this->state_data['primary_keys'] ) ) {
1505
  $this->state_data['primary_keys'] = trim( $this->state_data['primary_keys'] );
1506
  if ( ! empty( $this->state_data['primary_keys'] ) && is_serialized( $this->state_data['primary_keys'] ) ) {
1507
- $this->primary_keys = unserialize( $this->state_data['primary_keys'] );
1508
  $first_select = false;
1509
  }
1510
  }
@@ -1591,7 +1604,7 @@ class WPMDB extends WPMDB_Base {
1591
  // build a list of clauses, iteratively reducing the number of fields compared in the compound key
1592
  // e.g. (a = 1 AND b = 2 AND c > 3) OR (a = 1 AND b > 2) OR (a > 1)
1593
  $clauses = array();
1594
- for ( $j = 0; $j < $primary_key_count; $j ++ ) {
1595
  // build a subclause for each field in the compound index
1596
  $subclauses = array();
1597
  $i = 0;
@@ -1599,7 +1612,7 @@ class WPMDB extends WPMDB_Base {
1599
  // only the last field in the key should be different in this subclause
1600
  $operator = ( count( $temp_primary_keys ) - 1 == $i ? '>' : '=' );
1601
  $subclauses[] = sprintf( '%s %s %s', $this->backquote( $primary_key ), $operator, $wpdb->prepare( '%s', $value ) );
1602
- ++ $i;
1603
  }
1604
 
1605
  // remove last field from array to reduce fields in next clause
@@ -1758,7 +1771,7 @@ class WPMDB extends WPMDB_Base {
1758
  if ( $insert_buffer == $insert_query_template ) {
1759
  $insert_buffer .= $insert_line;
1760
 
1761
- ++ $this->row_tracker;
1762
 
1763
  if ( ! empty( $this->primary_keys ) ) {
1764
  foreach ( $this->primary_keys as $primary_key => $value ) {
@@ -1787,7 +1800,7 @@ class WPMDB extends WPMDB_Base {
1787
  $insert_buffer .= $insert_line;
1788
  $query_size += strlen( $insert_line );
1789
 
1790
- ++ $this->row_tracker;
1791
 
1792
  if ( ! empty( $this->primary_keys ) ) {
1793
  foreach ( $this->primary_keys as $primary_key => $value ) {
@@ -1838,7 +1851,7 @@ class WPMDB extends WPMDB_Base {
1838
  }
1839
  }
1840
 
1841
- $this->row_tracker = - 1;
1842
 
1843
  return $this->transfer_chunk();
1844
  } // end export_table()
@@ -1860,9 +1873,9 @@ class WPMDB extends WPMDB_Base {
1860
  *
1861
  * @param string $desired_table Can be empty to match on tables from scopes other than 'table'.
1862
  * @param string $given_table
1863
- * @param string $scope Optional type of table to match against, default is 'table'.
1864
- * @param string $new_prefix Optional new prefix already added to $given_table.
1865
- * @param int $blog_id Optional Only used with 'blog' scope to test against a specific subsite's tables other than current for $wpdb.
1866
  *
1867
  * @return boolean
1868
  */
@@ -1880,11 +1893,11 @@ class WPMDB extends WPMDB_Base {
1880
  }
1881
 
1882
  if ( ! empty( $new_prefix ) && 0 === stripos( $given_table, $new_prefix ) ) {
1883
- $given_table = substr_replace( $given_table, $wpdb->prefix, 0, strlen( $new_prefix ) );
1884
  }
1885
 
1886
  $match = false;
1887
- $prefix_escaped = preg_quote( $wpdb->prefix, '/' );
1888
  $desired_table_escaped = preg_quote( $desired_table, '/' );
1889
 
1890
  if ( 'table' === $scope ) {
@@ -1921,7 +1934,7 @@ class WPMDB extends WPMDB_Base {
1921
  * Return multisite-compatible names for requested
1922
  * tables, based on queried table name
1923
  *
1924
- * @param array $tables List of table names required
1925
  * @param string $queried_table Name of table from which to derive the blog ID
1926
  *
1927
  * @return array List of table names altered for multisite compatibility
@@ -1930,7 +1943,7 @@ class WPMDB extends WPMDB_Base {
1930
  global $wpdb;
1931
 
1932
  // default table prefix
1933
- $prefix = $wpdb->prefix;
1934
  $prefix_escaped = preg_quote( $prefix, '/' );
1935
 
1936
  // if multisite, extract blog ID from queried table name and add to prefix
@@ -2039,7 +2052,7 @@ class WPMDB extends WPMDB_Base {
2039
 
2040
  $result = array(
2041
  'current_row' => $this->row_tracker,
2042
- 'primary_keys' => serialize( $this->primary_keys )
2043
  );
2044
 
2045
  if ( $this->state_data['intent'] == 'savefile' && $this->state_data['last_table'] == '1' ) {
@@ -2065,10 +2078,11 @@ class WPMDB extends WPMDB_Base {
2065
  }
2066
 
2067
  $data = array(
2068
- 'action' => 'wpmdb_process_chunk',
2069
- 'table' => $this->state_data['table'],
2070
- 'chunk_gzipped' => $chunk_gzipped,
2071
- 'chunk' => $this->current_chunk,
 
2072
  // NEEDS TO BE the last element in this array because of adding it back into the array in ajax_process_chunk()
2073
  );
2074
 
@@ -2098,7 +2112,7 @@ class WPMDB extends WPMDB_Base {
2098
  $result = $this->end_ajax( json_encode(
2099
  array(
2100
  'current_row' => $this->row_tracker,
2101
- 'primary_keys' => serialize( $this->primary_keys )
2102
  )
2103
  ) );
2104
 
@@ -2136,7 +2150,7 @@ class WPMDB extends WPMDB_Base {
2136
  * Taken from phpMyAdmin.
2137
  *
2138
  * @param string $a_string
2139
- * @param bool $is_like
2140
  *
2141
  * @return mixed
2142
  */
@@ -2327,6 +2341,9 @@ class WPMDB extends WPMDB_Base {
2327
  $src = $plugins_url . "asset/js/hook$min.js";
2328
  wp_enqueue_script( 'wp-migrate-db-pro-hook', $src, null, $version, true );
2329
 
 
 
 
2330
  do_action( 'wpmdb_load_assets' );
2331
 
2332
  $src = $plugins_url . "asset/js/script$min.js";
@@ -2345,9 +2362,8 @@ class WPMDB extends WPMDB_Base {
2345
  'fetching_license' => __( 'Fetching license details, please wait...', 'wp-migrate-db' ),
2346
  'clear_log_problem' => __( 'An error occurred when trying to clear the debug log. Please contact support. (#132)', 'wp-migrate-db' ),
2347
  'update_log_problem' => __( 'An error occurred when trying to update the debug log. Please contact support. (#133)', 'wp-migrate-db' ),
2348
- 'migrate_db_save' => _x( 'Migrate & Save Profile', 'Copy data between servers and save migration profile', 'wp-migrate-db' ),
2349
- 'migrate_db' => _x( 'Migrate', 'Copy data between servers', 'wp-migrate-db' ),
2350
  'please_select_one_table' => __( 'Please select at least one table to migrate.', 'wp-migrate-db' ),
 
2351
  'enter_name_for_profile' => __( 'Please enter a name for your migration profile.', 'wp-migrate-db' ),
2352
  'save_profile_problem' => __( 'An error occurred when attempting to save the migration profile. Please see the Help tab for details on how to request support. (#118)', 'wp-migrate-db' ),
2353
  'exporting_complete' => _x( 'Exporting complete', 'Data has been successfully exported', 'wp-migrate-db' ),
@@ -2386,6 +2402,7 @@ class WPMDB extends WPMDB_Base {
2386
  'completing_current_request' => __( 'Completing current request', 'wp-migrate-db' ),
2387
  'cancelling_migration' => _x( 'Cancelling migration', 'The migration is being cancelled', 'wp-migrate-db' ),
2388
  'paused' => _x( 'Paused', 'The migration has been temporarily stopped', 'wp-migrate-db' ),
 
2389
  'removing_local_sql' => __( 'Removing the local MySQL export file', 'wp-migrate-db' ),
2390
  'removing_local_backup' => __( 'Removing the local backup MySQL export file', 'wp-migrate-db' ),
2391
  'removing_local_temp_tables' => __( 'Removing the local temporary tables', 'wp-migrate-db' ),
@@ -2416,6 +2433,12 @@ class WPMDB extends WPMDB_Base {
2416
  'delaying_next_request' => __( 'Waiting %s seconds before executing next step', 'wp-migrate-db' ),
2417
  'delay_between_requests_problem' => __( 'A problem occurred when trying to change the delay between requests, please try again.', 'wp-migrate-db' ),
2418
  'flush_problem' => __( 'A problem occurred when flushing caches and rewrite rules. (#145)', 'wp-migrate-db' ),
 
 
 
 
 
 
2419
  )
2420
  );
2421
 
@@ -2461,7 +2484,8 @@ class WPMDB extends WPMDB_Base {
2461
  * @return void
2462
  */
2463
  function admin_head_connection_info() {
2464
- global $table_prefix;
 
2465
 
2466
  $nonces = apply_filters( 'wpmdb_nonces', array(
2467
  'update_max_request_size' => wp_create_nonce( 'update-max-request-size' ),
@@ -2514,6 +2538,7 @@ class WPMDB extends WPMDB_Base {
2514
  'profile' => isset( $_GET['wpmdb-profile'] ) ? $_GET['wpmdb-profile'] : '-1',
2515
  'is_pro' => esc_html( ( $this->is_pro ) ? 'true' : 'false' ),
2516
  'lower_case_table_names' => esc_html( $this->get_lower_case_table_names_setting() ),
 
2517
  ) );
2518
 
2519
  wp_localize_script( 'wp-migrate-db-pro-script', 'wpmdb_data', $data );
@@ -2560,6 +2585,11 @@ class WPMDB extends WPMDB_Base {
2560
  return $current_site->path;
2561
  }
2562
 
 
 
 
 
 
2563
  function get_domain_current_site() {
2564
  if ( ! is_multisite() ) {
2565
  return '';
@@ -2570,10 +2600,6 @@ class WPMDB extends WPMDB_Base {
2570
  return $current_site->domain;
2571
  }
2572
 
2573
- function maybe_checked( $option ) {
2574
- echo esc_html( ( isset( $option ) && $option == '1' ) ? ' checked="checked"' : '' );
2575
- }
2576
-
2577
  /**
2578
  * Called to cancel an in-progress migration.
2579
  */
@@ -2591,11 +2617,22 @@ class WPMDB extends WPMDB_Base {
2591
  $this->delete_export_file( $this->state_data['dump_filename'], false );
2592
  break;
2593
  case 'push' :
2594
- $data = $this->filter_post_elements( $this->state_data, array( 'action', 'intent', 'url', 'key', 'form_data', 'dump_filename', 'temp_prefix', 'stage' ) );
2595
- $data['dumpfile_created'] = empty( $this->state_data['dumpfile_created'] ) ? 0 : 1;
2596
- $data['action'] = 'wpmdb_process_push_migration_cancellation';
2597
- $ajax_url = $this->ajax_url();
2598
- $data['sig'] = $this->create_signature( $data, $data['key'] );
 
 
 
 
 
 
 
 
 
 
 
2599
 
2600
  $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
2601
  $this->display_errors();
@@ -2773,20 +2810,21 @@ class WPMDB extends WPMDB_Base {
2773
  $abort_utf8mb4 = apply_filters( 'wpmdb_abort_utf8mb4_to_utf8', $abort_utf8mb4 );
2774
 
2775
  $replace_count = 0;
2776
- $create_table = preg_replace( '/(COLLATE\s)utf8mb4/', '$1utf8', $create_table, -1, $replace_count ); // Column collation
2777
 
2778
  if ( false === $abort_utf8mb4 || 0 === $replace_count ) {
2779
- $create_table = preg_replace( '/(COLLATE=)utf8mb4/', '$1utf8', $create_table, - 1, $replace_count ); // Table collation
2780
  }
2781
 
2782
  if ( false === $abort_utf8mb4 || 0 === $replace_count ) {
2783
- $create_table = preg_replace( '/(CHARSET\s?=\s?)utf8mb4/', '$1utf8', $create_table, - 1, $replace_count ); // Table charset
2784
  }
2785
 
2786
  if ( true === $abort_utf8mb4 && 0 !== $replace_count ) {
2787
  $return = sprintf( __( 'The source site supports utf8mb4 data but the target does not, aborting migration to avoid possible data corruption. Please see %1$s for more information. (#148)', 'wp-migrate-db-pro' ), sprintf( '<a href="https://deliciousbrains.com/wp-migrate-db-pro/doc/source-site-supports-utf8mb4/">%1$s</a>', __( 'our documentation', 'wp-migrate-db-pro' ) ) );
2788
  $return = array( 'wpmdb_error' => 1, 'body' => $return );
2789
  $result = $this->end_ajax( json_encode( $return ) );
 
2790
  return $result;
2791
  }
2792
  }
@@ -2816,7 +2854,7 @@ class WPMDB extends WPMDB_Base {
2816
  foreach ( $tmp_find_replace_pairs as $replace_old => $replace_new ) {
2817
  $find_replace_pairs['replace_old'][ $i ] = $replace_old;
2818
  $find_replace_pairs['replace_new'][ $i ] = $replace_new;
2819
- $i ++;
2820
  }
2821
  }
2822
 
9
  protected $maximum_chunk_size;
10
  protected $current_chunk = '';
11
  protected $connection_details;
 
12
  protected $max_insert_string_len;
13
  protected $row_tracker;
14
  protected $rows_per_segment = 100;
77
  'exclude_post_revisions',
78
  'compatibility_older_mysql',
79
  'export_dest',
80
+ 'pause_before_finalize',
81
  );
82
 
83
  $this->default_profile = array(
104
  'create_backup' => '0',
105
  'exclude_post_types' => '0',
106
  'compatibility_older_mysql' => '0',
107
+ 'pause_before_finalize' => '0',
108
  );
109
 
110
  $this->plugin_tabs = array(
278
  * @return array|string
279
  */
280
  function parse_migration_form_data( $data ) {
281
+ $form_data = parent::parse_migration_form_data( $data );
282
+
 
 
 
 
283
  $this->accepted_fields = apply_filters( 'wpmdb_accepted_profile_fields', $this->accepted_fields );
284
  $form_data = array_intersect_key( $form_data, array_flip( $this->accepted_fields ) );
285
  unset( $form_data['replace_old'][0] );
302
  return $form_data;
303
  }
304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  /**
306
  * Adds settings link to plugin page
307
  *
362
  * @return void
363
  */
364
  function output_diagnostic_info() {
 
365
  global $wpdb;
366
+ $table_prefix = $wpdb->base_prefix;
367
 
368
  echo 'site_url(): ';
369
  echo esc_html( site_url() );
523
  echo "\r\n";
524
  }
525
 
526
+ $theme_info = wp_get_theme();
527
+ echo "Active Theme Name: " . esc_html( $theme_info->Name ) . "\r\n";
528
+ echo "Active Theme Folder: " . esc_html( basename( $theme_info->get_stylesheet_directory() ) ) . "\r\n";
529
+ if ( $theme_info->get( 'Template' ) ) {
530
+ echo "Parent Theme Folder: " . esc_html( $theme_info->get( 'Template' ) ) . "\r\n";
531
+ }
532
+ if ( ! file_exists( $theme_info->get_stylesheet_directory() ) ) {
533
+ echo "WARNING: Active Theme Folder Not Found\r\n";
534
+ }
535
+
536
+ echo "\r\n";
537
+
538
  echo "Active Plugins:\r\n";
539
 
540
  if ( isset( $GLOBALS['wpmdb_compatibility'] ) ) {
666
 
667
  // checks if we're performing a backup, if so, continue with the backup and exit immediately after
668
  if ( $this->state_data['stage'] == 'backup' && $this->state_data['intent'] != 'savefile' ) {
 
 
 
 
 
669
  // if performing a push we need to backup the REMOTE machine's DB
670
  if ( $this->state_data['intent'] == 'push' ) {
671
+ $data = $this->filter_post_elements(
672
  $this->state_data,
673
  array(
674
  'action',
675
+ 'remote_state_id',
676
  'url',
 
677
  'table',
678
  'form_data',
679
  'stage',
680
  'bottleneck',
681
  'prefix',
682
  'current_row',
 
683
  'last_table',
684
  'gzip',
685
  'primary_keys',
687
  'domain_current_site',
688
  )
689
  );
690
+
691
+ $data['action'] = 'wpmdb_backup_remote_table';
692
+ $data['intent'] = 'pull';
693
+ $data['sig'] = $this->create_signature( $data, $this->state_data['key'] );
694
+ $data['primary_keys'] = addslashes( $data['primary_keys'] );
695
+ $ajax_url = $this->ajax_url();
696
+ $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
697
  ob_start();
698
  $this->display_errors();
699
  $maybe_errors = ob_get_clean();
765
 
766
  return $result;
767
  } else {
768
+ $data = $this->filter_post_elements(
769
+ $this->state_data,
770
+ array(
771
+ 'remote_state_id',
772
+ 'intent',
773
+ 'url',
774
+ 'table',
775
+ 'form_data',
776
+ 'stage',
777
+ 'bottleneck',
778
+ 'current_row',
779
+ 'last_table',
780
+ 'gzip',
781
+ 'primary_keys',
782
+ 'site_url',
783
+ 'find_replace_pairs',
784
+ )
785
+ );
786
+
787
  $data['action'] = 'wpmdb_process_pull_request';
788
  $data['pull_limit'] = $this->get_sensible_pull_limit();
789
  $data['db_version'] = $wpdb->db_version();
793
  $data['domain_current_site'] = $this->get_domain_current_site();
794
  }
795
 
796
+ $data['prefix'] = $wpdb->base_prefix;
 
 
 
 
797
 
798
  if ( isset( $data['find_replace_pairs'] ) ) {
799
  $data['find_replace_pairs'] = serialize( $data['find_replace_pairs'] );
800
  }
801
 
802
+ if ( isset( $data['sig'] ) ) {
803
+ unset( $data['sig'] );
804
+ }
805
+
806
+ $data['sig'] = $this->create_signature( $data, $this->state_data['key'] );
807
+ $data['primary_keys'] = addslashes( $data['primary_keys'] );
808
+ $data['find_replace_pairs'] = addslashes( $data['find_replace_pairs'] );
809
+ $ajax_url = $this->ajax_url();
810
 
811
  $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
812
  ob_start();
891
  $return['dump_path'] = $this->get_sql_dump_info( 'migrate', 'path' );
892
  $return['dump_filename'] = basename( $return['dump_path'] );
893
  $return['dump_url'] = $this->get_sql_dump_info( 'migrate', 'url' );
894
+ $dump_filename_no_extension = substr( $return['dump_filename'], 0, -4 );
895
 
896
  $create_alter_table_query = $this->get_create_alter_table_query();
897
  // sets up our table to store 'ALTER' queries
963
 
964
  if ( ! empty( $this->form_data['create_backup'] ) && $this->state_data['intent'] == 'pull' ) {
965
  $return['dump_filename'] = basename( $this->get_sql_dump_info( 'backup', 'path' ) );
966
+ $return['dump_filename'] = substr( $return['dump_filename'], 0, -4 );
967
  $return['dump_url'] = $this->get_sql_dump_info( 'backup', 'url' );
968
  }
969
  }
1044
  $this->set_post_data( $key_rules );
1045
 
1046
  $key = absint( $this->state_data['profile_id'] );
1047
+ --$key;
1048
  $return = '';
1049
 
1050
  if ( isset( $this->settings['profiles'][ $key ] ) ) {
1075
 
1076
  if ( is_multisite() ) {
1077
  $tables = $this->get_tables();
1078
+ $sql = "SELECT `post_type` FROM `{$wpdb->base_prefix}posts` ";
1079
+ $prefix_escaped = preg_quote( $wpdb->base_prefix, '/' );
1080
 
1081
  foreach ( $tables as $table ) {
1082
  if ( 0 == preg_match( '/' . $prefix_escaped . '[0-9]+_posts/', $table ) ) {
1083
  continue;
1084
  }
1085
+ $blog_id = str_replace( array( $wpdb->base_prefix, '_posts' ), array( '', '' ), $table );
1086
+ $sql .= "UNION SELECT `post_type` FROM `{$wpdb->base_prefix}" . $blog_id . '_posts` ';
1087
  }
1088
  $sql .= ';';
1089
  $post_types = $wpdb->get_results( $sql, ARRAY_A );
1090
  } else {
1091
  $post_types = $wpdb->get_results(
1092
  "SELECT DISTINCT `post_type`
1093
+ FROM `{$wpdb->base_prefix}posts`
1094
  WHERE 1;",
1095
  ARRAY_A
1096
  );
1107
 
1108
  // Retrieves the specified profile, if -1, returns the default profile
1109
  function get_profile( $profile_id ) {
1110
+ --$profile_id;
1111
 
1112
  if ( $profile_id == '-1' || ! isset( $this->settings['profiles'][ $profile_id ] ) ) {
1113
  return $this->default_profile;
1211
  $this->domain_replace = $this->state_data['domain_current_site'];
1212
  } elseif ( is_multisite() && ! empty( $this->form_data['replace_new'][1] ) ) {
1213
  $url = $this->form_data['replace_new'][1];
1214
+ $url = $this->parse_url( $url );
1215
 
1216
  if ( isset( $url['host'] ) ) {
1217
  $this->domain_replace = $url['host'];
1248
  $sql_count = count( $sql_lines );
1249
 
1250
  // lets find first line with constraints
1251
+ for ( $i = 0; $i < $sql_count; $i++ ) {
1252
  if ( preg_match(
1253
  '@^[\s]*(CONSTRAINT|FOREIGN[\s]+KEY)@',
1254
  $sql_lines[ $i ]
1270
  $sql_constraints_query .= 'ALTER TABLE ' . $this->backquote( $table ) . $crlf;
1271
 
1272
  $first = true;
1273
+ for ( $j = $i; $j < $sql_count; $j++ ) {
1274
  if ( preg_match(
1275
  '@CONSTRAINT|FOREIGN[\s]+KEY@',
1276
  $sql_lines[ $j ]
1344
  $this->form_data = $this->parse_migration_form_data( $this->state_data['form_data'] );
1345
  }
1346
 
1347
+ $temp_prefix = ( isset( $this->state_data['temp_prefix'] ) ? $this->state_data['temp_prefix'] : $this->temp_prefix );
 
1348
 
1349
  $table_structure = $wpdb->get_results( 'DESCRIBE ' . $this->backquote( $table ) );
1350
 
1355
  }
1356
 
1357
  $table_name = $table;
1358
+ $target_table_name = apply_filters( 'wpmdb_target_table_name', $table_name, $this->form_data['action'], $this->state_data['stage'] );
1359
+ $table_name = $target_table_name;
1360
 
1361
  if ( 'savefile' !== $this->form_data['action'] && 'backup' !== $this->state_data['stage'] ) {
1362
  $table_name = $temp_prefix . $table;
1363
  }
1364
 
1365
+ $current_row = -1;
1366
 
1367
  if ( ! empty( $this->state_data['current_row'] ) ) {
1368
  $temp_current_row = trim( $this->state_data['current_row'] );
1371
  }
1372
  }
1373
 
1374
+ if ( $current_row == -1 ) {
1375
+ // Don't stow data until after `wpmdb_create_table_query` filter is applied as mysql_compat_filter() can return an error
1376
+ $stow = '';
1377
+
1378
  // Add SQL statement to drop existing table
1379
  if ( $this->form_data['action'] == 'savefile' || $this->state_data['stage'] == 'backup' ) {
1380
+ $stow .= ( "\n\n" );
1381
+ $stow .= ( "#\n" );
1382
+ $stow .= ( '# ' . sprintf( __( 'Delete any existing table %s', 'wp-migrate-db' ), $this->backquote( $table_name ) ) . "\n" );
1383
+ $stow .= ( "#\n" );
1384
+ $stow .= ( "\n" );
1385
  }
1386
+ $stow .= ( 'DROP TABLE IF EXISTS ' . $this->backquote( $table_name ) . ";\n" );
1387
 
1388
  // Table structure
1389
  // Comment in SQL-file
1390
  if ( $this->form_data['action'] == 'savefile' || $this->state_data['stage'] == 'backup' ) {
1391
+ $stow .= ( "\n\n" );
1392
+ $stow .= ( "#\n" );
1393
+ $stow .= ( '# ' . sprintf( __( 'Table structure of table %s', 'wp-migrate-db' ), $this->backquote( $table_name ) ) . "\n" );
1394
+ $stow .= ( "#\n" );
1395
+ $stow .= ( "\n" );
1396
  }
1397
 
1398
  $create_table = $wpdb->get_results( 'SHOW CREATE TABLE ' . $this->backquote( $table ), ARRAY_N );
1407
  $create_table[0][1] = str_replace( 'TYPE=', 'ENGINE=', $create_table[0][1] );
1408
 
1409
  $alter_table_query = '';
1410
+ $create_table[0][1] = $this->process_sql_constraint( $create_table[0][1], $target_table_name, $alter_table_query );
1411
 
1412
  $create_table[0][1] = apply_filters( 'wpmdb_create_table_query', $create_table[0][1], $table_name, $db_version, $this->form_data['action'], $this->state_data['stage'] );
1413
+ $stow .= ( $create_table[0][1] . ";\n" );
1414
 
1415
+ $this->stow( $stow );
1416
 
1417
  if ( ! empty( $alter_table_query ) ) {
1418
  $alter_table_name = $this->get_alter_table_name();
1485
 
1486
  $row_inc = $this->rows_per_segment;
1487
  $row_start = 0;
1488
+ if ( $current_row != -1 ) {
1489
  $row_start = $current_row;
1490
  }
1491
 
1517
  if ( ! empty( $this->state_data['primary_keys'] ) ) {
1518
  $this->state_data['primary_keys'] = trim( $this->state_data['primary_keys'] );
1519
  if ( ! empty( $this->state_data['primary_keys'] ) && is_serialized( $this->state_data['primary_keys'] ) ) {
1520
+ $this->primary_keys = unserialize( stripslashes( $this->state_data['primary_keys'] ) );
1521
  $first_select = false;
1522
  }
1523
  }
1604
  // build a list of clauses, iteratively reducing the number of fields compared in the compound key
1605
  // e.g. (a = 1 AND b = 2 AND c > 3) OR (a = 1 AND b > 2) OR (a > 1)
1606
  $clauses = array();
1607
+ for ( $j = 0; $j < $primary_key_count; $j++ ) {
1608
  // build a subclause for each field in the compound index
1609
  $subclauses = array();
1610
  $i = 0;
1612
  // only the last field in the key should be different in this subclause
1613
  $operator = ( count( $temp_primary_keys ) - 1 == $i ? '>' : '=' );
1614
  $subclauses[] = sprintf( '%s %s %s', $this->backquote( $primary_key ), $operator, $wpdb->prepare( '%s', $value ) );
1615
+ ++$i;
1616
  }
1617
 
1618
  // remove last field from array to reduce fields in next clause
1771
  if ( $insert_buffer == $insert_query_template ) {
1772
  $insert_buffer .= $insert_line;
1773
 
1774
+ ++$this->row_tracker;
1775
 
1776
  if ( ! empty( $this->primary_keys ) ) {
1777
  foreach ( $this->primary_keys as $primary_key => $value ) {
1800
  $insert_buffer .= $insert_line;
1801
  $query_size += strlen( $insert_line );
1802
 
1803
+ ++$this->row_tracker;
1804
 
1805
  if ( ! empty( $this->primary_keys ) ) {
1806
  foreach ( $this->primary_keys as $primary_key => $value ) {
1851
  }
1852
  }
1853
 
1854
+ $this->row_tracker = -1;
1855
 
1856
  return $this->transfer_chunk();
1857
  } // end export_table()
1873
  *
1874
  * @param string $desired_table Can be empty to match on tables from scopes other than 'table'.
1875
  * @param string $given_table
1876
+ * @param string $scope Optional type of table to match against, default is 'table'.
1877
+ * @param string $new_prefix Optional new prefix already added to $given_table.
1878
+ * @param int $blog_id Optional Only used with 'blog' scope to test against a specific subsite's tables other than current for $wpdb.
1879
  *
1880
  * @return boolean
1881
  */
1893
  }
1894
 
1895
  if ( ! empty( $new_prefix ) && 0 === stripos( $given_table, $new_prefix ) ) {
1896
+ $given_table = substr_replace( $given_table, $wpdb->base_prefix, 0, strlen( $new_prefix ) );
1897
  }
1898
 
1899
  $match = false;
1900
+ $prefix_escaped = preg_quote( $wpdb->base_prefix, '/' );
1901
  $desired_table_escaped = preg_quote( $desired_table, '/' );
1902
 
1903
  if ( 'table' === $scope ) {
1934
  * Return multisite-compatible names for requested
1935
  * tables, based on queried table name
1936
  *
1937
+ * @param array $tables List of table names required
1938
  * @param string $queried_table Name of table from which to derive the blog ID
1939
  *
1940
  * @return array List of table names altered for multisite compatibility
1943
  global $wpdb;
1944
 
1945
  // default table prefix
1946
+ $prefix = $wpdb->base_prefix;
1947
  $prefix_escaped = preg_quote( $prefix, '/' );
1948
 
1949
  // if multisite, extract blog ID from queried table name and add to prefix
2052
 
2053
  $result = array(
2054
  'current_row' => $this->row_tracker,
2055
+ 'primary_keys' => serialize( $this->primary_keys ),
2056
  );
2057
 
2058
  if ( $this->state_data['intent'] == 'savefile' && $this->state_data['last_table'] == '1' ) {
2078
  }
2079
 
2080
  $data = array(
2081
+ 'action' => 'wpmdb_process_chunk',
2082
+ 'remote_state_id' => $this->state_data['remote_state_id'],
2083
+ 'table' => $this->state_data['table'],
2084
+ 'chunk_gzipped' => $chunk_gzipped,
2085
+ 'chunk' => $this->current_chunk,
2086
  // NEEDS TO BE the last element in this array because of adding it back into the array in ajax_process_chunk()
2087
  );
2088
 
2112
  $result = $this->end_ajax( json_encode(
2113
  array(
2114
  'current_row' => $this->row_tracker,
2115
+ 'primary_keys' => serialize( $this->primary_keys ),
2116
  )
2117
  ) );
2118
 
2150
  * Taken from phpMyAdmin.
2151
  *
2152
  * @param string $a_string
2153
+ * @param bool $is_like
2154
  *
2155
  * @return mixed
2156
  */
2341
  $src = $plugins_url . "asset/js/hook$min.js";
2342
  wp_enqueue_script( 'wp-migrate-db-pro-hook', $src, null, $version, true );
2343
 
2344
+ $src = $plugins_url . "asset/js/multisite$min.js";
2345
+ wp_enqueue_script( 'wp-migrate-db-pro-multisite', $src, array( 'jquery' ), $version, true );
2346
+
2347
  do_action( 'wpmdb_load_assets' );
2348
 
2349
  $src = $plugins_url . "asset/js/script$min.js";
2362
  'fetching_license' => __( 'Fetching license details, please wait...', 'wp-migrate-db' ),
2363
  'clear_log_problem' => __( 'An error occurred when trying to clear the debug log. Please contact support. (#132)', 'wp-migrate-db' ),
2364
  'update_log_problem' => __( 'An error occurred when trying to update the debug log. Please contact support. (#133)', 'wp-migrate-db' ),
 
 
2365
  'please_select_one_table' => __( 'Please select at least one table to migrate.', 'wp-migrate-db' ),
2366
+ 'please_select_one_table_backup' => __( 'Please select at least one table for backup.', 'wp-migrate-db' ),
2367
  'enter_name_for_profile' => __( 'Please enter a name for your migration profile.', 'wp-migrate-db' ),
2368
  'save_profile_problem' => __( 'An error occurred when attempting to save the migration profile. Please see the Help tab for details on how to request support. (#118)', 'wp-migrate-db' ),
2369
  'exporting_complete' => _x( 'Exporting complete', 'Data has been successfully exported', 'wp-migrate-db' ),
2402
  'completing_current_request' => __( 'Completing current request', 'wp-migrate-db' ),
2403
  'cancelling_migration' => _x( 'Cancelling migration', 'The migration is being cancelled', 'wp-migrate-db' ),
2404
  'paused' => _x( 'Paused', 'The migration has been temporarily stopped', 'wp-migrate-db' ),
2405
+ 'paused_before_finalize' => __( 'Automatically paused before migrated tables are replaced. Click "Resume" or "Cancel" when ready.', 'wp-migrate-db' ),
2406
  'removing_local_sql' => __( 'Removing the local MySQL export file', 'wp-migrate-db' ),
2407
  'removing_local_backup' => __( 'Removing the local backup MySQL export file', 'wp-migrate-db' ),
2408
  'removing_local_temp_tables' => __( 'Removing the local temporary tables', 'wp-migrate-db' ),
2433
  'delaying_next_request' => __( 'Waiting %s seconds before executing next step', 'wp-migrate-db' ),
2434
  'delay_between_requests_problem' => __( 'A problem occurred when trying to change the delay between requests, please try again.', 'wp-migrate-db' ),
2435
  'flush_problem' => __( 'A problem occurred when flushing caches and rewrite rules. (#145)', 'wp-migrate-db' ),
2436
+ 'migrate_button_push' => _x( 'Push', 'Transfer this database to the remote site', 'wp-migrate-db' ),
2437
+ 'migrate_button_push_save' => _x( 'Push &amp; Save', 'Transfer this database to the remote site and save migration profile', 'wp-migrate-db' ),
2438
+ 'migrate_button_pull' => _x( 'Pull', 'Transfer the remote database to this site', 'wp-migrate-db' ),
2439
+ 'migrate_button_pull_save' => _x( 'Pull &amp; Save', 'Transfer the remote database to this site and save migration profile', 'wp-migrate-db' ),
2440
+ 'migrate_button_export' => _x( 'Export', 'Download a copy of the database', 'wp-migrate-db' ),
2441
+ 'migrate_button_export_save' => _x( 'Export &amp; Save', 'Download a copy of the database and save migration profile', 'wp-migrate-db' ),
2442
  )
2443
  );
2444
 
2484
  * @return void
2485
  */
2486
  function admin_head_connection_info() {
2487
+ global $wpdb;
2488
+ $table_prefix = $wpdb->base_prefix;
2489
 
2490
  $nonces = apply_filters( 'wpmdb_nonces', array(
2491
  'update_max_request_size' => wp_create_nonce( 'update-max-request-size' ),
2538
  'profile' => isset( $_GET['wpmdb-profile'] ) ? $_GET['wpmdb-profile'] : '-1',
2539
  'is_pro' => esc_html( ( $this->is_pro ) ? 'true' : 'false' ),
2540
  'lower_case_table_names' => esc_html( $this->get_lower_case_table_names_setting() ),
2541
+ 'subsites' => $this->subsites_list(),
2542
  ) );
2543
 
2544
  wp_localize_script( 'wp-migrate-db-pro-script', 'wpmdb_data', $data );
2585
  return $current_site->path;
2586
  }
2587
 
2588
+ /**
2589
+ * Get the domain for the current site.
2590
+ *
2591
+ * @return string
2592
+ */
2593
  function get_domain_current_site() {
2594
  if ( ! is_multisite() ) {
2595
  return '';
2600
  return $current_site->domain;
2601
  }
2602
 
 
 
 
 
2603
  /**
2604
  * Called to cancel an in-progress migration.
2605
  */
2617
  $this->delete_export_file( $this->state_data['dump_filename'], false );
2618
  break;
2619
  case 'push' :
2620
+ $data = $this->filter_post_elements(
2621
+ $this->state_data,
2622
+ array(
2623
+ 'remote_state_id',
2624
+ 'intent',
2625
+ 'url',
2626
+ 'form_data',
2627
+ 'temp_prefix',
2628
+ 'stage',
2629
+ 'dump_filename',
2630
+ )
2631
+ );
2632
+
2633
+ $data['action'] = 'wpmdb_process_push_migration_cancellation';
2634
+ $data['sig'] = $this->create_signature( $data, $this->state_data['key'] );
2635
+ $ajax_url = $this->ajax_url();
2636
 
2637
  $response = $this->remote_post( $ajax_url, $data, __FUNCTION__ );
2638
  $this->display_errors();
2810
  $abort_utf8mb4 = apply_filters( 'wpmdb_abort_utf8mb4_to_utf8', $abort_utf8mb4 );
2811
 
2812
  $replace_count = 0;
2813
+ $create_table = preg_replace( '/(COLLATE\s)utf8mb4/', '$1utf8', $create_table, -1, $replace_count ); // Column collation
2814
 
2815
  if ( false === $abort_utf8mb4 || 0 === $replace_count ) {
2816
+ $create_table = preg_replace( '/(COLLATE=)utf8mb4/', '$1utf8', $create_table, -1, $replace_count ); // Table collation
2817
  }
2818
 
2819
  if ( false === $abort_utf8mb4 || 0 === $replace_count ) {
2820
+ $create_table = preg_replace( '/(CHARSET\s?=\s?)utf8mb4/', '$1utf8', $create_table, -1, $replace_count ); // Table charset
2821
  }
2822
 
2823
  if ( true === $abort_utf8mb4 && 0 !== $replace_count ) {
2824
  $return = sprintf( __( 'The source site supports utf8mb4 data but the target does not, aborting migration to avoid possible data corruption. Please see %1$s for more information. (#148)', 'wp-migrate-db-pro' ), sprintf( '<a href="https://deliciousbrains.com/wp-migrate-db-pro/doc/source-site-supports-utf8mb4/">%1$s</a>', __( 'our documentation', 'wp-migrate-db-pro' ) ) );
2825
  $return = array( 'wpmdb_error' => 1, 'body' => $return );
2826
  $result = $this->end_ajax( json_encode( $return ) );
2827
+
2828
  return $result;
2829
  }
2830
  }
2854
  foreach ( $tmp_find_replace_pairs as $replace_old => $replace_new ) {
2855
  $find_replace_pairs['replace_old'][ $i ] = $replace_old;
2856
  $find_replace_pairs['replace_new'][ $i ] = $replace_new;
2857
+ $i++;
2858
  }
2859
  }
2860
 
languages/wp-migrate-db-en.pot CHANGED
@@ -1,6 +1,6 @@
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
  #
6
  #, fuzzy
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: wp-migrate-db\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
- "POT-Creation-Date: 2015-07-09 15:57-0300\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,25 +17,25 @@ msgstr ""
17
  "Content-Type: text/plain; charset=UTF-8\n"
18
  "Content-Transfer-Encoding: 8bit\n"
19
 
20
- #: class/wpmdb-base.php:143
21
  msgid ""
22
  "Invalid content verification signature, please verify the connection "
23
  "information on the remote site and try again."
24
  msgstr ""
25
 
26
- #: class/wpmdb-base.php:333
27
  #, php-format
28
  msgid ""
29
  "The connection to the remote server has timed out, no changes have been "
30
  "committed. (#134 - scope: %s)"
31
  msgstr ""
32
 
33
- #: class/wpmdb-base.php:335
34
  #, php-format
35
  msgid "We could not find: %s. Are you sure this is the correct URL?"
36
  msgstr ""
37
 
38
- #: class/wpmdb-base.php:340
39
  msgid ""
40
  "It appears that you might be trying to pull from a local environment. This "
41
  "will not work if <u>this</u> website happens to be located on a remote "
@@ -43,7 +43,7 @@ msgid ""
43
  "environment."
44
  msgstr ""
45
 
46
- #: class/wpmdb-base.php:342
47
  msgid ""
48
  "It appears that you might be trying to push to a local environment. This "
49
  "will not work if <u>this</u> website happens to be located on a remote "
@@ -51,7 +51,7 @@ msgid ""
51
  "environment."
52
  msgstr ""
53
 
54
- #: class/wpmdb-base.php:350
55
  #, php-format
56
  msgid ""
57
  "We've detected that <code>WP_HTTP_BLOCK_EXTERNAL</code> is enabled and the "
@@ -61,53 +61,53 @@ msgid ""
61
  "\" target=\"_blank\">More information</a>. (#147 - scope: %3$s)"
62
  msgstr ""
63
 
64
- #: class/wpmdb-base.php:353
65
  #, php-format
66
  msgid ""
67
  "The connection failed, an unexpected error occurred, please contact support. "
68
  "(#121 - scope: %s)"
69
  msgstr ""
70
 
71
- #: class/wpmdb-base.php:363
72
  msgid ""
73
  "The remote site is protected with Basic Authentication. Please enter the "
74
  "username and password above to continue. (401 Unauthorized)"
75
  msgstr ""
76
 
77
- #: class/wpmdb-base.php:368
78
  #, php-format
79
  msgid ""
80
  "Unable to connect to the remote server, please check the connection details "
81
  "- %1$s %2$s (#129 - scope: %3$s)"
82
  msgstr ""
83
 
84
- #: class/wpmdb-base.php:378
85
  #, php-format
86
  msgid ""
87
  "WP Migrate DB Pro does not seem to be installed or active on the remote "
88
  "site. (#131 - scope: %s)"
89
  msgstr ""
90
 
91
- #: class/wpmdb-base.php:381
92
  #, php-format
93
  msgid ""
94
  "A response was expected from the remote, instead we got nothing. (#146 - "
95
  "scope: %1$s) Please review %2$s for possible solutions."
96
  msgstr ""
97
 
98
- #: class/wpmdb-base.php:381
99
- #: class/wpmdb.php:2787
100
  msgid "our documentation"
101
  msgstr ""
102
 
103
- #: class/wpmdb-base.php:390
104
  msgid ""
105
  "There was a problem with the AJAX request, we were expecting a serialized "
106
  "response, instead we received:<br />"
107
  msgstr ""
108
 
109
- #: class/wpmdb-base.php:678
110
- #: class/wpmdb-base.php:1139
111
  #, php-format
112
  msgid ""
113
  "<strong>Could not connect to deliciousbrains.com</strong> &mdash; You will "
@@ -118,13 +118,13 @@ msgid ""
118
  "%2$s"
119
  msgstr ""
120
 
121
- #: class/wpmdb-base.php:678
122
- #: class/wpmdb-base.php:1139
123
  msgid "Temporarily disable SSL for connections to deliciousbrains.com"
124
  msgstr ""
125
 
126
- #: class/wpmdb-base.php:686
127
- #: class/wpmdb-base.php:1145
128
  #, php-format
129
  msgid ""
130
  "We've detected that <code>WP_HTTP_BLOCK_EXTERNAL</code> is enabled and the "
@@ -134,43 +134,43 @@ msgid ""
134
  "\" target=\"_blank\">More information</a>."
135
  msgstr ""
136
 
137
- #: class/wpmdb-base.php:731
138
  msgid ""
139
  "<strong>Delicious Brains API is Down — </strong>Unfortunately we're "
140
  "experiencing some problems with our server."
141
  msgstr ""
142
 
143
- #: class/wpmdb-base.php:735
144
  #, php-format
145
  msgctxt "ex. 2 hours ago"
146
  msgid "%s ago"
147
  msgstr ""
148
 
149
- #: class/wpmdb-base.php:740
150
  msgid "Here's the most recent update on its status"
151
  msgstr ""
152
 
153
- #: class/wpmdb-base.php:767
154
  #, php-format
155
  msgid ""
156
  "Error retrieving download from deliciousbrain.com. Please try again or "
157
  "download manually from <a href=\"%1$s\">%2$s</a>."
158
  msgstr ""
159
 
160
- #: class/wpmdb-base.php:767
161
  msgctxt "Delicious Brains account"
162
  msgid "My Account"
163
  msgstr ""
164
 
165
- #: class/wpmdb-base.php:826
166
- #: class/wpmdb.php:111
167
- #: class/wpmdb.php:331
168
- #: class/wpmdbpro.php:1875
169
  msgctxt "Plugin configuration and preferences"
170
  msgid "Settings"
171
  msgstr ""
172
 
173
- #: class/wpmdb-base.php:827
174
  #, php-format
175
  msgid ""
176
  "To finish activating WP Migrate DB Pro, please go to %1$s and enter your "
@@ -178,31 +178,31 @@ msgid ""
178
  "\">purchase one</a>."
179
  msgstr ""
180
 
181
- #: class/wpmdb-base.php:1058
182
- #: class/wpmdb-base.php:1068
183
  msgctxt "A new version of the plugin is available"
184
  msgid "Update Available"
185
  msgstr ""
186
 
187
- #: class/wpmdb-base.php:1059
188
  #, php-format
189
  msgid "A new version of %1$s is now available. %2$s"
190
  msgstr ""
191
 
192
- #: class/wpmdb-base.php:1059
193
- #: class/wpmdb-base.php:1069
194
  msgctxt "Download and install a new version of the plugin"
195
  msgid "Update Now"
196
  msgstr ""
197
 
198
- #: class/wpmdb-base.php:1069
199
  #, php-format
200
  msgid ""
201
  "%1$s %2$s is now available. You currently have %3$s installed. <a href=\"%4$s"
202
  "\">%5$s</a>"
203
  msgstr ""
204
 
205
- #: class/wpmdb-base.php:1113
206
  #, php-format
207
  msgid ""
208
  "<strong>Activate Your License</strong> &mdash; Please <a href=\"%s\" class="
@@ -210,13 +210,13 @@ msgid ""
210
  "priority support and plugin updates."
211
  msgstr ""
212
 
213
- #: class/wpmdb-base.php:1130
214
  msgid ""
215
  "<strong>We've temporarily activated your license and will complete the "
216
  "activation once the Delicious Brains API is available again.</strong>"
217
  msgstr ""
218
 
219
- #: class/wpmdb-base.php:1152
220
  #, php-format
221
  msgid ""
222
  "<strong>Your License Was Cancelled</strong> &mdash; Please visit <a href=\"%s"
@@ -224,43 +224,43 @@ msgid ""
224
  "enable push and pull."
225
  msgstr ""
226
 
227
- #: class/wpmdb-base.php:1153
228
- #: class/wpmdb-base.php:1158
229
  #: class/wpmdb-base.php:1178
230
- #: class/wpmdb-base.php:1182
231
- #: class/wpmdbpro.php:1008
232
- #: class/wpmdbpro.php:1882
 
 
233
  msgid "Check my license again"
234
  msgstr ""
235
 
236
- #: class/wpmdb-base.php:1156
237
  msgid "Your License Has Expired"
238
  msgstr ""
239
 
240
- #: class/wpmdb-base.php:1157
241
  #, php-format
242
  msgid "Login to <a href=\"%s\">My Account</a> to renew. "
243
  msgstr ""
244
 
245
- #: class/wpmdb-base.php:1162
246
  msgid "Updates are only available to those with an active license. "
247
  msgstr ""
248
 
249
- #: class/wpmdb-base.php:1163
250
  msgid "Only active licenses can download and install addons. "
251
  msgstr ""
252
 
253
- #: class/wpmdb-base.php:1164
254
  msgid "Only active licenses can submit support requests. "
255
  msgstr ""
256
 
257
- #: class/wpmdb-base.php:1165
258
  msgid ""
259
  "All features will continue to work, but you won't be able to receive updates "
260
  "or email support. "
261
  msgstr ""
262
 
263
- #: class/wpmdb-base.php:1177
264
  #, php-format
265
  msgid ""
266
  "<strong>No Activations Left</strong> &mdash; Please visit <a href=\"%s\" "
@@ -268,7 +268,7 @@ msgid ""
268
  "previous activation and enable push and pull."
269
  msgstr ""
270
 
271
- #: class/wpmdb-base.php:1181
272
  #, php-format
273
  msgid ""
274
  "<strong>Your License Was Not Found</strong> &mdash; Perhaps you made a typo "
@@ -277,53 +277,53 @@ msgid ""
277
  "license key."
278
  msgstr ""
279
 
280
- #: class/wpmdb-base.php:1185
281
  msgid "<strong>Your License Was Not Found</strong> &mdash; "
282
  msgstr ""
283
 
284
- #: class/wpmdb-base.php:1189
285
  msgid "Your License Is Inactive"
286
  msgstr ""
287
 
288
- #: class/wpmdb-base.php:1190
289
  msgid "Your license has been deactivated for this install."
290
  msgstr ""
291
 
292
- #: class/wpmdb-base.php:1190
293
  msgid "Reactivate License"
294
  msgstr ""
295
 
296
- #: class/wpmdb-base.php:1193
297
  #, php-format
298
  msgid ""
299
  "<strong>An Unexpected Error Occurred</strong> &mdash; Please contact us at "
300
  "<a href=\"%1$s\">%2$s</a> and quote the following:"
301
  msgstr ""
302
 
303
- #: class/wpmdb-base.php:1232
304
  #, php-format
305
  msgid "Invalid nonce for: %s"
306
  msgstr ""
307
 
308
- #: class/wpmdb-base.php:1240
309
  #, php-format
310
  msgid "Access denied for: %s"
311
  msgstr ""
312
 
313
- #: class/wpmdb-base.php:1444
314
  msgctxt "dismiss notice permanently"
315
  msgid "Dismiss"
316
  msgstr ""
317
 
318
- #: class/wpmdb-base.php:1453
319
  msgid "Remind Me Later"
320
  msgstr ""
321
 
322
- #: class/wpmdb-base.php:1555
323
  msgid "Failed to save migration state. Please contact support."
324
  msgstr ""
325
 
326
- #: class/wpmdb-base.php:1578
327
  msgid "Failed to retrieve migration state. Please contact support."
328
  msgstr ""
329
 
@@ -332,35 +332,39 @@ msgstr ""
332
  msgid "CLI addon requires PHP %1$s+"
333
  msgstr ""
334
 
335
- #: class/wpmdb-cli.php:129
 
 
 
 
336
  #, php-format
337
  msgid "The following table(s) do not exist in the %1$s database: %2$s"
338
  msgstr ""
339
 
340
- #: class/wpmdb-cli.php:176
341
  #, php-format
342
  msgid ""
343
  "We were expecting a JSON response, instead we received: %2$s (function name: "
344
  "%1$s)"
345
  msgstr ""
346
 
347
- #: class/wpmdb-cli.php:232
348
  msgid "Initiating migration..."
349
  msgstr ""
350
 
351
- #: class/wpmdb-cli.php:270
352
  msgid "Exporting tables"
353
  msgstr ""
354
 
355
- #: class/wpmdb-cli.php:340
356
  msgid "No tables selected for migration."
357
  msgstr ""
358
 
359
- #: class/wpmdb-cli.php:433
360
  msgid "Cleaning up..."
361
  msgstr ""
362
 
363
- #: class/wpmdb-cli.php:500
364
  msgid "Unable to move exported file."
365
  msgstr ""
366
 
@@ -476,254 +480,248 @@ msgstr ""
476
  msgid "Unknown sanitization rule \"%1$s\" supplied by %2$s"
477
  msgstr ""
478
 
479
- #: class/wpmdb.php:110
480
  msgctxt "Configure a migration or export"
481
  msgid "Migrate"
482
  msgstr ""
483
 
484
- #: class/wpmdb.php:112
485
  msgctxt "Get help or contact support"
486
  msgid "Help"
487
  msgstr ""
488
 
489
- #: class/wpmdb.php:179
490
  #, php-format
491
  msgid "The following directory could not be created: %s"
492
  msgstr ""
493
 
494
- #: class/wpmdb.php:184
495
  #, php-format
496
  msgid "Could not copy the compatibility plugin from %1$s to %2$s"
497
  msgstr ""
498
 
499
- #: class/wpmdb.php:190
500
  #, php-format
501
  msgid "Could not remove the compatibility plugin from %s"
502
  msgstr ""
503
 
504
- #: class/wpmdb.php:929
505
  #: class/wpmdbpro.php:333
506
- #: class/wpmdbpro.php:1722
507
  msgid ""
508
  "Failed attempting to unserialize the response from the remote server. Please "
509
  "contact support."
510
  msgstr ""
511
 
512
- #: class/wpmdb.php:1344
513
  msgid ""
514
  "Failed to retrieve table structure, please ensure your database is online. "
515
  "(#125)"
516
  msgstr ""
517
 
518
- #: class/wpmdb.php:1370
519
  #, php-format
520
  msgid "Delete any existing table %s"
521
  msgstr ""
522
 
523
- #: class/wpmdb.php:1381
524
  #, php-format
525
  msgid "Table structure of table %s"
526
  msgstr ""
527
 
528
- #: class/wpmdb.php:1389
529
  msgid ""
530
  "Failed to generate the create table query, please ensure your database is "
531
  "online. (#126)"
532
  msgstr ""
533
 
534
- #: class/wpmdb.php:1444
535
  #, php-format
536
  msgid "Data contents of table %s"
537
  msgstr ""
538
 
539
- #: class/wpmdb.php:1815
540
  #, php-format
541
  msgid "End of data contents of table %s"
542
  msgstr ""
543
 
544
- #: class/wpmdb.php:1955
545
  msgid "WordPress MySQL database migration"
546
  msgstr ""
547
 
548
- #: class/wpmdb.php:1957
549
  #, php-format
550
  msgid "Generated: %s"
551
  msgstr ""
552
 
553
- #: class/wpmdb.php:1958
554
  #, php-format
555
  msgid "Hostname: %s"
556
  msgstr ""
557
 
558
- #: class/wpmdb.php:1959
559
  #, php-format
560
  msgid "Database: %s"
561
  msgstr ""
562
 
563
- #: class/wpmdb.php:2012
564
  msgid "Failed to write the gzipped SQL data to the file. (#127)"
565
  msgstr ""
566
 
567
- #: class/wpmdb.php:2019
568
  msgid "Failed to write the SQL data to the file. (#128)"
569
  msgstr ""
570
 
571
- #: class/wpmdb.php:2154
572
- #: class/wpmdb.php:2165
573
- #: class/wpmdbpro.php:1682
574
  msgid "Migrate DB Pro"
575
  msgstr ""
576
 
577
- #: class/wpmdb.php:2154
578
- #: class/wpmdb.php:2165
579
- #: class/wpmdb.php:2701
580
  msgid "Migrate DB"
581
  msgstr ""
582
 
583
- #: class/wpmdb.php:2338
584
  msgid ""
585
  "A problem occurred when trying to change the maximum request size, please "
586
  "try again."
587
  msgstr ""
588
 
589
- #: class/wpmdb.php:2339
590
- #: class/wpmdbpro.php:1008
591
  msgid "A problem occurred when trying to check the license, please try again."
592
  msgstr ""
593
 
594
- #: class/wpmdb.php:2340
595
  msgid "Establishing connection to remote server, please wait"
596
  msgstr ""
597
 
598
- #: class/wpmdb.php:2341
599
  msgid ""
600
  "A problem occurred when attempting to connect to the local server, please "
601
  "check the details and try again."
602
  msgstr ""
603
 
604
- #: class/wpmdb.php:2342
605
  msgid "Please enter your license key."
606
  msgstr ""
607
 
608
- #: class/wpmdb.php:2343
609
  msgid ""
610
  "A problem occurred when trying to register the license, please try again."
611
  msgstr ""
612
 
613
- #: class/wpmdb.php:2344
614
  msgid ""
615
  "Your license has been activated. You will now receive automatic updates and "
616
  "access to email support."
617
  msgstr ""
618
 
619
- #: class/wpmdb.php:2345
620
  #: template/pro/licence-info.php:6
621
  msgid "Fetching license details, please wait..."
622
  msgstr ""
623
 
624
- #: class/wpmdb.php:2346
625
  msgid ""
626
  "An error occurred when trying to clear the debug log. Please contact "
627
  "support. (#132)"
628
  msgstr ""
629
 
630
- #: class/wpmdb.php:2347
631
  msgid ""
632
  "An error occurred when trying to update the debug log. Please contact "
633
  "support. (#133)"
634
  msgstr ""
635
 
636
- #: class/wpmdb.php:2348
637
- msgctxt "Copy data between servers and save migration profile"
638
- msgid "Migrate & Save Profile"
639
- msgstr ""
640
-
641
- #: class/wpmdb.php:2349
642
- msgctxt "Copy data between servers"
643
- msgid "Migrate"
644
  msgstr ""
645
 
646
- #: class/wpmdb.php:2350
647
- msgid "Please select at least one table to migrate."
648
  msgstr ""
649
 
650
- #: class/wpmdb.php:2351
651
  msgid "Please enter a name for your migration profile."
652
  msgstr ""
653
 
654
- #: class/wpmdb.php:2352
655
  msgid ""
656
  "An error occurred when attempting to save the migration profile. Please see "
657
  "the Help tab for details on how to request support. (#118)"
658
  msgstr ""
659
 
660
- #: class/wpmdb.php:2353
661
  msgctxt "Data has been successfully exported"
662
  msgid "Exporting complete"
663
  msgstr ""
664
 
665
- #: class/wpmdb.php:2354
666
  msgid "Exporting, please wait..."
667
  msgstr ""
668
 
669
- #: class/wpmdb.php:2355
670
  msgid "please wait..."
671
  msgstr ""
672
 
673
- #: class/wpmdb.php:2356
674
  msgctxt "Finished successfully"
675
  msgid "complete"
676
  msgstr ""
677
 
678
- #: class/wpmdb.php:2357
679
  msgctxt "Copy of data between servers did not complete"
680
  msgid "Migration failed"
681
  msgstr ""
682
 
683
- #: class/wpmdb.php:2358
684
  msgctxt "Saving a copy of the data before import"
685
  msgid "Backing up"
686
  msgstr ""
687
 
688
- #: class/wpmdb.php:2359
689
  msgctxt "Copying data between servers"
690
  msgid "Migrating"
691
  msgstr ""
692
 
693
- #: class/wpmdb.php:2360
694
  msgctxt "Current request status"
695
  msgid "Status"
696
  msgstr ""
697
 
698
- #: class/wpmdb.php:2361
699
  msgctxt "The message the server responded with"
700
  msgid "Response"
701
  msgstr ""
702
 
703
- #: class/wpmdb.php:2362
704
  msgid ""
705
  "A problem occurred when attempting to process the following table (#113)"
706
  msgstr ""
707
 
708
- #: class/wpmdb.php:2363
709
  msgid ""
710
  "A problem occurred when processing the following table. We were expecting a "
711
  "response in JSON format but instead received an empty response."
712
  msgstr ""
713
 
714
- #: class/wpmdb.php:2364
715
  msgid "Migration completed with some errors"
716
  msgstr ""
717
 
718
- #: class/wpmdb.php:2365
719
  msgid "Migration complete, your backup is located at:"
720
  msgstr ""
721
 
722
- #: class/wpmdb.php:2366
723
  msgid "A problem occurred when finalizing the backup. (#140)"
724
  msgstr ""
725
 
726
- #: class/wpmdb.php:2367
727
  #: template/common/compatibility.php:34
728
  #: template/common/max-request-size.php:11
729
  #: template/pro/delay-between-requests.php:11
@@ -731,32 +729,32 @@ msgctxt "The settings were saved successfully"
731
  msgid "Saved"
732
  msgstr ""
733
 
734
- #: class/wpmdb.php:2368
735
  msgid ""
736
  "Any sites setup to use the current secret key will no longer be able to "
737
  "connect. You will need to update those sites with the newly generated secret "
738
  "key. Do you wish to continue?"
739
  msgstr ""
740
 
741
- #: class/wpmdb.php:2369
742
  msgid ""
743
  "An error occurred when trying to generate the secret key. Please see the "
744
  "Help tab for details on how to request support. (#105)"
745
  msgstr ""
746
 
747
- #: class/wpmdb.php:2370
748
  msgid ""
749
  "You are about to remove the migration profile \"{{profile}}\". This cannot "
750
  "be undone. Do you wish to continue?"
751
  msgstr ""
752
 
753
- #: class/wpmdb.php:2371
754
  msgid ""
755
  "An error occurred when trying to delete the profile. Please see the Help tab "
756
  "for details on how to request support. (#106)"
757
  msgstr ""
758
 
759
- #: class/wpmdb.php:2372
760
  msgid ""
761
  "The selected migration profile could not be deleted because it was not "
762
  "found.\n"
@@ -764,219 +762,225 @@ msgid ""
764
  "migration profiles."
765
  msgstr ""
766
 
767
- #: class/wpmdb.php:2373
768
  msgid ""
769
  "If you change the connection details, you will lose any replaces and table "
770
  "selections you have made below. Do you wish to continue?"
771
  msgstr ""
772
 
773
- #: class/wpmdb.php:2374
774
  #: template/migrate.php:113
775
  msgid "Please enter the connection information above to continue."
776
  msgstr ""
777
 
778
- #: class/wpmdb.php:2375
779
  msgid ""
780
  "An error occurred when trying to save the settings. Please try again. If the "
781
  "problem persists, please see the Help tab for details on how to request "
782
  "support. (#108)"
783
  msgstr ""
784
 
785
- #: class/wpmdb.php:2376
786
  msgid ""
787
  "The connection information appears to be missing, please enter it to "
788
  "continue."
789
  msgstr ""
790
 
791
- #: class/wpmdb.php:2377
792
  msgid ""
793
  "The connection information appears to be incorrect, it should consist of two "
794
  "lines. The first being the remote server's URL and the second being the "
795
  "secret key."
796
  msgstr ""
797
 
798
- #: class/wpmdb.php:2378
799
  msgid ""
800
  "The URL on the first line appears to be invalid, please check it and try "
801
  "again."
802
  msgstr ""
803
 
804
- #: class/wpmdb.php:2379
805
  msgid ""
806
  "The secret key on the second line appears to be invalid. It should be a 32 "
807
  "character string that consists of letters, numbers and special characters "
808
  "only."
809
  msgstr ""
810
 
811
- #: class/wpmdb.php:2380
812
  msgid ""
813
  "It appears you've entered the URL for this website, you need to provide the "
814
  "URL of the remote website instead."
815
  msgstr ""
816
 
817
- #: class/wpmdb.php:2381
818
  msgid ""
819
  "Looks like your remote secret key is the same as the secret key for this "
820
  "site. To fix this, go to the <a href=\"#settings\">Settings tab</a> and "
821
  "click \"Reset Secret Key\""
822
  msgstr ""
823
 
824
- #: class/wpmdb.php:2382
825
- #: template/migrate-progress.php:9
826
  msgid "Time Elapsed:"
827
  msgstr ""
828
 
829
- #: class/wpmdb.php:2383
830
- #: template/migrate-progress.php:21
831
  msgctxt "Temporarily stop migrating"
832
  msgid "Pause"
833
  msgstr ""
834
 
835
- #: class/wpmdb.php:2384
836
  msgctxt "The migration has been temporarily stopped"
837
  msgid "Migration Paused"
838
  msgstr ""
839
 
840
- #: class/wpmdb.php:2385
841
  msgctxt "Restart migrating after it was paused"
842
  msgid "Resume"
843
  msgstr ""
844
 
845
- #: class/wpmdb.php:2386
846
  msgid "Completing current request"
847
  msgstr ""
848
 
849
- #: class/wpmdb.php:2387
850
  msgctxt "The migration is being cancelled"
851
  msgid "Cancelling migration"
852
  msgstr ""
853
 
854
- #: class/wpmdb.php:2388
855
  msgctxt "The migration has been temporarily stopped"
856
  msgid "Paused"
857
  msgstr ""
858
 
859
- #: class/wpmdb.php:2389
 
 
 
 
 
 
860
  msgid "Removing the local MySQL export file"
861
  msgstr ""
862
 
863
- #: class/wpmdb.php:2390
864
  msgid "Removing the local backup MySQL export file"
865
  msgstr ""
866
 
867
- #: class/wpmdb.php:2391
868
  msgid "Removing the local temporary tables"
869
  msgstr ""
870
 
871
- #: class/wpmdb.php:2392
872
  msgid "Removing the remote backup MySQL export file"
873
  msgstr ""
874
 
875
- #: class/wpmdb.php:2393
876
  msgid "Removing the remote temporary tables"
877
  msgstr ""
878
 
879
- #: class/wpmdb.php:2394
880
  msgid "Migration cancellation failed"
881
  msgstr ""
882
 
883
- #: class/wpmdb.php:2395
884
  msgid ""
885
  "A problem occurred while cancelling the migration, you may have to manually "
886
  "delete some temporary files / tables."
887
  msgstr ""
888
 
889
- #: class/wpmdb.php:2396
890
  msgctxt "The migration has been cancelled"
891
  msgid "Migration cancelled"
892
  msgstr ""
893
 
894
- #: class/wpmdb.php:2397
895
  msgctxt "The migration completed successfully"
896
  msgid "Migration complete"
897
  msgstr ""
898
 
899
- #: class/wpmdb.php:2398
900
  msgctxt "The migration is in the last stages"
901
  msgid "Finalizing migration"
902
  msgstr ""
903
 
904
- #: class/wpmdb.php:2399
905
  msgctxt "The caches and rewrite rules for the target are being flushed"
906
  msgid "Flushing caches and rewrite rules"
907
  msgstr ""
908
 
909
- #: class/wpmdb.php:2400
910
  msgid "A problem occurred when trying to add plugins to backlist."
911
  msgstr ""
912
 
913
- #: class/wpmdb.php:2401
914
  msgid ""
915
  "If confirmed we will install an additional WordPress 'Must Use' plugin. This "
916
  "plugin will allow us to control which plugins are loaded during WP Migrate "
917
  "DB Pro specific operations. Do you wish to continue?"
918
  msgstr ""
919
 
920
- #: class/wpmdb.php:2402
921
  msgid ""
922
  "A problem occurred when trying to change the plugin compatibility setting."
923
  msgstr ""
924
 
925
- #: class/wpmdb.php:2403
926
  msgctxt "Confirmation required"
927
  msgid "Sure?"
928
  msgstr ""
929
 
930
- #: class/wpmdb.php:2404
931
  #, php-format
932
  msgid "Pulling from %s, please wait..."
933
  msgstr ""
934
 
935
- #: class/wpmdb.php:2405
936
  #, php-format
937
  msgid "Pulling from %s complete"
938
  msgstr ""
939
 
940
- #: class/wpmdb.php:2406
941
  #, php-format
942
  msgid "Pushing to %s, please wait..."
943
  msgstr ""
944
 
945
- #: class/wpmdb.php:2407
946
  #, php-format
947
  msgid "Pushing to %s complete"
948
  msgstr ""
949
 
950
- #: class/wpmdb.php:2408
951
  msgid "Copying license to the remote site, please wait"
952
  msgstr ""
953
 
954
- #: class/wpmdb.php:2409
955
  msgid "Attempting to activate your license, please wait..."
956
  msgstr ""
957
 
958
- #: class/wpmdb.php:2410
959
  msgid "License successfully activated, please wait..."
960
  msgstr ""
961
 
962
- #: class/wpmdb.php:2411
963
  msgid ""
964
  "An error occurred when trying to reactivate your license. Please provide the "
965
  "following information when requesting support:"
966
  msgstr ""
967
 
968
- #: class/wpmdb.php:2412
969
  msgid ""
970
  "<strong>We've temporarily activated your licence and will complete the "
971
  "activation once the Delicious Brains API is available again.</strong><br /"
972
  ">Please refresh this page to continue."
973
  msgstr ""
974
 
975
- #: class/wpmdb.php:2413
976
  msgid "JSON Decoding Failure"
977
  msgstr ""
978
 
979
- #: class/wpmdb.php:2414
980
  msgid ""
981
  "Our AJAX request was expecting JSON but we received something else. Often "
982
  "this is caused by your theme and/or plugins spitting out PHP errors. If you "
@@ -985,50 +989,81 @@ msgid ""
985
  "disable errors from showing up."
986
  msgstr ""
987
 
988
- #: class/wpmdb.php:2415
989
  msgid "View error messages"
990
  msgstr ""
991
 
992
- #: class/wpmdb.php:2416
993
  #, php-format
994
  msgid "Waiting %s seconds before executing next step"
995
  msgstr ""
996
 
997
- #: class/wpmdb.php:2417
998
  msgid ""
999
  "A problem occurred when trying to change the delay between requests, please "
1000
  "try again."
1001
  msgstr ""
1002
 
1003
- #: class/wpmdb.php:2418
1004
  msgid "A problem occurred when flushing caches and rewrite rules. (#145)"
1005
  msgstr ""
1006
 
1007
- #: class/wpmdb.php:2454
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1008
  msgid "Could not find the file to download:"
1009
  msgstr ""
1010
 
1011
- #: class/wpmdb.php:2635
1012
  msgid "MySQL export file not found."
1013
  msgstr ""
1014
 
1015
- #: class/wpmdb.php:2641
1016
  msgid "Could not delete the MySQL export file."
1017
  msgstr ""
1018
 
1019
- #: class/wpmdb.php:2707
1020
  msgid ""
1021
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1022
  "automatically deactivated WP Migrate DB."
1023
  msgstr ""
1024
 
1025
- #: class/wpmdb.php:2709
1026
  msgid ""
1027
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1028
  "automatically deactivated WP Migrate DB Pro."
1029
  msgstr ""
1030
 
1031
- #: class/wpmdb.php:2787
1032
  #, php-format
1033
  msgid ""
1034
  "The source site supports utf8mb4 data but the target does not, aborting "
@@ -1036,29 +1071,29 @@ msgid ""
1036
  "information. (#148)"
1037
  msgstr ""
1038
 
1039
- #: class/wpmdb.php:2837
1040
  msgid "Warning: Mixed Case Table Names"
1041
  msgstr ""
1042
 
1043
- #: class/wpmdb.php:2840
1044
  msgid ""
1045
  "Whoa! We've detected that your <b>local</b> site has the MySQL setting "
1046
  "<code>lower_case_table_names</code> set to <code>1</code>."
1047
  msgstr ""
1048
 
1049
- #: class/wpmdb.php:2842
1050
  msgid ""
1051
  "Whoa! We've detected that your <b>remote</b> site has the MySQL setting "
1052
  "<code>lower_case_table_names</code> set to <code>1</code>."
1053
  msgstr ""
1054
 
1055
- #: class/wpmdb.php:2845
1056
  msgid ""
1057
  "As a result, uppercase characters in table names will be converted to "
1058
  "lowercase during the migration."
1059
  msgstr ""
1060
 
1061
- #: class/wpmdb.php:2847
1062
  #, php-format
1063
  msgid ""
1064
  "You can read more about this in <a href=\"%s\">our documentation</a>, "
@@ -1086,17 +1121,17 @@ msgid ""
1086
  msgstr ""
1087
 
1088
  #: class/wpmdbpro-cli-export.php:68
1089
- #: class/wpmdbpro-cli-export.php:74
1090
  msgid ""
1091
  "A valid Blog ID or Subsite URL must be supplied to make use of the subsite "
1092
  "option"
1093
  msgstr ""
1094
 
1095
- #: class/wpmdbpro-cli-export.php:85
1096
  msgid "A new table name prefix may only be specified for subsite exports."
1097
  msgstr ""
1098
 
1099
- #: class/wpmdbpro-cli-export.php:88
1100
  msgid "A valid prefix must be supplied to make use of the prefix option"
1101
  msgstr ""
1102
 
@@ -1150,28 +1185,28 @@ msgid ""
1150
  "Please activate your license before attempting a pull or push migration."
1151
  msgstr ""
1152
 
1153
- #: class/wpmdbpro.php:600
1154
  msgid ""
1155
  "The connection succeeded but the remote site is configured to reject pull "
1156
  "connections. You can change this in the \"settings\" tab on the remote site. "
1157
  "(#141)"
1158
  msgstr ""
1159
 
1160
- #: class/wpmdbpro.php:651
1161
  msgid ""
1162
  "The connection succeeded but the remote site is configured to reject pull "
1163
  "connections. You can change this in the \"settings\" tab on the remote site. "
1164
  "(#110)"
1165
  msgstr ""
1166
 
1167
- #: class/wpmdbpro.php:653
1168
  msgid ""
1169
  "The connection succeeded but the remote site is configured to reject push "
1170
  "connections. You can change this in the \"settings\" tab on the remote site. "
1171
  "(#110)"
1172
  msgstr ""
1173
 
1174
- #: class/wpmdbpro.php:722
1175
  #, php-format
1176
  msgid ""
1177
  "<b>Version Mismatch</b> &mdash; We've detected you have version %1$s of WP "
@@ -1179,7 +1214,7 @@ msgid ""
1179
  "the Plugins page on both installs and check for updates."
1180
  msgstr ""
1181
 
1182
- #: class/wpmdbpro.php:724
1183
  #, php-format
1184
  msgid ""
1185
  "<b>Version Mismatch</b> &mdash; We've detected you have version %1$s of WP "
@@ -1187,138 +1222,138 @@ msgid ""
1187
  "\"%4$s\">Plugins page</a> on both installs and check for updates."
1188
  msgstr ""
1189
 
1190
- #: class/wpmdbpro.php:735
1191
  msgctxt "Asking to try and connect to remote server after verification error"
1192
  msgid "Try again?"
1193
  msgstr ""
1194
 
1195
- #: class/wpmdbpro.php:748
1196
  #, php-format
1197
  msgid ""
1198
  "Activate remote license &mdash; Looks like you don't have a WP Migrate DB "
1199
  "Pro license active at %s."
1200
  msgstr ""
1201
 
1202
- #: class/wpmdbpro.php:750
1203
  #, php-format
1204
  msgid "Copy %1$s license key to %2$s and activate it"
1205
  msgstr ""
1206
 
1207
- #: class/wpmdbpro.php:761
1208
  msgid ""
1209
  "The connection succeeded but the remote site is configured to reject pull "
1210
  "connections. You can change this in the \"settings\" tab on the remote site. "
1211
  "(#122)"
1212
  msgstr ""
1213
 
1214
- #: class/wpmdbpro.php:763
1215
  msgid ""
1216
  "The connection succeeded but the remote site is configured to reject push "
1217
  "connections. You can change this in the \"settings\" tab on the remote site. "
1218
  "(#122)"
1219
  msgstr ""
1220
 
1221
- #: class/wpmdbpro.php:765
1222
  msgctxt "Attempt to connect to the remote server again"
1223
  msgid "Try again?"
1224
  msgstr ""
1225
 
1226
- #: class/wpmdbpro.php:911
1227
  msgctxt "Delete license"
1228
  msgid "Remove"
1229
  msgstr ""
1230
 
1231
- #: class/wpmdbpro.php:1085
1232
  msgid ""
1233
  "If you have an <strong>active license</strong>, you may send an email to the "
1234
  "following address."
1235
  msgstr ""
1236
 
1237
- #: class/wpmdbpro.php:1087
1238
  msgid ""
1239
  "Please copy the Diagnostic Info &amp; Error Log info below into a text file "
1240
  "and attach it to your email. Do the same for any other site involved in your "
1241
  "email."
1242
  msgstr ""
1243
 
1244
- #: class/wpmdbpro.php:1118
1245
  msgctxt "License does not allow use of addons"
1246
  msgid "Addons Unavailable"
1247
  msgstr ""
1248
 
1249
- #: class/wpmdbpro.php:1118
1250
  #, php-format
1251
  msgid ""
1252
  "Addons are not included with the Personal license. Visit <a href=\"%s\" "
1253
  "target=\"_blank\">My Account</a> to upgrade in just a few clicks."
1254
  msgstr ""
1255
 
1256
- #: class/wpmdbpro.php:1133
1257
  msgctxt "Installed on website but not activated"
1258
  msgid "Installed"
1259
  msgstr ""
1260
 
1261
- #: class/wpmdbpro.php:1135
1262
  msgctxt "Installed and activated on website"
1263
  msgid "Activated"
1264
  msgstr ""
1265
 
1266
- #: class/wpmdbpro.php:1138
1267
  msgctxt "Enable addon so it may be used"
1268
  msgid "Activate"
1269
  msgstr ""
1270
 
1271
- #: class/wpmdbpro.php:1142
1272
  msgctxt "Download and activate addon"
1273
  msgid "Install"
1274
  msgstr ""
1275
 
1276
- #: class/wpmdbpro.php:1148
1277
  #: template/common/debug-info.php:4
1278
  msgctxt "Download to your computer"
1279
  msgid "Download"
1280
  msgstr ""
1281
 
1282
- #: class/wpmdbpro.php:1574
1283
  msgid "Could not upload the SQL to the server. (#135)"
1284
  msgstr ""
1285
 
1286
- #: class/wpmdbpro.php:1580
1287
  msgid "Could not read the SQL file we uploaded to the server. (#136)"
1288
  msgstr ""
1289
 
1290
- #: class/wpmdbpro.php:1599
1291
  msgid ""
1292
  "The connection succeeded but the remote site is configured to reject push "
1293
  "connections. You can change this in the \"settings\" tab on the remote site. "
1294
  "(#139)"
1295
  msgstr ""
1296
 
1297
- #: class/wpmdbpro.php:1865
1298
  #, php-format
1299
  msgid "There is a new version of %s available."
1300
  msgstr ""
1301
 
1302
- #: class/wpmdbpro.php:1867
1303
  #, php-format
1304
  msgid "View version %s details"
1305
  msgstr ""
1306
 
1307
- #: class/wpmdbpro.php:1877
1308
  #, php-format
1309
  msgid ""
1310
  "To update, go to %1$s and enter your license key. If you don't have a "
1311
  "license key, you may <a href=\"%2$s\">purchase one</a>."
1312
  msgstr ""
1313
 
1314
- #: class/wpmdbpro.php:1879
1315
  #, php-format
1316
  msgid ""
1317
  "To finish activating %1$s, please go to %2$s and enter your license key. If "
1318
  "you don't have a license key, you may <a href=\"%3$s\">purchase one</a>."
1319
  msgstr ""
1320
 
1321
- #: class/wpmdbpro.php:1945
1322
  msgid "Could not retrieve version details. Please try again."
1323
  msgstr ""
1324
 
@@ -1363,21 +1398,21 @@ msgstr ""
1363
  #: template/common/compatibility.php:26
1364
  #: template/pro/backup.php:44
1365
  #: template/pro/exclude-post-types.php:19
1366
- #: template/pro/select-tables.php:36
1367
  msgid "Select All"
1368
  msgstr ""
1369
 
1370
  #: template/common/compatibility.php:28
1371
  #: template/pro/backup.php:46
1372
  #: template/pro/exclude-post-types.php:21
1373
- #: template/pro/select-tables.php:38
1374
  msgid "Deselect All"
1375
  msgstr ""
1376
 
1377
  #: template/common/compatibility.php:30
1378
  #: template/pro/backup.php:48
1379
  #: template/pro/exclude-post-types.php:23
1380
- #: template/pro/select-tables.php:40
1381
  msgid "Invert Selection"
1382
  msgstr ""
1383
 
@@ -1411,11 +1446,11 @@ msgstr ""
1411
  msgid "Please wait while migration is running..."
1412
  msgstr ""
1413
 
1414
- #: template/migrate-progress.php:8
1415
  msgid "Establishing Connection"
1416
  msgstr ""
1417
 
1418
- #: template/migrate-progress.php:22
1419
  msgctxt "Stop the migration"
1420
  msgid "Cancel"
1421
  msgstr ""
@@ -1529,24 +1564,28 @@ msgstr ""
1529
  msgid "Compatible with older versions of MySQL (pre-5.5)"
1530
  msgstr ""
1531
 
1532
- #: template/migrate.php:287
 
 
 
 
1533
  msgid "Save Migration Profile"
1534
  msgstr ""
1535
 
1536
- #: template/migrate.php:287
1537
  msgid "Save the above settings for the next time you do a similiar migration"
1538
  msgstr ""
1539
 
1540
- #: template/migrate.php:309
1541
  msgid "Create new profile"
1542
  msgstr ""
1543
 
1544
- #: template/migrate.php:318
1545
- #: template/migrate.php:328
1546
  msgid "Warning: Different Table Prefixes"
1547
  msgstr ""
1548
 
1549
- #: template/migrate.php:320
1550
  msgid ""
1551
  "Whoa! We've detected that the database table prefix differs between "
1552
  "installations. Clicking the Migrate button below will create new database "
@@ -1554,7 +1593,7 @@ msgid ""
1554
  "span>\"."
1555
  msgstr ""
1556
 
1557
- #: template/migrate.php:322
1558
  #, php-format
1559
  msgid ""
1560
  "However, your local install is configured to use table prefix \"%1$s\" and "
@@ -1563,13 +1602,13 @@ msgid ""
1563
  "variable to \"<span class=\"remote-prefix\"></span>\"."
1564
  msgstr ""
1565
 
1566
- #: template/migrate.php:324
1567
  msgid ""
1568
  "This will allow your local install the use the migrated tables. Once you do "
1569
  "this, you shouldn't have to do it again."
1570
  msgstr ""
1571
 
1572
- #: template/migrate.php:330
1573
  #, php-format
1574
  msgid ""
1575
  "Whoa! We've detected that the database table prefix differs between "
@@ -1577,7 +1616,7 @@ msgid ""
1577
  "tables in the remote database with prefix \"%s\"."
1578
  msgstr ""
1579
 
1580
- #: template/migrate.php:332
1581
  #, php-format
1582
  msgid ""
1583
  "However, your remote install is configured to use table prefix \"<span class="
@@ -1587,13 +1626,18 @@ msgid ""
1587
  "span>\" variable to \"%s\"."
1588
  msgstr ""
1589
 
1590
- #: template/migrate.php:334
1591
  msgid ""
1592
  "This will allow your remote install the use the migrated tables. Once you do "
1593
  "this, you shouldn't have to do it again."
1594
  msgstr ""
1595
 
1596
- #: template/options.php:19
 
 
 
 
 
1597
  msgid ""
1598
  "<strong>PHP Safe Mode Enabled</strong> &mdash; We do not officially support "
1599
  "running this plugin in safe mode because <code>set_time_limit()</code> has "
@@ -1603,13 +1647,13 @@ msgid ""
1603
  "However, if you have trouble, we can't help you until you turn off safe mode."
1604
  msgstr ""
1605
 
1606
- #: template/options.php:21
1607
- #: template/options.php:40
1608
  #, php-format
1609
  msgid "Your current PHP run time limit is set to %s seconds."
1610
  msgstr ""
1611
 
1612
- #: template/options.php:29
1613
  #, php-format
1614
  msgid ""
1615
  "<strong>Internet Explorer Not Supported</strong> &mdash; Less than 2% of our "
@@ -1618,7 +1662,7 @@ msgid ""
1618
  "instead. If this is a problem for you, please let us know."
1619
  msgstr ""
1620
 
1621
- #: template/options.php:38
1622
  msgid ""
1623
  "<strong>PHP Function Disabled</strong> &mdash; The <code>set_time_limit()</"
1624
  "code> function is currently disabled on your server. We use this function to "
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the wp-migrate-db package.
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
  #
6
  #, fuzzy
8
  msgstr ""
9
  "Project-Id-Version: wp-migrate-db\n"
10
  "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
11
+ "POT-Creation-Date: 2015-12-06 10:37+1300\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
17
  "Content-Type: text/plain; charset=UTF-8\n"
18
  "Content-Transfer-Encoding: 8bit\n"
19
 
20
+ #: class/wpmdb-base.php:159
21
  msgid ""
22
  "Invalid content verification signature, please verify the connection "
23
  "information on the remote site and try again."
24
  msgstr ""
25
 
26
+ #: class/wpmdb-base.php:349
27
  #, php-format
28
  msgid ""
29
  "The connection to the remote server has timed out, no changes have been "
30
  "committed. (#134 - scope: %s)"
31
  msgstr ""
32
 
33
+ #: class/wpmdb-base.php:351
34
  #, php-format
35
  msgid "We could not find: %s. Are you sure this is the correct URL?"
36
  msgstr ""
37
 
38
+ #: class/wpmdb-base.php:356
39
  msgid ""
40
  "It appears that you might be trying to pull from a local environment. This "
41
  "will not work if <u>this</u> website happens to be located on a remote "
43
  "environment."
44
  msgstr ""
45
 
46
+ #: class/wpmdb-base.php:358
47
  msgid ""
48
  "It appears that you might be trying to push to a local environment. This "
49
  "will not work if <u>this</u> website happens to be located on a remote "
51
  "environment."
52
  msgstr ""
53
 
54
+ #: class/wpmdb-base.php:366
55
  #, php-format
56
  msgid ""
57
  "We've detected that <code>WP_HTTP_BLOCK_EXTERNAL</code> is enabled and the "
61
  "\" target=\"_blank\">More information</a>. (#147 - scope: %3$s)"
62
  msgstr ""
63
 
64
+ #: class/wpmdb-base.php:369
65
  #, php-format
66
  msgid ""
67
  "The connection failed, an unexpected error occurred, please contact support. "
68
  "(#121 - scope: %s)"
69
  msgstr ""
70
 
71
+ #: class/wpmdb-base.php:379
72
  msgid ""
73
  "The remote site is protected with Basic Authentication. Please enter the "
74
  "username and password above to continue. (401 Unauthorized)"
75
  msgstr ""
76
 
77
+ #: class/wpmdb-base.php:384
78
  #, php-format
79
  msgid ""
80
  "Unable to connect to the remote server, please check the connection details "
81
  "- %1$s %2$s (#129 - scope: %3$s)"
82
  msgstr ""
83
 
84
+ #: class/wpmdb-base.php:394
85
  #, php-format
86
  msgid ""
87
  "WP Migrate DB Pro does not seem to be installed or active on the remote "
88
  "site. (#131 - scope: %s)"
89
  msgstr ""
90
 
91
+ #: class/wpmdb-base.php:397
92
  #, php-format
93
  msgid ""
94
  "A response was expected from the remote, instead we got nothing. (#146 - "
95
  "scope: %1$s) Please review %2$s for possible solutions."
96
  msgstr ""
97
 
98
+ #: class/wpmdb-base.php:397
99
+ #: class/wpmdb.php:2824
100
  msgid "our documentation"
101
  msgstr ""
102
 
103
+ #: class/wpmdb-base.php:406
104
  msgid ""
105
  "There was a problem with the AJAX request, we were expecting a serialized "
106
  "response, instead we received:<br />"
107
  msgstr ""
108
 
109
+ #: class/wpmdb-base.php:703
110
+ #: class/wpmdb-base.php:1164
111
  #, php-format
112
  msgid ""
113
  "<strong>Could not connect to deliciousbrains.com</strong> &mdash; You will "
118
  "%2$s"
119
  msgstr ""
120
 
121
+ #: class/wpmdb-base.php:703
122
+ #: class/wpmdb-base.php:1164
123
  msgid "Temporarily disable SSL for connections to deliciousbrains.com"
124
  msgstr ""
125
 
126
+ #: class/wpmdb-base.php:711
127
+ #: class/wpmdb-base.php:1170
128
  #, php-format
129
  msgid ""
130
  "We've detected that <code>WP_HTTP_BLOCK_EXTERNAL</code> is enabled and the "
134
  "\" target=\"_blank\">More information</a>."
135
  msgstr ""
136
 
137
+ #: class/wpmdb-base.php:756
138
  msgid ""
139
  "<strong>Delicious Brains API is Down — </strong>Unfortunately we're "
140
  "experiencing some problems with our server."
141
  msgstr ""
142
 
143
+ #: class/wpmdb-base.php:760
144
  #, php-format
145
  msgctxt "ex. 2 hours ago"
146
  msgid "%s ago"
147
  msgstr ""
148
 
149
+ #: class/wpmdb-base.php:765
150
  msgid "Here's the most recent update on its status"
151
  msgstr ""
152
 
153
+ #: class/wpmdb-base.php:792
154
  #, php-format
155
  msgid ""
156
  "Error retrieving download from deliciousbrain.com. Please try again or "
157
  "download manually from <a href=\"%1$s\">%2$s</a>."
158
  msgstr ""
159
 
160
+ #: class/wpmdb-base.php:792
161
  msgctxt "Delicious Brains account"
162
  msgid "My Account"
163
  msgstr ""
164
 
165
+ #: class/wpmdb-base.php:851
166
+ #: class/wpmdb.php:112
167
+ #: class/wpmdb.php:313
168
+ #: class/wpmdbpro.php:1916
169
  msgctxt "Plugin configuration and preferences"
170
  msgid "Settings"
171
  msgstr ""
172
 
173
+ #: class/wpmdb-base.php:852
174
  #, php-format
175
  msgid ""
176
  "To finish activating WP Migrate DB Pro, please go to %1$s and enter your "
178
  "\">purchase one</a>."
179
  msgstr ""
180
 
181
+ #: class/wpmdb-base.php:1083
182
+ #: class/wpmdb-base.php:1093
183
  msgctxt "A new version of the plugin is available"
184
  msgid "Update Available"
185
  msgstr ""
186
 
187
+ #: class/wpmdb-base.php:1084
188
  #, php-format
189
  msgid "A new version of %1$s is now available. %2$s"
190
  msgstr ""
191
 
192
+ #: class/wpmdb-base.php:1084
193
+ #: class/wpmdb-base.php:1094
194
  msgctxt "Download and install a new version of the plugin"
195
  msgid "Update Now"
196
  msgstr ""
197
 
198
+ #: class/wpmdb-base.php:1094
199
  #, php-format
200
  msgid ""
201
  "%1$s %2$s is now available. You currently have %3$s installed. <a href=\"%4$s"
202
  "\">%5$s</a>"
203
  msgstr ""
204
 
205
+ #: class/wpmdb-base.php:1138
206
  #, php-format
207
  msgid ""
208
  "<strong>Activate Your License</strong> &mdash; Please <a href=\"%s\" class="
210
  "priority support and plugin updates."
211
  msgstr ""
212
 
213
+ #: class/wpmdb-base.php:1155
214
  msgid ""
215
  "<strong>We've temporarily activated your license and will complete the "
216
  "activation once the Delicious Brains API is available again.</strong>"
217
  msgstr ""
218
 
219
+ #: class/wpmdb-base.php:1177
220
  #, php-format
221
  msgid ""
222
  "<strong>Your License Was Cancelled</strong> &mdash; Please visit <a href=\"%s"
224
  "enable push and pull."
225
  msgstr ""
226
 
 
 
227
  #: class/wpmdb-base.php:1178
228
+ #: class/wpmdb-base.php:1183
229
+ #: class/wpmdb-base.php:1203
230
+ #: class/wpmdb-base.php:1207
231
+ #: class/wpmdbpro.php:1017
232
+ #: class/wpmdbpro.php:1923
233
  msgid "Check my license again"
234
  msgstr ""
235
 
236
+ #: class/wpmdb-base.php:1181
237
  msgid "Your License Has Expired"
238
  msgstr ""
239
 
240
+ #: class/wpmdb-base.php:1182
241
  #, php-format
242
  msgid "Login to <a href=\"%s\">My Account</a> to renew. "
243
  msgstr ""
244
 
245
+ #: class/wpmdb-base.php:1187
246
  msgid "Updates are only available to those with an active license. "
247
  msgstr ""
248
 
249
+ #: class/wpmdb-base.php:1188
250
  msgid "Only active licenses can download and install addons. "
251
  msgstr ""
252
 
253
+ #: class/wpmdb-base.php:1189
254
  msgid "Only active licenses can submit support requests. "
255
  msgstr ""
256
 
257
+ #: class/wpmdb-base.php:1190
258
  msgid ""
259
  "All features will continue to work, but you won't be able to receive updates "
260
  "or email support. "
261
  msgstr ""
262
 
263
+ #: class/wpmdb-base.php:1202
264
  #, php-format
265
  msgid ""
266
  "<strong>No Activations Left</strong> &mdash; Please visit <a href=\"%s\" "
268
  "previous activation and enable push and pull."
269
  msgstr ""
270
 
271
+ #: class/wpmdb-base.php:1206
272
  #, php-format
273
  msgid ""
274
  "<strong>Your License Was Not Found</strong> &mdash; Perhaps you made a typo "
277
  "license key."
278
  msgstr ""
279
 
280
+ #: class/wpmdb-base.php:1210
281
  msgid "<strong>Your License Was Not Found</strong> &mdash; "
282
  msgstr ""
283
 
284
+ #: class/wpmdb-base.php:1214
285
  msgid "Your License Is Inactive"
286
  msgstr ""
287
 
288
+ #: class/wpmdb-base.php:1215
289
  msgid "Your license has been deactivated for this install."
290
  msgstr ""
291
 
292
+ #: class/wpmdb-base.php:1215
293
  msgid "Reactivate License"
294
  msgstr ""
295
 
296
+ #: class/wpmdb-base.php:1218
297
  #, php-format
298
  msgid ""
299
  "<strong>An Unexpected Error Occurred</strong> &mdash; Please contact us at "
300
  "<a href=\"%1$s\">%2$s</a> and quote the following:"
301
  msgstr ""
302
 
303
+ #: class/wpmdb-base.php:1257
304
  #, php-format
305
  msgid "Invalid nonce for: %s"
306
  msgstr ""
307
 
308
+ #: class/wpmdb-base.php:1265
309
  #, php-format
310
  msgid "Access denied for: %s"
311
  msgstr ""
312
 
313
+ #: class/wpmdb-base.php:1469
314
  msgctxt "dismiss notice permanently"
315
  msgid "Dismiss"
316
  msgstr ""
317
 
318
+ #: class/wpmdb-base.php:1478
319
  msgid "Remind Me Later"
320
  msgstr ""
321
 
322
+ #: class/wpmdb-base.php:1580
323
  msgid "Failed to save migration state. Please contact support."
324
  msgstr ""
325
 
326
+ #: class/wpmdb-base.php:1603
327
  msgid "Failed to retrieve migration state. Please contact support."
328
  msgstr ""
329
 
332
  msgid "CLI addon requires PHP %1$s+"
333
  msgstr ""
334
 
335
+ #: class/wpmdb-cli.php:104
336
+ msgid "Profile not found or unable to be generated from params."
337
+ msgstr ""
338
+
339
+ #: class/wpmdb-cli.php:136
340
  #, php-format
341
  msgid "The following table(s) do not exist in the %1$s database: %2$s"
342
  msgstr ""
343
 
344
+ #: class/wpmdb-cli.php:183
345
  #, php-format
346
  msgid ""
347
  "We were expecting a JSON response, instead we received: %2$s (function name: "
348
  "%1$s)"
349
  msgstr ""
350
 
351
+ #: class/wpmdb-cli.php:239
352
  msgid "Initiating migration..."
353
  msgstr ""
354
 
355
+ #: class/wpmdb-cli.php:277
356
  msgid "Exporting tables"
357
  msgstr ""
358
 
359
+ #: class/wpmdb-cli.php:347
360
  msgid "No tables selected for migration."
361
  msgstr ""
362
 
363
+ #: class/wpmdb-cli.php:440
364
  msgid "Cleaning up..."
365
  msgstr ""
366
 
367
+ #: class/wpmdb-cli.php:507
368
  msgid "Unable to move exported file."
369
  msgstr ""
370
 
480
  msgid "Unknown sanitization rule \"%1$s\" supplied by %2$s"
481
  msgstr ""
482
 
483
+ #: class/wpmdb.php:111
484
  msgctxt "Configure a migration or export"
485
  msgid "Migrate"
486
  msgstr ""
487
 
488
+ #: class/wpmdb.php:113
489
  msgctxt "Get help or contact support"
490
  msgid "Help"
491
  msgstr ""
492
 
493
+ #: class/wpmdb.php:180
494
  #, php-format
495
  msgid "The following directory could not be created: %s"
496
  msgstr ""
497
 
498
+ #: class/wpmdb.php:185
499
  #, php-format
500
  msgid "Could not copy the compatibility plugin from %1$s to %2$s"
501
  msgstr ""
502
 
503
+ #: class/wpmdb.php:191
504
  #, php-format
505
  msgid "Could not remove the compatibility plugin from %s"
506
  msgstr ""
507
 
508
+ #: class/wpmdb.php:938
509
  #: class/wpmdbpro.php:333
510
+ #: class/wpmdbpro.php:1763
511
  msgid ""
512
  "Failed attempting to unserialize the response from the remote server. Please "
513
  "contact support."
514
  msgstr ""
515
 
516
+ #: class/wpmdb.php:1352
517
  msgid ""
518
  "Failed to retrieve table structure, please ensure your database is online. "
519
  "(#125)"
520
  msgstr ""
521
 
522
+ #: class/wpmdb.php:1382
523
  #, php-format
524
  msgid "Delete any existing table %s"
525
  msgstr ""
526
 
527
+ #: class/wpmdb.php:1393
528
  #, php-format
529
  msgid "Table structure of table %s"
530
  msgstr ""
531
 
532
+ #: class/wpmdb.php:1401
533
  msgid ""
534
  "Failed to generate the create table query, please ensure your database is "
535
  "online. (#126)"
536
  msgstr ""
537
 
538
+ #: class/wpmdb.php:1457
539
  #, php-format
540
  msgid "Data contents of table %s"
541
  msgstr ""
542
 
543
+ #: class/wpmdb.php:1828
544
  #, php-format
545
  msgid "End of data contents of table %s"
546
  msgstr ""
547
 
548
+ #: class/wpmdb.php:1968
549
  msgid "WordPress MySQL database migration"
550
  msgstr ""
551
 
552
+ #: class/wpmdb.php:1970
553
  #, php-format
554
  msgid "Generated: %s"
555
  msgstr ""
556
 
557
+ #: class/wpmdb.php:1971
558
  #, php-format
559
  msgid "Hostname: %s"
560
  msgstr ""
561
 
562
+ #: class/wpmdb.php:1972
563
  #, php-format
564
  msgid "Database: %s"
565
  msgstr ""
566
 
567
+ #: class/wpmdb.php:2025
568
  msgid "Failed to write the gzipped SQL data to the file. (#127)"
569
  msgstr ""
570
 
571
+ #: class/wpmdb.php:2032
572
  msgid "Failed to write the SQL data to the file. (#128)"
573
  msgstr ""
574
 
575
+ #: class/wpmdb.php:2168
576
+ #: class/wpmdb.php:2179
577
+ #: class/wpmdbpro.php:1723
578
  msgid "Migrate DB Pro"
579
  msgstr ""
580
 
581
+ #: class/wpmdb.php:2168
582
+ #: class/wpmdb.php:2179
583
+ #: class/wpmdb.php:2738
584
  msgid "Migrate DB"
585
  msgstr ""
586
 
587
+ #: class/wpmdb.php:2355
588
  msgid ""
589
  "A problem occurred when trying to change the maximum request size, please "
590
  "try again."
591
  msgstr ""
592
 
593
+ #: class/wpmdb.php:2356
594
+ #: class/wpmdbpro.php:1017
595
  msgid "A problem occurred when trying to check the license, please try again."
596
  msgstr ""
597
 
598
+ #: class/wpmdb.php:2357
599
  msgid "Establishing connection to remote server, please wait"
600
  msgstr ""
601
 
602
+ #: class/wpmdb.php:2358
603
  msgid ""
604
  "A problem occurred when attempting to connect to the local server, please "
605
  "check the details and try again."
606
  msgstr ""
607
 
608
+ #: class/wpmdb.php:2359
609
  msgid "Please enter your license key."
610
  msgstr ""
611
 
612
+ #: class/wpmdb.php:2360
613
  msgid ""
614
  "A problem occurred when trying to register the license, please try again."
615
  msgstr ""
616
 
617
+ #: class/wpmdb.php:2361
618
  msgid ""
619
  "Your license has been activated. You will now receive automatic updates and "
620
  "access to email support."
621
  msgstr ""
622
 
623
+ #: class/wpmdb.php:2362
624
  #: template/pro/licence-info.php:6
625
  msgid "Fetching license details, please wait..."
626
  msgstr ""
627
 
628
+ #: class/wpmdb.php:2363
629
  msgid ""
630
  "An error occurred when trying to clear the debug log. Please contact "
631
  "support. (#132)"
632
  msgstr ""
633
 
634
+ #: class/wpmdb.php:2364
635
  msgid ""
636
  "An error occurred when trying to update the debug log. Please contact "
637
  "support. (#133)"
638
  msgstr ""
639
 
640
+ #: class/wpmdb.php:2365
641
+ msgid "Please select at least one table to migrate."
 
 
 
 
 
 
642
  msgstr ""
643
 
644
+ #: class/wpmdb.php:2366
645
+ msgid "Please select at least one table for backup."
646
  msgstr ""
647
 
648
+ #: class/wpmdb.php:2367
649
  msgid "Please enter a name for your migration profile."
650
  msgstr ""
651
 
652
+ #: class/wpmdb.php:2368
653
  msgid ""
654
  "An error occurred when attempting to save the migration profile. Please see "
655
  "the Help tab for details on how to request support. (#118)"
656
  msgstr ""
657
 
658
+ #: class/wpmdb.php:2369
659
  msgctxt "Data has been successfully exported"
660
  msgid "Exporting complete"
661
  msgstr ""
662
 
663
+ #: class/wpmdb.php:2370
664
  msgid "Exporting, please wait..."
665
  msgstr ""
666
 
667
+ #: class/wpmdb.php:2371
668
  msgid "please wait..."
669
  msgstr ""
670
 
671
+ #: class/wpmdb.php:2372
672
  msgctxt "Finished successfully"
673
  msgid "complete"
674
  msgstr ""
675
 
676
+ #: class/wpmdb.php:2373
677
  msgctxt "Copy of data between servers did not complete"
678
  msgid "Migration failed"
679
  msgstr ""
680
 
681
+ #: class/wpmdb.php:2374
682
  msgctxt "Saving a copy of the data before import"
683
  msgid "Backing up"
684
  msgstr ""
685
 
686
+ #: class/wpmdb.php:2375
687
  msgctxt "Copying data between servers"
688
  msgid "Migrating"
689
  msgstr ""
690
 
691
+ #: class/wpmdb.php:2376
692
  msgctxt "Current request status"
693
  msgid "Status"
694
  msgstr ""
695
 
696
+ #: class/wpmdb.php:2377
697
  msgctxt "The message the server responded with"
698
  msgid "Response"
699
  msgstr ""
700
 
701
+ #: class/wpmdb.php:2378
702
  msgid ""
703
  "A problem occurred when attempting to process the following table (#113)"
704
  msgstr ""
705
 
706
+ #: class/wpmdb.php:2379
707
  msgid ""
708
  "A problem occurred when processing the following table. We were expecting a "
709
  "response in JSON format but instead received an empty response."
710
  msgstr ""
711
 
712
+ #: class/wpmdb.php:2380
713
  msgid "Migration completed with some errors"
714
  msgstr ""
715
 
716
+ #: class/wpmdb.php:2381
717
  msgid "Migration complete, your backup is located at:"
718
  msgstr ""
719
 
720
+ #: class/wpmdb.php:2382
721
  msgid "A problem occurred when finalizing the backup. (#140)"
722
  msgstr ""
723
 
724
+ #: class/wpmdb.php:2383
725
  #: template/common/compatibility.php:34
726
  #: template/common/max-request-size.php:11
727
  #: template/pro/delay-between-requests.php:11
729
  msgid "Saved"
730
  msgstr ""
731
 
732
+ #: class/wpmdb.php:2384
733
  msgid ""
734
  "Any sites setup to use the current secret key will no longer be able to "
735
  "connect. You will need to update those sites with the newly generated secret "
736
  "key. Do you wish to continue?"
737
  msgstr ""
738
 
739
+ #: class/wpmdb.php:2385
740
  msgid ""
741
  "An error occurred when trying to generate the secret key. Please see the "
742
  "Help tab for details on how to request support. (#105)"
743
  msgstr ""
744
 
745
+ #: class/wpmdb.php:2386
746
  msgid ""
747
  "You are about to remove the migration profile \"{{profile}}\". This cannot "
748
  "be undone. Do you wish to continue?"
749
  msgstr ""
750
 
751
+ #: class/wpmdb.php:2387
752
  msgid ""
753
  "An error occurred when trying to delete the profile. Please see the Help tab "
754
  "for details on how to request support. (#106)"
755
  msgstr ""
756
 
757
+ #: class/wpmdb.php:2388
758
  msgid ""
759
  "The selected migration profile could not be deleted because it was not "
760
  "found.\n"
762
  "migration profiles."
763
  msgstr ""
764
 
765
+ #: class/wpmdb.php:2389
766
  msgid ""
767
  "If you change the connection details, you will lose any replaces and table "
768
  "selections you have made below. Do you wish to continue?"
769
  msgstr ""
770
 
771
+ #: class/wpmdb.php:2390
772
  #: template/migrate.php:113
773
  msgid "Please enter the connection information above to continue."
774
  msgstr ""
775
 
776
+ #: class/wpmdb.php:2391
777
  msgid ""
778
  "An error occurred when trying to save the settings. Please try again. If the "
779
  "problem persists, please see the Help tab for details on how to request "
780
  "support. (#108)"
781
  msgstr ""
782
 
783
+ #: class/wpmdb.php:2392
784
  msgid ""
785
  "The connection information appears to be missing, please enter it to "
786
  "continue."
787
  msgstr ""
788
 
789
+ #: class/wpmdb.php:2393
790
  msgid ""
791
  "The connection information appears to be incorrect, it should consist of two "
792
  "lines. The first being the remote server's URL and the second being the "
793
  "secret key."
794
  msgstr ""
795
 
796
+ #: class/wpmdb.php:2394
797
  msgid ""
798
  "The URL on the first line appears to be invalid, please check it and try "
799
  "again."
800
  msgstr ""
801
 
802
+ #: class/wpmdb.php:2395
803
  msgid ""
804
  "The secret key on the second line appears to be invalid. It should be a 32 "
805
  "character string that consists of letters, numbers and special characters "
806
  "only."
807
  msgstr ""
808
 
809
+ #: class/wpmdb.php:2396
810
  msgid ""
811
  "It appears you've entered the URL for this website, you need to provide the "
812
  "URL of the remote website instead."
813
  msgstr ""
814
 
815
+ #: class/wpmdb.php:2397
816
  msgid ""
817
  "Looks like your remote secret key is the same as the secret key for this "
818
  "site. To fix this, go to the <a href=\"#settings\">Settings tab</a> and "
819
  "click \"Reset Secret Key\""
820
  msgstr ""
821
 
822
+ #: class/wpmdb.php:2398
823
+ #: template/migrate-progress.php:11
824
  msgid "Time Elapsed:"
825
  msgstr ""
826
 
827
+ #: class/wpmdb.php:2399
828
+ #: template/migrate-progress.php:25
829
  msgctxt "Temporarily stop migrating"
830
  msgid "Pause"
831
  msgstr ""
832
 
833
+ #: class/wpmdb.php:2400
834
  msgctxt "The migration has been temporarily stopped"
835
  msgid "Migration Paused"
836
  msgstr ""
837
 
838
+ #: class/wpmdb.php:2401
839
  msgctxt "Restart migrating after it was paused"
840
  msgid "Resume"
841
  msgstr ""
842
 
843
+ #: class/wpmdb.php:2402
844
  msgid "Completing current request"
845
  msgstr ""
846
 
847
+ #: class/wpmdb.php:2403
848
  msgctxt "The migration is being cancelled"
849
  msgid "Cancelling migration"
850
  msgstr ""
851
 
852
+ #: class/wpmdb.php:2404
853
  msgctxt "The migration has been temporarily stopped"
854
  msgid "Paused"
855
  msgstr ""
856
 
857
+ #: class/wpmdb.php:2405
858
+ msgid ""
859
+ "Automatically paused before migrated tables are replaced. Click \"Resume\" "
860
+ "or \"Cancel\" when ready."
861
+ msgstr ""
862
+
863
+ #: class/wpmdb.php:2406
864
  msgid "Removing the local MySQL export file"
865
  msgstr ""
866
 
867
+ #: class/wpmdb.php:2407
868
  msgid "Removing the local backup MySQL export file"
869
  msgstr ""
870
 
871
+ #: class/wpmdb.php:2408
872
  msgid "Removing the local temporary tables"
873
  msgstr ""
874
 
875
+ #: class/wpmdb.php:2409
876
  msgid "Removing the remote backup MySQL export file"
877
  msgstr ""
878
 
879
+ #: class/wpmdb.php:2410
880
  msgid "Removing the remote temporary tables"
881
  msgstr ""
882
 
883
+ #: class/wpmdb.php:2411
884
  msgid "Migration cancellation failed"
885
  msgstr ""
886
 
887
+ #: class/wpmdb.php:2412
888
  msgid ""
889
  "A problem occurred while cancelling the migration, you may have to manually "
890
  "delete some temporary files / tables."
891
  msgstr ""
892
 
893
+ #: class/wpmdb.php:2413
894
  msgctxt "The migration has been cancelled"
895
  msgid "Migration cancelled"
896
  msgstr ""
897
 
898
+ #: class/wpmdb.php:2414
899
  msgctxt "The migration completed successfully"
900
  msgid "Migration complete"
901
  msgstr ""
902
 
903
+ #: class/wpmdb.php:2415
904
  msgctxt "The migration is in the last stages"
905
  msgid "Finalizing migration"
906
  msgstr ""
907
 
908
+ #: class/wpmdb.php:2416
909
  msgctxt "The caches and rewrite rules for the target are being flushed"
910
  msgid "Flushing caches and rewrite rules"
911
  msgstr ""
912
 
913
+ #: class/wpmdb.php:2417
914
  msgid "A problem occurred when trying to add plugins to backlist."
915
  msgstr ""
916
 
917
+ #: class/wpmdb.php:2418
918
  msgid ""
919
  "If confirmed we will install an additional WordPress 'Must Use' plugin. This "
920
  "plugin will allow us to control which plugins are loaded during WP Migrate "
921
  "DB Pro specific operations. Do you wish to continue?"
922
  msgstr ""
923
 
924
+ #: class/wpmdb.php:2419
925
  msgid ""
926
  "A problem occurred when trying to change the plugin compatibility setting."
927
  msgstr ""
928
 
929
+ #: class/wpmdb.php:2420
930
  msgctxt "Confirmation required"
931
  msgid "Sure?"
932
  msgstr ""
933
 
934
+ #: class/wpmdb.php:2421
935
  #, php-format
936
  msgid "Pulling from %s, please wait..."
937
  msgstr ""
938
 
939
+ #: class/wpmdb.php:2422
940
  #, php-format
941
  msgid "Pulling from %s complete"
942
  msgstr ""
943
 
944
+ #: class/wpmdb.php:2423
945
  #, php-format
946
  msgid "Pushing to %s, please wait..."
947
  msgstr ""
948
 
949
+ #: class/wpmdb.php:2424
950
  #, php-format
951
  msgid "Pushing to %s complete"
952
  msgstr ""
953
 
954
+ #: class/wpmdb.php:2425
955
  msgid "Copying license to the remote site, please wait"
956
  msgstr ""
957
 
958
+ #: class/wpmdb.php:2426
959
  msgid "Attempting to activate your license, please wait..."
960
  msgstr ""
961
 
962
+ #: class/wpmdb.php:2427
963
  msgid "License successfully activated, please wait..."
964
  msgstr ""
965
 
966
+ #: class/wpmdb.php:2428
967
  msgid ""
968
  "An error occurred when trying to reactivate your license. Please provide the "
969
  "following information when requesting support:"
970
  msgstr ""
971
 
972
+ #: class/wpmdb.php:2429
973
  msgid ""
974
  "<strong>We've temporarily activated your licence and will complete the "
975
  "activation once the Delicious Brains API is available again.</strong><br /"
976
  ">Please refresh this page to continue."
977
  msgstr ""
978
 
979
+ #: class/wpmdb.php:2430
980
  msgid "JSON Decoding Failure"
981
  msgstr ""
982
 
983
+ #: class/wpmdb.php:2431
984
  msgid ""
985
  "Our AJAX request was expecting JSON but we received something else. Often "
986
  "this is caused by your theme and/or plugins spitting out PHP errors. If you "
989
  "disable errors from showing up."
990
  msgstr ""
991
 
992
+ #: class/wpmdb.php:2432
993
  msgid "View error messages"
994
  msgstr ""
995
 
996
+ #: class/wpmdb.php:2433
997
  #, php-format
998
  msgid "Waiting %s seconds before executing next step"
999
  msgstr ""
1000
 
1001
+ #: class/wpmdb.php:2434
1002
  msgid ""
1003
  "A problem occurred when trying to change the delay between requests, please "
1004
  "try again."
1005
  msgstr ""
1006
 
1007
+ #: class/wpmdb.php:2435
1008
  msgid "A problem occurred when flushing caches and rewrite rules. (#145)"
1009
  msgstr ""
1010
 
1011
+ #: class/wpmdb.php:2436
1012
+ msgctxt "Transfer this database to the remote site"
1013
+ msgid "Push"
1014
+ msgstr ""
1015
+
1016
+ #: class/wpmdb.php:2437
1017
+ msgctxt "Transfer this database to the remote site and save migration profile"
1018
+ msgid "Push &amp; Save"
1019
+ msgstr ""
1020
+
1021
+ #: class/wpmdb.php:2438
1022
+ msgctxt "Transfer the remote database to this site"
1023
+ msgid "Pull"
1024
+ msgstr ""
1025
+
1026
+ #: class/wpmdb.php:2439
1027
+ msgctxt "Transfer the remote database to this site and save migration profile"
1028
+ msgid "Pull &amp; Save"
1029
+ msgstr ""
1030
+
1031
+ #: class/wpmdb.php:2440
1032
+ #: template/migrate.php:353
1033
+ msgctxt "Download a copy of the database"
1034
+ msgid "Export"
1035
+ msgstr ""
1036
+
1037
+ #: class/wpmdb.php:2441
1038
+ msgctxt "Download a copy of the database and save migration profile"
1039
+ msgid "Export &amp; Save"
1040
+ msgstr ""
1041
+
1042
+ #: class/wpmdb.php:2477
1043
  msgid "Could not find the file to download:"
1044
  msgstr ""
1045
 
1046
+ #: class/wpmdb.php:2672
1047
  msgid "MySQL export file not found."
1048
  msgstr ""
1049
 
1050
+ #: class/wpmdb.php:2678
1051
  msgid "Could not delete the MySQL export file."
1052
  msgstr ""
1053
 
1054
+ #: class/wpmdb.php:2744
1055
  msgid ""
1056
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1057
  "automatically deactivated WP Migrate DB."
1058
  msgstr ""
1059
 
1060
+ #: class/wpmdb.php:2746
1061
  msgid ""
1062
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1063
  "automatically deactivated WP Migrate DB Pro."
1064
  msgstr ""
1065
 
1066
+ #: class/wpmdb.php:2824
1067
  #, php-format
1068
  msgid ""
1069
  "The source site supports utf8mb4 data but the target does not, aborting "
1071
  "information. (#148)"
1072
  msgstr ""
1073
 
1074
+ #: class/wpmdb.php:2875
1075
  msgid "Warning: Mixed Case Table Names"
1076
  msgstr ""
1077
 
1078
+ #: class/wpmdb.php:2878
1079
  msgid ""
1080
  "Whoa! We've detected that your <b>local</b> site has the MySQL setting "
1081
  "<code>lower_case_table_names</code> set to <code>1</code>."
1082
  msgstr ""
1083
 
1084
+ #: class/wpmdb.php:2880
1085
  msgid ""
1086
  "Whoa! We've detected that your <b>remote</b> site has the MySQL setting "
1087
  "<code>lower_case_table_names</code> set to <code>1</code>."
1088
  msgstr ""
1089
 
1090
+ #: class/wpmdb.php:2883
1091
  msgid ""
1092
  "As a result, uppercase characters in table names will be converted to "
1093
  "lowercase during the migration."
1094
  msgstr ""
1095
 
1096
+ #: class/wpmdb.php:2885
1097
  #, php-format
1098
  msgid ""
1099
  "You can read more about this in <a href=\"%s\">our documentation</a>, "
1121
  msgstr ""
1122
 
1123
  #: class/wpmdbpro-cli-export.php:68
1124
+ #: class/wpmdbpro-cli-export.php:73
1125
  msgid ""
1126
  "A valid Blog ID or Subsite URL must be supplied to make use of the subsite "
1127
  "option"
1128
  msgstr ""
1129
 
1130
+ #: class/wpmdbpro-cli-export.php:84
1131
  msgid "A new table name prefix may only be specified for subsite exports."
1132
  msgstr ""
1133
 
1134
+ #: class/wpmdbpro-cli-export.php:87
1135
  msgid "A valid prefix must be supplied to make use of the prefix option"
1136
  msgstr ""
1137
 
1185
  "Please activate your license before attempting a pull or push migration."
1186
  msgstr ""
1187
 
1188
+ #: class/wpmdbpro.php:597
1189
  msgid ""
1190
  "The connection succeeded but the remote site is configured to reject pull "
1191
  "connections. You can change this in the \"settings\" tab on the remote site. "
1192
  "(#141)"
1193
  msgstr ""
1194
 
1195
+ #: class/wpmdbpro.php:648
1196
  msgid ""
1197
  "The connection succeeded but the remote site is configured to reject pull "
1198
  "connections. You can change this in the \"settings\" tab on the remote site. "
1199
  "(#110)"
1200
  msgstr ""
1201
 
1202
+ #: class/wpmdbpro.php:650
1203
  msgid ""
1204
  "The connection succeeded but the remote site is configured to reject push "
1205
  "connections. You can change this in the \"settings\" tab on the remote site. "
1206
  "(#110)"
1207
  msgstr ""
1208
 
1209
+ #: class/wpmdbpro.php:729
1210
  #, php-format
1211
  msgid ""
1212
  "<b>Version Mismatch</b> &mdash; We've detected you have version %1$s of WP "
1214
  "the Plugins page on both installs and check for updates."
1215
  msgstr ""
1216
 
1217
+ #: class/wpmdbpro.php:731
1218
  #, php-format
1219
  msgid ""
1220
  "<b>Version Mismatch</b> &mdash; We've detected you have version %1$s of WP "
1222
  "\"%4$s\">Plugins page</a> on both installs and check for updates."
1223
  msgstr ""
1224
 
1225
+ #: class/wpmdbpro.php:745
1226
  msgctxt "Asking to try and connect to remote server after verification error"
1227
  msgid "Try again?"
1228
  msgstr ""
1229
 
1230
+ #: class/wpmdbpro.php:758
1231
  #, php-format
1232
  msgid ""
1233
  "Activate remote license &mdash; Looks like you don't have a WP Migrate DB "
1234
  "Pro license active at %s."
1235
  msgstr ""
1236
 
1237
+ #: class/wpmdbpro.php:760
1238
  #, php-format
1239
  msgid "Copy %1$s license key to %2$s and activate it"
1240
  msgstr ""
1241
 
1242
+ #: class/wpmdbpro.php:771
1243
  msgid ""
1244
  "The connection succeeded but the remote site is configured to reject pull "
1245
  "connections. You can change this in the \"settings\" tab on the remote site. "
1246
  "(#122)"
1247
  msgstr ""
1248
 
1249
+ #: class/wpmdbpro.php:773
1250
  msgid ""
1251
  "The connection succeeded but the remote site is configured to reject push "
1252
  "connections. You can change this in the \"settings\" tab on the remote site. "
1253
  "(#122)"
1254
  msgstr ""
1255
 
1256
+ #: class/wpmdbpro.php:775
1257
  msgctxt "Attempt to connect to the remote server again"
1258
  msgid "Try again?"
1259
  msgstr ""
1260
 
1261
+ #: class/wpmdbpro.php:920
1262
  msgctxt "Delete license"
1263
  msgid "Remove"
1264
  msgstr ""
1265
 
1266
+ #: class/wpmdbpro.php:1104
1267
  msgid ""
1268
  "If you have an <strong>active license</strong>, you may send an email to the "
1269
  "following address."
1270
  msgstr ""
1271
 
1272
+ #: class/wpmdbpro.php:1106
1273
  msgid ""
1274
  "Please copy the Diagnostic Info &amp; Error Log info below into a text file "
1275
  "and attach it to your email. Do the same for any other site involved in your "
1276
  "email."
1277
  msgstr ""
1278
 
1279
+ #: class/wpmdbpro.php:1137
1280
  msgctxt "License does not allow use of addons"
1281
  msgid "Addons Unavailable"
1282
  msgstr ""
1283
 
1284
+ #: class/wpmdbpro.php:1137
1285
  #, php-format
1286
  msgid ""
1287
  "Addons are not included with the Personal license. Visit <a href=\"%s\" "
1288
  "target=\"_blank\">My Account</a> to upgrade in just a few clicks."
1289
  msgstr ""
1290
 
1291
+ #: class/wpmdbpro.php:1152
1292
  msgctxt "Installed on website but not activated"
1293
  msgid "Installed"
1294
  msgstr ""
1295
 
1296
+ #: class/wpmdbpro.php:1154
1297
  msgctxt "Installed and activated on website"
1298
  msgid "Activated"
1299
  msgstr ""
1300
 
1301
+ #: class/wpmdbpro.php:1157
1302
  msgctxt "Enable addon so it may be used"
1303
  msgid "Activate"
1304
  msgstr ""
1305
 
1306
+ #: class/wpmdbpro.php:1161
1307
  msgctxt "Download and activate addon"
1308
  msgid "Install"
1309
  msgstr ""
1310
 
1311
+ #: class/wpmdbpro.php:1167
1312
  #: template/common/debug-info.php:4
1313
  msgctxt "Download to your computer"
1314
  msgid "Download"
1315
  msgstr ""
1316
 
1317
+ #: class/wpmdbpro.php:1615
1318
  msgid "Could not upload the SQL to the server. (#135)"
1319
  msgstr ""
1320
 
1321
+ #: class/wpmdbpro.php:1621
1322
  msgid "Could not read the SQL file we uploaded to the server. (#136)"
1323
  msgstr ""
1324
 
1325
+ #: class/wpmdbpro.php:1640
1326
  msgid ""
1327
  "The connection succeeded but the remote site is configured to reject push "
1328
  "connections. You can change this in the \"settings\" tab on the remote site. "
1329
  "(#139)"
1330
  msgstr ""
1331
 
1332
+ #: class/wpmdbpro.php:1906
1333
  #, php-format
1334
  msgid "There is a new version of %s available."
1335
  msgstr ""
1336
 
1337
+ #: class/wpmdbpro.php:1908
1338
  #, php-format
1339
  msgid "View version %s details"
1340
  msgstr ""
1341
 
1342
+ #: class/wpmdbpro.php:1918
1343
  #, php-format
1344
  msgid ""
1345
  "To update, go to %1$s and enter your license key. If you don't have a "
1346
  "license key, you may <a href=\"%2$s\">purchase one</a>."
1347
  msgstr ""
1348
 
1349
+ #: class/wpmdbpro.php:1920
1350
  #, php-format
1351
  msgid ""
1352
  "To finish activating %1$s, please go to %2$s and enter your license key. If "
1353
  "you don't have a license key, you may <a href=\"%3$s\">purchase one</a>."
1354
  msgstr ""
1355
 
1356
+ #: class/wpmdbpro.php:1988
1357
  msgid "Could not retrieve version details. Please try again."
1358
  msgstr ""
1359
 
1398
  #: template/common/compatibility.php:26
1399
  #: template/pro/backup.php:44
1400
  #: template/pro/exclude-post-types.php:19
1401
+ #: template/pro/select-tables.php:42
1402
  msgid "Select All"
1403
  msgstr ""
1404
 
1405
  #: template/common/compatibility.php:28
1406
  #: template/pro/backup.php:46
1407
  #: template/pro/exclude-post-types.php:21
1408
+ #: template/pro/select-tables.php:44
1409
  msgid "Deselect All"
1410
  msgstr ""
1411
 
1412
  #: template/common/compatibility.php:30
1413
  #: template/pro/backup.php:48
1414
  #: template/pro/exclude-post-types.php:23
1415
+ #: template/pro/select-tables.php:46
1416
  msgid "Invert Selection"
1417
  msgstr ""
1418
 
1446
  msgid "Please wait while migration is running..."
1447
  msgstr ""
1448
 
1449
+ #: template/migrate-progress.php:10
1450
  msgid "Establishing Connection"
1451
  msgstr ""
1452
 
1453
+ #: template/migrate-progress.php:26
1454
  msgctxt "Stop the migration"
1455
  msgid "Cancel"
1456
  msgstr ""
1564
  msgid "Compatible with older versions of MySQL (pre-5.5)"
1565
  msgstr ""
1566
 
1567
+ #: template/migrate.php:277
1568
+ msgid "Pause before replacing migrated tables"
1569
+ msgstr ""
1570
+
1571
+ #: template/migrate.php:293
1572
  msgid "Save Migration Profile"
1573
  msgstr ""
1574
 
1575
+ #: template/migrate.php:293
1576
  msgid "Save the above settings for the next time you do a similiar migration"
1577
  msgstr ""
1578
 
1579
+ #: template/migrate.php:315
1580
  msgid "Create new profile"
1581
  msgstr ""
1582
 
1583
+ #: template/migrate.php:324
1584
+ #: template/migrate.php:334
1585
  msgid "Warning: Different Table Prefixes"
1586
  msgstr ""
1587
 
1588
+ #: template/migrate.php:326
1589
  msgid ""
1590
  "Whoa! We've detected that the database table prefix differs between "
1591
  "installations. Clicking the Migrate button below will create new database "
1593
  "span>\"."
1594
  msgstr ""
1595
 
1596
+ #: template/migrate.php:328
1597
  #, php-format
1598
  msgid ""
1599
  "However, your local install is configured to use table prefix \"%1$s\" and "
1602
  "variable to \"<span class=\"remote-prefix\"></span>\"."
1603
  msgstr ""
1604
 
1605
+ #: template/migrate.php:330
1606
  msgid ""
1607
  "This will allow your local install the use the migrated tables. Once you do "
1608
  "this, you shouldn't have to do it again."
1609
  msgstr ""
1610
 
1611
+ #: template/migrate.php:336
1612
  #, php-format
1613
  msgid ""
1614
  "Whoa! We've detected that the database table prefix differs between "
1616
  "tables in the remote database with prefix \"%s\"."
1617
  msgstr ""
1618
 
1619
+ #: template/migrate.php:338
1620
  #, php-format
1621
  msgid ""
1622
  "However, your remote install is configured to use table prefix \"<span class="
1626
  "span>\" variable to \"%s\"."
1627
  msgstr ""
1628
 
1629
+ #: template/migrate.php:340
1630
  msgid ""
1631
  "This will allow your remote install the use the migrated tables. Once you do "
1632
  "this, you shouldn't have to do it again."
1633
  msgstr ""
1634
 
1635
+ #: template/migrate.php:354
1636
+ msgctxt "Save current migration settings"
1637
+ msgid "Save Profile"
1638
+ msgstr ""
1639
+
1640
+ #: template/options.php:22
1641
  msgid ""
1642
  "<strong>PHP Safe Mode Enabled</strong> &mdash; We do not officially support "
1643
  "running this plugin in safe mode because <code>set_time_limit()</code> has "
1647
  "However, if you have trouble, we can't help you until you turn off safe mode."
1648
  msgstr ""
1649
 
1650
+ #: template/options.php:24
1651
+ #: template/options.php:43
1652
  #, php-format
1653
  msgid "Your current PHP run time limit is set to %s seconds."
1654
  msgstr ""
1655
 
1656
+ #: template/options.php:32
1657
  #, php-format
1658
  msgid ""
1659
  "<strong>Internet Explorer Not Supported</strong> &mdash; Less than 2% of our "
1662
  "instead. If this is a problem for you, please let us know."
1663
  msgstr ""
1664
 
1665
+ #: template/options.php:41
1666
  msgid ""
1667
  "<strong>PHP Function Disabled</strong> &mdash; The <code>set_time_limit()</"
1668
  "code> function is currently disabled on your server. We use this function to "
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bradt
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
4
  Tags: migrate, migration, export, data dump, backup, database, mysql
5
  Requires at least: 3.0
6
- Tested up to: 4.4
7
- Stable tag: 0.7.1
8
  License: GPLv2
9
 
10
  Migrates your database by running find & replace on URLs and file paths, handling serialized data, and saving an SQL file.
@@ -87,6 +87,13 @@ If you upgrade to [WP Migrate DB Pro](http://deliciousbrains.com/wp-migrate-db-p
87
 
88
  == Changelog ==
89
 
 
 
 
 
 
 
 
90
  = WP Migrate DB 0.7.1 - 2015-07-09 =
91
 
92
  * Improvement: Added more diagnostic info to facilitate debugging
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
4
  Tags: migrate, migration, export, data dump, backup, database, mysql
5
  Requires at least: 3.0
6
+ Tested up to: 4.5
7
+ Stable tag: 0.7.2
8
  License: GPLv2
9
 
10
  Migrates your database by running find & replace on URLs and file paths, handling serialized data, and saving an SQL file.
87
 
88
  == Changelog ==
89
 
90
+ = WP Migrate DB 0.7.2 - 2015-12-03 =
91
+
92
+ * Improvement: "Migrate" button renamed to "Export"
93
+ * Improvement: Uses WP_Filesystem instead of direct PHP filesystem functionality where possible
94
+ * Improvement: Remove Find & Replace row icon is now a little dimmer to reduce UI clutter
95
+ * Improvement: Compatibility with WordPress 4.4
96
+
97
  = WP Migrate DB 0.7.1 - 2015-07-09 =
98
 
99
  * Improvement: Added more diagnostic info to facilitate debugging
template/migrate-progress.php CHANGED
@@ -4,17 +4,21 @@
4
  <div>
5
  <h2 class="progress-title"><?php _e( 'Please wait while migration is running...', 'wp-migrate-db' ); ?></h2>
6
  </div>
7
- <div class="progress-info-wrapper clearfix">
8
- <div class="progress-text"><?php _e( 'Establishing Connection', 'wp-migrate-db' ); ?></div>
9
- <span class="timer"><?php echo __( 'Time Elapsed:', 'wp-migrate-db' ) . ' 00:00:00'; ?></span>
10
- </div>
11
- <div class="clearfix"></div>
12
- <div class="progress-bar-wrapper">
13
- <div class="progress-tables-hover-boxes"></div>
14
- <div class="progress-label">wp_options</div>
15
- <div class="progress-bar"></div>
16
- <div class="progress-tables"></div>
 
 
 
17
  </div>
 
18
  <?php do_action( 'wpmdb_template_progress_after_bar' ); ?>
19
 
20
  <div class="migration-controls">
@@ -24,4 +28,4 @@
24
 
25
  <?php $this->template_part( array( 'progress_upgrade' ) ); ?>
26
 
27
- </div> <!-- end .progress-content -->
4
  <div>
5
  <h2 class="progress-title"><?php _e( 'Please wait while migration is running...', 'wp-migrate-db' ); ?></h2>
6
  </div>
7
+
8
+ <div class="progress-wrapper-primary">
9
+ <div class="progress-info-wrapper clearfix">
10
+ <div class="progress-text"><?php _e( 'Establishing Connection', 'wp-migrate-db' ); ?></div>
11
+ <span class="timer"><?php echo __( 'Time Elapsed:', 'wp-migrate-db' ) . ' 00:00:00'; ?></span>
12
+ </div>
13
+ <div class="clearfix"></div>
14
+ <div class="progress-bar-wrapper">
15
+ <div class="progress-tables-hover-boxes"></div>
16
+ <div class="progress-label">wp_options</div>
17
+ <div class="progress-bar"></div>
18
+ <div class="progress-tables"></div>
19
+ </div>
20
  </div>
21
+
22
  <?php do_action( 'wpmdb_template_progress_after_bar' ); ?>
23
 
24
  <div class="migration-controls">
28
 
29
  <?php $this->template_part( array( 'progress_upgrade' ) ); ?>
30
 
31
+ </div> <!-- end .progress-content -->
template/migrate.php CHANGED
@@ -271,6 +271,12 @@ $breadcrumbs_params = array(
271
  <?php _e( 'Compatible with older versions of MySQL (pre-5.5)', 'wp-migrate-db' ); ?>
272
  </label>
273
  </li>
 
 
 
 
 
 
274
  <?php $this->template_part( array( 'exclude_post_revisions' ), $loaded_profile ); ?>
275
  </ul>
276
 
@@ -319,7 +325,7 @@ $breadcrumbs_params = array(
319
 
320
  <p><?php _e( 'Whoa! We\'ve detected that the database table prefix differs between installations. Clicking the Migrate button below will create new database tables in your local database with prefix "<span class="remote-prefix"></span>".', 'wp-migrate-db' ); ?></p>
321
 
322
- <p><?php printf( __( 'However, your local install is configured to use table prefix "%1$s" and will ignore the migrated tables. So, <b>AFTER</b> migration is complete, you will need to edit your local install\'s wp-config.php and change the "%1$s" variable to "<span class="remote-prefix"></span>".', 'wp-migrate-db' ), $wpdb->prefix, $wpdb->prefix ); ?></p>
323
 
324
  <p><?php _e( 'This will allow your local install the use the migrated tables. Once you do this, you shouldn\'t have to do it again.', 'wp-migrate-db' ); ?></p>
325
  </div>
@@ -327,9 +333,9 @@ $breadcrumbs_params = array(
327
  <div class="notification-message warning-notice prefix-notice push">
328
  <h4><?php _e( 'Warning: Different Table Prefixes', 'wp-migrate-db' ); ?></h4>
329
 
330
- <p><?php printf( __( 'Whoa! We\'ve detected that the database table prefix differs between installations. Clicking the Migrate button below will create new database tables in the remote database with prefix "%s".', 'wp-migrate-db' ), $wpdb->prefix ); ?></p>
331
 
332
- <p><?php printf( __( 'However, your remote install is configured to use table prefix "<span class="remote-prefix"></span>" and will ignore the migrated tables. So, <b>AFTER</b> migration is complete, you will need to edit your remote install\'s wp-config.php and change the "<span class="remote-prefix"></span>" variable to "%s".', 'wp-migrate-db' ), $wpdb->prefix ); ?></p>
333
 
334
  <p><?php _e( 'This will allow your remote install the use the migrated tables. Once you do this, you shouldn\'t have to do it again.', 'wp-migrate-db' ); ?></p>
335
  </div>
@@ -344,8 +350,8 @@ $breadcrumbs_params = array(
344
 
345
  <p class="migrate-db">
346
  <input type="hidden" class="remote-json-data" name="remote_json_data" autocomplete="off"/>
347
- <input class="button-primary migrate-db-button" type="submit" value="Migrate" name="Submit" autocomplete="off"/>
348
- <input class="button save-settings-button" type="submit" value="Save Profile" name="submit_save_profile" autocomplete="off"/>
349
  </p>
350
 
351
  </div>
271
  <?php _e( 'Compatible with older versions of MySQL (pre-5.5)', 'wp-migrate-db' ); ?>
272
  </label>
273
  </li>
274
+ <li class="pause-before-finalize">
275
+ <label for="pause-before-finalize">
276
+ <input id="pause-before-finalize" type="checkbox" value="1" autocomplete="off" name="pause_before_finalize"<?php $this->maybe_checked( $loaded_profile['pause_before_finalize'] ); ?> />
277
+ <?php _e( 'Pause before replacing migrated tables', 'wp-migrate-db' ); ?>
278
+ </label>
279
+ </li>
280
  <?php $this->template_part( array( 'exclude_post_revisions' ), $loaded_profile ); ?>
281
  </ul>
282
 
325
 
326
  <p><?php _e( 'Whoa! We\'ve detected that the database table prefix differs between installations. Clicking the Migrate button below will create new database tables in your local database with prefix "<span class="remote-prefix"></span>".', 'wp-migrate-db' ); ?></p>
327
 
328
+ <p><?php printf( __( 'However, your local install is configured to use table prefix "%1$s" and will ignore the migrated tables. So, <b>AFTER</b> migration is complete, you will need to edit your local install\'s wp-config.php and change the "%1$s" variable to "<span class="remote-prefix"></span>".', 'wp-migrate-db' ), $wpdb->base_prefix, $wpdb->base_prefix ); ?></p>
329
 
330
  <p><?php _e( 'This will allow your local install the use the migrated tables. Once you do this, you shouldn\'t have to do it again.', 'wp-migrate-db' ); ?></p>
331
  </div>
333
  <div class="notification-message warning-notice prefix-notice push">
334
  <h4><?php _e( 'Warning: Different Table Prefixes', 'wp-migrate-db' ); ?></h4>
335
 
336
+ <p><?php printf( __( 'Whoa! We\'ve detected that the database table prefix differs between installations. Clicking the Migrate button below will create new database tables in the remote database with prefix "%s".', 'wp-migrate-db' ), $wpdb->base_prefix ); ?></p>
337
 
338
+ <p><?php printf( __( 'However, your remote install is configured to use table prefix "<span class="remote-prefix"></span>" and will ignore the migrated tables. So, <b>AFTER</b> migration is complete, you will need to edit your remote install\'s wp-config.php and change the "<span class="remote-prefix"></span>" variable to "%s".', 'wp-migrate-db' ), $wpdb->base_prefix ); ?></p>
339
 
340
  <p><?php _e( 'This will allow your remote install the use the migrated tables. Once you do this, you shouldn\'t have to do it again.', 'wp-migrate-db' ); ?></p>
341
  </div>
350
 
351
  <p class="migrate-db">
352
  <input type="hidden" class="remote-json-data" name="remote_json_data" autocomplete="off"/>
353
+ <input class="button-primary migrate-db-button" type="submit" value="<?php echo esc_attr_x( 'Export', 'Download a copy of the database', 'wp-migrate-db' ); ?>" name="Submit" autocomplete="off"/>
354
+ <input class="button save-settings-button" type="submit" value="<?php echo esc_attr_x( 'Save Profile', 'Save current migration settings', 'wp-migrate-db' ); ?>" name="submit_save_profile" autocomplete="off"/>
355
  </p>
356
 
357
  </div>
template/options.php CHANGED
@@ -1,7 +1,10 @@
1
  <div class="wrap wpmdb">
2
 
 
 
 
3
  <div id="icon-tools" class="icon32"><br/></div>
4
- <h2><?php echo $this->get_plugin_title(); ?></h2>
5
 
6
  <h2 class="nav-tab-wrapper">
7
  <?php $this->plugin_tabs(); ?>
1
  <div class="wrap wpmdb">
2
 
3
+ <?php /* This is a hack to get sitewide notices to appear above the visible title. https://github.com/deliciousbrains/wp-migrate-db-pro/issues/1436 */ ?>
4
+ <h1 style="display:none;"></h1>
5
+
6
  <div id="icon-tools" class="icon32"><br/></div>
7
+ <h1><?php echo $this->get_plugin_title(); ?></h1>
8
 
9
  <h2 class="nav-tab-wrapper">
10
  <?php $this->plugin_tabs(); ?>
wp-migrate-db.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Migrate DB
4
  Plugin URI: http://wordpress.org/plugins/wp-migrate-db/
5
  Description: Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.
6
  Author: Delicious Brains
7
- Version: 0.7.1
8
  Author URI: http://deliciousbrains.com
9
  Network: True
10
  Text Domain: wp-migrate-db
@@ -22,7 +22,7 @@ Domain Path: /languages/
22
  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
  // **********************************************************************
24
 
25
- $GLOBALS['wpmdb_meta']['wp-migrate-db']['version'] = '0.7.1';
26
 
27
  if ( ! class_exists( 'WPMDB_Utils' ) ) {
28
  require dirname( __FILE__ ) . '/class/wpmdb-utils.php';
4
  Plugin URI: http://wordpress.org/plugins/wp-migrate-db/
5
  Description: Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.
6
  Author: Delicious Brains
7
+ Version: 0.7.2
8
  Author URI: http://deliciousbrains.com
9
  Network: True
10
  Text Domain: wp-migrate-db
22
  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
  // **********************************************************************
24
 
25
+ $GLOBALS['wpmdb_meta']['wp-migrate-db']['version'] = '0.7.2';
26
 
27
  if ( ! class_exists( 'WPMDB_Utils' ) ) {
28
  require dirname( __FILE__ ) . '/class/wpmdb-utils.php';