WP Migrate DB - Version 0.7.1

Version Description

Download this release

Release Info

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

Code changes from version 0.7 to 0.7.1

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;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;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{-moz-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);-webkit-transform:scale(1) rotate(-90deg) translateX(0px) translateY(0px) skewX(0deg) skewY(0deg);-o-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;-webkit-border-radius:64px;-moz-border-radius:64px;-ms-border-radius:64px;-o-border-radius: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;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;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}.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%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;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:-moz-linear-gradient(bottom, #72a7cf,#8cc1e9);background-image:-o-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{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;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;-moz-transition:opacity 200ms ease-in-out;-ms-transition:opacity 200ms ease-in-out;-o-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), (-o-min-device-pixel-ratio: 2.6 / 2), (-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-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}
asset/js/common.js CHANGED
@@ -1,10 +1,12 @@
1
  // global vars
2
- var hooks = [];
3
- var call_stack = [];
4
- var non_fatal_errors = '';
5
- var migration_error = false;
6
- var connection_data;
7
- var next_step_in_migration;
 
 
8
 
9
  /**
10
  * Toggle proper translated strings based on migration type selected.
@@ -32,25 +34,25 @@ function wpmdb_migration_type() {
32
  }
33
 
34
  function wpmdb_call_next_hook() {
35
- if ( !call_stack.length ) {
36
- call_stack = hooks;
37
  }
38
 
39
- var func = call_stack[0];
40
- call_stack.shift();
41
- window[func](); // Uses the string from the array to call the function of the same name
42
  }
43
 
44
  function wpmdb_add_commas( number_string ) {
45
  number_string += '';
46
- var x = number_string.split( '.' );
47
- var x1 = x[0];
48
- var x2 = x.length > 1 ? '.' + x[1] : '';
49
  var rgx = /(\d+)(\d{3})/;
50
- while ( rgx.test( x1 ) ) {
51
- x1 = x1.replace( rgx, '$1' + ',' + '$2' );
52
  }
53
- return x1 + x2;
54
  }
55
 
56
  function wpmdb_parse_json( maybe_json ) {
@@ -59,7 +61,8 @@ function wpmdb_parse_json( maybe_json ) {
59
  json_object = jQuery.parseJSON( maybe_json );
60
  }
61
  catch ( e ) {
62
- // we simply return false here because the json data itself will never just contain a value of "false"
 
63
  return false;
64
  }
65
  return json_object;
@@ -91,12 +94,12 @@ function wpmdbGetAjaxErrors( title, code, text, jqXHR ) {
91
  }
92
 
93
  // Only add local connection issue if php errors (#144) or jqXHR has been provided
94
- if ( jsonErrors || jqXHR !== undefined ) {
95
  html += '<strong>' + title + '</strong>' + ' &mdash; ';
96
  }
97
 
98
  // Only add extra error details if not php errors (#144) and jqXHR has been provided
99
- if ( !jsonErrors && jqXHR !== undefined ) {
100
  html += wpmdb_strings.status + ': ' + jqXHR.status + ' ' + jqXHR.statusText;
101
  html += '<br /><br />' + wpmdb_strings.response + ':<br />';
102
  }
@@ -113,5 +116,7 @@ function wpmdbGetAjaxErrors( title, code, text, jqXHR ) {
113
  }
114
 
115
  (function( $ ) {
 
116
  // jQuery code here
 
117
  })( jQuery );
1
  // global vars
2
+ var wpmdb = wpmdb || {};
3
+ wpmdb.common = {
4
+ hooks: [],
5
+ call_stack: [],
6
+ non_fatal_errors: '',
7
+ migration_error: false
8
+ };
9
+ wpmdb.functions = {};
10
 
11
  /**
12
  * Toggle proper translated strings based on migration type selected.
34
  }
35
 
36
  function wpmdb_call_next_hook() {
37
+ if ( !wpmdb.common.call_stack.length ) {
38
+ wpmdb.common.call_stack = wpmdb.common.hooks;
39
  }
40
 
41
+ var func = wpmdb.common.call_stack[ 0 ];
42
+ wpmdb.common.call_stack.shift();
43
+ func.call( this );
44
  }
45
 
46
  function wpmdb_add_commas( number_string ) {
47
  number_string += '';
48
+ var number_parts = number_string.split( '.' );
49
+ var integer = number_parts[ 0 ];
50
+ var decimal = 1 < number_parts.length ? '.' + number_parts[ 1 ] : '';
51
  var rgx = /(\d+)(\d{3})/;
52
+ while ( rgx.test( integer ) ) {
53
+ integer = integer.replace( rgx, '$1' + ',' + '$2' );
54
  }
55
+ return integer + decimal;
56
  }
57
 
58
  function wpmdb_parse_json( maybe_json ) {
61
  json_object = jQuery.parseJSON( maybe_json );
62
  }
63
  catch ( e ) {
64
+
65
+ // We simply return false here because the json data itself will never just contain a value of "false"
66
  return false;
67
  }
68
  return json_object;
94
  }
95
 
96
  // Only add local connection issue if php errors (#144) or jqXHR has been provided
97
+ if ( jsonErrors || 'undefined' !== jqXHR ) {
98
  html += '<strong>' + title + '</strong>' + ' &mdash; ';
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
  }
116
  }
117
 
118
  (function( $ ) {
119
+
120
  // jQuery code here
121
+
122
  })( jQuery );
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(){call_stack.length||(call_stack=hooks);var a=call_stack[0];call_stack.shift(),window[a]()}function wpmdb_add_commas(a){a+="";for(var b=a.split("."),c=b[0],d=b.length>1?"."+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||void 0!==d)&&(f+="<strong>"+a+"</strong> &mdash; "),e||void 0===d||(f+=wpmdb_strings.status+": "+d.status+" "+d.statusText,f+="<br /><br />"+wpmdb_strings.response+":<br />"),e||(c+=" "+b),f+=c}var hooks=[],call_stack=[],non_fatal_errors="",migration_error=!1,connection_data,next_step_in_migration;!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={},function(){}(jQuery);
asset/js/hook.js CHANGED
@@ -52,7 +52,7 @@
52
  remove_hook: function( hook_type, action, tag ) {
53
  if ( undefined !== jQuery.wpmdb.hooks[hook_type][action] ) {
54
  var hooks = jQuery.wpmdb.hooks[hook_type][action];
55
- for ( var i = hooks.length - 1; i >= 0; i-- ) {
56
  if ( undefined === tag || tag === hooks[i].tag ) {
57
  hooks.splice( i, 1 );
58
  }
@@ -61,4 +61,4 @@
61
  }
62
  };
63
 
64
- })( jQuery );
52
  remove_hook: function( hook_type, action, tag ) {
53
  if ( undefined !== jQuery.wpmdb.hooks[hook_type][action] ) {
54
  var hooks = jQuery.wpmdb.hooks[hook_type][action];
55
+ for ( var i = hooks.length - 1; 0 < i; i-- ) {
56
  if ( undefined === tag || tag === hooks[i].tag ) {
57
  hooks.splice( i, 1 );
58
  }
61
  }
62
  };
63
 
64
+ })( jQuery );
asset/js/hook.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){a.wpmdb={hooks:{action:{},filter:{}},add_action:function(a,b,c){jQuery.wpmdb.add_hook("action",a,b,c)},add_filter:function(a,b,c){jQuery.wpmdb.add_hook("filter",a,b,c)},do_action:function(a,b){jQuery.wpmdb.do_hook("action",a,null,b)},apply_filters:function(a,b,c){return jQuery.wpmdb.do_hook("filter",a,b,c)},remove_action:function(a,b){jQuery.wpmdb.remove_hook("action",a,b)},remove_filter:function(a,b){jQuery.wpmdb.remove_hook("filter",a,b)},add_hook:function(a,b,c,d){void 0===jQuery.wpmdb.hooks[a][b]&&(jQuery.wpmdb.hooks[a][b]=[]);var e=jQuery.wpmdb.hooks[a][b];void 0===d&&(d=b+"_"+e.length),jQuery.wpmdb.hooks[a][b].push({tag:d,callable:c})},do_hook:function(a,b,c,d){if(void 0!==jQuery.wpmdb.hooks[a][b])for(var e=jQuery.wpmdb.hooks[a][b],f=0;f<e.length;f++)"action"===a?e[f].callable(d):c=e[f].callable(c,d);return"filter"===a?c:void 0},remove_hook:function(a,b,c){if(void 0!==jQuery.wpmdb.hooks[a][b])for(var d=jQuery.wpmdb.hooks[a][b],e=d.length-1;e>=0;e--)(void 0===c||c===d[e].tag)&&d.splice(e,1)}}}(jQuery);
1
+ !function(a){a.wpmdb={hooks:{action:{},filter:{}},add_action:function(a,b,c){jQuery.wpmdb.add_hook("action",a,b,c)},add_filter:function(a,b,c){jQuery.wpmdb.add_hook("filter",a,b,c)},do_action:function(a,b){jQuery.wpmdb.do_hook("action",a,null,b)},apply_filters:function(a,b,c){return jQuery.wpmdb.do_hook("filter",a,b,c)},remove_action:function(a,b){jQuery.wpmdb.remove_hook("action",a,b)},remove_filter:function(a,b){jQuery.wpmdb.remove_hook("filter",a,b)},add_hook:function(a,b,c,d){void 0===jQuery.wpmdb.hooks[a][b]&&(jQuery.wpmdb.hooks[a][b]=[]);var e=jQuery.wpmdb.hooks[a][b];void 0===d&&(d=b+"_"+e.length),jQuery.wpmdb.hooks[a][b].push({tag:d,callable:c})},do_hook:function(a,b,c,d){if(void 0!==jQuery.wpmdb.hooks[a][b])for(var e=jQuery.wpmdb.hooks[a][b],f=0;f<e.length;f++)"action"===a?e[f].callable(d):c=e[f].callable(c,d);return"filter"===a?c:void 0},remove_hook:function(a,b,c){if(void 0!==jQuery.wpmdb.hooks[a][b])for(var d=jQuery.wpmdb.hooks[a][b],e=d.length-1;e>0;e--)(void 0===c||c===d[e].tag)&&d.splice(e,1)}}}(jQuery);
asset/js/script.js CHANGED
@@ -1,11 +1,4 @@
1
- // global functions
2
- var migration_complete;
3
- var migration_complete_events;
4
- var migrate_table_recursive;
5
- var execute_next_step;
6
- var wpmdb_flush;
7
-
8
- (function( $ ) {
9
 
10
  var migration_state_id = '';
11
  var connection_established = false;
@@ -46,7 +39,7 @@ var wpmdb_flush;
46
 
47
  var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ), spinner_url = admin_url + '/images/spinner';
48
 
49
- if ( window.devicePixelRatio >= 2 ) {
50
  spinner_url += '-2x';
51
  }
52
  spinner_url += '.gif';
@@ -74,7 +67,7 @@ var wpmdb_flush;
74
 
75
  function is_int( n ) {
76
  n = parseInt( n );
77
- return typeof n === 'number' && n % 1 === 0;
78
  }
79
 
80
  function setup_counter() {
@@ -114,10 +107,10 @@ var wpmdb_flush;
114
  }
115
 
116
  function get_query_var( name ) {
117
- name = name.replace( /[\[]/, "\\[" ).replace( /[\]]/, "\\]" );
118
- var regex = new RegExp( "[\\?&]" + name + "=([^&#]*)" ),
119
  results = regex.exec( location.search );
120
- return results === null ? "" : decodeURIComponent( results[ 1 ].replace( /\+/g, " " ) );
121
  }
122
 
123
  function maybe_show_ssl_warning( url, key, remote_scheme ) {
@@ -126,7 +119,7 @@ var wpmdb_flush;
126
  $( '.ssl-notice' ).show();
127
  show_ssl_notice = true;
128
  url = url.replace( 'https', 'http' );
129
- $( '.pull-push-connection-info' ).val( url + "\n" + key );
130
  return;
131
  }
132
  show_ssl_notice = false;
@@ -139,15 +132,14 @@ var wpmdb_flush;
139
  show_prefix_notice = true;
140
  if ( 'pull' === wpmdb_migration_type() ) {
141
  $( '.prefix-notice.pull' ).show();
142
- }
143
- else {
144
  $( '.prefix-notice.push' ).show();
145
  }
146
  }
147
  }
148
 
149
  function maybe_show_mixed_cased_table_name_warning() {
150
- if ( 'undefined' === typeof connection_data || false === connection_data ) {
151
  return;
152
  }
153
 
@@ -163,7 +155,7 @@ var wpmdb_flush;
163
  if ( 'push' === migration_intent || 'savefile' === migration_intent ) {
164
  tables_to_migrate = wpmdb_data.this_prefixed_tables;
165
  } else {
166
- tables_to_migrate = connection_data.prefixed_tables;
167
  }
168
  }
169
 
@@ -182,7 +174,7 @@ var wpmdb_flush;
182
  * Do not display the warning if the remote lower_case_table_names does not equal "1" (i.e the only problematic setting)
183
  * Applies to push/export migrations.
184
  */
185
- if ( '1' !== connection_data.lower_case_table_names && ( 'push' === migration_intent || 'savefile' === migration_intent ) ) {
186
  return;
187
  }
188
 
@@ -217,7 +209,7 @@ var wpmdb_flush;
217
  function get_migration_status_label( url, intent, stage ) {
218
  var domain = get_domain_name( url );
219
  var migrating_stage_label, completed_stage_label;
220
- if ( intent === 'pull' ) {
221
  migrating_stage_label = wpmdb_strings.pull_migration_label_migrating;
222
  completed_stage_label = wpmdb_strings.pull_migration_label_completed;
223
  } else {
@@ -236,7 +228,7 @@ var wpmdb_flush;
236
  }
237
 
238
  function remove_protocol( url ) {
239
- return url.replace( /^https?:/i, "" );
240
  }
241
 
242
  function disable_export_type_controls() {
@@ -266,9 +258,10 @@ var wpmdb_flush;
266
  $( '.progress-text' ).html( previous_progress_text );
267
  $( '.migration-progress-ajax-spinner' ).show();
268
  $( '.pause-resume' ).html( wpmdb_strings.pause );
269
- // resume the timer
 
270
  elapsed_interval = setInterval( count, 1000 );
271
- execute_next_step();
272
  } else {
273
  migration_paused = true;
274
  doing_ajax = false;
@@ -314,12 +307,11 @@ var wpmdb_flush;
314
  if ( $( this ).is( ':checked' ) ) {
315
  var answer = confirm( wpmdb_strings.mu_plugin_confirmation );
316
 
317
- if ( ! answer ) {
318
  $( this ).prop( 'checked', false );
319
  return;
320
  }
321
- }
322
- else {
323
  install = '0';
324
  }
325
 
@@ -347,8 +339,7 @@ var wpmdb_flush;
347
  success: function( data ) {
348
  if ( '' !== $.trim( data ) ) {
349
  alert( data );
350
- }
351
- else {
352
  $( '.plugin-compatibility' ).append( '<span class="ajax-success-msg">' + wpmdb_strings.saved + '</span>' );
353
  $( '.ajax-success-msg' ).fadeOut( 2000, function() {
354
  $( this ).remove();
@@ -366,12 +357,12 @@ var wpmdb_flush;
366
  $( '.plugin-compatibility-wrap' ).show();
367
  }
368
 
369
- if ( navigator.userAgent.indexOf( 'MSIE' ) > 0 || navigator.userAgent.indexOf( 'Trident' ) > 0 ) {
370
  $( '.ie-warning' ).show();
371
  }
372
 
373
  if ( 0 === wpmdb_data.valid_licence ) {
374
- $( '#savefile' ).prop( "checked", true );
375
  }
376
  var max_request_size_container = $( '.max-request-size' );
377
  var max_request_size_slider = $( '.slider', max_request_size_container );
@@ -525,8 +516,7 @@ var wpmdb_flush;
525
  if ( 'undefined' !== typeof data.dbrains_api_down ) {
526
  support_msg = data.dbrains_api_down + data.message;
527
  addons_msg = data.dbrains_api_down;
528
- }
529
- else if ( 'undefined' !== typeof data.errors ) {
530
 
531
  if ( 'undefined' !== typeof data.errors.subscription_expired ) {
532
  licence_msg = data.errors.subscription_expired.licence;
@@ -541,10 +531,9 @@ var wpmdb_flush;
541
  addons_msg = msg;
542
  }
543
  if ( 'undefined' !== typeof data.addon_content ) {
544
- addons_msg += "\n" + data.addon_content;
545
  }
546
- }
547
- else {
548
  support_msg = data.message;
549
  addons_msg = data.addon_content;
550
  }
@@ -585,12 +574,12 @@ var wpmdb_flush;
585
  check_licence( null, 'all' );
586
  } );
587
  function refresh_table_selects() {
588
- if ( undefined !== wpmdb_data && undefined !== wpmdb_data.this_tables && undefined !== wpmdb_data.this_table_sizes ) {
589
- $push_select = create_table_select( wpmdb_data.this_tables, wpmdb_data.this_table_sizes, $( $push_select ).val() );
590
  }
591
 
592
- if ( undefined !== connection_data && undefined !== connection_data.tables && undefined !== connection_data.table_sizes_hr ) {
593
- $pull_select = create_table_select( connection_data.tables, connection_data.table_sizes_hr, $( $pull_select ).val() );
594
  }
595
  }
596
 
@@ -641,8 +630,8 @@ var wpmdb_flush;
641
 
642
  function establish_remote_connection_from_saved_profile() {
643
  var action = wpmdb_migration_type();
644
- var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( "\n" );
645
- if ( 'undefined' === typeof wpmdb_default_profile || true === wpmdb_default_profile || 'savefile' === action || doing_ajax || ! wpmdb_data.is_pro ) {
646
  return;
647
  }
648
 
@@ -681,7 +670,7 @@ var wpmdb_flush;
681
  doing_ajax = false;
682
  enable_export_type_controls();
683
 
684
- if ( typeof data.wpmdb_error !== 'undefined' && data.wpmdb_error === 1 ) {
685
  $( '.connection-status' ).html( data.body );
686
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
687
 
@@ -702,26 +691,25 @@ var wpmdb_flush;
702
  $( '.connection-status' ).hide();
703
  $( '.step-two' ).show();
704
  connection_established = true;
705
- connection_data = data;
706
  move_connection_info_box();
707
 
708
  maybe_show_mixed_cased_table_name_warning();
709
 
710
  var loaded_tables = '';
711
- if ( wpmdb_default_profile === false && typeof wpmdb_loaded_tables !== 'undefined' ) {
712
  loaded_tables = wpmdb_loaded_tables;
713
  }
714
 
715
- $pull_select = create_table_select( connection_data.tables, connection_data.table_sizes_hr, loaded_tables );
716
 
717
  var loaded_post_types = '';
718
- if ( wpmdb_default_profile === false && typeof wpmdb_loaded_post_types !== 'undefined' ) {
719
- if ( typeof data.select_post_types !== 'undefined' ) {
720
  $( '#exclude-post-types' ).attr( 'checked', 'checked' );
721
  $( '.post-type-select-wrap' ).show();
722
  loaded_post_types = data.select_post_types;
723
- }
724
- else {
725
  loaded_post_types = wpmdb_loaded_post_types;
726
  }
727
  }
@@ -734,12 +722,11 @@ var wpmdb_flush;
734
  class: 'multiselect'
735
  } );
736
 
737
- $.each( connection_data.post_types, function( index, value ) {
738
  var selected = $.inArray( value, loaded_post_types );
739
- if ( selected !== -1 || ( wpmdb_convert_exclude_revisions === true && value !== 'revision' ) ) {
740
  selected = ' selected="selected" ';
741
- }
742
- else {
743
  selected = ' ';
744
  }
745
  $( $post_type_select ).append( '<option' + selected + 'value="' + value + '">' + value + '</option>' );
@@ -748,7 +735,7 @@ var wpmdb_flush;
748
  $pull_post_type_select = $post_type_select;
749
 
750
  var loaded_tables_backup = '';
751
- if ( wpmdb_default_profile === false && typeof wpmdb_loaded_tables_backup !== 'undefined' ) {
752
  loaded_tables_backup = wpmdb_loaded_tables_backup;
753
  }
754
 
@@ -760,15 +747,14 @@ var wpmdb_flush;
760
  class: 'multiselect'
761
  } );
762
 
763
- $.each( connection_data.tables, function( index, value ) {
764
  var selected = $.inArray( value, loaded_tables_backup );
765
- if ( selected !== -1 ) {
766
  selected = ' selected="selected" ';
767
- }
768
- else {
769
  selected = ' ';
770
  }
771
- $( $table_select_backup ).append( '<option' + selected + 'value="' + value + '">' + value + ' (' + connection_data.table_sizes_hr[ value ] + ')</option>' );
772
  } );
773
 
774
  $push_select_backup = $table_select_backup;
@@ -781,13 +767,12 @@ var wpmdb_flush;
781
  $( '.backup-tables-wrap' ).prepend( $pull_select_backup );
782
  $( '.table-prefix' ).html( data.prefix );
783
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
784
- }
785
- else {
786
  $( '#select-backup' ).remove();
787
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
788
  }
789
 
790
- $.wpmdb.do_action( 'verify_connection_to_remote_site', connection_data );
791
  }
792
 
793
  } );
@@ -803,7 +788,6 @@ var wpmdb_flush;
803
  $( this ).blur();
804
  } );
805
 
806
-
807
  function enable_pro_licence( data, licence_key ) {
808
  $( '.licence-input, .register-licence' ).remove();
809
  $( '.licence-not-entered' ).prepend( data.masked_licence );
@@ -826,7 +810,7 @@ var wpmdb_flush;
826
 
827
  var licence_key = $.trim( $( '.licence-input' ).val() );
828
 
829
- if ( licence_key === '' ) {
830
  $( '.licence-status' ).addClass( 'notification-message error-notice' );
831
  $( '.licence-status' ).html( wpmdb_strings.enter_license_key );
832
  return;
@@ -856,22 +840,20 @@ var wpmdb_flush;
856
  doing_licence_registration_ajax = false;
857
  $( '.register-licence-ajax-spinner' ).remove();
858
 
859
- if ( typeof data.errors !== 'undefined' ) {
860
  var msg = '';
861
  for ( var key in data.errors ) {
862
  msg += data.errors[ key ];
863
  }
864
  $( '.licence-status' ).html( msg );
865
 
866
- if ( typeof data.masked_licence !== 'undefined' ) {
867
  enable_pro_licence( data, licence_key );
868
  $( '.migrate-tab .invalid-licence' ).hide();
869
  }
870
- }
871
- else if ( typeof data.wpmdb_error !== 'undefined' && typeof data.body !== 'undefined' ) {
872
  $( '.licence-status' ).html( data.body );
873
- }
874
- else {
875
  $( '.licence-status' ).html( wpmdb_strings.license_registered ).delay( 5000 ).fadeOut( 1000 );
876
  $( '.licence-status' ).addClass( 'success notification-message success-notice' );
877
  enable_pro_licence( data, licence_key );
@@ -968,8 +950,7 @@ var wpmdb_flush;
968
  if ( $( '.expand-collapse-arrow', this ).hasClass( 'collapsed' ) ) {
969
  $( '.expand-collapse-arrow', this ).removeClass( 'collapsed' );
970
  $( this ).next().show();
971
- }
972
- else {
973
  $( '.expand-collapse-arrow', this ).addClass( 'collapsed' );
974
  $( this ).next().hide();
975
  }
@@ -978,8 +959,7 @@ var wpmdb_flush;
978
  $( '.checkbox-label input[type=checkbox]' ).change( function() {
979
  if ( $( this ).is( ':checked' ) ) {
980
  $( this ).parent().next().show();
981
- }
982
- else {
983
  $( this ).parent().next().hide();
984
  }
985
  } );
@@ -989,8 +969,7 @@ var wpmdb_flush;
989
  if ( $( this ).is( ':checked' ) ) {
990
  $( '.save-settings-button' ).show();
991
  $( '.migrate-db .button-primary' ).val( wpmdb_strings.migrate_db_save );
992
- }
993
- else {
994
  $( '.save-settings-button' ).hide();
995
  $( '.migrate-db .button-primary' ).val( wpmdb_strings.migrate_db );
996
  }
@@ -1022,7 +1001,7 @@ var wpmdb_flush;
1022
  }
1023
 
1024
  // check that they've selected some tables to migrate
1025
- if ( $( '#migrate-selected' ).is( ':checked' ) && $( '#select-tables' ).val() === null ) {
1026
  alert( wpmdb_strings.please_select_one_table );
1027
  return;
1028
  }
@@ -1076,16 +1055,16 @@ var wpmdb_flush;
1076
 
1077
  stage = 'backup';
1078
 
1079
- if ( migration_intent === 'savefile' ) {
1080
  stage = 'migrate';
1081
  }
1082
 
1083
- if ( $( '#create-backup' ).is( ':checked' ) === false ) {
1084
  stage = 'migrate';
1085
  }
1086
 
1087
  var table_intent = $( 'input[name=table_migrate_option]:checked' ).val();
1088
- var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( "\n" );
1089
  var table_rows = '';
1090
 
1091
  remote_site = connection_info[ 0 ];
@@ -1097,10 +1076,9 @@ var wpmdb_flush;
1097
 
1098
  completed_msg = wpmdb_strings.exporting_complete;
1099
 
1100
- if ( migration_intent === 'savefile' ) {
1101
  static_migration_label = wpmdb_strings.exporting_please_wait;
1102
- }
1103
- else {
1104
  static_migration_label = get_migration_status_label( remote_site, migration_intent, 'migrating' );
1105
  completed_msg = get_migration_status_label( remote_site, migration_intent, 'completed' );
1106
  }
@@ -1112,58 +1090,52 @@ var wpmdb_flush;
1112
  var table_option = $( 'input[name=table_migrate_option]:checked' ).val();
1113
  var selected_tables = '';
1114
 
1115
- if ( stage === 'backup' ) {
1116
- if ( table_option === 'migrate_only_with_prefix' && backup_option === 'backup_selected' ) {
1117
  backup_option = 'backup_only_with_prefix';
1118
  }
1119
- if ( migration_intent === 'push' ) {
1120
- table_rows = connection_data.table_rows;
1121
- if ( backup_option === 'backup_only_with_prefix' ) {
1122
- tables_to_migrate = connection_data.prefixed_tables;
1123
- }
1124
- else if ( backup_option === 'backup_selected' ) {
1125
  selected_tables = $( '#select-tables' ).val();
1126
- tables_to_migrate = get_intersect( selected_tables, connection_data.tables );
1127
- }
1128
- else if ( backup_option === 'backup_manual_select' ) {
1129
  tables_to_migrate = $( '#select-backup' ).val();
1130
  }
1131
- }
1132
- else {
1133
  table_rows = wpmdb_data.this_table_rows;
1134
- if ( backup_option === 'backup_only_with_prefix' ) {
1135
  tables_to_migrate = wpmdb_data.this_prefixed_tables;
1136
- }
1137
- else if ( backup_option === 'backup_selected' ) {
1138
  selected_tables = $( '#select-tables' ).val();
1139
  tables_to_migrate = get_intersect( selected_tables, wpmdb_data.this_tables );
1140
- }
1141
- else if ( backup_option === 'backup_manual_select' ) {
1142
  tables_to_migrate = $( '#select-backup' ).val();
1143
  }
1144
  }
1145
- }
1146
- else {
1147
- if ( table_intent === 'migrate_select' ) { // user has elected to migrate only certain tables
1148
- // grab tables as per what the user has selected from the multiselect box
1149
  tables_to_migrate = $( '#select-tables' ).val();
1150
- // user is pushing or exporting
1151
- if ( migration_intent === 'push' || migration_intent === 'savefile' ) {
1152
- // default value, assuming we're not backing up
 
 
1153
  table_rows = wpmdb_data.this_table_rows;
 
 
1154
  }
1155
- else {
1156
- table_rows = connection_data.table_rows;
1157
- }
1158
- }
1159
- else {
1160
- if ( migration_intent === 'push' || migration_intent === 'savefile' ) {
1161
  tables_to_migrate = wpmdb_data.this_prefixed_tables;
1162
  table_rows = wpmdb_data.this_table_rows;
1163
- }
1164
- else {
1165
- tables_to_migrate = connection_data.prefixed_tables;
1166
- table_rows = connection_data.table_rows;
1167
  }
1168
  }
1169
  }
@@ -1196,15 +1168,7 @@ var wpmdb_flush;
1196
 
1197
  if ( 0 !== percent_diff && percent === max_percent ) {
1198
  percent += percent_diff;
1199
-
1200
- if ( 0 > percent ) {
1201
- // If there is another element with max_percent might be able to correct.
1202
- // It's likely if we're getting this error that there are a lot of small tables.
1203
- percent_diff = 0 - percent;
1204
- percent = 0;
1205
- } else {
1206
- percent_diff = 0;
1207
- }
1208
  }
1209
 
1210
  $( '.progress-tables' ).append( '<div class="progress-chunk ' + value + '_chunk" style="width: ' + percent + '%;" title="' + value + '"><span>' + value + '</span></div>' );
@@ -1212,12 +1176,9 @@ var wpmdb_flush;
1212
  last_element = value;
1213
  } );
1214
 
1215
- total_percent = 0;
1216
-
1217
  // Only enumerate progress-chunk classed elements from core
1218
  $( '.progress-tables' ).not( '.media' ).find( '.progress-chunk' ).each( function( index ) {
1219
- total_percent += $( this ).width();
1220
- if ( 1 > $( this ).width() && tables_to_migrate[ index ] !== last_element ) {
1221
  $( this ).hide();
1222
  $( '.progress-chunk-hover[data-table=' + tables_to_migrate[ index ] + ']' ).hide();
1223
  table_rows[ last_element ] = Number( table_rows[ last_element ] );
@@ -1237,13 +1198,6 @@ var wpmdb_flush;
1237
  }
1238
  } );
1239
 
1240
- var percent = 0;
1241
- if ( 0 !== table_rows[ last_element ] && 100 > total_percent ) {
1242
- percent = Math.round( ( table_rows[ last_element ] / total_size ) * 100 );
1243
- }
1244
- $( '.progress-tables .progress-chunk:last' ).css( 'width', percent + '%' );
1245
- $( '.progress-chunk-hover:last' ).css( 'width', percent + '%' );
1246
-
1247
  var return_vals = [ table_rows, total_size ];
1248
 
1249
  return return_vals;
@@ -1272,8 +1226,8 @@ var wpmdb_flush;
1272
  nonce: wpmdb_data.nonces.initiate_migration
1273
  };
1274
 
1275
- if ( migration_intent !== 'savefile' ) {
1276
- request_data.temp_prefix = connection_data.temp_prefix;
1277
  }
1278
 
1279
  doing_ajax = true;
@@ -1292,15 +1246,15 @@ var wpmdb_flush;
1292
  console.log( textStatus );
1293
  console.log( errorThrown );
1294
  doing_ajax = false;
1295
- migration_error = true;
1296
- migration_complete_events();
1297
  return;
1298
  },
1299
  success: function( data ) {
1300
  doing_ajax = false;
1301
- if ( typeof data !== 'undefined' && typeof data.wpmdb_error !== 'undefined' && data.wpmdb_error === 1 ) {
1302
- migration_error = true;
1303
- migration_complete_events();
1304
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1305
  $( '.progress-text' ).addClass( 'migration-error' );
1306
  $( '.progress-text' ).html( data.body );
@@ -1319,37 +1273,34 @@ var wpmdb_flush;
1319
 
1320
  // Set delay between requests - use max of local/remote values, 0 if doing export
1321
  delay_between_requests = 0;
1322
- if ( 'savefile' !== migration_intent && 'undefined' !== typeof connection_data && 'undefined' !== typeof connection_data.delay_between_requests ) {
1323
- delay_between_requests = Math.max( parseInt( wpmdb_data.delay_between_requests ), parseInt( connection_data.delay_between_requests ) );
1324
  }
1325
 
1326
- migrate_table_recursive = function( current_row, primary_keys ) {
1327
 
1328
  if ( i >= tables_to_migrate.length ) {
1329
- if ( stage === 'backup' ) {
1330
  stage = 'migrate';
1331
  i = 0;
1332
  progress_size = 0;
1333
  overall_percent = 0;
1334
  $( '.progress-bar' ).width( '0px' );
1335
 
1336
- if ( table_intent === 'migrate_select' ) {
1337
  tables_to_migrate = $( '#select-tables' ).val();
1338
- if ( migration_intent === 'push' || migration_intent === 'savefile' ) {
1339
  table_rows = wpmdb_data.this_table_rows;
 
 
1340
  }
1341
- else {
1342
- table_rows = connection_data.table_rows;
1343
- }
1344
- }
1345
- else {
1346
- if ( migration_intent === 'push' || migration_intent === 'savefile' ) {
1347
  tables_to_migrate = wpmdb_data.this_prefixed_tables;
1348
  table_rows = wpmdb_data.this_table_rows;
1349
- }
1350
- else {
1351
- tables_to_migrate = connection_data.prefixed_tables;
1352
- table_rows = connection_data.table_rows;
1353
  }
1354
  }
1355
 
@@ -1360,25 +1311,23 @@ var wpmdb_flush;
1360
  table_rows = table_details[ 0 ];
1361
  total_size = table_details[ 1 ];
1362
 
1363
- }
1364
- else {
1365
  $( '.progress-label' ).removeClass( 'label-visible' );
1366
 
1367
- hooks = $.wpmdb.apply_filters( 'wpmdb_before_migration_complete_hooks', hooks );
1368
- hooks.push( 'migration_complete' );
1369
- hooks.push( 'wpmdb_flush' );
1370
- hooks = $.wpmdb.apply_filters( 'wpmdb_after_migration_complete_hooks', hooks );
1371
- hooks.push( 'migration_complete_events' );
1372
- next_step_in_migration = { fn: wpmdb_call_next_hook };
1373
- execute_next_step();
1374
  return;
1375
  }
1376
  }
1377
 
1378
- if ( stage === 'backup' ) {
1379
  $( '.progress-text' ).html( overall_percent + '% - ' + wpmdb_strings.backing_up + ' "' + tables_to_migrate[ i ] + '"' );
1380
- }
1381
- else {
1382
  $( '.progress-text' ).html( overall_percent + '% - ' + wpmdb_strings.migrating + ' "' + tables_to_migrate[ i ] + '"' );
1383
  }
1384
 
@@ -1388,7 +1337,7 @@ var wpmdb_flush;
1388
  }
1389
 
1390
  var gzip = 0;
1391
- if ( migration_intent !== 'savefile' && parseInt( connection_data.gzip ) === 1 ) {
1392
  gzip = 1;
1393
  }
1394
 
@@ -1404,14 +1353,14 @@ var wpmdb_flush;
1404
  nonce: wpmdb_data.nonces.migrate_table
1405
  };
1406
 
1407
- if ( migration_intent !== 'savefile' ) {
1408
- request_data.bottleneck = connection_data.bottleneck;
1409
- request_data.prefix = connection_data.prefix;
1410
  }
1411
 
1412
- if ( connection_data && connection_data.path_current_site && connection_data.domain ) {
1413
- request_data.path_current_site = connection_data.path_current_site;
1414
- request_data.domain_current_site = connection_data.domain;
1415
  }
1416
 
1417
  doing_ajax = true;
@@ -1432,8 +1381,8 @@ var wpmdb_flush;
1432
  console.log( jqXHR );
1433
  console.log( textStatus );
1434
  console.log( errorThrown );
1435
- migration_error = true;
1436
- migration_complete_events();
1437
  return;
1438
  },
1439
  success: function( data ) {
@@ -1444,36 +1393,35 @@ var wpmdb_flush;
1444
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1445
  if ( '' === data || null === data ) {
1446
  $( '.progress-text' ).html( wpmdb_strings.table_process_problem_empty_response + ' ' + tables_to_migrate[ i ] );
1447
- }
1448
- else {
1449
  $( '.progress-text' ).html( getAjaxErrors( data, null, null ) );
1450
  }
1451
  $( '.progress-text' ).addClass( 'migration-error' );
1452
- migration_error = true;
1453
- migration_complete_events();
1454
  return;
1455
  }
1456
 
1457
- if ( typeof row_information.wpmdb_error !== 'undefined' && row_information.wpmdb_error === 1 ) {
1458
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1459
  $( '.progress-text' ).addClass( 'migration-error' );
1460
  $( '.progress-text' ).html( row_information.body );
1461
- migration_error = true;
1462
- migration_complete_events();
1463
  return;
1464
  }
1465
 
1466
  // We need the returned file name for delivery or display to the user.
1467
  if ( 1 === last_table && 'savefile' === migration_intent ) {
1468
- if ( typeof row_information.dump_filename !== 'undefined' ) {
1469
  dump_filename = row_information.dump_filename;
1470
  }
1471
- if ( typeof row_information.dump_path !== 'undefined' ) {
1472
  dump_path = row_information.dump_path;
1473
  }
1474
  }
1475
 
1476
- if ( row_information.current_row === -1 || row_information.current_row === '-1' ) {
1477
  progress_size -= overall_table_progress;
1478
  overall_table_progress = 0;
1479
  last_progress = 0;
@@ -1481,8 +1429,7 @@ var wpmdb_flush;
1481
  i++;
1482
  row_information.current_row = '';
1483
  row_information.primary_keys = '';
1484
- }
1485
- else {
1486
  temp_progress = parseInt( row_information.current_row );
1487
  table_progress = temp_progress - last_progress;
1488
  last_progress = temp_progress;
@@ -1491,18 +1438,21 @@ var wpmdb_flush;
1491
  }
1492
  overall_percent = Math.floor( ( progress_size / total_size ) * 100 );
1493
  $( '.progress-bar' ).width( overall_percent + '%' );
1494
- next_step_in_migration = {
1495
- fn: migrate_table_recursive,
1496
  args: [ row_information.current_row, row_information.primary_keys ]
1497
  };
1498
- execute_next_step();
1499
  }
1500
  } );
1501
 
1502
  };
1503
 
1504
- next_step_in_migration = { fn: migrate_table_recursive, args: [ '-1', '' ] };
1505
- execute_next_step();
 
 
 
1506
 
1507
  }
1508
 
@@ -1510,16 +1460,15 @@ var wpmdb_flush;
1510
 
1511
  } );
1512
 
1513
- migration_complete_events = function() {
1514
- if ( false === migration_error ) {
1515
- if ( non_fatal_errors === '' ) {
1516
  if ( 'savefile' !== migration_intent && true === $( '#save_computer' ).is( ':checked' ) ) {
1517
  $( '.progress-text' ).css( 'visibility', 'hidden' );
1518
  }
1519
  $( '.progress-title' ).html( completed_msg ).append( '<div class="dashicons dashicons-yes"></div>' );
1520
- }
1521
- else {
1522
- $( '.progress-text' ).html( non_fatal_errors );
1523
  $( '.progress-text' ).addClass( 'migration-error' );
1524
  $( '.progress-title' ).html( wpmdb_strings.completed_with_some_errors );
1525
  }
@@ -1530,15 +1479,15 @@ var wpmdb_flush;
1530
  $( '.migration-controls' ).hide();
1531
 
1532
  // reset migration variables so consecutive migrations work correctly
1533
- hooks = [];
1534
- call_stack = [];
1535
- migration_error = false;
1536
  currently_migrating = false;
1537
  migration_completed = true;
1538
  migration_paused = false;
1539
  migration_cancelled = false;
1540
  doing_ajax = false;
1541
- non_fatal_errors = '';
1542
 
1543
  $( '.progress-label' ).remove();
1544
  $( '.migration-progress-ajax-spinner' ).remove();
@@ -1547,9 +1496,9 @@ var wpmdb_flush;
1547
  clearInterval( elapsed_interval );
1548
  };
1549
 
1550
- migration_complete = function() {
1551
  $( '.migration-controls' ).fadeOut();
1552
- if ( migration_intent === 'savefile' ) {
1553
  currently_migrating = false;
1554
  var migrate_complete_text = wpmdb_strings.migration_complete;
1555
  if ( $( '#save_computer' ).is( ':checked' ) ) {
@@ -1558,19 +1507,17 @@ var wpmdb_flush;
1558
  url += '&gzip=1';
1559
  }
1560
  window.location = url;
1561
- }
1562
- else {
1563
  migrate_complete_text = wpmdb_strings.completed_dump_located_at + ' ' + dump_path;
1564
  }
1565
 
1566
- if ( migration_error === false ) {
1567
  $( '.progress-text' ).html( migrate_complete_text );
1568
- migration_complete_events();
1569
  $( '.progress-title' ).html( completed_msg );
1570
  }
1571
 
1572
- }
1573
- else { // rename temp tables, delete old tables
1574
  $( '.progress-text' ).html( wpmdb_strings.finalizing_migration );
1575
  doing_ajax = true;
1576
  $.ajax( {
@@ -1581,7 +1528,7 @@ var wpmdb_flush;
1581
  data: {
1582
  action: 'wpmdb_finalize_migration',
1583
  migration_state_id: migration_state_id,
1584
- prefix: connection_data.prefix,
1585
  tables: tables_to_migrate.join( ',' ),
1586
  nonce: wpmdb_data.nonces.finalize_migration
1587
  },
@@ -1591,8 +1538,8 @@ var wpmdb_flush;
1591
  $( '.progress-text' ).html( wpmdb_strings.finalize_tables_problem );
1592
  $( '.progress-text' ).addClass( 'migration-error' );
1593
  alert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );
1594
- migration_error = true;
1595
- migration_complete_events();
1596
  return;
1597
  },
1598
  success: function( data ) {
@@ -1601,19 +1548,19 @@ var wpmdb_flush;
1601
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1602
  $( '.progress-text' ).html( data );
1603
  $( '.progress-text' ).addClass( 'migration-error' );
1604
- migration_error = true;
1605
- migration_complete_events();
1606
  return;
1607
  }
1608
- next_step_in_migration = { fn: wpmdb_call_next_hook };
1609
- execute_next_step();
1610
  }
1611
  } );
1612
  }
1613
  };
1614
 
1615
- wpmdb_flush = function() {
1616
- if ( migration_intent !== 'savefile' ) {
1617
  $( '.progress-text' ).html( wpmdb_strings.flushing );
1618
  doing_ajax = true;
1619
  $.ajax( {
@@ -1632,8 +1579,8 @@ var wpmdb_flush;
1632
  $( '.progress-text' ).html( wpmdb_strings.flush_problem );
1633
  $( '.progress-text' ).addClass( 'migration-error' );
1634
  alert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );
1635
- migration_error = true;
1636
- migration_complete_events();
1637
  return;
1638
  },
1639
  success: function( data ) {
@@ -1642,12 +1589,12 @@ var wpmdb_flush;
1642
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1643
  $( '.progress-text' ).html( data );
1644
  $( '.progress-text' ).addClass( 'migration-error' );
1645
- migration_error = true;
1646
- migration_complete_events();
1647
  return;
1648
  }
1649
- next_step_in_migration = { fn: wpmdb_call_next_hook };
1650
- execute_next_step();
1651
  }
1652
  } );
1653
  }
@@ -1659,7 +1606,7 @@ var wpmdb_flush;
1659
  } );
1660
 
1661
  $( 'body' ).on( 'click', '#overlay', function() {
1662
- if ( migration_completed === true ) {
1663
  hide_overlay();
1664
  }
1665
  } );
@@ -1676,7 +1623,7 @@ var wpmdb_flush;
1676
  // AJAX save button profile
1677
  $( '.save-settings-button' ).click( function( event ) {
1678
  event.preventDefault();
1679
- if ( $.trim( $( '.create-new-profile' ).val() ) === '' && $( '#create_new' ).is( ':checked' ) ) {
1680
  alert( wpmdb_strings.enter_name_for_profile );
1681
  $( '.create-new-profile' ).focus();
1682
  return;
@@ -1688,13 +1635,12 @@ var wpmdb_flush;
1688
  var profile;
1689
  $( '.save-settings-button' ).blur();
1690
 
1691
-
1692
  if ( doing_save_profile ) {
1693
  return;
1694
  }
1695
 
1696
  // check that they've selected some tables to migrate
1697
- if ( $( '#migrate-selected' ).is( ':checked' ) && $( '#select-tables' ).val() === null ) {
1698
  alert( wpmdb_strings.please_select_one_table );
1699
  return;
1700
  }
@@ -1751,13 +1697,14 @@ var wpmdb_flush;
1751
  var new_profile_key = parseInt( data, 10 );
1752
  var new_profile_id = new_profile_key + 1;
1753
  var new_li = $( '<li><span class="delete-profile" data-profile-id="' + new_profile_id + '"></span><label for="profile-' + new_profile_id + '"><input id="profile-' + new_profile_id + '" value="' + new_profile_key + '" name="save_migration_profile_option" type="radio"></label></li>' );
1754
- new_li.find( "label" ).append( document.createTextNode( " " + profile_name ) );
1755
  updated_profile_id = new_profile_id;
1756
 
1757
  $( '#create_new' ).parents( 'li' ).before( new_li );
1758
  $( '#profile-' + new_profile_id ).attr( 'checked', 'checked' );
1759
  }
1760
- // push updated profile id to history if available
 
1761
  var updatedURL = window.location.href.replace( '#migrate', '' ).replace( /&wpmdb-profile=-?\d+/, '' ) + '&wpmdb-profile=' + updated_profile_id;
1762
  var updated_profile_name = $( '#migrate-form input[name=save_migration_profile_option]:checked' ).parent().text().trim();
1763
 
@@ -1766,7 +1713,7 @@ var wpmdb_flush;
1766
  $( '#migrate-form .crumbs .crumb:last' ).text( updated_profile_name );
1767
  } else {
1768
  var $crumbs = $( '<div class="crumbs" />' )
1769
- .append( '<a class="crumb" href="tools.php?page=wp-migrate-db-pro"> Saved Profiles </a>' )
1770
  .append( '<span class="crumb">' + updated_profile_name + '</span>' );
1771
  $( '#migrate-form' ).prepend( $crumbs );
1772
  }
@@ -1788,10 +1735,9 @@ var wpmdb_flush;
1788
 
1789
  // show / hide progress lavel on hover
1790
  $( 'body' ).on( 'mouseenter mouseleave', '.progress-chunk-hover', function( event ) {
1791
- if ( event.type === 'mouseenter' ) {
1792
  $( '.progress-label' ).addClass( 'label-visible' );
1793
- }
1794
- else {
1795
  $( '.progress-label' ).removeClass( 'label-visible' );
1796
  }
1797
  } );
@@ -1810,33 +1756,33 @@ var wpmdb_flush;
1810
  $( '#create-backup-label' ).removeClass( 'disabled' );
1811
  $( '.backup-option-disabled' ).hide();
1812
  $( '.compatibility-older-mysql' ).hide();
1813
- var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( "\n" );
1814
  var profile_name;
1815
  wpmdb_toggle_migration_action_text();
1816
  if ( 'pull' === wpmdb_migration_type() ) {
1817
  $( '.pull-list li' ).append( $connection_info_box );
1818
  $connection_info_box.show( function() {
1819
  var connection_textarea = $( this ).find( '.pull-push-connection-info' );
1820
- if ( ! connection_textarea.val() ) {
1821
  connection_textarea.focus();
1822
  }
1823
  } );
1824
  if ( connection_established ) {
1825
  $( '.connection-status' ).hide();
1826
  $( '.step-two' ).show();
1827
- $( '.table-prefix' ).html( connection_data.prefix );
1828
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
1829
- if ( profile_name_edited === false ) {
1830
- profile_name = get_domain_name( connection_data.url );
1831
  $( '.create-new-profile' ).val( profile_name );
1832
  }
1833
- if ( show_prefix_notice === true ) {
1834
  $( '.prefix-notice.pull' ).show();
1835
  }
1836
- if ( show_ssl_notice === true ) {
1837
  $( '.ssl-notice' ).show();
1838
  }
1839
- if ( show_version_notice === true ) {
1840
  $( '.different-plugin-version-notice' ).show();
1841
  $( '.step-two' ).hide();
1842
  }
@@ -1848,17 +1794,15 @@ var wpmdb_flush;
1848
  $( '.backup-option-disabled' ).show();
1849
  $( '.upload-directory-location' ).html( wpmdb_data.this_upload_dir_long );
1850
  }
1851
- }
1852
- else {
1853
  $( '.connection-status' ).show();
1854
  $( '.step-two' ).hide();
1855
  }
1856
- }
1857
- else if ( 'push' === wpmdb_migration_type() ) {
1858
  $( '.push-list li' ).append( $connection_info_box );
1859
  $connection_info_box.show( function() {
1860
  var connection_textarea = $( this ).find( '.pull-push-connection-info' );
1861
- if ( ! connection_textarea.val() ) {
1862
  connection_textarea.focus();
1863
  }
1864
  } );
@@ -1866,41 +1810,39 @@ var wpmdb_flush;
1866
  $( '.connection-status' ).hide();
1867
  $( '.step-two' ).show();
1868
  $( '.table-prefix' ).html( wpmdb_data.this_prefix );
1869
- $( '.uploads-dir' ).html( connection_data.uploads_dir );
1870
- if ( profile_name_edited === false ) {
1871
- profile_name = get_domain_name( connection_data.url );
1872
  $( '.create-new-profile' ).val( profile_name );
1873
  }
1874
- if ( show_prefix_notice === true ) {
1875
  $( '.prefix-notice.push' ).show();
1876
  }
1877
- if ( show_ssl_notice === true ) {
1878
  $( '.ssl-notice' ).show();
1879
  }
1880
- if ( show_version_notice === true ) {
1881
  $( '.different-plugin-version-notice' ).show();
1882
  $( '.step-two' ).hide();
1883
  }
1884
  wpmdb_toggle_migration_action_text();
1885
- if ( '0' === connection_data.write_permissions ) {
1886
  $( '#create-backup' ).prop( 'checked', false );
1887
  $( '#create-backup' ).attr( 'disabled', 'disabled' );
1888
  $( '#create-backup-label' ).addClass( 'disabled' );
1889
  $( '.backup-option-disabled' ).show();
1890
- $( '.upload-directory-location' ).html( connection_data.upload_dir_long );
1891
  }
1892
- }
1893
- else {
1894
  $( '.connection-status' ).show();
1895
  $( '.step-two' ).hide();
1896
  }
1897
- }
1898
- else if ( 'savefile' === wpmdb_migration_type() ) {
1899
  $( '.connection-status' ).hide();
1900
  $( '.step-two' ).show();
1901
  $( '.table-prefix' ).html( wpmdb_data.this_prefix );
1902
  $( '.compatibility-older-mysql' ).show();
1903
- if ( profile_name_edited === false ) {
1904
  $( '.create-new-profile' ).val( '' );
1905
  }
1906
  $( '.backup-options' ).hide();
@@ -1929,6 +1871,13 @@ var wpmdb_flush;
1929
  } );
1930
 
1931
  function change_replace_values() {
 
 
 
 
 
 
 
1932
  if ( 'push' === wpmdb_migration_type() || 'savefile' === wpmdb_migration_type() ) {
1933
  if ( 'pull' === last_replace_switch ) {
1934
  $( '.replace-row' ).each( function() {
@@ -1936,20 +1885,39 @@ var wpmdb_flush;
1936
  $( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );
1937
  $( '.replace-right-col input', this ).val( old_val );
1938
  } );
 
 
 
 
 
 
 
 
 
 
1939
  }
1940
  $.wpmdb.do_action( 'wpmdb_update_push_table_select' );
1941
  $( '#select-post-types' ).remove();
1942
  $( '.select-post-types-wrap' ).prepend( $push_post_type_select );
1943
  $( '#select-backup' ).remove();
1944
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
1945
- }
1946
- else if ( 'pull' === wpmdb_migration_type() ) {
1947
  if ( '' === last_replace_switch || 'push' === last_replace_switch || 'savefile' === last_replace_switch ) {
1948
  $( '.replace-row' ).each( function() {
1949
  var old_val = $( '.old-replace-col input', this ).val();
1950
  $( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );
1951
  $( '.replace-right-col input', this ).val( old_val );
1952
  } );
 
 
 
 
 
 
 
 
 
 
1953
  }
1954
  $.wpmdb.do_action( 'wpmdb_update_pull_table_select' );
1955
  $( '#select-post-types' ).remove();
@@ -1961,7 +1929,7 @@ var wpmdb_flush;
1961
  }
1962
 
1963
  // hide second section if pull or push is selected with no connection established
1964
- if ( ( 'pull' === wpmdb_migration_type() || 'push' === wpmdb_migration_type() ) && ! connection_established ) {
1965
  $( '.step-two' ).hide();
1966
  $( '.connection-status' ).show();
1967
  }
@@ -1978,13 +1946,13 @@ var wpmdb_flush;
1978
  var position = icon.position();
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
 
@@ -2026,13 +1994,13 @@ var wpmdb_flush;
2026
  switch_to_plugin_tab( hash, false );
2027
  } );
2028
 
2029
- $( 'body' ).on( 'click', "a[href^='#']", function( event ) {
2030
  var href = $( event.target ).attr( 'href' );
2031
  var tab_name = href.substr( 1 );
2032
 
2033
  if ( tab_name ) {
2034
  var nav_tab = $( '.' + tab_name );
2035
- if ( nav_tab.length === 1 ) {
2036
  nav_tab.trigger( 'click' );
2037
  event.preventDefault();
2038
  }
@@ -2047,7 +2015,7 @@ var wpmdb_flush;
2047
  // repeatable fields
2048
  $( 'body' ).on( 'click', '.replace-remove-row', function() {
2049
  $( this ).parents( 'tr' ).remove();
2050
- if ( $( '.replace-row' ).length < 2 ) {
2051
  $( '.no-replaces-message' ).show();
2052
  }
2053
 
@@ -2116,7 +2084,7 @@ var wpmdb_flush;
2116
  }
2117
  }
2118
 
2119
- if ( hash === 'help' ) {
2120
  refresh_debug_log();
2121
  if ( false === checked_licence && '1' === wpmdb_data.has_licence ) {
2122
  $( '.support-content p' ).append( ajax_spinner );
@@ -2124,7 +2092,7 @@ var wpmdb_flush;
2124
  }
2125
  }
2126
 
2127
- if ( hash === 'addons' && true !== skip_addons_check ) {
2128
  if ( false === checked_licence && '1' === wpmdb_data.has_licence ) {
2129
  $( '.addons-content p' ).append( ajax_spinner );
2130
  check_licence();
@@ -2140,7 +2108,7 @@ var wpmdb_flush;
2140
  switch_to_plugin_tab( hash, false );
2141
  }
2142
 
2143
- if ( get_query_var( 'install-plugin' ) !== '' ) {
2144
  hash = 'addons';
2145
  checked_licence = true;
2146
  switch_to_plugin_tab( hash, true );
@@ -2169,7 +2137,7 @@ var wpmdb_flush;
2169
  $( '.reset-api-key' ).click( function() {
2170
  var answer = confirm( wpmdb_strings.reset_api_key );
2171
 
2172
- if ( ! answer || doing_reset_api_key_ajax ) {
2173
  return;
2174
  }
2175
 
@@ -2194,7 +2162,7 @@ var wpmdb_flush;
2194
  $( '.reset-api-key-ajax-spinner' ).remove();
2195
  doing_reset_api_key_ajax = false;
2196
  $( '.connection-info' ).html( data );
2197
- wpmdb_data.connection_info = $.trim( data ).split( "\n" );
2198
  }
2199
  } );
2200
 
@@ -2215,7 +2183,7 @@ var wpmdb_flush;
2215
 
2216
  $( 'input[name=backup_option]' ).change( function() {
2217
  $( '.backup-tables-wrap' ).hide();
2218
- if ( $( this ).val() === 'backup_manual_select' ) {
2219
  $( '.backup-tables-wrap' ).show();
2220
  }
2221
  } );
@@ -2272,7 +2240,7 @@ var wpmdb_flush;
2272
  name = $.trim( $( name ).html() );
2273
  var answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );
2274
 
2275
- if ( ! answer ) {
2276
  return;
2277
  }
2278
  var $profile_li = $( this ).parent();
@@ -2305,7 +2273,7 @@ var wpmdb_flush;
2305
  alert( wpmdb_strings.remove_profile_problem );
2306
  },
2307
  success: function( data ) {
2308
- if ( data === '-1' ) {
2309
  alert( wpmdb_strings.remove_profile_not_found );
2310
  }
2311
  }
@@ -2318,7 +2286,7 @@ var wpmdb_flush;
2318
  var name = $( this ).prev().html();
2319
  var answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );
2320
 
2321
- if ( ! answer ) {
2322
  return;
2323
  }
2324
 
@@ -2345,10 +2313,9 @@ var wpmdb_flush;
2345
  $( 'body' ).on( 'click', '.temp-disabled', function() {
2346
  var answer = confirm( wpmdb_strings.change_connection_info );
2347
 
2348
- if ( ! answer ) {
2349
  return;
2350
- }
2351
- else {
2352
  $( '.ssl-notice' ).hide();
2353
  $( '.different-plugin-version-notice' ).hide();
2354
  $( '.migrate-db-button' ).show();
@@ -2424,9 +2391,9 @@ var wpmdb_flush;
2424
  } );
2425
 
2426
  $( 'body' ).on( 'click', '.try-http', function() {
2427
- var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( "\n" );
2428
  var new_url = connection_info[ 0 ].replace( 'https', 'http' );
2429
- var new_contents = new_url + "\n" + connection_info[ 1 ];
2430
  $( '.pull-push-connection-info' ).val( new_contents );
2431
  connection_box_changed();
2432
  } );
@@ -2453,36 +2420,36 @@ var wpmdb_flush;
2453
 
2454
  data = $( '.pull-push-connection-info' ).val();
2455
 
2456
- var connection_info = $.trim( data ).split( "\n" );
2457
  var error = false;
2458
  var error_message = '';
2459
 
2460
- if ( connection_info === '' ) {
2461
  error = true;
2462
  error_message = wpmdb_strings.connection_info_missing;
2463
  }
2464
 
2465
- if ( connection_info.length !== 2 && ! error ) {
2466
  error = true;
2467
  error_message = wpmdb_strings.connection_info_incorrect;
2468
  }
2469
 
2470
- if ( ! error && ! validate_url( connection_info[ 0 ] ) ) {
2471
  error = true;
2472
  error_message = wpmdb_strings.connection_info_url_invalid;
2473
  }
2474
 
2475
- if ( ! error && connection_info[ 1 ].length < 32 ) {
2476
  error = true;
2477
  error_message = wpmdb_strings.connection_info_key_invalid;
2478
  }
2479
 
2480
- if ( ! error && connection_info[ 0 ] === wpmdb_data.connection_info[ 0 ] ) {
2481
  error = true;
2482
  error_message = wpmdb_strings.connection_info_local_url;
2483
  }
2484
 
2485
- if ( ! error && connection_info[ 1 ] === wpmdb_data.connection_info[ 1 ] ) {
2486
  error = true;
2487
  error_message = wpmdb_strings.connection_info_local_key;
2488
  }
@@ -2493,11 +2460,11 @@ var wpmdb_flush;
2493
  return;
2494
  }
2495
 
2496
- var new_connection_info_contents = connection_info[ 0 ] + "\n" + connection_info[ 1 ];
2497
 
2498
  if ( false === wpmdb_data.openssl_available ) {
2499
  connection_info[ 0 ] = connection_info[ 0 ].replace( 'https://', 'http://' );
2500
- new_connection_info_contents = connection_info[ 0 ] + "\n" + connection_info[ 1 ];
2501
  $( '.pull-push-connection-info' ).val( new_connection_info_contents );
2502
  }
2503
 
@@ -2508,7 +2475,7 @@ var wpmdb_flush;
2508
  if ( $( '.basic-access-auth-wrapper' ).is( ':visible' ) ) {
2509
  connection_info[ 0 ] = connection_info[ 0 ].replace( /\/\/(.*)@/, '//' );
2510
  connection_info[ 0 ] = connection_info[ 0 ].replace( '//', '//' + encodeURIComponent( $.trim( $( '.auth-username' ).val() ) ) + ':' + encodeURIComponent( $.trim( $( '.auth-password' ).val() ) ) + '@' );
2511
- new_connection_info_contents = connection_info[ 0 ] + "\n" + connection_info[ 1 ];
2512
  $( '.pull-push-connection-info' ).val( new_connection_info_contents );
2513
  $( '.basic-access-auth-wrapper' ).hide();
2514
  }
@@ -2551,7 +2518,7 @@ var wpmdb_flush;
2551
  enable_export_type_controls();
2552
  maybe_show_ssl_warning( connection_info[ 0 ], connection_info[ 1 ], data.scheme );
2553
 
2554
- if ( typeof data.wpmdb_error !== 'undefined' && data.wpmdb_error === 1 ) {
2555
  $( '.connection-status' ).html( data.body );
2556
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
2557
 
@@ -2575,7 +2542,8 @@ var wpmdb_flush;
2575
  maybe_show_prefix_notice( data.prefix );
2576
 
2577
  connection_established = true;
2578
- connection_data = data;
 
2579
  move_connection_info_box();
2580
  change_replace_values();
2581
 
@@ -2597,7 +2565,7 @@ var wpmdb_flush;
2597
  class: 'multiselect'
2598
  } );
2599
 
2600
- $.each( connection_data.post_types, function( index, value ) {
2601
  $( $post_type_select ).append( '<option value="' + value + '">' + value + '</option>' );
2602
  } );
2603
 
@@ -2619,8 +2587,7 @@ var wpmdb_flush;
2619
  $( '.select-post-types-wrap' ).prepend( $pull_post_type_select );
2620
  $( '.table-prefix' ).html( data.prefix );
2621
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
2622
- }
2623
- else {
2624
  $( '#new-url' ).val( remove_protocol( data.url ) );
2625
  $( '#new-path' ).val( data.path );
2626
  if ( 'true' === wpmdb_data.is_multisite ) {
@@ -2631,11 +2598,11 @@ var wpmdb_flush;
2631
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
2632
  }
2633
 
2634
- next_step_in_migration = {
2635
  fn: $.wpmdb.do_action,
2636
- args: [ 'verify_connection_to_remote_site', connection_data ]
2637
  };
2638
- execute_next_step();
2639
  }
2640
 
2641
  } );
@@ -2656,7 +2623,7 @@ var wpmdb_flush;
2656
 
2657
  if ( true === migration_paused ) {
2658
  migration_paused = false;
2659
- execute_next_step();
2660
  }
2661
  }
2662
 
@@ -2669,13 +2636,13 @@ var wpmdb_flush;
2669
  $( '.licence-input' ).focus();
2670
  } );
2671
 
2672
- execute_next_step = function() {
2673
 
2674
  // if delay is set, set a timeout for delay to recall this function, then return
2675
  if ( 0 < delay_between_requests && false === flag_skip_delay ) {
2676
  setTimeout( function() {
2677
  flag_skip_delay = true;
2678
- execute_next_step();
2679
  }, delay_between_requests );
2680
  return;
2681
  } else {
@@ -2684,9 +2651,11 @@ var wpmdb_flush;
2684
 
2685
  if ( true === migration_paused ) {
2686
  $( '.migration-progress-ajax-spinner' ).hide();
2687
- // pause the timer
 
2688
  clearInterval( elapsed_interval );
2689
  $( '.progress-text' ).html( wpmdb_strings.paused );
 
2690
  // Re-bind Pause/Resume button to Resume when we are finally Paused
2691
  $( 'body' ).on( 'click', '.pause-resume', function( event ) {
2692
  set_pause_resume_button( event );
@@ -2696,28 +2665,23 @@ var wpmdb_flush;
2696
  } );
2697
  $( '.pause-resume' ).html( wpmdb_strings.resume );
2698
  return;
2699
- }
2700
- else if ( true === migration_cancelled ) {
2701
  migration_intent = wpmdb_migration_type();
2702
 
2703
  var progress_msg;
2704
 
2705
  if ( 'savefile' === migration_intent ) {
2706
  progress_msg = wpmdb_strings.removing_local_sql;
2707
- }
2708
- else if ( 'pull' === migration_intent ) {
2709
  if ( 'backup' === stage ) {
2710
  progress_msg = wpmdb_strings.removing_local_backup;
2711
- }
2712
- else {
2713
  progress_msg = wpmdb_strings.removing_local_temp_tables;
2714
  }
2715
- }
2716
- else if ( 'push' === migration_intent ) {
2717
  if ( 'backup' === stage ) {
2718
  progress_msg = wpmdb_strings.removing_remote_sql;
2719
- }
2720
- else {
2721
  progress_msg = wpmdb_strings.removing_remote_temp_tables;
2722
  }
2723
  }
@@ -2745,8 +2709,8 @@ var wpmdb_flush;
2745
  console.log( textStatus );
2746
  console.log( errorThrown );
2747
  doing_ajax = false;
2748
- migration_error = true;
2749
- migration_complete_events();
2750
  return;
2751
  },
2752
  success: function( data ) {
@@ -2756,18 +2720,17 @@ var wpmdb_flush;
2756
  $( '.progress-title' ).html( wpmdb_strings.migration_cancellation_failed );
2757
  $( '.progress-text' ).html( data );
2758
  $( '.progress-text' ).addClass( 'migration-error' );
2759
- migration_error = true;
2760
- migration_complete_events();
2761
  return;
2762
  }
2763
  completed_msg = wpmdb_strings.migration_cancelled;
2764
  $( '.progress-text' ).hide();
2765
- migration_complete_events();
2766
  }
2767
  } );
2768
- }
2769
- else {
2770
- next_step_in_migration.fn.apply( null, next_step_in_migration.args );
2771
  }
2772
  };
2773
 
@@ -2776,7 +2739,7 @@ var wpmdb_flush;
2776
  $( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );
2777
  $( '.connection-status' ).append( ajax_spinner );
2778
 
2779
- var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( "\n" );
2780
 
2781
  doing_ajax = true;
2782
  disable_export_type_controls();
@@ -2804,7 +2767,7 @@ var wpmdb_flush;
2804
  doing_ajax = false;
2805
  enable_export_type_controls();
2806
 
2807
- if ( typeof data.wpmdb_error !== 'undefined' && data.wpmdb_error === 1 ) {
2808
  $( '.connection-status' ).html( data.body );
2809
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
2810
 
@@ -2844,12 +2807,12 @@ var wpmdb_flush;
2844
  $( '.ajax-spinner' ).remove();
2845
  doing_ajax = false;
2846
 
2847
- if ( typeof data.wpmdb_error !== 'undefined' && data.wpmdb_error === 1 ) {
2848
  $( '.invalid-licence' ).html( data.body );
2849
  return;
2850
  }
2851
 
2852
- if ( typeof data.wpmdb_dbrains_api_down !== 'undefined' && data.wpmdb_dbrains_api_down === 1 ) {
2853
  $( '.invalid-licence' ).html( wpmdb_strings.temporarily_activated_licence );
2854
  $( '.invalid-licence' ).append( data.body );
2855
  return;
@@ -2871,4 +2834,4 @@ var wpmdb_flush;
2871
  } );
2872
  } );
2873
 
2874
- })( jQuery );
1
+ (function( $, wpmdb ) {
 
 
 
 
 
 
 
2
 
3
  var migration_state_id = '';
4
  var connection_established = false;
39
 
40
  var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ), spinner_url = admin_url + '/images/spinner';
41
 
42
+ if ( 2 < window.devicePixelRatio ) {
43
  spinner_url += '-2x';
44
  }
45
  spinner_url += '.gif';
67
 
68
  function is_int( n ) {
69
  n = parseInt( n );
70
+ return 'number' === typeof n && 0 === n % 1;
71
  }
72
 
73
  function setup_counter() {
107
  }
108
 
109
  function get_query_var( name ) {
110
+ name = name.replace( /[\[]/, '\\[' ).replace( /[\]]/, '\\]' );
111
+ var regex = new RegExp( '[\\?&]' + name + '=([^&#]*)' ),
112
  results = regex.exec( location.search );
113
+ return null === results ? '' : decodeURIComponent( results[ 1 ].replace( /\+/g, ' ' ) );
114
  }
115
 
116
  function maybe_show_ssl_warning( url, key, remote_scheme ) {
119
  $( '.ssl-notice' ).show();
120
  show_ssl_notice = true;
121
  url = url.replace( 'https', 'http' );
122
+ $( '.pull-push-connection-info' ).val( url + '\n' + key );
123
  return;
124
  }
125
  show_ssl_notice = false;
132
  show_prefix_notice = true;
133
  if ( 'pull' === wpmdb_migration_type() ) {
134
  $( '.prefix-notice.pull' ).show();
135
+ } else {
 
136
  $( '.prefix-notice.push' ).show();
137
  }
138
  }
139
  }
140
 
141
  function maybe_show_mixed_cased_table_name_warning() {
142
+ if ( 'undefined' === typeof wpmdb.common.connection_data || false === wpmdb.common.connection_data ) {
143
  return;
144
  }
145
 
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
 
174
  * Do not display the warning if the remote lower_case_table_names does not equal "1" (i.e the only problematic setting)
175
  * Applies to push/export migrations.
176
  */
177
+ if ( '1' !== wpmdb.common.connection_data.lower_case_table_names && ( 'push' === migration_intent || 'savefile' === migration_intent ) ) {
178
  return;
179
  }
180
 
209
  function get_migration_status_label( url, intent, stage ) {
210
  var domain = get_domain_name( url );
211
  var migrating_stage_label, completed_stage_label;
212
+ if ( 'pull' === intent ) {
213
  migrating_stage_label = wpmdb_strings.pull_migration_label_migrating;
214
  completed_stage_label = wpmdb_strings.pull_migration_label_completed;
215
  } else {
228
  }
229
 
230
  function remove_protocol( url ) {
231
+ return url.replace( /^https?:/i, '' );
232
  }
233
 
234
  function disable_export_type_controls() {
258
  $( '.progress-text' ).html( previous_progress_text );
259
  $( '.migration-progress-ajax-spinner' ).show();
260
  $( '.pause-resume' ).html( wpmdb_strings.pause );
261
+
262
+ // Resume the timer
263
  elapsed_interval = setInterval( count, 1000 );
264
+ wpmdb.functions.execute_next_step();
265
  } else {
266
  migration_paused = true;
267
  doing_ajax = false;
307
  if ( $( this ).is( ':checked' ) ) {
308
  var answer = confirm( wpmdb_strings.mu_plugin_confirmation );
309
 
310
+ if ( !answer ) {
311
  $( this ).prop( 'checked', false );
312
  return;
313
  }
314
+ } else {
 
315
  install = '0';
316
  }
317
 
339
  success: function( data ) {
340
  if ( '' !== $.trim( data ) ) {
341
  alert( data );
342
+ } else {
 
343
  $( '.plugin-compatibility' ).append( '<span class="ajax-success-msg">' + wpmdb_strings.saved + '</span>' );
344
  $( '.ajax-success-msg' ).fadeOut( 2000, function() {
345
  $( this ).remove();
357
  $( '.plugin-compatibility-wrap' ).show();
358
  }
359
 
360
+ if ( 0 <= navigator.userAgent.indexOf( 'MSIE' ) || 0 <= navigator.userAgent.indexOf( 'Trident' ) ) {
361
  $( '.ie-warning' ).show();
362
  }
363
 
364
  if ( 0 === wpmdb_data.valid_licence ) {
365
+ $( '#savefile' ).prop( 'checked', true );
366
  }
367
  var max_request_size_container = $( '.max-request-size' );
368
  var max_request_size_slider = $( '.slider', max_request_size_container );
516
  if ( 'undefined' !== typeof data.dbrains_api_down ) {
517
  support_msg = data.dbrains_api_down + data.message;
518
  addons_msg = data.dbrains_api_down;
519
+ } else if ( 'undefined' !== typeof data.errors ) {
 
520
 
521
  if ( 'undefined' !== typeof data.errors.subscription_expired ) {
522
  licence_msg = data.errors.subscription_expired.licence;
531
  addons_msg = msg;
532
  }
533
  if ( 'undefined' !== typeof data.addon_content ) {
534
+ addons_msg += '\n' + data.addon_content;
535
  }
536
+ } else {
 
537
  support_msg = data.message;
538
  addons_msg = data.addon_content;
539
  }
574
  check_licence( null, 'all' );
575
  } );
576
  function refresh_table_selects() {
577
+ if ( undefined !== wpmdb_data && undefined !== wpmdb_data.this_tables && undefined !== wpmdb_data.this_table_sizes_hr ) {
578
+ $push_select = create_table_select( wpmdb_data.this_tables, wpmdb_data.this_table_sizes_hr, $( $push_select ).val() );
579
  }
580
 
581
+ if ( undefined !== wpmdb.common.connection_data && undefined !== wpmdb.common.connection_data.tables && undefined !== wpmdb.common.connection_data.table_sizes_hr ) {
582
+ $pull_select = create_table_select( wpmdb.common.connection_data.tables, wpmdb.common.connection_data.table_sizes_hr, $( $pull_select ).val() );
583
  }
584
  }
585
 
630
 
631
  function establish_remote_connection_from_saved_profile() {
632
  var action = wpmdb_migration_type();
633
+ var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
634
+ if ( 'undefined' === typeof wpmdb_default_profile || true === wpmdb_default_profile || 'savefile' === action || doing_ajax || !wpmdb_data.is_pro ) {
635
  return;
636
  }
637
 
670
  doing_ajax = false;
671
  enable_export_type_controls();
672
 
673
+ if ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {
674
  $( '.connection-status' ).html( data.body );
675
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
676
 
691
  $( '.connection-status' ).hide();
692
  $( '.step-two' ).show();
693
  connection_established = true;
694
+ wpmdb.common.connection_data = data;
695
  move_connection_info_box();
696
 
697
  maybe_show_mixed_cased_table_name_warning();
698
 
699
  var loaded_tables = '';
700
+ if ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_tables ) {
701
  loaded_tables = wpmdb_loaded_tables;
702
  }
703
 
704
+ $pull_select = create_table_select( wpmdb.common.connection_data.tables, wpmdb.common.connection_data.table_sizes_hr, loaded_tables );
705
 
706
  var loaded_post_types = '';
707
+ if ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_post_types ) {
708
+ if ( 'undefined' !== typeof data.select_post_types ) {
709
  $( '#exclude-post-types' ).attr( 'checked', 'checked' );
710
  $( '.post-type-select-wrap' ).show();
711
  loaded_post_types = data.select_post_types;
712
+ } else {
 
713
  loaded_post_types = wpmdb_loaded_post_types;
714
  }
715
  }
722
  class: 'multiselect'
723
  } );
724
 
725
+ $.each( wpmdb.common.connection_data.post_types, function( index, value ) {
726
  var selected = $.inArray( value, loaded_post_types );
727
+ if ( -1 !== selected || ( true === wpmdb_convert_exclude_revisions && 'revision' !== value ) ) {
728
  selected = ' selected="selected" ';
729
+ } else {
 
730
  selected = ' ';
731
  }
732
  $( $post_type_select ).append( '<option' + selected + 'value="' + value + '">' + value + '</option>' );
735
  $pull_post_type_select = $post_type_select;
736
 
737
  var loaded_tables_backup = '';
738
+ if ( false === wpmdb_default_profile && 'undefined' !== typeof wpmdb_loaded_tables_backup ) {
739
  loaded_tables_backup = wpmdb_loaded_tables_backup;
740
  }
741
 
747
  class: 'multiselect'
748
  } );
749
 
750
+ $.each( wpmdb.common.connection_data.tables, function( index, value ) {
751
  var selected = $.inArray( value, loaded_tables_backup );
752
+ if ( -1 !== selected ) {
753
  selected = ' selected="selected" ';
754
+ } else {
 
755
  selected = ' ';
756
  }
757
+ $( $table_select_backup ).append( '<option' + selected + 'value="' + value + '">' + value + ' (' + wpmdb.common.connection_data.table_sizes_hr[ value ] + ')</option>' );
758
  } );
759
 
760
  $push_select_backup = $table_select_backup;
767
  $( '.backup-tables-wrap' ).prepend( $pull_select_backup );
768
  $( '.table-prefix' ).html( data.prefix );
769
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
770
+ } else {
 
771
  $( '#select-backup' ).remove();
772
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
773
  }
774
 
775
+ $.wpmdb.do_action( 'verify_connection_to_remote_site', wpmdb.common.connection_data );
776
  }
777
 
778
  } );
788
  $( this ).blur();
789
  } );
790
 
 
791
  function enable_pro_licence( data, licence_key ) {
792
  $( '.licence-input, .register-licence' ).remove();
793
  $( '.licence-not-entered' ).prepend( data.masked_licence );
810
 
811
  var licence_key = $.trim( $( '.licence-input' ).val() );
812
 
813
+ if ( '' === licence_key ) {
814
  $( '.licence-status' ).addClass( 'notification-message error-notice' );
815
  $( '.licence-status' ).html( wpmdb_strings.enter_license_key );
816
  return;
840
  doing_licence_registration_ajax = false;
841
  $( '.register-licence-ajax-spinner' ).remove();
842
 
843
+ if ( 'undefined' !== typeof data.errors ) {
844
  var msg = '';
845
  for ( var key in data.errors ) {
846
  msg += data.errors[ key ];
847
  }
848
  $( '.licence-status' ).html( msg );
849
 
850
+ if ( 'undefined' !== typeof data.masked_licence ) {
851
  enable_pro_licence( data, licence_key );
852
  $( '.migrate-tab .invalid-licence' ).hide();
853
  }
854
+ } else if ( 'undefined' !== typeof data.wpmdb_error && 'undefined' !== typeof data.body ) {
 
855
  $( '.licence-status' ).html( data.body );
856
+ } else {
 
857
  $( '.licence-status' ).html( wpmdb_strings.license_registered ).delay( 5000 ).fadeOut( 1000 );
858
  $( '.licence-status' ).addClass( 'success notification-message success-notice' );
859
  enable_pro_licence( data, licence_key );
950
  if ( $( '.expand-collapse-arrow', this ).hasClass( 'collapsed' ) ) {
951
  $( '.expand-collapse-arrow', this ).removeClass( 'collapsed' );
952
  $( this ).next().show();
953
+ } else {
 
954
  $( '.expand-collapse-arrow', this ).addClass( 'collapsed' );
955
  $( this ).next().hide();
956
  }
959
  $( '.checkbox-label input[type=checkbox]' ).change( function() {
960
  if ( $( this ).is( ':checked' ) ) {
961
  $( this ).parent().next().show();
962
+ } else {
 
963
  $( this ).parent().next().hide();
964
  }
965
  } );
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
  }
1001
  }
1002
 
1003
  // check that they've selected some tables to migrate
1004
+ if ( $( '#migrate-selected' ).is( ':checked' ) && null === $( '#select-tables' ).val() ) {
1005
  alert( wpmdb_strings.please_select_one_table );
1006
  return;
1007
  }
1055
 
1056
  stage = 'backup';
1057
 
1058
+ if ( 'savefile' === migration_intent ) {
1059
  stage = 'migrate';
1060
  }
1061
 
1062
+ if ( false === $( '#create-backup' ).is( ':checked' ) ) {
1063
  stage = 'migrate';
1064
  }
1065
 
1066
  var table_intent = $( 'input[name=table_migrate_option]:checked' ).val();
1067
+ var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
1068
  var table_rows = '';
1069
 
1070
  remote_site = connection_info[ 0 ];
1076
 
1077
  completed_msg = wpmdb_strings.exporting_complete;
1078
 
1079
+ if ( 'savefile' === migration_intent ) {
1080
  static_migration_label = wpmdb_strings.exporting_please_wait;
1081
+ } else {
 
1082
  static_migration_label = get_migration_status_label( remote_site, migration_intent, 'migrating' );
1083
  completed_msg = get_migration_status_label( remote_site, migration_intent, 'completed' );
1084
  }
1090
  var table_option = $( 'input[name=table_migrate_option]:checked' ).val();
1091
  var selected_tables = '';
1092
 
1093
+ if ( 'backup' === stage ) {
1094
+ if ( 'migrate_only_with_prefix' === table_option && 'backup_selected' === backup_option ) {
1095
  backup_option = 'backup_only_with_prefix';
1096
  }
1097
+ if ( 'push' === migration_intent ) {
1098
+ table_rows = wpmdb.common.connection_data.table_rows;
1099
+ if ( 'backup_only_with_prefix' === backup_option ) {
1100
+ tables_to_migrate = wpmdb.common.connection_data.prefixed_tables;
1101
+ } else if ( 'backup_selected' === backup_option ) {
 
1102
  selected_tables = $( '#select-tables' ).val();
1103
+ tables_to_migrate = get_intersect( selected_tables, wpmdb.common.connection_data.tables );
1104
+ } else if ( 'backup_manual_select' === backup_option ) {
 
1105
  tables_to_migrate = $( '#select-backup' ).val();
1106
  }
1107
+ } else {
 
1108
  table_rows = wpmdb_data.this_table_rows;
1109
+ if ( 'backup_only_with_prefix' === backup_option ) {
1110
  tables_to_migrate = wpmdb_data.this_prefixed_tables;
1111
+ } else if ( 'backup_selected' === backup_option ) {
 
1112
  selected_tables = $( '#select-tables' ).val();
1113
  tables_to_migrate = get_intersect( selected_tables, wpmdb_data.this_tables );
1114
+ } else if ( 'backup_manual_select' === backup_option ) {
 
1115
  tables_to_migrate = $( '#select-backup' ).val();
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
  }
1168
 
1169
  if ( 0 !== percent_diff && percent === max_percent ) {
1170
  percent += percent_diff;
1171
+ percent_diff = 0;
 
 
 
 
 
 
 
 
1172
  }
1173
 
1174
  $( '.progress-tables' ).append( '<div class="progress-chunk ' + value + '_chunk" style="width: ' + percent + '%;" title="' + value + '"><span>' + value + '</span></div>' );
1176
  last_element = value;
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();
1184
  table_rows[ last_element ] = Number( table_rows[ last_element ] );
1198
  }
1199
  } );
1200
 
 
 
 
 
 
 
 
1201
  var return_vals = [ table_rows, total_size ];
1202
 
1203
  return return_vals;
1226
  nonce: wpmdb_data.nonces.initiate_migration
1227
  };
1228
 
1229
+ if ( 'savefile' !== migration_intent ) {
1230
+ request_data.temp_prefix = wpmdb.common.connection_data.temp_prefix;
1231
  }
1232
 
1233
  doing_ajax = true;
1246
  console.log( textStatus );
1247
  console.log( errorThrown );
1248
  doing_ajax = false;
1249
+ wpmdb.common.migration_error = true;
1250
+ wpmdb.functions.migration_complete_events();
1251
  return;
1252
  },
1253
  success: function( data ) {
1254
  doing_ajax = false;
1255
+ if ( 'undefined' !== typeof data && 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {
1256
+ wpmdb.common.migration_error = true;
1257
+ wpmdb.functions.migration_complete_events();
1258
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1259
  $( '.progress-text' ).addClass( 'migration-error' );
1260
  $( '.progress-text' ).html( data.body );
1273
 
1274
  // Set delay between requests - use max of local/remote values, 0 if doing export
1275
  delay_between_requests = 0;
1276
+ if ( 'savefile' !== migration_intent && 'undefined' !== typeof wpmdb.common.connection_data && 'undefined' !== typeof wpmdb.common.connection_data.delay_between_requests ) {
1277
+ delay_between_requests = Math.max( parseInt( wpmdb_data.delay_between_requests ), parseInt( wpmdb.common.connection_data.delay_between_requests ) );
1278
  }
1279
 
1280
+ wpmdb.functions.migrate_table_recursive = function( current_row, primary_keys ) {
1281
 
1282
  if ( i >= tables_to_migrate.length ) {
1283
+ if ( 'backup' === stage ) {
1284
  stage = 'migrate';
1285
  i = 0;
1286
  progress_size = 0;
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
 
1311
  table_rows = table_details[ 0 ];
1312
  total_size = table_details[ 1 ];
1313
 
1314
+ } else {
 
1315
  $( '.progress-label' ).removeClass( 'label-visible' );
1316
 
1317
+ wpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_before_migration_complete_hooks', wpmdb.common.hooks );
1318
+ wpmdb.common.hooks.push( wpmdb.functions.migration_complete );
1319
+ wpmdb.common.hooks.push( wpmdb.functions.wpmdb_flush );
1320
+ wpmdb.common.hooks = $.wpmdb.apply_filters( 'wpmdb_after_migration_complete_hooks', wpmdb.common.hooks );
1321
+ wpmdb.common.hooks.push( wpmdb.functions.migration_complete_events );
1322
+ wpmdb.common.next_step_in_migration = { fn: wpmdb_call_next_hook };
1323
+ wpmdb.functions.execute_next_step();
1324
  return;
1325
  }
1326
  }
1327
 
1328
+ if ( 'backup' === stage ) {
1329
  $( '.progress-text' ).html( overall_percent + '% - ' + wpmdb_strings.backing_up + ' "' + tables_to_migrate[ i ] + '"' );
1330
+ } else {
 
1331
  $( '.progress-text' ).html( overall_percent + '% - ' + wpmdb_strings.migrating + ' "' + tables_to_migrate[ i ] + '"' );
1332
  }
1333
 
1337
  }
1338
 
1339
  var gzip = 0;
1340
+ if ( 'savefile' !== migration_intent && 1 === parseInt( wpmdb.common.connection_data.gzip ) ) {
1341
  gzip = 1;
1342
  }
1343
 
1353
  nonce: wpmdb_data.nonces.migrate_table
1354
  };
1355
 
1356
+ if ( 'savefile' !== migration_intent ) {
1357
+ request_data.bottleneck = wpmdb.common.connection_data.bottleneck;
1358
+ request_data.prefix = wpmdb.common.connection_data.prefix;
1359
  }
1360
 
1361
+ if ( wpmdb.common.connection_data && wpmdb.common.connection_data.path_current_site && wpmdb.common.connection_data.domain ) {
1362
+ request_data.path_current_site = wpmdb.common.connection_data.path_current_site;
1363
+ request_data.domain_current_site = wpmdb.common.connection_data.domain;
1364
  }
1365
 
1366
  doing_ajax = true;
1381
  console.log( jqXHR );
1382
  console.log( textStatus );
1383
  console.log( errorThrown );
1384
+ wpmdb.common.migration_error = true;
1385
+ wpmdb.functions.migration_complete_events();
1386
  return;
1387
  },
1388
  success: function( data ) {
1393
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1394
  if ( '' === data || null === data ) {
1395
  $( '.progress-text' ).html( wpmdb_strings.table_process_problem_empty_response + ' ' + tables_to_migrate[ i ] );
1396
+ } else {
 
1397
  $( '.progress-text' ).html( getAjaxErrors( data, null, null ) );
1398
  }
1399
  $( '.progress-text' ).addClass( 'migration-error' );
1400
+ wpmdb.common.migration_error = true;
1401
+ wpmdb.functions.migration_complete_events();
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 );
1409
+ wpmdb.common.migration_error = true;
1410
+ wpmdb.functions.migration_complete_events();
1411
  return;
1412
  }
1413
 
1414
  // We need the returned file name for delivery or display to the user.
1415
  if ( 1 === last_table && 'savefile' === migration_intent ) {
1416
+ if ( 'undefined' !== typeof row_information.dump_filename ) {
1417
  dump_filename = row_information.dump_filename;
1418
  }
1419
+ if ( 'undefined' !== typeof row_information.dump_path ) {
1420
  dump_path = row_information.dump_path;
1421
  }
1422
  }
1423
 
1424
+ if ( -1 === row_information.current_row || '-1' === row_information.current_row ) {
1425
  progress_size -= overall_table_progress;
1426
  overall_table_progress = 0;
1427
  last_progress = 0;
1429
  i++;
1430
  row_information.current_row = '';
1431
  row_information.primary_keys = '';
1432
+ } else {
 
1433
  temp_progress = parseInt( row_information.current_row );
1434
  table_progress = temp_progress - last_progress;
1435
  last_progress = temp_progress;
1438
  }
1439
  overall_percent = Math.floor( ( progress_size / total_size ) * 100 );
1440
  $( '.progress-bar' ).width( overall_percent + '%' );
1441
+ wpmdb.common.next_step_in_migration = {
1442
+ fn: wpmdb.functions.migrate_table_recursive,
1443
  args: [ row_information.current_row, row_information.primary_keys ]
1444
  };
1445
+ wpmdb.functions.execute_next_step();
1446
  }
1447
  } );
1448
 
1449
  };
1450
 
1451
+ wpmdb.common.next_step_in_migration = {
1452
+ fn: wpmdb.functions.migrate_table_recursive,
1453
+ args: [ '-1', '' ]
1454
+ };
1455
+ wpmdb.functions.execute_next_step();
1456
 
1457
  }
1458
 
1460
 
1461
  } );
1462
 
1463
+ wpmdb.functions.migration_complete_events = function() {
1464
+ if ( false === wpmdb.common.migration_error ) {
1465
+ if ( '' === wpmdb.common.non_fatal_errors ) {
1466
  if ( 'savefile' !== migration_intent && true === $( '#save_computer' ).is( ':checked' ) ) {
1467
  $( '.progress-text' ).css( 'visibility', 'hidden' );
1468
  }
1469
  $( '.progress-title' ).html( completed_msg ).append( '<div class="dashicons dashicons-yes"></div>' );
1470
+ } else {
1471
+ $( '.progress-text' ).html( wpmdb.common.non_fatal_errors );
 
1472
  $( '.progress-text' ).addClass( 'migration-error' );
1473
  $( '.progress-title' ).html( wpmdb_strings.completed_with_some_errors );
1474
  }
1479
  $( '.migration-controls' ).hide();
1480
 
1481
  // reset migration variables so consecutive migrations work correctly
1482
+ wpmdb.common.hooks = [];
1483
+ wpmdb.common.call_stack = [];
1484
+ wpmdb.common.migration_error = false;
1485
  currently_migrating = false;
1486
  migration_completed = true;
1487
  migration_paused = false;
1488
  migration_cancelled = false;
1489
  doing_ajax = false;
1490
+ wpmdb.common.non_fatal_errors = '';
1491
 
1492
  $( '.progress-label' ).remove();
1493
  $( '.migration-progress-ajax-spinner' ).remove();
1496
  clearInterval( elapsed_interval );
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;
1504
  if ( $( '#save_computer' ).is( ':checked' ) ) {
1507
  url += '&gzip=1';
1508
  }
1509
  window.location = url;
1510
+ } else {
 
1511
  migrate_complete_text = wpmdb_strings.completed_dump_located_at + ' ' + dump_path;
1512
  }
1513
 
1514
+ if ( false === wpmdb.common.migration_error ) {
1515
  $( '.progress-text' ).html( migrate_complete_text );
1516
+ wpmdb.functions.migration_complete_events();
1517
  $( '.progress-title' ).html( completed_msg );
1518
  }
1519
 
1520
+ } else { // rename temp tables, delete old tables
 
1521
  $( '.progress-text' ).html( wpmdb_strings.finalizing_migration );
1522
  doing_ajax = true;
1523
  $.ajax( {
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
1534
  },
1538
  $( '.progress-text' ).html( wpmdb_strings.finalize_tables_problem );
1539
  $( '.progress-text' ).addClass( 'migration-error' );
1540
  alert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );
1541
+ wpmdb.common.migration_error = true;
1542
+ wpmdb.functions.migration_complete_events();
1543
  return;
1544
  },
1545
  success: function( data ) {
1548
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1549
  $( '.progress-text' ).html( data );
1550
  $( '.progress-text' ).addClass( 'migration-error' );
1551
+ wpmdb.common.migration_error = true;
1552
+ wpmdb.functions.migration_complete_events();
1553
  return;
1554
  }
1555
+ wpmdb.common.next_step_in_migration = { fn: wpmdb_call_next_hook };
1556
+ wpmdb.functions.execute_next_step();
1557
  }
1558
  } );
1559
  }
1560
  };
1561
 
1562
+ wpmdb.functions.wpmdb_flush = function() {
1563
+ if ( 'savefile' !== migration_intent ) {
1564
  $( '.progress-text' ).html( wpmdb_strings.flushing );
1565
  doing_ajax = true;
1566
  $.ajax( {
1579
  $( '.progress-text' ).html( wpmdb_strings.flush_problem );
1580
  $( '.progress-text' ).addClass( 'migration-error' );
1581
  alert( jqXHR + ' : ' + textStatus + ' : ' + errorThrown );
1582
+ wpmdb.common.migration_error = true;
1583
+ wpmdb.functions.migration_complete_events();
1584
  return;
1585
  },
1586
  success: function( data ) {
1589
  $( '.progress-title' ).html( wpmdb_strings.migration_failed );
1590
  $( '.progress-text' ).html( data );
1591
  $( '.progress-text' ).addClass( 'migration-error' );
1592
+ wpmdb.common.migration_error = true;
1593
+ wpmdb.functions.migration_complete_events();
1594
  return;
1595
  }
1596
+ wpmdb.common.next_step_in_migration = { fn: wpmdb_call_next_hook };
1597
+ wpmdb.functions.execute_next_step();
1598
  }
1599
  } );
1600
  }
1606
  } );
1607
 
1608
  $( 'body' ).on( 'click', '#overlay', function() {
1609
+ if ( true === migration_completed ) {
1610
  hide_overlay();
1611
  }
1612
  } );
1623
  // AJAX save button profile
1624
  $( '.save-settings-button' ).click( function( event ) {
1625
  event.preventDefault();
1626
+ if ( '' === $.trim( $( '.create-new-profile' ).val() ) && $( '#create_new' ).is( ':checked' ) ) {
1627
  alert( wpmdb_strings.enter_name_for_profile );
1628
  $( '.create-new-profile' ).focus();
1629
  return;
1635
  var profile;
1636
  $( '.save-settings-button' ).blur();
1637
 
 
1638
  if ( doing_save_profile ) {
1639
  return;
1640
  }
1641
 
1642
  // check that they've selected some tables to migrate
1643
+ if ( $( '#migrate-selected' ).is( ':checked' ) && null === $( '#select-tables' ).val() ) {
1644
  alert( wpmdb_strings.please_select_one_table );
1645
  return;
1646
  }
1697
  var new_profile_key = parseInt( data, 10 );
1698
  var new_profile_id = new_profile_key + 1;
1699
  var new_li = $( '<li><span class="delete-profile" data-profile-id="' + new_profile_id + '"></span><label for="profile-' + new_profile_id + '"><input id="profile-' + new_profile_id + '" value="' + new_profile_key + '" name="save_migration_profile_option" type="radio"></label></li>' );
1700
+ new_li.find( 'label' ).append( document.createTextNode( ' ' + profile_name ) );
1701
  updated_profile_id = new_profile_id;
1702
 
1703
  $( '#create_new' ).parents( 'li' ).before( new_li );
1704
  $( '#profile-' + new_profile_id ).attr( 'checked', 'checked' );
1705
  }
1706
+
1707
+ // Push updated profile id to history if available
1708
  var updatedURL = window.location.href.replace( '#migrate', '' ).replace( /&wpmdb-profile=-?\d+/, '' ) + '&wpmdb-profile=' + updated_profile_id;
1709
  var updated_profile_name = $( '#migrate-form input[name=save_migration_profile_option]:checked' ).parent().text().trim();
1710
 
1713
  $( '#migrate-form .crumbs .crumb:last' ).text( updated_profile_name );
1714
  } else {
1715
  var $crumbs = $( '<div class="crumbs" />' )
1716
+ .append( '<a class="crumb" href="' + wpmdb_data.this_plugin_base + '"> Saved Profiles </a>' )
1717
  .append( '<span class="crumb">' + updated_profile_name + '</span>' );
1718
  $( '#migrate-form' ).prepend( $crumbs );
1719
  }
1735
 
1736
  // show / hide progress lavel on hover
1737
  $( 'body' ).on( 'mouseenter mouseleave', '.progress-chunk-hover', function( event ) {
1738
+ if ( 'mouseenter' === event.type ) {
1739
  $( '.progress-label' ).addClass( 'label-visible' );
1740
+ } else {
 
1741
  $( '.progress-label' ).removeClass( 'label-visible' );
1742
  }
1743
  } );
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();
1762
  if ( 'pull' === wpmdb_migration_type() ) {
1763
  $( '.pull-list li' ).append( $connection_info_box );
1764
  $connection_info_box.show( function() {
1765
  var connection_textarea = $( this ).find( '.pull-push-connection-info' );
1766
+ if ( !connection_textarea.val() ) {
1767
  connection_textarea.focus();
1768
  }
1769
  } );
1770
  if ( connection_established ) {
1771
  $( '.connection-status' ).hide();
1772
  $( '.step-two' ).show();
1773
+ $( '.table-prefix' ).html( wpmdb.common.connection_data.prefix );
1774
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
1775
+ if ( false === profile_name_edited ) {
1776
+ profile_name = get_domain_name( wpmdb.common.connection_data.url );
1777
  $( '.create-new-profile' ).val( profile_name );
1778
  }
1779
+ if ( true === show_prefix_notice ) {
1780
  $( '.prefix-notice.pull' ).show();
1781
  }
1782
+ if ( true === show_ssl_notice ) {
1783
  $( '.ssl-notice' ).show();
1784
  }
1785
+ if ( true === show_version_notice ) {
1786
  $( '.different-plugin-version-notice' ).show();
1787
  $( '.step-two' ).hide();
1788
  }
1794
  $( '.backup-option-disabled' ).show();
1795
  $( '.upload-directory-location' ).html( wpmdb_data.this_upload_dir_long );
1796
  }
1797
+ } else {
 
1798
  $( '.connection-status' ).show();
1799
  $( '.step-two' ).hide();
1800
  }
1801
+ } else if ( 'push' === wpmdb_migration_type() ) {
 
1802
  $( '.push-list li' ).append( $connection_info_box );
1803
  $connection_info_box.show( function() {
1804
  var connection_textarea = $( this ).find( '.pull-push-connection-info' );
1805
+ if ( !connection_textarea.val() ) {
1806
  connection_textarea.focus();
1807
  }
1808
  } );
1810
  $( '.connection-status' ).hide();
1811
  $( '.step-two' ).show();
1812
  $( '.table-prefix' ).html( wpmdb_data.this_prefix );
1813
+ $( '.uploads-dir' ).html( wpmdb.common.connection_data.uploads_dir );
1814
+ if ( false === profile_name_edited ) {
1815
+ profile_name = get_domain_name( wpmdb.common.connection_data.url );
1816
  $( '.create-new-profile' ).val( profile_name );
1817
  }
1818
+ if ( true === show_prefix_notice ) {
1819
  $( '.prefix-notice.push' ).show();
1820
  }
1821
+ if ( true === show_ssl_notice ) {
1822
  $( '.ssl-notice' ).show();
1823
  }
1824
+ if ( true === show_version_notice ) {
1825
  $( '.different-plugin-version-notice' ).show();
1826
  $( '.step-two' ).hide();
1827
  }
1828
  wpmdb_toggle_migration_action_text();
1829
+ if ( '0' === wpmdb.common.connection_data.write_permissions ) {
1830
  $( '#create-backup' ).prop( 'checked', false );
1831
  $( '#create-backup' ).attr( 'disabled', 'disabled' );
1832
  $( '#create-backup-label' ).addClass( 'disabled' );
1833
  $( '.backup-option-disabled' ).show();
1834
+ $( '.upload-directory-location' ).html( wpmdb.common.connection_data.upload_dir_long );
1835
  }
1836
+ } else {
 
1837
  $( '.connection-status' ).show();
1838
  $( '.step-two' ).hide();
1839
  }
1840
+ } else if ( 'savefile' === wpmdb_migration_type() ) {
 
1841
  $( '.connection-status' ).hide();
1842
  $( '.step-two' ).show();
1843
  $( '.table-prefix' ).html( wpmdb_data.this_prefix );
1844
  $( '.compatibility-older-mysql' ).show();
1845
+ if ( false === profile_name_edited ) {
1846
  $( '.create-new-profile' ).val( '' );
1847
  }
1848
  $( '.backup-options' ).hide();
1871
  } );
1872
 
1873
  function change_replace_values() {
1874
+ var old_url = null;
1875
+ var old_path = null;
1876
+ if ( null !== wpmdb.common.previous_connection_data && 'object' === typeof wpmdb.common.previous_connection_data && wpmdb.common.previous_connection_data.url !== wpmdb.common.connection_data.url ) {
1877
+ old_url = remove_protocol( wpmdb.common.previous_connection_data.url );
1878
+ old_path = wpmdb.common.previous_connection_data.path;
1879
+ }
1880
+
1881
  if ( 'push' === wpmdb_migration_type() || 'savefile' === wpmdb_migration_type() ) {
1882
  if ( 'pull' === last_replace_switch ) {
1883
  $( '.replace-row' ).each( function() {
1885
  $( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );
1886
  $( '.replace-right-col input', this ).val( old_val );
1887
  } );
1888
+ } else if ( 'push' === last_replace_switch && 'push' === wpmdb_migration_type() && null !== old_url && null !== old_path ) {
1889
+ $( '.replace-row' ).each( function() {
1890
+ var old_val = $( '.replace-right-col input', this ).val();
1891
+ if ( old_val === old_path ) {
1892
+ $( '.replace-right-col input', this ).val( wpmdb.common.connection_data.path );
1893
+ }
1894
+ if ( old_val === old_url ) {
1895
+ $( '.replace-right-col input', this ).val( remove_protocol( wpmdb.common.connection_data.url ) );
1896
+ }
1897
+ } );
1898
  }
1899
  $.wpmdb.do_action( 'wpmdb_update_push_table_select' );
1900
  $( '#select-post-types' ).remove();
1901
  $( '.select-post-types-wrap' ).prepend( $push_post_type_select );
1902
  $( '#select-backup' ).remove();
1903
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
1904
+ } else if ( 'pull' === wpmdb_migration_type() ) {
 
1905
  if ( '' === last_replace_switch || 'push' === last_replace_switch || 'savefile' === last_replace_switch ) {
1906
  $( '.replace-row' ).each( function() {
1907
  var old_val = $( '.old-replace-col input', this ).val();
1908
  $( '.old-replace-col input', this ).val( $( '.replace-right-col input', this ).val() );
1909
  $( '.replace-right-col input', this ).val( old_val );
1910
  } );
1911
+ } else if ( 'pull' === last_replace_switch && 'pull' === wpmdb_migration_type() && null !== old_url && null !== old_path ) {
1912
+ $( '.replace-row' ).each( function() {
1913
+ var old_val = $( '.old-replace-col input', this ).val();
1914
+ if ( old_val === old_path ) {
1915
+ $( '.old-replace-col input', this ).val( wpmdb.common.connection_data.path );
1916
+ }
1917
+ if ( old_val === old_url ) {
1918
+ $( '.old-replace-col input', this ).val( remove_protocol( wpmdb.common.connection_data.url ) );
1919
+ }
1920
+ } );
1921
  }
1922
  $.wpmdb.do_action( 'wpmdb_update_pull_table_select' );
1923
  $( '#select-post-types' ).remove();
1929
  }
1930
 
1931
  // hide second section if pull or push is selected with no connection established
1932
+ if ( ( 'pull' === wpmdb_migration_type() || 'push' === wpmdb_migration_type() ) && !connection_established ) {
1933
  $( '.step-two' ).hide();
1934
  $( '.connection-status' ).show();
1935
  }
1946
  var position = icon.position();
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
 
1994
  switch_to_plugin_tab( hash, false );
1995
  } );
1996
 
1997
+ $( 'body' ).on( 'click', 'a[href^="#"]', function( event ) {
1998
  var href = $( event.target ).attr( 'href' );
1999
  var tab_name = href.substr( 1 );
2000
 
2001
  if ( tab_name ) {
2002
  var nav_tab = $( '.' + tab_name );
2003
+ if ( 1 === nav_tab.length ) {
2004
  nav_tab.trigger( 'click' );
2005
  event.preventDefault();
2006
  }
2015
  // repeatable fields
2016
  $( 'body' ).on( 'click', '.replace-remove-row', function() {
2017
  $( this ).parents( 'tr' ).remove();
2018
+ if ( 2 >= $( '.replace-row' ).length ) {
2019
  $( '.no-replaces-message' ).show();
2020
  }
2021
 
2084
  }
2085
  }
2086
 
2087
+ if ( 'help' === hash ) {
2088
  refresh_debug_log();
2089
  if ( false === checked_licence && '1' === wpmdb_data.has_licence ) {
2090
  $( '.support-content p' ).append( ajax_spinner );
2092
  }
2093
  }
2094
 
2095
+ if ( 'addons' === hash && true !== skip_addons_check ) {
2096
  if ( false === checked_licence && '1' === wpmdb_data.has_licence ) {
2097
  $( '.addons-content p' ).append( ajax_spinner );
2098
  check_licence();
2108
  switch_to_plugin_tab( hash, false );
2109
  }
2110
 
2111
+ if ( '' !== get_query_var( 'install-plugin' ) ) {
2112
  hash = 'addons';
2113
  checked_licence = true;
2114
  switch_to_plugin_tab( hash, true );
2137
  $( '.reset-api-key' ).click( function() {
2138
  var answer = confirm( wpmdb_strings.reset_api_key );
2139
 
2140
+ if ( !answer || doing_reset_api_key_ajax ) {
2141
  return;
2142
  }
2143
 
2162
  $( '.reset-api-key-ajax-spinner' ).remove();
2163
  doing_reset_api_key_ajax = false;
2164
  $( '.connection-info' ).html( data );
2165
+ wpmdb_data.connection_info = $.trim( data ).split( '\n' );
2166
  }
2167
  } );
2168
 
2183
 
2184
  $( 'input[name=backup_option]' ).change( function() {
2185
  $( '.backup-tables-wrap' ).hide();
2186
+ if ( 'backup_manual_select' === $( this ).val() ) {
2187
  $( '.backup-tables-wrap' ).show();
2188
  }
2189
  } );
2240
  name = $.trim( $( name ).html() );
2241
  var answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );
2242
 
2243
+ if ( !answer ) {
2244
  return;
2245
  }
2246
  var $profile_li = $( this ).parent();
2273
  alert( wpmdb_strings.remove_profile_problem );
2274
  },
2275
  success: function( data ) {
2276
+ if ( '-1' === data ) {
2277
  alert( wpmdb_strings.remove_profile_not_found );
2278
  }
2279
  }
2286
  var name = $( this ).prev().html();
2287
  var answer = confirm( wpmdb_strings.remove_profile.replace( '{{profile}}', name ) );
2288
 
2289
+ if ( !answer ) {
2290
  return;
2291
  }
2292
 
2313
  $( 'body' ).on( 'click', '.temp-disabled', function() {
2314
  var answer = confirm( wpmdb_strings.change_connection_info );
2315
 
2316
+ if ( !answer ) {
2317
  return;
2318
+ } else {
 
2319
  $( '.ssl-notice' ).hide();
2320
  $( '.different-plugin-version-notice' ).hide();
2321
  $( '.migrate-db-button' ).show();
2391
  } );
2392
 
2393
  $( 'body' ).on( 'click', '.try-http', function() {
2394
+ var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
2395
  var new_url = connection_info[ 0 ].replace( 'https', 'http' );
2396
+ var new_contents = new_url + '\n' + connection_info[ 1 ];
2397
  $( '.pull-push-connection-info' ).val( new_contents );
2398
  connection_box_changed();
2399
  } );
2420
 
2421
  data = $( '.pull-push-connection-info' ).val();
2422
 
2423
+ var connection_info = $.trim( data ).split( '\n' );
2424
  var error = false;
2425
  var error_message = '';
2426
 
2427
+ if ( '' === connection_info ) {
2428
  error = true;
2429
  error_message = wpmdb_strings.connection_info_missing;
2430
  }
2431
 
2432
+ if ( 2 !== connection_info.length && !error ) {
2433
  error = true;
2434
  error_message = wpmdb_strings.connection_info_incorrect;
2435
  }
2436
 
2437
+ if ( !error && !validate_url( connection_info[ 0 ] ) ) {
2438
  error = true;
2439
  error_message = wpmdb_strings.connection_info_url_invalid;
2440
  }
2441
 
2442
+ if ( !error && 32 >= connection_info[ 1 ].length ) {
2443
  error = true;
2444
  error_message = wpmdb_strings.connection_info_key_invalid;
2445
  }
2446
 
2447
+ if ( !error && connection_info[ 0 ] === wpmdb_data.connection_info[ 0 ] ) {
2448
  error = true;
2449
  error_message = wpmdb_strings.connection_info_local_url;
2450
  }
2451
 
2452
+ if ( !error && connection_info[ 1 ] === wpmdb_data.connection_info[ 1 ] ) {
2453
  error = true;
2454
  error_message = wpmdb_strings.connection_info_local_key;
2455
  }
2460
  return;
2461
  }
2462
 
2463
+ var new_connection_info_contents = connection_info[ 0 ] + '\n' + connection_info[ 1 ];
2464
 
2465
  if ( false === wpmdb_data.openssl_available ) {
2466
  connection_info[ 0 ] = connection_info[ 0 ].replace( 'https://', 'http://' );
2467
+ new_connection_info_contents = connection_info[ 0 ] + '\n' + connection_info[ 1 ];
2468
  $( '.pull-push-connection-info' ).val( new_connection_info_contents );
2469
  }
2470
 
2475
  if ( $( '.basic-access-auth-wrapper' ).is( ':visible' ) ) {
2476
  connection_info[ 0 ] = connection_info[ 0 ].replace( /\/\/(.*)@/, '//' );
2477
  connection_info[ 0 ] = connection_info[ 0 ].replace( '//', '//' + encodeURIComponent( $.trim( $( '.auth-username' ).val() ) ) + ':' + encodeURIComponent( $.trim( $( '.auth-password' ).val() ) ) + '@' );
2478
+ new_connection_info_contents = connection_info[ 0 ] + '\n' + connection_info[ 1 ];
2479
  $( '.pull-push-connection-info' ).val( new_connection_info_contents );
2480
  $( '.basic-access-auth-wrapper' ).hide();
2481
  }
2518
  enable_export_type_controls();
2519
  maybe_show_ssl_warning( connection_info[ 0 ], connection_info[ 1 ], data.scheme );
2520
 
2521
+ if ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {
2522
  $( '.connection-status' ).html( data.body );
2523
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
2524
 
2542
  maybe_show_prefix_notice( data.prefix );
2543
 
2544
  connection_established = true;
2545
+ wpmdb.common.previous_connection_data = wpmdb.common.connection_data;
2546
+ wpmdb.common.connection_data = data;
2547
  move_connection_info_box();
2548
  change_replace_values();
2549
 
2565
  class: 'multiselect'
2566
  } );
2567
 
2568
+ $.each( wpmdb.common.connection_data.post_types, function( index, value ) {
2569
  $( $post_type_select ).append( '<option value="' + value + '">' + value + '</option>' );
2570
  } );
2571
 
2587
  $( '.select-post-types-wrap' ).prepend( $pull_post_type_select );
2588
  $( '.table-prefix' ).html( data.prefix );
2589
  $( '.uploads-dir' ).html( wpmdb_data.this_uploads_dir );
2590
+ } else {
 
2591
  $( '#new-url' ).val( remove_protocol( data.url ) );
2592
  $( '#new-path' ).val( data.path );
2593
  if ( 'true' === wpmdb_data.is_multisite ) {
2598
  $( '.backup-tables-wrap' ).prepend( $push_select_backup );
2599
  }
2600
 
2601
+ wpmdb.common.next_step_in_migration = {
2602
  fn: $.wpmdb.do_action,
2603
+ args: [ 'verify_connection_to_remote_site', wpmdb.common.connection_data ]
2604
  };
2605
+ wpmdb.functions.execute_next_step();
2606
  }
2607
 
2608
  } );
2623
 
2624
  if ( true === migration_paused ) {
2625
  migration_paused = false;
2626
+ wpmdb.functions.execute_next_step();
2627
  }
2628
  }
2629
 
2636
  $( '.licence-input' ).focus();
2637
  } );
2638
 
2639
+ wpmdb.functions.execute_next_step = function() {
2640
 
2641
  // if delay is set, set a timeout for delay to recall this function, then return
2642
  if ( 0 < delay_between_requests && false === flag_skip_delay ) {
2643
  setTimeout( function() {
2644
  flag_skip_delay = true;
2645
+ wpmdb.functions.execute_next_step();
2646
  }, delay_between_requests );
2647
  return;
2648
  } else {
2651
 
2652
  if ( true === migration_paused ) {
2653
  $( '.migration-progress-ajax-spinner' ).hide();
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 ) {
2661
  set_pause_resume_button( event );
2665
  } );
2666
  $( '.pause-resume' ).html( wpmdb_strings.resume );
2667
  return;
2668
+ } else if ( true === migration_cancelled ) {
 
2669
  migration_intent = wpmdb_migration_type();
2670
 
2671
  var progress_msg;
2672
 
2673
  if ( 'savefile' === migration_intent ) {
2674
  progress_msg = wpmdb_strings.removing_local_sql;
2675
+ } else if ( 'pull' === migration_intent ) {
 
2676
  if ( 'backup' === stage ) {
2677
  progress_msg = wpmdb_strings.removing_local_backup;
2678
+ } else {
 
2679
  progress_msg = wpmdb_strings.removing_local_temp_tables;
2680
  }
2681
+ } else if ( 'push' === migration_intent ) {
 
2682
  if ( 'backup' === stage ) {
2683
  progress_msg = wpmdb_strings.removing_remote_sql;
2684
+ } else {
 
2685
  progress_msg = wpmdb_strings.removing_remote_temp_tables;
2686
  }
2687
  }
2709
  console.log( textStatus );
2710
  console.log( errorThrown );
2711
  doing_ajax = false;
2712
+ wpmdb.common.migration_error = true;
2713
+ wpmdb.functions.migration_complete_events();
2714
  return;
2715
  },
2716
  success: function( data ) {
2720
  $( '.progress-title' ).html( wpmdb_strings.migration_cancellation_failed );
2721
  $( '.progress-text' ).html( data );
2722
  $( '.progress-text' ).addClass( 'migration-error' );
2723
+ wpmdb.common.migration_error = true;
2724
+ wpmdb.functions.migration_complete_events();
2725
  return;
2726
  }
2727
  completed_msg = wpmdb_strings.migration_cancelled;
2728
  $( '.progress-text' ).hide();
2729
+ wpmdb.functions.migration_complete_events();
2730
  }
2731
  } );
2732
+ } else {
2733
+ wpmdb.common.next_step_in_migration.fn.apply( null, wpmdb.common.next_step_in_migration.args );
 
2734
  }
2735
  };
2736
 
2739
  $( '.connection-status' ).removeClass( 'notification-message error-notice migration-error' );
2740
  $( '.connection-status' ).append( ajax_spinner );
2741
 
2742
+ var connection_info = $.trim( $( '.pull-push-connection-info' ).val() ).split( '\n' );
2743
 
2744
  doing_ajax = true;
2745
  disable_export_type_controls();
2767
  doing_ajax = false;
2768
  enable_export_type_controls();
2769
 
2770
+ if ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {
2771
  $( '.connection-status' ).html( data.body );
2772
  $( '.connection-status' ).addClass( 'notification-message error-notice migration-error' );
2773
 
2807
  $( '.ajax-spinner' ).remove();
2808
  doing_ajax = false;
2809
 
2810
+ if ( 'undefined' !== typeof data.wpmdb_error && 1 === data.wpmdb_error ) {
2811
  $( '.invalid-licence' ).html( data.body );
2812
  return;
2813
  }
2814
 
2815
+ if ( 'undefined' !== typeof data.wpmdb_dbrains_api_down && 1 === data.wpmdb_dbrains_api_down ) {
2816
  $( '.invalid-licence' ).html( wpmdb_strings.temporarily_activated_licence );
2817
  $( '.invalid-licence' ).append( data.body );
2818
  return;
2834
  } );
2835
  } );
2836
 
2837
+ })( jQuery, wpmdb );
asset/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- var migration_complete,migration_complete_events,migrate_table_recursive,execute_next_step,wpmdb_flush;!function(a){function b(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a}function c(){U=0,X=a(".timer"),Y=wpmdb_strings.time_elapsed+" ",x=setInterval(e,1e3)}function d(){var a=Math.floor(U/3600)%24,c=Math.floor(U/60)%60,d=U%60,e=Y+b(a,2,0)+":"+b(c,2,0)+":"+b(d,2,0);X.html(e)}function e(){U+=1,d()}function f(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 g(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function h(b,c,d){var e=b.substr(0,b.indexOf(":"));return d!==e&&-1!==b.indexOf("https")?(a(".ssl-notice").show(),K=!0,b=b.replace("https","http"),void a(".pull-push-connection-info").val(b+"\n"+c)):void(K=!1)}function i(b){b!==wpmdb_data.this_prefix&&(a(".remote-prefix").html(b),J=!0,"pull"===wpmdb_migration_type()?a(".prefix-notice.pull").show():a(".prefix-notice.push").show())}function j(){if("undefined"!=typeof connection_data&&!1!==connection_data){var b,c=wpmdb_migration_type(),d=a("input[name=table_migrate_option]:checked").val();a(".mixed-case-table-name-notice").hide(),b="migrate_select"===d?a("#select-tables").val():"push"===c||"savefile"===c?wpmdb_data.this_prefixed_tables:connection_data.prefixed_tables,null!==b&&(b=b.join(""),b!==b.toLowerCase()&&("1"===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 k(a){var b=a,c=b.replace(/\/\/(.*)@/,"//").replace("http://","").replace("https://","").replace("www.","");return c}function l(a,b,c){var d,e,f=k(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 m(a){return a.replace(/^https?:/i,"")}function n(){a(".option-group").each(function(){a("input",this).attr("disabled","disabled"),a("label",this).css("cursor","default")})}function o(){a(".option-group").each(function(){a("input",this).removeAttr("disabled"),a("label",this).css("cursor","pointer")})}function p(b,c,d){a(".slider",b).slider("value",c),a(".amount",b).html(wpmdb_add_commas(c)+" "+d)}function q(){!0===R?(R=!1,C=!0,a(".progress-title").html(S),a(".progress-text").html(T),a(".migration-progress-ajax-spinner").show(),a(".pause-resume").html(wpmdb_strings.pause),x=setInterval(e,1e3),execute_next_step()):(R=!0,C=!1,S=a(".progress-title").html(),T=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 r(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 s,t,u,v,w,x,y,z="",A=!1,B="",C=!1,D=!1,E=!1,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O="",P="",Q="",R=!1,S="",T="",U=0,V=0,W=!1,X=!1,Y="",Z=!1,$=0,_=400,ab=ajaxurl.replace("/admin-ajax.php",""),bb=ab+"/images/spinner";window.devicePixelRatio>=2&&(bb+="-2x"),bb+=".gif";var cb='<img src="'+bb+'" alt="" class="ajax-spinner general-spinner" />';window.onbeforeunload=function(a){return N?(a=a||window.event,a&&(a.returnValue=wpmdb_strings.sure),wpmdb_strings.sure):void 0},a(document).ready(function(){function b(b){I=!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(_,function(){a(this).empty().html(c).stop().fadeIn(_)}),f.stop().fadeOut(_,function(){a(this).empty().html(d).stop().fadeIn(_)}),g.stop().fadeOut(_,function(){a(this).empty().html(e).stop().fadeIn(_)})}})}function d(){void 0!==wpmdb_data&&void 0!==wpmdb_data.this_tables&&void 0!==wpmdb_data.this_table_sizes&&(tb=r(wpmdb_data.this_tables,wpmdb_data.this_table_sizes,a(tb).val())),void 0!==connection_data&&void 0!==connection_data.tables&&void 0!==connection_data.table_sizes_hr&&(ub=r(connection_data.tables,connection_data.table_sizes_hr,a(ub).val()))}function e(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(tb)}function S(){a("#select-tables").remove(),a(".select-tables-wrap").prepend(ub)}function T(){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 U(){a(".table-migrate-options").show()}function X(){a("#select-tables").children("option").prop("selected",!0)}function Y(){return m(wpmdb_data.this_url)}function ab(){var b=wpmdb_migration_type(),c=a.trim(a(".pull-push-connection-info").val()).split("\n");if("undefined"!=typeof wpmdb_default_profile&&!0!==wpmdb_default_profile&&"savefile"!==b&&!C&&wpmdb_data.is_pro){C=!0,n(),a(".connection-status").html(wpmdb_strings.establishing_remote_connection),a(".connection-status").removeClass("notification-message error-notice migration-error"),a(".connection-status").append(cb);var d=wpmdb_migration_type();a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:c[0],key:c[1],intent:d,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(jb(b.responseText,"(#102)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),C=!1,o()},success:function(b){if(a(".ajax-spinner").remove(),C=!1,o(),"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error)return 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());h(c[0],c[1],b.scheme),i(b.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(),A=!0,connection_data=b,hb(),j();var d="";wpmdb_default_profile===!1&&"undefined"!=typeof wpmdb_loaded_tables&&(d=wpmdb_loaded_tables),ub=r(connection_data.tables,connection_data.table_sizes_hr,d);var e="";wpmdb_default_profile===!1&&"undefined"!=typeof wpmdb_loaded_post_types&&("undefined"!=typeof b.select_post_types?(a("#exclude-post-types").attr("checked","checked"),a(".post-type-select-wrap").show(),e=b.select_post_types):e=wpmdb_loaded_post_types);var f=document.createElement("select");a(f).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(connection_data.post_types,function(b,c){var d=a.inArray(c,e);d=-1!==d||wpmdb_convert_exclude_revisions===!0&&"revision"!==c?' selected="selected" ':" ",a(f).append("<option"+d+'value="'+c+'">'+c+"</option>")}),wb=f;var g="";wpmdb_default_profile===!1&&"undefined"!=typeof wpmdb_loaded_tables_backup&&(g=wpmdb_loaded_tables_backup);var k=document.createElement("select");a(k).attr({multiple:"multiple",name:"select_backup[]",id:"select-backup","class":"multiselect"}),a.each(connection_data.tables,function(b,c){var d=a.inArray(c,g);d=-1!==d?' selected="selected" ':" ",a(k).append("<option"+d+'value="'+c+'">'+c+" ("+connection_data.table_sizes_hr[c]+")</option>")}),xb=k,"pull"===wpmdb_migration_type()?(a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(wb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(yb),a(".table-prefix").html(b.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#select-backup").remove(),a(".backup-tables-wrap").prepend(xb)),a.wpmdb.do_action("verify_connection_to_remote_site",connection_data)}})}}function db(c,d){a(".licence-input, .register-licence").remove(),a(".licence-not-entered").prepend(c.masked_licence),a(".support-content").empty().html("<p>"+wpmdb_strings.fetching_license+'<img src="'+bb+'" alt="" class="ajax-spinner general-spinner" /></p>'),b(d),a(".migrate-selection label").removeClass("disabled"),a(".migrate-selection input").removeAttr("disabled")}function eb(){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 fb(){var b=a(".progress-content").outerHeight();a(".progress-content").animate({top:"-"+b+"px"},400,"swing",function(){a("#overlay").remove(),a(".progress-content").remove()}),M=!1}function gb(){var b;if(a(".save-settings-button").blur(),!F){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();F=!0,b=a("#migrate-form").serialize(),a(".save-settings-button").attr("disabled","disabled").after('<img src="'+bb+'" alt="" class="save-profile-ajax-spinner general-spinner" />'),C=!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(){C=!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()}),F=!1},success:function(b){var e=parseInt(a("#migrate-form input[name=save_migration_profile_option]:checked").val(),10)+1;if(C=!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()}),F=!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="tools.php?page=wp-migrate-db-pro"> Saved Profiles </a>').append('<span class="crumb">'+j+"</span>");a("#migrate-form").prepend(k)}window.history.pushState({updated_profile_id:e},null,i)}}})}}function hb(){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 b;a.trim(a(".pull-push-connection-info").val()).split("\n")}wpmdb_toggle_migration_action_text(),"pull"===wpmdb_migration_type()?(a(".pull-list li").append(zb),zb.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),A?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(connection_data.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir),H===!1&&(b=k(connection_data.url),a(".create-new-profile").val(b)),J===!0&&a(".prefix-notice.pull").show(),K===!0&&a(".ssl-notice").show(),L===!0&&(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(zb),zb.show(function(){var b=a(this).find(".pull-push-connection-info");b.val()||b.focus()}),A?(a(".connection-status").hide(),a(".step-two").show(),a(".table-prefix").html(wpmdb_data.this_prefix),a(".uploads-dir").html(connection_data.uploads_dir),H===!1&&(b=k(connection_data.url),a(".create-new-profile").val(b)),J===!0&&a(".prefix-notice.push").show(),K===!0&&a(".ssl-notice").show(),L===!0&&(a(".different-plugin-version-notice").show(),a(".step-two").hide()),wpmdb_toggle_migration_action_text(),"0"===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(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(),H===!1&&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())),j(),a.wpmdb.do_action("move_connection_info_box",{migration_type:wpmdb_migration_type(),last_migration_type:B})}function ib(){"push"===wpmdb_migration_type()||"savefile"===wpmdb_migration_type()?("pull"===B&&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)}),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(vb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(xb)):"pull"===wpmdb_migration_type()&&((""===B||"push"===B||"savefile"===B)&&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)}),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(wb),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(yb)),B=wpmdb_migration_type()}function jb(a,b,c){return wpmdbGetAjaxErrors(wpmdb_strings.connection_local_server_problem,b,a,c)}function kb(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 lb(c,d){a(".nav-tab").removeClass("nav-tab-active"),a(".nav-tab."+c).addClass("nav-tab-active"),a(".content-tab").hide(),a("."+c+"-tab").show(),"settings"===c&&!1===I&&"1"===wpmdb_data.has_licence&&(a("p.licence-status").append("Checking License... ").append(cb),b()),"help"===c&&(eb(),!1===I&&"1"===wpmdb_data.has_licence&&(a(".support-content p").append(cb),b())),"addons"===c&&!0!==d&&!1===I&&"1"===wpmdb_data.has_licence&&(a(".addons-content p").append(cb),b())}function mb(b){var c=a(".pull-push-connection-info");if(!C&&!a(c).hasClass("temp-disabled")){b=a(".pull-push-connection-info").val();var e=a.trim(b).split("\n"),f=!1,g="";if(""===e&&(f=!0,g=wpmdb_strings.connection_info_missing),2===e.length||f||(f=!0,g=wpmdb_strings.connection_info_incorrect),f||kb(e[0])||(f=!0,g=wpmdb_strings.connection_info_url_invalid),!f&&e[1].length<32&&(f=!0,g=wpmdb_strings.connection_info_key_invalid),f||e[0]!==wpmdb_data.connection_info[0]||(f=!0,g=wpmdb_strings.connection_info_local_url),f||e[1]!==wpmdb_data.connection_info[1]||(f=!0,g=wpmdb_strings.connection_info_local_key),f)return a(".connection-status").html(g),void a(".connection-status").addClass("notification-message error-notice migration-error");var l=e[0]+"\n"+e[1];!1===wpmdb_data.openssl_available&&(e[0]=e[0].replace("https://","http://"),l=e[0]+"\n"+e[1],a(".pull-push-connection-info").val(l)),J=!1,C=!0,n(),a(".basic-access-auth-wrapper").is(":visible")&&(e[0]=e[0].replace(/\/\/(.*)@/,"//"),e[0]=e[0].replace("//","//"+encodeURIComponent(a.trim(a(".auth-username").val()))+":"+encodeURIComponent(a.trim(a(".auth-password").val()))+"@"),l=e[0]+"\n"+e[1],a(".pull-push-connection-info").val(l),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(cb);var p=wpmdb_migration_type();H=!1,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"wpmdb_verify_connection_to_remote_site",url:e[0],key:e[1],intent:p,nonce:wpmdb_data.nonces.verify_connection_to_remote_site},error:function(b){a(".connection-status").html(jb(b.responseText,"(#100)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),C=!1,o()},success:function(b){if(a(".ajax-spinner").remove(),C=!1,o(),h(e[0],e[1],b.scheme),"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error)return 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());var c=k(b.url);a(".create-new-profile").val(c),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(),i(b.prefix),A=!0,connection_data=b,hb(),ib(),j(),d(),xb=a(ub).clone(),a(xb).attr({name:"select_backup[]",id:"select-backup"});var f=document.createElement("select");a(f).attr({multiple:"multiple",name:"select_post_types[]",id:"select-post-types","class":"multiselect"}),a.each(connection_data.post_types,function(b,c){a(f).append('<option value="'+c+'">'+c+"</option>")}),wb=f,a("#new-path-missing-warning, #new-url-missing-warning").hide(),"pull"===wpmdb_migration_type()?(a("#new-url").val(m(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(m(b.url))),a("#old-url").val(m(b.url)),a("#old-path").val(b.path),a.wpmdb.do_action("wpmdb_update_pull_table_select"),a("#select-post-types").remove(),a(".select-post-types-wrap").prepend(wb),a(".table-prefix").html(b.prefix),a(".uploads-dir").html(wpmdb_data.this_uploads_dir)):(a("#new-url").val(m(b.url)),a("#new-path").val(b.path),"true"===wpmdb_data.is_multisite&&a('.replace-row.pin .old-replace-col input[type="text"]').val(m(wpmdb_data.this_url)),a.wpmdb.do_action("wpmdb_update_push_table_select"),a("#select-backup").remove(),a(".backup-tables-wrap").prepend(xb)),next_step_in_migration={fn:a.wpmdb.do_action,args:["verify_connection_to_remote_site",connection_data]},execute_next_step()}})}}function nb(){W=!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===R&&(R=!1,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(cb),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(),(navigator.userAgent.indexOf("MSIE")>0||navigator.userAgent.indexOf("Trident")>0)&&a(".ie-warning").show(),0===wpmdb_data.valid_licence&&a("#savefile").prop("checked",!0);var ob=a(".max-request-size"),pb=a(".slider",ob);pb.slider({range:"min",value:parseInt(wpmdb_data.max_request/1024),min:512,max:parseInt(wpmdb_data.bottleneck/1024),step:1,create:function(){p(ob,wpmdb_data.max_request/1024,"kB")},slide:function(a,b){p(ob,b.value,"kB")},stop:function(b,c){a(".amount",ob).after('<img src="'+bb+'" alt="" class="slider-spinner general-spinner" />'),pb.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(){pb.slider("enable"),a(".slider-spinner",ob).remove(),alert(wpmdb_strings.max_request_size_problem),p(ob,wpmdb_data.max_request/1024,"kB"),pb.slider("enable")},success:function(){pb.slider("enable"),a(".slider-success-msg",ob).show(),a(".slider-success-msg",ob).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",ob).remove()}})}});var qb=a(".delay-between-requests"),rb=a(".slider",qb);rb.slider({range:"min",value:parseInt(wpmdb_data.delay_between_requests/1e3),min:0,max:10,step:1,create:function(){p(qb,wpmdb_data.delay_between_requests/1e3,"s")},slide:function(a,b){p(qb,b.value,"s")},stop:function(b,c){a(".amount",qb).after('<img src="'+bb+'" alt="" class="slider-spinner general-spinner" />'),rb.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(){rb.slider("enable"),a(".slider-spinner",qb).remove(),alert(wpmdb_strings.delay_between_requests_problem),p(qb,wpmdb_data.delay_between_requests/1e3,"s"),rb.slider("enable")},success:function(){wpmdb_data.delay_between_requests=parseInt(1e3*c.value),rb.slider("enable"),a(".slider-success-msg",qb).show(),a(".slider-success-msg",qb).fadeOut(2e3,function(){a(this).hide()}),a(".slider-spinner",qb).remove()}})}});var sb=a(".progress-content").clone();a(".progress-content").remove();var tb=a("#select-tables").clone(),ub=a("#select-tables").clone(),vb=a("#select-post-types").clone(),wb=a("#select-post-types").clone(),xb=a("#select-backup").clone(),yb=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()),B=wpmdb_migration_type(),a(".content-tab").on("click",".check-my-licence-again",function(c){c.preventDefault(),I=!1,a(c.target).replaceWith("Checking... "+cb),b(null,"all")}),a.wpmdb.add_action("wpmdb_refresh_table_selects",d),a.wpmdb.add_action("wpmdb_update_push_table_select",e),a.wpmdb.add_action("wpmdb_update_pull_table_select",S),a.wpmdb.add_action("wpmdb_disable_table_migration_options",T),a.wpmdb.add_action("wpmdb_enable_table_migration_options",U),a.wpmdb.add_action("wpmdb_select_all_tables",X),a.wpmdb.add_filter("wpmdb_base_old_url",Y),ab(),a("body").on("click",".js-action-link",function(b){b.preventDefault(),a(this).blur()}),a(".licence-form").submit(function(b){if(b.preventDefault(),!D){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"),D=!0,a(".button.register-licence").after('<img src="'+bb+'" 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(){D=!1,a(".register-licence-ajax-spinner").remove(),a(".licence-status").html(wpmdb_strings.register_license_problem)},success:function(b){if(D=!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&&(db(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"),db(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(b){function d(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,0>d?(j=0-d,d=0):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}),g=0,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()}g+=a(this).width(),1>a(this).width()&&b[c]!==i&&(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=0;0!==e[i]&&100>g&&(k=Math.round(e[i]/d*100)),a(".progress-tables .progress-chunk:last").css("width",k+"%"),a(".progress-chunk-hover:last").css("width",k+"%");var l=[e,d];return l}if(a(this).blur(),b.preventDefault(),z="",!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);
2
- var e=!1,g=!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),e=!0),a("#new-path").length&&!a("#new-path").val()&&(a("#new-path-missing-warning").show(),!1===e&&(a("#new-path").focus(),a("html,body").scrollTop(0)),g=!0),!0!==e&&!0!==g){a("#save-migration-profile").is(":checked")&&gb(),v=a("#migrate-form").serialize();var h=a(document).height();a("body").append('<div id="overlay"></div>'),a("#overlay").height(h).css({position:"fixed",top:0,left:0,width:"100%","z-index":99999,display:"none"});var i=sb.clone();s=wpmdb_migration_type(),w="backup","savefile"===s&&(w="migrate"),a("#create-backup").is(":checked")===!1&&(w="migrate");var j=a("input[name=table_migrate_option]:checked").val(),k=a.trim(a(".pull-push-connection-info").val()).split("\n"),m="";t=k[0],u=k[1];var n="";a("#overlay").after(i),y=wpmdb_strings.exporting_complete,"savefile"===s?n=wpmdb_strings.exporting_please_wait:(n=l(t,s,"migrating"),y=l(t,s,"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"===w?("migrate_only_with_prefix"===p&&"backup_selected"===o&&(o="backup_only_with_prefix"),"push"===s?(m=connection_data.table_rows,"backup_only_with_prefix"===o?Q=connection_data.prefixed_tables:"backup_selected"===o?(q=a("#select-tables").val(),Q=f(q,connection_data.tables)):"backup_manual_select"===o&&(Q=a("#select-backup").val())):(m=wpmdb_data.this_table_rows,"backup_only_with_prefix"===o?Q=wpmdb_data.this_prefixed_tables:"backup_selected"===o?(q=a("#select-tables").val(),Q=f(q,wpmdb_data.this_tables)):"backup_manual_select"===o&&(Q=a("#select-backup").val()))):"migrate_select"===j?(Q=a("#select-tables").val(),m="push"===s||"savefile"===s?wpmdb_data.this_table_rows:connection_data.table_rows):"push"===s||"savefile"===s?(Q=wpmdb_data.this_prefixed_tables,m=wpmdb_data.this_table_rows):(Q=connection_data.prefixed_tables,m=connection_data.table_rows);var r=d(Q,m);m=r[0];var x=r[1];a(".progress-title").after('<img src="'+bb+'" alt="" class="migration-progress-ajax-spinner general-spinner" />');var A=a(".progress-content").outerHeight();a(".progress-content").css("top","-"+A+"px").show().animate({top:"0px"}),c(),N=!0;var B={action:"wpmdb_initiate_migration",intent:s,url:t,key:u,form_data:v,stage:w,nonce:wpmdb_data.nonces.initiate_migration};"savefile"!==s&&(B.temp_prefix=connection_data.temp_prefix),C=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:B,error:function(b,c,d){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(jb(b.responseText,"(#112)",b)),a(".progress-text").addClass("migration-error"),console.log(b),console.log(c),console.log(d),C=!1,migration_error=!0,migration_complete_events()},success:function(b){if(C=!1,"undefined"!=typeof b&&"undefined"!=typeof b.wpmdb_error&&1===b.wpmdb_error)return migration_error=!0,migration_complete_events(),a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),void a(".progress-text").html(b.body);z=b.migration_state_id;var c=0,e=0;V=0;var f=0,g=0,h=0,i=0;$=0,"savefile"!==s&&"undefined"!=typeof connection_data&&"undefined"!=typeof connection_data.delay_between_requests&&($=Math.max(parseInt(wpmdb_data.delay_between_requests),parseInt(connection_data.delay_between_requests))),migrate_table_recursive=function(b,k){if(c>=Q.length){if("backup"!==w)return a(".progress-label").removeClass("label-visible"),hooks=a.wpmdb.apply_filters("wpmdb_before_migration_complete_hooks",hooks),hooks.push("migration_complete"),hooks.push("wpmdb_flush"),hooks=a.wpmdb.apply_filters("wpmdb_after_migration_complete_hooks",hooks),hooks.push("migration_complete_events"),next_step_in_migration={fn:wpmdb_call_next_hook},void execute_next_step();w="migrate",c=0,e=0,V=0,a(".progress-bar").width("0px"),"migrate_select"===j?(Q=a("#select-tables").val(),m="push"===s||"savefile"===s?wpmdb_data.this_table_rows:connection_data.table_rows):"push"===s||"savefile"===s?(Q=wpmdb_data.this_prefixed_tables,m=wpmdb_data.this_table_rows):(Q=connection_data.prefixed_tables,m=connection_data.table_rows),a(".progress-tables").empty(),a(".progress-tables-hover-boxes").empty(),r=d(Q,m),m=r[0],x=r[1]}a(".progress-text").html("backup"===w?V+"% - "+wpmdb_strings.backing_up+' "'+Q[c]+'"':V+"% - "+wpmdb_strings.migrating+' "'+Q[c]+'"');var l=0;c===Q.length-1&&(l=1);var n=0;"savefile"!==s&&1===parseInt(connection_data.gzip)&&(n=1);var o={action:"wpmdb_migrate_table",migration_state_id:z,table:Q[c],stage:w,current_row:b,last_table:l,primary_keys:k,gzip:n,nonce:wpmdb_data.nonces.migrate_table};"savefile"!==s&&(o.bottleneck=connection_data.bottleneck,o.prefix=connection_data.prefix),connection_data&&connection_data.path_current_site&&connection_data.domain&&(o.path_current_site=connection_data.path_current_site,o.domain_current_site=connection_data.domain),C=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,timeout:0,data:o,error:function(b,d,e){a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.table_process_problem+" "+Q[c]),a(".progress-text").append("<br /><br />"+wpmdb_strings.status+": "+b.status+" "+b.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+b.responseText),a(".progress-text").addClass("migration-error"),C=!1,console.log(b),console.log(d),console.log(e),migration_error=!0,migration_complete_events()},success:function(b){C=!1,b=a.trim(b);var d=wpmdb_parse_json(b);return!1===d||null===d?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(""===b||null===b?wpmdb_strings.table_process_problem_empty_response+" "+Q[c]:jb(b,null,null)),a(".progress-text").addClass("migration-error"),migration_error=!0,void migration_complete_events()):"undefined"!=typeof d.wpmdb_error&&1===d.wpmdb_error?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").addClass("migration-error"),a(".progress-text").html(d.body),migration_error=!0,void migration_complete_events()):(1===l&&"savefile"===s&&("undefined"!=typeof d.dump_filename&&(O=d.dump_filename),"undefined"!=typeof d.dump_path&&(P=d.dump_path)),-1===d.current_row||"-1"===d.current_row?(e-=i,i=0,h=0,e+=parseInt(m[Q[c]]),c++,d.current_row="",d.primary_keys=""):(g=parseInt(d.current_row),f=g-h,h=g,e+=f,i+=f),V=Math.floor(e/x*100),a(".progress-bar").width(V+"%"),next_step_in_migration={fn:migrate_table_recursive,args:[d.current_row,d.primary_keys]},void execute_next_step())}})},next_step_in_migration={fn:migrate_table_recursive,args:["-1",""]},execute_next_step()}})}}}),migration_complete_events=function(){!1===migration_error&&(""===non_fatal_errors?("savefile"!==s&&!0===a("#save_computer").is(":checked")&&a(".progress-text").css("visibility","hidden"),a(".progress-title").html(y).append('<div class="dashicons dashicons-yes"></div>')):(a(".progress-text").html(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(),hooks=[],call_stack=[],migration_error=!1,N=!1,M=!0,R=!1,W=!1,C=!1,non_fatal_errors="",a(".progress-label").remove(),a(".migration-progress-ajax-spinner").remove(),a(".close-progress-content").show(),a("#overlay").css("cursor","pointer"),clearInterval(x)},migration_complete=function(){if(a(".migration-controls").fadeOut(),"savefile"===s){N=!1;var b=wpmdb_strings.migration_complete;if(a("#save_computer").is(":checked")){var c=wpmdb_data.this_download_url+encodeURIComponent(O);a("#gzip_file").is(":checked")&&(c+="&gzip=1"),window.location=c}else b=wpmdb_strings.completed_dump_located_at+" "+P;migration_error===!1&&(a(".progress-text").html(b),migration_complete_events(),a(".progress-title").html(y))}else a(".progress-text").html(wpmdb_strings.finalizing_migration),C=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_finalize_migration",migration_state_id:z,prefix:connection_data.prefix,tables:Q.join(","),nonce:wpmdb_data.nonces.finalize_migration},error:function(b,c,d){C=!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(b+" : "+c+" : "+d),migration_error=!0,migration_complete_events()},success:function(b){return C=!1,"1"!==a.trim(b)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(b),a(".progress-text").addClass("migration-error"),migration_error=!0,void migration_complete_events()):(next_step_in_migration={fn:wpmdb_call_next_hook},void execute_next_step())}})},wpmdb_flush=function(){"savefile"!==s&&(a(".progress-text").html(wpmdb_strings.flushing),C=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:{action:"wpmdb_flush",migration_state_id:z,nonce:wpmdb_data.nonces.flush},error:function(b,c,d){C=!1,a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(wpmdb_strings.flush_problem),a(".progress-text").addClass("migration-error"),alert(b+" : "+c+" : "+d),migration_error=!0,migration_complete_events()},success:function(b){return C=!1,"1"!==a.trim(b)?(a(".progress-title").html(wpmdb_strings.migration_failed),a(".progress-text").html(b),a(".progress-text").addClass("migration-error"),migration_error=!0,void migration_complete_events()):(next_step_in_migration={fn:wpmdb_call_next_hook},void execute_next_step())}}))},a("body").on("click",".close-progress-content-button",function(){fb()}),a("body").on("click","#overlay",function(){M===!0&&fb()}),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 gb()}),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 zb=a(".connection-info-wrapper");hb(),a(".migrate-selection.option-group input[type=radio]").change(function(){hb(),A&&ib()}),"pull"!==wpmdb_migration_type()&&"push"!==wpmdb_migration_type()||A||(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,lb(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(),a(".replace-row").length<2&&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 Ab="";window.location.hash&&(Ab=window.location.hash.substring(1),lb(Ab,!1)),""!==g("install-plugin")&&(Ab="addons",I=!0,lb(Ab,!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&&!E&&(E=!0,a(".reset-api-key").after('<img src="'+bb+'" 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(),E=!1},success:function(b){a(".reset-api-key-ajax-spinner").remove(),E=!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(!G){a(this).addClass("disabled");var b=a("#selected-plugins");a(b).attr("disabled","disabled"),G=!0,a(this).after('<img src="'+bb+'" 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"),G=!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"),G=!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),A=!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(cb);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(),mb()}),a(".pull-push-connection-info").bind("paste",function(){setTimeout(function(){mb()},0)}),a("body").on("click",".try-again",function(){mb()}),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),mb()}),a(".create-new-profile").change(function(){H=!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){q(a)}),a("body").on("click",".cancel",function(a){nb(a)}),a(".enter-licence").click(function(){a(".settings").click(),a(".licence-input").focus()}),execute_next_step=function(){if($>0&&!1===Z)return void setTimeout(function(){Z=!0,execute_next_step()},$);if(Z=!1,!0===R)return a(".migration-progress-ajax-spinner").hide(),clearInterval(x),a(".progress-text").html(wpmdb_strings.paused),a("body").on("click",".pause-resume",function(a){q(a)}),a("body").on("click",".cancel",function(a){nb(a)}),void a(".pause-resume").html(wpmdb_strings.resume);if(!0===W){s=wpmdb_migration_type();var b;"savefile"===s?b=wpmdb_strings.removing_local_sql:"pull"===s?b="backup"===w?wpmdb_strings.removing_local_backup:wpmdb_strings.removing_local_temp_tables:"push"===s&&(b="backup"===w?wpmdb_strings.removing_remote_sql:wpmdb_strings.removing_remote_temp_tables),a(".progress-text").html(b);var c={action:"wpmdb_cancel_migration",migration_state_id:z};C=!0,a.ajax({url:ajaxurl,type:"POST",dataType:"text",cache:!1,data:c,error:function(b,c,d){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+": "+b.status+" "+b.statusText+"<br /><br />"+wpmdb_strings.response+":<br />"+b.responseText),a(".progress-text").addClass("migration-error"),console.log(b),console.log(c),console.log(d),C=!1,migration_error=!0,migration_complete_events()},success:function(b){return C=!1,b=a.trim(b),"push"===s&&"1"!==b||"push"!==s&&""!==b?(a(".progress-title").html(wpmdb_strings.migration_cancellation_failed),a(".progress-text").html(b),a(".progress-text").addClass("migration-error"),migration_error=!0,void migration_complete_events()):(y=wpmdb_strings.migration_cancelled,a(".progress-text").hide(),void migration_complete_events())}})}else next_step_in_migration.fn.apply(null,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(cb);var b=a.trim(a(".pull-push-connection-info").val()).split("\n");C=!0,n(),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(jb(b.responseText,"(#143)",b)),a(".connection-status").addClass("notification-message error-notice migration-error"),a(".ajax-spinner").remove(),C=!1,o()},success:function(b){return a(".ajax-spinner").remove(),C=!1,o(),"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 mb()}})}),a("body").on("click",".reactivate-licence",function(){C=!0,a(".invalid-licence").empty().html(wpmdb_strings.attempting_to_activate_licence),a(".invalid-licence").append(cb),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(),C=!1},success:function(b){return a(".ajax-spinner").remove(),C=!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(){j()}),a("body").on("change","#select-tables",function(){j()})})}(jQuery);
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);
class/wpmdb-base.php CHANGED
@@ -128,15 +128,15 @@ class WPMDB_Base {
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.2',
132
  ),
133
  'wp-migrate-db-pro-cli/wp-migrate-db-pro-cli.php' => array(
134
  'name' => 'CLI',
135
- 'required_version' => '1.2',
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',
140
  )
141
  );
142
 
@@ -370,16 +370,16 @@ class WPMDB_Base {
370
 
371
  return false;
372
  }
373
- } elseif ( '0' === $response['body'] ) {
374
- if ( 0 === strpos( $url, 'https://' ) && 'ajax_verify_connection_to_remote_site' == $scope ) {
375
- return $this->retry_remote_post( $url, $data, $scope, $args, $expecting_serial );
376
- }
377
- $this->error = sprintf( __( 'WP Migrate DB Pro does not seem to be installed or active on the remote site. (#131 - scope: %s)', 'wp-migrate-db' ), $scope );
378
- $this->log_error( $this->error, $response );
379
-
380
- return false;
381
  } elseif ( empty( $response['body'] ) ) {
382
- $this->error = sprintf( __( 'A response was expected from the remote, instead we got nothing. (#146 - scope: %1$s) Please review %2$s for possible solutions.', 'wp-migrate-db' ), $scope, sprintf( '<a href="https://deliciousbrains.com/wp-migrate-db-pro/doc/a-response-was-expected-from-the-remote/" target="_blank">%1$s</a>', __( 'our documentation', 'wp-migrate-db' ) ) );
 
 
 
 
 
 
 
 
383
  $this->log_error( $this->error, $response );
384
 
385
  return false;
@@ -1254,6 +1254,13 @@ class WPMDB_Base {
1254
  return $key;
1255
  }
1256
 
 
 
 
 
 
 
 
1257
  function get_bottleneck( $type = 'regular' ) {
1258
  $suhosin_limit = false;
1259
  $suhosin_request_limit = false;
@@ -1270,8 +1277,13 @@ class WPMDB_Base {
1270
 
1271
  // we have to account for HTTP headers and other bloating, here we minus 1kb for bloat
1272
  $post_max_upper_size = apply_filters( 'wpmdb_post_max_upper_size', 26214400 );
 
1273
  $calculated_bottleneck = min( ( $this->get_post_max_size() - 1024 ), $post_max_upper_size );
1274
 
 
 
 
 
1275
  if ( $suhosin_limit ) {
1276
  $calculated_bottleneck = min( $calculated_bottleneck, $suhosin_limit - 1024 );
1277
  }
@@ -1312,20 +1324,13 @@ class WPMDB_Base {
1312
  return $val;
1313
  }
1314
 
 
 
 
 
 
1315
  function get_post_max_size() {
1316
- $val = trim( ini_get( 'post_max_size' ) );
1317
- $last = strtolower( $val[ strlen( $val ) - 1 ] );
1318
-
1319
- switch ( $last ) {
1320
- case 'g':
1321
- $val *= 1024;
1322
- case 'm':
1323
- $val *= 1024;
1324
- case 'k':
1325
- $val *= 1024;
1326
- }
1327
-
1328
- return $val;
1329
  }
1330
 
1331
  /**
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
 
370
 
371
  return false;
372
  }
 
 
 
 
 
 
 
 
373
  } elseif ( empty( $response['body'] ) ) {
374
+ if ( '0' === $response['body'] && 'ajax_verify_connection_to_remote_site' == $scope ) {
375
+ if ( 0 === strpos( $url, 'https://' ) ) {
376
+ return $this->retry_remote_post( $url, $data, $scope, $args, $expecting_serial );
377
+ } else {
378
+ $this->error = sprintf( __( 'WP Migrate DB Pro does not seem to be installed or active on the remote site. (#131 - scope: %s)', 'wp-migrate-db' ), $scope );
379
+ }
380
+ } else {
381
+ $this->error = sprintf( __( 'A response was expected from the remote, instead we got nothing. (#146 - scope: %1$s) Please review %2$s for possible solutions.', 'wp-migrate-db' ), $scope, sprintf( '<a href="https://deliciousbrains.com/wp-migrate-db-pro/doc/a-response-was-expected-from-the-remote/" target="_blank">%1$s</a>', __( 'our documentation', 'wp-migrate-db' ) ) );
382
+ }
383
  $this->log_error( $this->error, $response );
384
 
385
  return false;
1254
  return $key;
1255
  }
1256
 
1257
+ /**
1258
+ * Returns the wpmdb_bottleneck value in bytes
1259
+ *
1260
+ * @param string $type
1261
+ *
1262
+ * @return int
1263
+ */
1264
  function get_bottleneck( $type = 'regular' ) {
1265
  $suhosin_limit = false;
1266
  $suhosin_request_limit = false;
1277
 
1278
  // we have to account for HTTP headers and other bloating, here we minus 1kb for bloat
1279
  $post_max_upper_size = apply_filters( 'wpmdb_post_max_upper_size', 26214400 );
1280
+
1281
  $calculated_bottleneck = min( ( $this->get_post_max_size() - 1024 ), $post_max_upper_size );
1282
 
1283
+ if( 0 >= $calculated_bottleneck ) {
1284
+ $calculated_bottleneck = $post_max_upper_size;
1285
+ }
1286
+
1287
  if ( $suhosin_limit ) {
1288
  $calculated_bottleneck = min( $calculated_bottleneck, $suhosin_limit - 1024 );
1289
  }
1324
  return $val;
1325
  }
1326
 
1327
+ /**
1328
+ * Returns the php ini value for post_max_size in bytes
1329
+ *
1330
+ * @return int
1331
+ */
1332
  function get_post_max_size() {
1333
+ return $this->return_bytes( trim( ini_get( 'post_max_size' ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
1334
  }
1335
 
1336
  /**
class/wpmdb-command.php CHANGED
@@ -110,10 +110,10 @@ class WPMDB_Command extends WP_CLI_Command {
110
  $replace_old = array();
111
  $replace_new = array();
112
  if ( ! empty( $assoc_args['find'] ) ) {
113
- $replace_old = explode( ',', $assoc_args['find'] );
114
  }
115
  if ( ! empty( $assoc_args['replace'] ) ) {
116
- $replace_new = explode( ',', $assoc_args['replace'] );
117
  }
118
  if ( count( $replace_old ) !== count( $replace_new ) ) {
119
  return $wpmdb_cli->cli_error( sprintf( __( '%1$s and %2$s must contain the same number of values', 'wp-migrate-db-cli' ), '--find', '--replace' ) );
110
  $replace_old = array();
111
  $replace_new = array();
112
  if ( ! empty( $assoc_args['find'] ) ) {
113
+ $replace_old = str_getcsv( $assoc_args['find'] );
114
  }
115
  if ( ! empty( $assoc_args['replace'] ) ) {
116
+ $replace_new = str_getcsv( $assoc_args['replace'] );
117
  }
118
  if ( count( $replace_old ) !== count( $replace_new ) ) {
119
  return $wpmdb_cli->cli_error( sprintf( __( '%1$s and %2$s must contain the same number of values', 'wp-migrate-db-cli' ), '--find', '--replace' ) );
class/wpmdb-utils.php CHANGED
@@ -25,4 +25,41 @@ class WPMDB_Utils {
25
 
26
  return true;
27
  }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  return true;
27
  }
28
+
29
+ /**
30
+ * Checks if another version of WPMDB(Pro) is active and deactivates it.
31
+ * To be hooked on `activated_plugin` so other plugin is deactivated when current plugin is activated.
32
+ *
33
+ * @param string $plugin
34
+ *
35
+ */
36
+ public static function deactivate_other_instances( $plugin ) {
37
+ if ( ! in_array( basename( $plugin ), array( 'wp-migrate-db-pro.php', 'wp-migrate-db.php' ) ) ) {
38
+ return;
39
+ }
40
+
41
+ $plugin_to_deactivate = 'wp-migrate-db.php';
42
+ $deactivated_notice_id = '1';
43
+ if ( basename( $plugin ) == $plugin_to_deactivate ) {
44
+ $plugin_to_deactivate = 'wp-migrate-db-pro.php';
45
+ $deactivated_notice_id = '2';
46
+ }
47
+
48
+ if ( is_multisite() ) {
49
+ $active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
50
+ $active_plugins = array_keys( $active_plugins );
51
+ } else {
52
+ $active_plugins = (array) get_option( 'active_plugins', array() );
53
+ }
54
+
55
+ foreach ( $active_plugins as $basename ) {
56
+ if ( false !== strpos( $basename, $plugin_to_deactivate ) ) {
57
+ set_transient( 'wp_migrate_db_deactivated_notice_id', $deactivated_notice_id, 1 * HOUR_IN_SECONDS );
58
+ deactivate_plugins( $basename );
59
+
60
+ return;
61
+ }
62
+ }
63
+ }
64
+
65
+ }
class/wpmdb.php CHANGED
@@ -112,9 +112,6 @@ class WPMDB extends WPMDB_Base {
112
  '<a href="#" class="nav-tab js-action-link help" data-div-name="help-tab">' . esc_html( _x( 'Help', 'Get help or contact support', 'wp-migrate-db' ) ) . '</a>',
113
  );
114
 
115
- // automatically deactivate WPMDB Pro / Free if the other is already active
116
- add_action( 'activated_plugin', array( $this, 'deactivate_other_instances' ) );
117
-
118
  // display a notice when either WP Migrate DB or WP Migrate DB Pro is automatically deactivated
119
  add_action( 'pre_current_active_plugins', array( $this, 'plugin_deactivated_notice' ) );
120
 
@@ -531,6 +528,12 @@ class WPMDB extends WPMDB_Base {
531
  } else {
532
  echo 'No';
533
  }
 
 
 
 
 
 
534
  echo "\r\n\r\n";
535
 
536
  do_action( 'wpmdb_diagnostic_info' );
@@ -742,12 +745,12 @@ class WPMDB extends WPMDB_Base {
742
 
743
  if ( 'push' == $this->state_data['intent'] ) {
744
  // $db_version has been set to remote database's version.
745
- add_filter( 'wpmdb_create_table_query', array( $this, 'mysql_compat_filter' ), 10, 3 );
746
  } elseif ( 'savefile' == $this->state_data['intent'] && ! empty( $this->form_data['compatibility_older_mysql'] ) ) {
747
  // compatibility_older_mysql is currently a checkbox meaning pre-5.5 compatibility (we play safe and target 5.1),
748
  // this may change in the future to be a dropdown or radiobox returning the version to be compatible with.
749
  $db_version = '5.1';
750
- add_filter( 'wpmdb_create_table_query', array( $this, 'mysql_compat_filter' ), 10, 3 );
751
  }
752
  }
753
 
@@ -1394,7 +1397,7 @@ class WPMDB extends WPMDB_Base {
1394
  $alter_table_query = '';
1395
  $create_table[0][1] = $this->process_sql_constraint( $create_table[0][1], $table_name, $alter_table_query );
1396
 
1397
- $create_table[0][1] = apply_filters( 'wpmdb_create_table_query', $create_table[0][1], $table_name, $db_version );
1398
 
1399
  $this->stow( $create_table[0][1] . ";\n" );
1400
 
@@ -1447,6 +1450,8 @@ class WPMDB extends WPMDB_Base {
1447
  // $ints = holds a list of the possible integer types so as to not wrap them in quotation marks later in the insert statements
1448
  $defs = array();
1449
  $ints = array();
 
 
1450
  foreach ( $table_structure as $struct ) {
1451
  if ( ( 0 === strpos( $struct->Type, 'tinyint' ) ) ||
1452
  ( 0 === strpos( strtolower( $struct->Type ), 'smallint' ) ) ||
@@ -1456,6 +1461,10 @@ class WPMDB extends WPMDB_Base {
1456
  ) {
1457
  $defs[ strtolower( $struct->Field ) ] = ( null === $struct->Default ) ? 'NULL' : $struct->Default;
1458
  $ints[ strtolower( $struct->Field ) ] = '1';
 
 
 
 
1459
  }
1460
  }
1461
 
@@ -1608,13 +1617,26 @@ class WPMDB extends WPMDB_Base {
1608
  $first_select = false;
1609
  }
1610
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1611
  $join = implode( ' ', array_unique( $join ) );
1612
  $join = apply_filters( 'wpmdb_rows_join', $join, $table );
1613
  $where = apply_filters( 'wpmdb_rows_where', $where, $table );
1614
  $order_by = apply_filters( 'wpmdb_rows_order_by', $order_by, $table );
1615
  $limit = apply_filters( 'wpmdb_rows_limit', $limit, $table );
1616
 
1617
- $sql = 'SELECT ' . $this->backquote( $table ) . '.* FROM ' . $this->backquote( $table ) . " $join $where $order_by $limit";
1618
  $sql = apply_filters( 'wpmdb_rows_sql', $sql, $table );
1619
 
1620
  $table_data = $wpdb->get_results( $sql );
@@ -1659,6 +1681,24 @@ class WPMDB extends WPMDB_Base {
1659
  continue;
1660
  }
1661
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1662
  if ( is_multisite() && 'path' == $key && $this->state_data['stage'] != 'backup' && ( $wpdb->site == $table || $wpdb->blogs == $table ) ) {
1663
  $old_path_current_site = $this->get_path_current_site();
1664
  $new_path_current_site = '';
@@ -2452,6 +2492,7 @@ class WPMDB extends WPMDB_Base {
2452
  'this_tables' => $this->get_tables(),
2453
  'this_prefixed_tables' => $this->get_tables( 'prefix' ),
2454
  'this_table_sizes' => $this->get_table_sizes(),
 
2455
  'this_table_rows' => $this->get_table_row_count(),
2456
  'this_upload_url' => esc_html( addslashes( trailingslashit( $this->get_upload_info( 'url' ) ) ) ),
2457
  'this_upload_dir_long' => esc_html( addslashes( trailingslashit( $this->get_upload_info( 'path' ) ) ) ),
@@ -2459,6 +2500,7 @@ class WPMDB extends WPMDB_Base {
2459
  'this_website_name' => sanitize_title_with_dashes( DB_NAME ),
2460
  'this_download_url' => network_admin_url( $this->plugin_base . '&download=' ),
2461
  'this_prefix' => esc_html( $table_prefix ),
 
2462
  'is_multisite' => esc_html( is_multisite() ? 'true' : 'false' ),
2463
  'openssl_available' => esc_html( $this->open_ssl_enabled() ? 'true' : 'false' ),
2464
  'max_request' => esc_html( $this->settings['max_request'] ),
@@ -2659,35 +2701,6 @@ class WPMDB extends WPMDB_Base {
2659
  return __( 'Migrate DB', 'wp-migrate-db' );
2660
  }
2661
 
2662
- function deactivate_other_instances( $plugin ) {
2663
- if ( ! in_array( basename( $plugin ), array( 'wp-migrate-db-pro.php', 'wp-migrate-db.php' ) ) ) {
2664
- return;
2665
- }
2666
-
2667
- $plugin_to_deactivate = 'wp-migrate-db.php';
2668
- $deactivated_notice_id = '1';
2669
- if ( $plugin_to_deactivate == basename( $plugin ) ) {
2670
- $plugin_to_deactivate = 'wp-migrate-db-pro.php';
2671
- $deactivated_notice_id = '2';
2672
- }
2673
-
2674
- if ( is_multisite() ) {
2675
- $active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
2676
- $active_plugins = array_keys( $active_plugins );
2677
- } else {
2678
- $active_plugins = (array) get_option( 'active_plugins', array() );
2679
- }
2680
-
2681
- foreach ( $active_plugins as $basename ) {
2682
- if ( false !== strpos( $basename, $plugin_to_deactivate ) ) {
2683
- set_transient( 'wp_migrate_db_deactivated_notice_id', $deactivated_notice_id, 1 * HOUR_IN_SECONDS );
2684
- deactivate_plugins( $basename );
2685
-
2686
- return;
2687
- }
2688
- }
2689
- }
2690
-
2691
  function plugin_deactivated_notice() {
2692
  if ( false !== ( $deactivated_notice_id = get_transient( 'wp_migrate_db_deactivated_notice_id' ) ) ) {
2693
  if ( '1' === $deactivated_notice_id ) {
@@ -2731,14 +2744,16 @@ class WPMDB extends WPMDB_Base {
2731
  /**
2732
  * Ensures that the given create table sql string is compatible with the target database server version.
2733
  *
2734
- * @param $create_table
2735
- * @param $table
2736
- * @param $db_version
 
 
2737
  *
2738
  * @return mixed
2739
  */
2740
- function mysql_compat_filter( $create_table, $table, $db_version ) {
2741
- if ( empty( $db_version ) ) {
2742
  return $create_table;
2743
  }
2744
 
@@ -2750,9 +2765,30 @@ class WPMDB extends WPMDB_Base {
2750
 
2751
  // Replace utf8mb4 introduced in MySQL 5.5.3 with utf8. As of WordPress 4.2 utf8mb4 is used by default on supported MySQL versions
2752
  // but causes migrations to fail when the remote site uses MySQL < 5.5.3.
2753
- $create_table = preg_replace( '/(COLLATE\s)utf8mb4/', '$1utf8', $create_table ); // Column collation
2754
- $create_table = preg_replace( '/(COLLATE=)utf8mb4/', '$1utf8', $create_table ); // Table collation
2755
- $create_table = preg_replace( '/(CHARSET\s?=\s?)utf8mb4/', '$1utf8', $create_table ); // Table charset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2756
  }
2757
 
2758
  return $create_table;
112
  '<a href="#" class="nav-tab js-action-link help" data-div-name="help-tab">' . esc_html( _x( 'Help', 'Get help or contact support', 'wp-migrate-db' ) ) . '</a>',
113
  );
114
 
 
 
 
115
  // display a notice when either WP Migrate DB or WP Migrate DB Pro is automatically deactivated
116
  add_action( 'pre_current_active_plugins', array( $this, 'plugin_deactivated_notice' ) );
117
 
528
  } else {
529
  echo 'No';
530
  }
531
+ echo "\r\n";
532
+
533
+ echo 'Delay Between Requests: ';
534
+ $delay_between_requests = $this->settings['delay_between_requests'];
535
+ $delay_between_requests = $delay_between_requests > 0 ? $delay_between_requests / 1000 : $delay_between_requests;
536
+ echo esc_html( $delay_between_requests ) . ' s';
537
  echo "\r\n\r\n";
538
 
539
  do_action( 'wpmdb_diagnostic_info' );
745
 
746
  if ( 'push' == $this->state_data['intent'] ) {
747
  // $db_version has been set to remote database's version.
748
+ add_filter( 'wpmdb_create_table_query', array( $this, 'mysql_compat_filter' ), 10, 5 );
749
  } elseif ( 'savefile' == $this->state_data['intent'] && ! empty( $this->form_data['compatibility_older_mysql'] ) ) {
750
  // compatibility_older_mysql is currently a checkbox meaning pre-5.5 compatibility (we play safe and target 5.1),
751
  // this may change in the future to be a dropdown or radiobox returning the version to be compatible with.
752
  $db_version = '5.1';
753
+ add_filter( 'wpmdb_create_table_query', array( $this, 'mysql_compat_filter' ), 10, 5 );
754
  }
755
  }
756
 
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
 
1450
  // $ints = holds a list of the possible integer types so as to not wrap them in quotation marks later in the insert statements
1451
  $defs = array();
1452
  $ints = array();
1453
+ $bins = array();
1454
+ $bits = array();
1455
  foreach ( $table_structure as $struct ) {
1456
  if ( ( 0 === strpos( $struct->Type, 'tinyint' ) ) ||
1457
  ( 0 === strpos( strtolower( $struct->Type ), 'smallint' ) ) ||
1461
  ) {
1462
  $defs[ strtolower( $struct->Field ) ] = ( null === $struct->Default ) ? 'NULL' : $struct->Default;
1463
  $ints[ strtolower( $struct->Field ) ] = '1';
1464
+ } elseif ( 0 === strpos( $struct->Type, 'binary' ) ) {
1465
+ $bins[ strtolower( $struct->Field ) ] = '1';
1466
+ } elseif ( 0 === strpos( $struct->Type, 'bit' ) ) {
1467
+ $bits[ strtolower( $struct->Field ) ] = '1';
1468
  }
1469
  }
1470
 
1617
  $first_select = false;
1618
  }
1619
 
1620
+ $sel = $this->backquote( $table ) . '.*';
1621
+ if ( ! empty( $bins ) ) {
1622
+ foreach ( $bins as $key => $bin ) {
1623
+ $hex_key = strtolower( $key ) . '__hex';
1624
+ $sel .= ', HEX(' . $this->backquote( $key ) . ') as ' . $this->backquote( $hex_key );
1625
+ }
1626
+ }
1627
+ if ( ! empty( $bits ) ) {
1628
+ foreach ( $bits as $key => $bit ) {
1629
+ $bit_key = strtolower( $key ) . '__bit';
1630
+ $sel .= ', ' . $this->backquote( $key ) . '+0 as ' . $this->backquote( $bit_key );
1631
+ }
1632
+ }
1633
  $join = implode( ' ', array_unique( $join ) );
1634
  $join = apply_filters( 'wpmdb_rows_join', $join, $table );
1635
  $where = apply_filters( 'wpmdb_rows_where', $where, $table );
1636
  $order_by = apply_filters( 'wpmdb_rows_order_by', $order_by, $table );
1637
  $limit = apply_filters( 'wpmdb_rows_limit', $limit, $table );
1638
 
1639
+ $sql = 'SELECT ' . $sel . ' FROM ' . $this->backquote( $table ) . " $join $where $order_by $limit";
1640
  $sql = apply_filters( 'wpmdb_rows_sql', $sql, $table );
1641
 
1642
  $table_data = $wpdb->get_results( $sql );
1681
  continue;
1682
  }
1683
 
1684
+ // If we have binary data, substitute in hex encoded version and remove hex encoded version from row.
1685
+ $hex_key = strtolower( $key ) . '__hex';
1686
+ if ( isset( $bins[ strtolower( $key ) ] ) && $bins[ strtolower( $key ) ] && isset( $row->$hex_key ) ) {
1687
+ $value = "UNHEX('" . $row->$hex_key . "')";
1688
+ $values[] = $value;
1689
+ unset( $row->$hex_key );
1690
+ continue;
1691
+ }
1692
+
1693
+ // If we have bit data, substitute in properly bit encoded version.
1694
+ $bit_key = strtolower( $key ) . '__bit';
1695
+ if ( isset( $bits[ strtolower( $key ) ] ) && $bits[ strtolower( $key ) ] && isset( $row->$bit_key ) ) {
1696
+ $value = "b'" . $row->$bit_key . "'";
1697
+ $values[] = $value;
1698
+ unset( $row->$bit_key );
1699
+ continue;
1700
+ }
1701
+
1702
  if ( is_multisite() && 'path' == $key && $this->state_data['stage'] != 'backup' && ( $wpdb->site == $table || $wpdb->blogs == $table ) ) {
1703
  $old_path_current_site = $this->get_path_current_site();
1704
  $new_path_current_site = '';
2492
  'this_tables' => $this->get_tables(),
2493
  'this_prefixed_tables' => $this->get_tables( 'prefix' ),
2494
  'this_table_sizes' => $this->get_table_sizes(),
2495
+ 'this_table_sizes_hr' => array_map( array( $this, 'format_table_sizes' ), $this->get_table_sizes() ),
2496
  'this_table_rows' => $this->get_table_row_count(),
2497
  'this_upload_url' => esc_html( addslashes( trailingslashit( $this->get_upload_info( 'url' ) ) ) ),
2498
  'this_upload_dir_long' => esc_html( addslashes( trailingslashit( $this->get_upload_info( 'path' ) ) ) ),
2500
  'this_website_name' => sanitize_title_with_dashes( DB_NAME ),
2501
  'this_download_url' => network_admin_url( $this->plugin_base . '&download=' ),
2502
  'this_prefix' => esc_html( $table_prefix ),
2503
+ 'this_plugin_base' => esc_html( $this->plugin_base ),
2504
  'is_multisite' => esc_html( is_multisite() ? 'true' : 'false' ),
2505
  'openssl_available' => esc_html( $this->open_ssl_enabled() ? 'true' : 'false' ),
2506
  'max_request' => esc_html( $this->settings['max_request'] ),
2701
  return __( 'Migrate DB', 'wp-migrate-db' );
2702
  }
2703
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2704
  function plugin_deactivated_notice() {
2705
  if ( false !== ( $deactivated_notice_id = get_transient( 'wp_migrate_db_deactivated_notice_id' ) ) ) {
2706
  if ( '1' === $deactivated_notice_id ) {
2744
  /**
2745
  * Ensures that the given create table sql string is compatible with the target database server version.
2746
  *
2747
+ * @param string $create_table
2748
+ * @param string $table
2749
+ * @param string $db_version
2750
+ * @param string $action
2751
+ * @param string $stage
2752
  *
2753
  * @return mixed
2754
  */
2755
+ function mysql_compat_filter( $create_table, $table, $db_version, $action, $stage ) {
2756
+ if ( empty( $db_version ) || empty( $action ) || empty( $stage ) ) {
2757
  return $create_table;
2758
  }
2759
 
2765
 
2766
  // Replace utf8mb4 introduced in MySQL 5.5.3 with utf8. As of WordPress 4.2 utf8mb4 is used by default on supported MySQL versions
2767
  // but causes migrations to fail when the remote site uses MySQL < 5.5.3.
2768
+ $abort_utf8mb4 = false;
2769
+ if ( 'savefile' !== $action && 'backup' !== $stage ) {
2770
+ $abort_utf8mb4 = true;
2771
+ }
2772
+ // Escape hatch if user knows that site content is utf8 safe.
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
  }
2793
 
2794
  return $create_table;
languages/wp-migrate-db-en.pot CHANGED
@@ -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-06-12 09:50-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"
@@ -81,21 +81,22 @@ msgid ""
81
  "- %1$s %2$s (#129 - scope: %3$s)"
82
  msgstr ""
83
 
84
- #: class/wpmdb-base.php:377
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:382
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:382
 
99
  msgid "our documentation"
100
  msgstr ""
101
 
@@ -163,7 +164,7 @@ msgstr ""
163
 
164
  #: class/wpmdb-base.php:826
165
  #: class/wpmdb.php:111
166
- #: class/wpmdb.php:334
167
  #: class/wpmdbpro.php:1875
168
  msgctxt "Plugin configuration and preferences"
169
  msgid "Settings"
@@ -309,20 +310,20 @@ msgstr ""
309
  msgid "Access denied for: %s"
310
  msgstr ""
311
 
312
- #: class/wpmdb-base.php:1439
313
  msgctxt "dismiss notice permanently"
314
  msgid "Dismiss"
315
  msgstr ""
316
 
317
- #: class/wpmdb-base.php:1448
318
  msgid "Remind Me Later"
319
  msgstr ""
320
 
321
- #: class/wpmdb-base.php:1550
322
  msgid "Failed to save migration state. Please contact support."
323
  msgstr ""
324
 
325
- #: class/wpmdb-base.php:1573
326
  msgid "Failed to retrieve migration state. Please contact support."
327
  msgstr ""
328
 
@@ -485,22 +486,22 @@ msgctxt "Get help or contact support"
485
  msgid "Help"
486
  msgstr ""
487
 
488
- #: class/wpmdb.php:182
489
  #, php-format
490
  msgid "The following directory could not be created: %s"
491
  msgstr ""
492
 
493
- #: class/wpmdb.php:187
494
  #, php-format
495
  msgid "Could not copy the compatibility plugin from %1$s to %2$s"
496
  msgstr ""
497
 
498
- #: class/wpmdb.php:193
499
  #, php-format
500
  msgid "Could not remove the compatibility plugin from %s"
501
  msgstr ""
502
 
503
- #: class/wpmdb.php:926
504
  #: class/wpmdbpro.php:333
505
  #: class/wpmdbpro.php:1722
506
  msgid ""
@@ -508,221 +509,221 @@ msgid ""
508
  "contact support."
509
  msgstr ""
510
 
511
- #: class/wpmdb.php:1341
512
  msgid ""
513
  "Failed to retrieve table structure, please ensure your database is online. "
514
  "(#125)"
515
  msgstr ""
516
 
517
- #: class/wpmdb.php:1367
518
  #, php-format
519
  msgid "Delete any existing table %s"
520
  msgstr ""
521
 
522
- #: class/wpmdb.php:1378
523
  #, php-format
524
  msgid "Table structure of table %s"
525
  msgstr ""
526
 
527
- #: class/wpmdb.php:1386
528
  msgid ""
529
  "Failed to generate the create table query, please ensure your database is "
530
  "online. (#126)"
531
  msgstr ""
532
 
533
- #: class/wpmdb.php:1441
534
  #, php-format
535
  msgid "Data contents of table %s"
536
  msgstr ""
537
 
538
- #: class/wpmdb.php:1775
539
  #, php-format
540
  msgid "End of data contents of table %s"
541
  msgstr ""
542
 
543
- #: class/wpmdb.php:1915
544
  msgid "WordPress MySQL database migration"
545
  msgstr ""
546
 
547
- #: class/wpmdb.php:1917
548
  #, php-format
549
  msgid "Generated: %s"
550
  msgstr ""
551
 
552
- #: class/wpmdb.php:1918
553
  #, php-format
554
  msgid "Hostname: %s"
555
  msgstr ""
556
 
557
- #: class/wpmdb.php:1919
558
  #, php-format
559
  msgid "Database: %s"
560
  msgstr ""
561
 
562
- #: class/wpmdb.php:1972
563
  msgid "Failed to write the gzipped SQL data to the file. (#127)"
564
  msgstr ""
565
 
566
- #: class/wpmdb.php:1979
567
  msgid "Failed to write the SQL data to the file. (#128)"
568
  msgstr ""
569
 
570
- #: class/wpmdb.php:2114
571
- #: class/wpmdb.php:2125
572
  #: class/wpmdbpro.php:1682
573
  msgid "Migrate DB Pro"
574
  msgstr ""
575
 
576
- #: class/wpmdb.php:2114
577
- #: class/wpmdb.php:2125
578
- #: class/wpmdb.php:2659
579
  msgid "Migrate DB"
580
  msgstr ""
581
 
582
- #: class/wpmdb.php:2298
583
  msgid ""
584
  "A problem occurred when trying to change the maximum request size, please "
585
  "try again."
586
  msgstr ""
587
 
588
- #: class/wpmdb.php:2299
589
  #: class/wpmdbpro.php:1008
590
  msgid "A problem occurred when trying to check the license, please try again."
591
  msgstr ""
592
 
593
- #: class/wpmdb.php:2300
594
  msgid "Establishing connection to remote server, please wait"
595
  msgstr ""
596
 
597
- #: class/wpmdb.php:2301
598
  msgid ""
599
  "A problem occurred when attempting to connect to the local server, please "
600
  "check the details and try again."
601
  msgstr ""
602
 
603
- #: class/wpmdb.php:2302
604
  msgid "Please enter your license key."
605
  msgstr ""
606
 
607
- #: class/wpmdb.php:2303
608
  msgid ""
609
  "A problem occurred when trying to register the license, please try again."
610
  msgstr ""
611
 
612
- #: class/wpmdb.php:2304
613
  msgid ""
614
  "Your license has been activated. You will now receive automatic updates and "
615
  "access to email support."
616
  msgstr ""
617
 
618
- #: class/wpmdb.php:2305
619
  #: template/pro/licence-info.php:6
620
  msgid "Fetching license details, please wait..."
621
  msgstr ""
622
 
623
- #: class/wpmdb.php:2306
624
  msgid ""
625
  "An error occurred when trying to clear the debug log. Please contact "
626
  "support. (#132)"
627
  msgstr ""
628
 
629
- #: class/wpmdb.php:2307
630
  msgid ""
631
  "An error occurred when trying to update the debug log. Please contact "
632
  "support. (#133)"
633
  msgstr ""
634
 
635
- #: class/wpmdb.php:2308
636
  msgctxt "Copy data between servers and save migration profile"
637
  msgid "Migrate & Save Profile"
638
  msgstr ""
639
 
640
- #: class/wpmdb.php:2309
641
  msgctxt "Copy data between servers"
642
  msgid "Migrate"
643
  msgstr ""
644
 
645
- #: class/wpmdb.php:2310
646
  msgid "Please select at least one table to migrate."
647
  msgstr ""
648
 
649
- #: class/wpmdb.php:2311
650
  msgid "Please enter a name for your migration profile."
651
  msgstr ""
652
 
653
- #: class/wpmdb.php:2312
654
  msgid ""
655
  "An error occurred when attempting to save the migration profile. Please see "
656
  "the Help tab for details on how to request support. (#118)"
657
  msgstr ""
658
 
659
- #: class/wpmdb.php:2313
660
  msgctxt "Data has been successfully exported"
661
  msgid "Exporting complete"
662
  msgstr ""
663
 
664
- #: class/wpmdb.php:2314
665
  msgid "Exporting, please wait..."
666
  msgstr ""
667
 
668
- #: class/wpmdb.php:2315
669
  msgid "please wait..."
670
  msgstr ""
671
 
672
- #: class/wpmdb.php:2316
673
  msgctxt "Finished successfully"
674
  msgid "complete"
675
  msgstr ""
676
 
677
- #: class/wpmdb.php:2317
678
  msgctxt "Copy of data between servers did not complete"
679
  msgid "Migration failed"
680
  msgstr ""
681
 
682
- #: class/wpmdb.php:2318
683
  msgctxt "Saving a copy of the data before import"
684
  msgid "Backing up"
685
  msgstr ""
686
 
687
- #: class/wpmdb.php:2319
688
  msgctxt "Copying data between servers"
689
  msgid "Migrating"
690
  msgstr ""
691
 
692
- #: class/wpmdb.php:2320
693
  msgctxt "Current request status"
694
  msgid "Status"
695
  msgstr ""
696
 
697
- #: class/wpmdb.php:2321
698
  msgctxt "The message the server responded with"
699
  msgid "Response"
700
  msgstr ""
701
 
702
- #: class/wpmdb.php:2322
703
  msgid ""
704
  "A problem occurred when attempting to process the following table (#113)"
705
  msgstr ""
706
 
707
- #: class/wpmdb.php:2323
708
  msgid ""
709
  "A problem occurred when processing the following table. We were expecting a "
710
  "response in JSON format but instead received an empty response."
711
  msgstr ""
712
 
713
- #: class/wpmdb.php:2324
714
  msgid "Migration completed with some errors"
715
  msgstr ""
716
 
717
- #: class/wpmdb.php:2325
718
  msgid "Migration complete, your backup is located at:"
719
  msgstr ""
720
 
721
- #: class/wpmdb.php:2326
722
  msgid "A problem occurred when finalizing the backup. (#140)"
723
  msgstr ""
724
 
725
- #: class/wpmdb.php:2327
726
  #: template/common/compatibility.php:34
727
  #: template/common/max-request-size.php:11
728
  #: template/pro/delay-between-requests.php:11
@@ -730,32 +731,32 @@ msgctxt "The settings were saved successfully"
730
  msgid "Saved"
731
  msgstr ""
732
 
733
- #: class/wpmdb.php:2328
734
  msgid ""
735
  "Any sites setup to use the current secret key will no longer be able to "
736
  "connect. You will need to update those sites with the newly generated secret "
737
  "key. Do you wish to continue?"
738
  msgstr ""
739
 
740
- #: class/wpmdb.php:2329
741
  msgid ""
742
  "An error occurred when trying to generate the secret key. Please see the "
743
  "Help tab for details on how to request support. (#105)"
744
  msgstr ""
745
 
746
- #: class/wpmdb.php:2330
747
  msgid ""
748
  "You are about to remove the migration profile \"{{profile}}\". This cannot "
749
  "be undone. Do you wish to continue?"
750
  msgstr ""
751
 
752
- #: class/wpmdb.php:2331
753
  msgid ""
754
  "An error occurred when trying to delete the profile. Please see the Help tab "
755
  "for details on how to request support. (#106)"
756
  msgstr ""
757
 
758
- #: class/wpmdb.php:2332
759
  msgid ""
760
  "The selected migration profile could not be deleted because it was not "
761
  "found.\n"
@@ -763,219 +764,219 @@ msgid ""
763
  "migration profiles."
764
  msgstr ""
765
 
766
- #: class/wpmdb.php:2333
767
  msgid ""
768
  "If you change the connection details, you will lose any replaces and table "
769
  "selections you have made below. Do you wish to continue?"
770
  msgstr ""
771
 
772
- #: class/wpmdb.php:2334
773
  #: template/migrate.php:113
774
  msgid "Please enter the connection information above to continue."
775
  msgstr ""
776
 
777
- #: class/wpmdb.php:2335
778
  msgid ""
779
  "An error occurred when trying to save the settings. Please try again. If the "
780
  "problem persists, please see the Help tab for details on how to request "
781
  "support. (#108)"
782
  msgstr ""
783
 
784
- #: class/wpmdb.php:2336
785
  msgid ""
786
  "The connection information appears to be missing, please enter it to "
787
  "continue."
788
  msgstr ""
789
 
790
- #: class/wpmdb.php:2337
791
  msgid ""
792
  "The connection information appears to be incorrect, it should consist of two "
793
  "lines. The first being the remote server's URL and the second being the "
794
  "secret key."
795
  msgstr ""
796
 
797
- #: class/wpmdb.php:2338
798
  msgid ""
799
  "The URL on the first line appears to be invalid, please check it and try "
800
  "again."
801
  msgstr ""
802
 
803
- #: class/wpmdb.php:2339
804
  msgid ""
805
  "The secret key on the second line appears to be invalid. It should be a 32 "
806
  "character string that consists of letters, numbers and special characters "
807
  "only."
808
  msgstr ""
809
 
810
- #: class/wpmdb.php:2340
811
  msgid ""
812
  "It appears you've entered the URL for this website, you need to provide the "
813
  "URL of the remote website instead."
814
  msgstr ""
815
 
816
- #: class/wpmdb.php:2341
817
  msgid ""
818
  "Looks like your remote secret key is the same as the secret key for this "
819
  "site. To fix this, go to the <a href=\"#settings\">Settings tab</a> and "
820
  "click \"Reset Secret Key\""
821
  msgstr ""
822
 
823
- #: class/wpmdb.php:2342
824
  #: template/migrate-progress.php:9
825
  msgid "Time Elapsed:"
826
  msgstr ""
827
 
828
- #: class/wpmdb.php:2343
829
  #: template/migrate-progress.php:21
830
  msgctxt "Temporarily stop migrating"
831
  msgid "Pause"
832
  msgstr ""
833
 
834
- #: class/wpmdb.php:2344
835
  msgctxt "The migration has been temporarily stopped"
836
  msgid "Migration Paused"
837
  msgstr ""
838
 
839
- #: class/wpmdb.php:2345
840
  msgctxt "Restart migrating after it was paused"
841
  msgid "Resume"
842
  msgstr ""
843
 
844
- #: class/wpmdb.php:2346
845
  msgid "Completing current request"
846
  msgstr ""
847
 
848
- #: class/wpmdb.php:2347
849
  msgctxt "The migration is being cancelled"
850
  msgid "Cancelling migration"
851
  msgstr ""
852
 
853
- #: class/wpmdb.php:2348
854
  msgctxt "The migration has been temporarily stopped"
855
  msgid "Paused"
856
  msgstr ""
857
 
858
- #: class/wpmdb.php:2349
859
  msgid "Removing the local MySQL export file"
860
  msgstr ""
861
 
862
- #: class/wpmdb.php:2350
863
  msgid "Removing the local backup MySQL export file"
864
  msgstr ""
865
 
866
- #: class/wpmdb.php:2351
867
  msgid "Removing the local temporary tables"
868
  msgstr ""
869
 
870
- #: class/wpmdb.php:2352
871
  msgid "Removing the remote backup MySQL export file"
872
  msgstr ""
873
 
874
- #: class/wpmdb.php:2353
875
  msgid "Removing the remote temporary tables"
876
  msgstr ""
877
 
878
- #: class/wpmdb.php:2354
879
  msgid "Migration cancellation failed"
880
  msgstr ""
881
 
882
- #: class/wpmdb.php:2355
883
  msgid ""
884
  "A problem occurred while cancelling the migration, you may have to manually "
885
  "delete some temporary files / tables."
886
  msgstr ""
887
 
888
- #: class/wpmdb.php:2356
889
  msgctxt "The migration has been cancelled"
890
  msgid "Migration cancelled"
891
  msgstr ""
892
 
893
- #: class/wpmdb.php:2357
894
  msgctxt "The migration completed successfully"
895
  msgid "Migration complete"
896
  msgstr ""
897
 
898
- #: class/wpmdb.php:2358
899
  msgctxt "The migration is in the last stages"
900
  msgid "Finalizing migration"
901
  msgstr ""
902
 
903
- #: class/wpmdb.php:2359
904
  msgctxt "The caches and rewrite rules for the target are being flushed"
905
  msgid "Flushing caches and rewrite rules"
906
  msgstr ""
907
 
908
- #: class/wpmdb.php:2360
909
  msgid "A problem occurred when trying to add plugins to backlist."
910
  msgstr ""
911
 
912
- #: class/wpmdb.php:2361
913
  msgid ""
914
  "If confirmed we will install an additional WordPress 'Must Use' plugin. This "
915
  "plugin will allow us to control which plugins are loaded during WP Migrate "
916
  "DB Pro specific operations. Do you wish to continue?"
917
  msgstr ""
918
 
919
- #: class/wpmdb.php:2362
920
  msgid ""
921
  "A problem occurred when trying to change the plugin compatibility setting."
922
  msgstr ""
923
 
924
- #: class/wpmdb.php:2363
925
  msgctxt "Confirmation required"
926
  msgid "Sure?"
927
  msgstr ""
928
 
929
- #: class/wpmdb.php:2364
930
  #, php-format
931
  msgid "Pulling from %s, please wait..."
932
  msgstr ""
933
 
934
- #: class/wpmdb.php:2365
935
  #, php-format
936
  msgid "Pulling from %s complete"
937
  msgstr ""
938
 
939
- #: class/wpmdb.php:2366
940
  #, php-format
941
  msgid "Pushing to %s, please wait..."
942
  msgstr ""
943
 
944
- #: class/wpmdb.php:2367
945
  #, php-format
946
  msgid "Pushing to %s complete"
947
  msgstr ""
948
 
949
- #: class/wpmdb.php:2368
950
  msgid "Copying license to the remote site, please wait"
951
  msgstr ""
952
 
953
- #: class/wpmdb.php:2369
954
  msgid "Attempting to activate your license, please wait..."
955
  msgstr ""
956
 
957
- #: class/wpmdb.php:2370
958
  msgid "License successfully activated, please wait..."
959
  msgstr ""
960
 
961
- #: class/wpmdb.php:2371
962
  msgid ""
963
  "An error occurred when trying to reactivate your license. Please provide the "
964
  "following information when requesting support:"
965
  msgstr ""
966
 
967
- #: class/wpmdb.php:2372
968
  msgid ""
969
  "<strong>We've temporarily activated your licence and will complete the "
970
  "activation once the Delicious Brains API is available again.</strong><br /"
971
  ">Please refresh this page to continue."
972
  msgstr ""
973
 
974
- #: class/wpmdb.php:2373
975
  msgid "JSON Decoding Failure"
976
  msgstr ""
977
 
978
- #: class/wpmdb.php:2374
979
  msgid ""
980
  "Our AJAX request was expecting JSON but we received something else. Often "
981
  "this is caused by your theme and/or plugins spitting out PHP errors. If you "
@@ -984,72 +985,80 @@ msgid ""
984
  "disable errors from showing up."
985
  msgstr ""
986
 
987
- #: class/wpmdb.php:2375
988
  msgid "View error messages"
989
  msgstr ""
990
 
991
- #: class/wpmdb.php:2376
992
  #, php-format
993
  msgid "Waiting %s seconds before executing next step"
994
  msgstr ""
995
 
996
- #: class/wpmdb.php:2377
997
  msgid ""
998
  "A problem occurred when trying to change the delay between requests, please "
999
  "try again."
1000
  msgstr ""
1001
 
1002
- #: class/wpmdb.php:2378
1003
  msgid "A problem occurred when flushing caches and rewrite rules. (#145)"
1004
  msgstr ""
1005
 
1006
- #: class/wpmdb.php:2414
1007
  msgid "Could not find the file to download:"
1008
  msgstr ""
1009
 
1010
- #: class/wpmdb.php:2593
1011
  msgid "MySQL export file not found."
1012
  msgstr ""
1013
 
1014
- #: class/wpmdb.php:2599
1015
  msgid "Could not delete the MySQL export file."
1016
  msgstr ""
1017
 
1018
- #: class/wpmdb.php:2694
1019
  msgid ""
1020
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1021
  "automatically deactivated WP Migrate DB."
1022
  msgstr ""
1023
 
1024
- #: class/wpmdb.php:2696
1025
  msgid ""
1026
  "WP Migrate DB and WP Migrate DB Pro cannot both be active. We've "
1027
  "automatically deactivated WP Migrate DB Pro."
1028
  msgstr ""
1029
 
1030
- #: class/wpmdb.php:2801
 
 
 
 
 
 
 
 
1031
  msgid "Warning: Mixed Case Table Names"
1032
  msgstr ""
1033
 
1034
- #: class/wpmdb.php:2804
1035
  msgid ""
1036
  "Whoa! We've detected that your <b>local</b> site has the MySQL setting "
1037
  "<code>lower_case_table_names</code> set to <code>1</code>."
1038
  msgstr ""
1039
 
1040
- #: class/wpmdb.php:2806
1041
  msgid ""
1042
  "Whoa! We've detected that your <b>remote</b> site has the MySQL setting "
1043
  "<code>lower_case_table_names</code> set to <code>1</code>."
1044
  msgstr ""
1045
 
1046
- #: class/wpmdb.php:2809
1047
  msgid ""
1048
  "As a result, uppercase characters in table names will be converted to "
1049
  "lowercase during the migration."
1050
  msgstr ""
1051
 
1052
- #: class/wpmdb.php:2811
1053
  #, php-format
1054
  msgid ""
1055
  "You can read more about this in <a href=\"%s\">our documentation</a>, "
@@ -1127,13 +1136,13 @@ msgid ""
1127
  msgstr ""
1128
 
1129
  #: class/wpmdbpro.php:191
1130
- msgid "Media Files Addon Demo"
1131
  msgstr ""
1132
 
1133
  #: class/wpmdbpro.php:192
1134
  msgid ""
1135
- "A short demo of how the Media Files addon allows you to sync up your "
1136
- "WordPress Media Libraries."
1137
  msgstr ""
1138
 
1139
  #: class/wpmdbpro.php:299
@@ -1683,7 +1692,7 @@ msgstr ""
1683
 
1684
  #: template/pro/delay-between-requests.php:7
1685
  msgid ""
1686
- "Some servers have rate limits which WP Migrate DB can hit when performing "
1687
  "migrations. If you're experiencing migration failures due to server rate "
1688
  "limits, you should set this to one or more seconds to alleviate the problem."
1689
  msgstr ""
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"
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
 
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"
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
 
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 ""
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
  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
  "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
  "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 "
1035
+ "migration to avoid possible data corruption. Please see %1$s for more "
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>, "
1136
  msgstr ""
1137
 
1138
  #: class/wpmdbpro.php:191
1139
+ msgid "WP Migrate DB Pro Media Files Addon 1.3 and CLI Addon 1.1"
1140
  msgstr ""
1141
 
1142
  #: class/wpmdbpro.php:192
1143
  msgid ""
1144
+ "A demonstration of what's new in WP Migrate DB Pro Media Files Addon 1.3 and "
1145
+ "CLI Addon 1.1."
1146
  msgstr ""
1147
 
1148
  #: class/wpmdbpro.php:299
1692
 
1693
  #: template/pro/delay-between-requests.php:7
1694
  msgid ""
1695
+ "Some servers have rate limits which the plugin can hit when performing "
1696
  "migrations. If you're experiencing migration failures due to server rate "
1697
  "limits, you should set this to one or more seconds to alleviate the problem."
1698
  msgstr ""
readme.txt CHANGED
@@ -1,37 +1,44 @@
1
  === WP Migrate DB ===
2
  Contributors: bradt
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
4
- Tags: database, migrate, backup, mysql
5
  Requires at least: 3.0
6
- Tested up to: 4.2.2
7
- Stable tag: 0.7
8
  License: GPLv2
9
 
10
- Exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
11
 
12
  == Description ==
13
 
14
- WP Migrate DB 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. It is perfect for developers who need to update their local install with fresh data from the production site, or copy their locally developed site to a staging or production server.
15
 
16
- It even takes into account serialized data (both arrays and objects) and updates the string length values.
 
 
17
 
18
  Example: <code>s:5:"hello"</code> becomes <code>s:11:"hello world"</code>
19
 
20
  **PRO Version with Email Support and More Features**
21
 
22
- * Select the tables you want to migrate
23
- * Pull production db down and replace local db
24
- * Push local db up and replace production/staging db
25
- * Multisite support
26
- * Video walkthroughs and howtos
27
- * Media files migration
28
- * Fire migrations from the command line or via a function call
29
- * More frequent bug fixes and improvements
30
- * And more features on the way!
31
-
32
- See the video below or [visit the web site](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpressorg&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) to learn more about the pro version.
33
-
34
- http://www.youtube.com/watch?v=IFdHIpf6jjc
 
 
 
 
 
35
 
36
  == Installation ==
37
 
@@ -40,18 +47,38 @@ http://www.youtube.com/watch?v=IFdHIpf6jjc
40
 
41
  == Frequently Asked Questions ==
42
 
43
- = Does this plugin support multisite? =
 
 
44
 
45
- Yes, in a limited capacity. The Developer license of the [pro version](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpressorg&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) fully supports multisite.
 
 
 
 
 
 
46
 
47
  = Does the plugin migrate files as well? =
48
 
49
- No, it only operates on the database.
50
 
51
  = Why do I end up with a wp-login.php download instead of the exported SQL file? =
52
 
53
  It is likely you have a download manager plugin or extension installed in your web browser. You will need to disable it for the SQL download to work properly.
54
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  == Screenshots ==
56
 
57
  1. Main screen
@@ -60,7 +87,17 @@ It is likely you have a download manager plugin or extension installed in your w
60
 
61
  == Changelog ==
62
 
63
- = 0.7 - 2015-06-12 =
 
 
 
 
 
 
 
 
 
 
64
 
65
  * New: [WP-CLI export subcommand](https://deliciousbrains.com/wp-migrate-db-pro/doc/cli-export-subcommand/)
66
  * New: Quick copy find textbox value to replace textbox by clicking arrow icon in between (hat tip Jonathan Perlman)
@@ -85,7 +122,7 @@ It is likely you have a download manager plugin or extension installed in your w
85
  * Bug fix: Custom post type links broken after migration with Compatibility Mode enabled
86
  * Bug fix: Saving a new profile does not change the URL to that saved profile URL
87
 
88
- = 0.6.1 - 2014-10-29 =
89
  * New: breadcrumb-style UI for saved profiles
90
  * New: Brazilian Portugese translation
91
  * Security: Added .htaccess to backup folder to help prevent direct downloads
@@ -120,14 +157,14 @@ It is likely you have a download manager plugin or extension installed in your w
120
  * Bug fix: PHP Notice: Undefined variable: safe_mode
121
  * Bug fix: Fatal error: Cannot use object of type WP_Error as array in `verify_download()`
122
 
123
- = 0.6 - 2014-08-19 =
124
  * New: Updated the migration UI to include a detailed progress bar, time elapsed, pause and cancel buttons and more!
125
  * New: Option to exclude transients (temporary cached data)
126
  * New: Migration profiles
127
  * New: Setting to configure the maximum request size (how much data is exported in a given HTTP request)
128
  * Improvement: Unlimited find & replace fields with drag & drop reordering
129
 
130
- = 0.5 - 2013-07-26 =
131
  * Language support! Thanks to an awesome [pull request](https://github.com/bradt/wp-migrate-db/pull/19) from [Rafael Funchal](https://github.com/rafaelfunchal).
132
  * New Language: Brazilian Portugese
133
  * [Added filter for the filename of the exported file](https://github.com/bradt/wp-migrate-db/issues/16)
@@ -136,27 +173,27 @@ It is likely you have a download manager plugin or extension installed in your w
136
  * Bug fix: [Table names with dashes not exporting](https://github.com/bradt/wp-migrate-db/issues/15)
137
  * Bug fix: [Find & replace is case-sensitive but shouldn't](https://github.com/bradt/wp-migrate-db/issues/13)
138
 
139
- = 0.4.4 - 2013-05-19 =
140
- * [Pro version has arrived!](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpressorg&utm_medium=web&utm_content=changelog&utm_campaign=freeplugin) Added some info to the sidebar.
141
  * Updated required version to WordPress 3.0+
142
  * Bug fix: [Does not handle serialized objects](https://github.com/bradt/wp-migrate-db/issues/11)
143
  * Bug fix: [Admin menu disappears when DISALLOW_FILE_MODS is true](https://github.com/bradt/wp-migrate-db/issues/8)
144
  * Bug fix: [Duplicate records on export](https://github.com/bradt/wp-migrate-db/issues/5)
145
  * Bug fix: Updated spinner image for HiDPI displays
146
 
147
- = 0.4.3 - 2012-12-18 =
148
  * Fixed deprecated error notices when debug mode is on
149
  * Bug fix: [Exports views as tables](https://github.com/bradt/wp-migrate-db/issues/3)
150
  * Compatibility tested with WordPress 3.5
151
 
152
- = 0.4.2 - 2012-09-13 =
153
  * Moved screenshots to /assets folder and updated them to support retina
154
  * Added sidebar including author profile and survey to gauge interest for a pro version
155
 
156
- = 0.4.1 - 2012-08-15 =
157
  * Removed WP App Store installer - not allowed in WP.org repo
158
 
159
- = 0.4 - 2012-08-07 =
160
  * New: More than 4x faster than version 0.3 due to find & replace improvements
161
  * New: Option to turn off replacing GUIDs
162
  * New: Option to exclude spam comments and post revisions from the export
@@ -166,22 +203,22 @@ It is likely you have a download manager plugin or extension installed in your w
166
  * New: WP App Store installer integration
167
  * Bug fix: Notices and warnings displayed when WP_DEBUG is on
168
 
169
- = 0.3 - 2011-12-16 =
170
  * Bug fix: [Null formatting error](http://plugins.trac.wordpress.org/ticket/1430)
171
  * Bug fix: [Deprecated capability](http://plugins.trac.wordpress.org/ticket/1431)
172
  * Bug fix: Serialized string lengths incorrect when string contains double quotes
173
 
174
- = 0.2.2 - 2011-09-23 =
175
  * Bug fix: [Breaks Export](http://wordpress.org/support/topic/plugin-wp-migrate-db-breaks-export?replies=1)
176
 
177
- = 0.2.1 - 2009-12-13 =
178
  * Moved to WordPress.org hosting
179
 
180
- = 0.2 - 2009-04-03 =
181
  * Moved menu link from "Settings" to "Tools"
182
  * The random string of characters no longer appears in the filename on save.
183
 
184
- = 0.1 - 2009-03-20 =
185
  * First release
186
 
187
  == Upgrade Notice ==
@@ -190,4 +227,4 @@ It is likely you have a download manager plugin or extension installed in your w
190
  Runs export over 4x faster and adds some nice new features often requested. Upgrade recommended.
191
 
192
  = 0.2.2 =
193
- This version fixes a bug that breaks the WordPress core export feature. It is highly recommended that everyone upgrade.
1
  === WP Migrate DB ===
2
  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.
11
 
12
  == Description ==
13
 
14
+ https://www.youtube.com/watch?v=m8oScnEK5y0
15
 
16
+ WP Migrate DB exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, handles serialized data, then allows you to save it to your computer as an SQL file. To complete the migration, you need to use a database management tool (e.g. phpMyAdmin) to import the SQL file to your database, replacing your existing database. It is perfect for developers who need to migrate fresh data from the production site to their local install, or migrate their locally developed site to a staging or production server.
17
+
18
+ WP Migrate DB handles serialized data (both arrays and objects) by unserializing the data and going through it, identifying strings and running a find & replace on them. Once it has gone through all the data, it serializes it again and sticks it back in the database.
19
 
20
  Example: <code>s:5:"hello"</code> becomes <code>s:11:"hello world"</code>
21
 
22
  **PRO Version with Email Support and More Features**
23
 
24
+ * Push and pull your databases
25
+ * Find & replace that handles serialized data
26
+ * Backups
27
+ * Export your database
28
+ * Select which tables to migrate
29
+ * Filter out post types
30
+ * Exclude useless data
31
+ * Save migration profiles
32
+ * Phenomenal email support
33
+ * Stress tested on massive databases
34
+ * Solid security
35
+ * [Media Files addon](https://deliciousbrains.com/wp-migrate-db-pro/doc/media-files-addon/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin)
36
+ * [CLI addon](https://deliciousbrains.com/wp-migrate-db-pro/doc/cli-addon/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin)
37
+ * [Multisite Tools addon](https://deliciousbrains.com/wp-migrate-db-pro/doc/multisite-tools-addon/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin)
38
+
39
+ See the video below or [visit the web site](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpress.org&utm_medium=web&utm_content=desc&utm_campaign=freeplugin) to learn more about the pro version.
40
+
41
+ https://www.youtube.com/watch?v=fHFcH4bCzmU
42
 
43
  == Installation ==
44
 
47
 
48
  == Frequently Asked Questions ==
49
 
50
+ = Why wouldn't I just use WordPress' built-in XML export/import to migrate my site? =
51
+
52
+ WP Migrate DB will migrate your entire WordPress database, WordPress' built-in tools will not. For more details, please see our blog post, [WordPress XML Export/Import vs. WP Migrate DB Pro](https://deliciousbrains.com/wordpress-xml-export-import-vs-wp-migrate-db-pro/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin).
53
 
54
+ = Will you migrate my site for me? =
55
+
56
+ Sorry, but we do not offer site migration services at the moment.
57
+
58
+ = Does the plugin support multisite? =
59
+
60
+ Yes, but the [Multisite Tools addon](https://deliciousbrains.com/wp-migrate-db-pro/doc/multisite-tools-addon/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) for the [pro version](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) does a lot more with multisite like migrating a subsite as a single-site install.
61
 
62
  = Does the plugin migrate files as well? =
63
 
64
+ No, it only operates on the database. The pro version's [Media Files addon](https://deliciousbrains.com/wp-migrate-db-pro/doc/media-files-addon/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) allows you to migrate media files.
65
 
66
  = Why do I end up with a wp-login.php download instead of the exported SQL file? =
67
 
68
  It is likely you have a download manager plugin or extension installed in your web browser. You will need to disable it for the SQL download to work properly.
69
 
70
+ = Does the plugin handle serialized data? =
71
+
72
+ Yep, it will run a find &amp; replace on your serialized data and migrate it without corrupting it. See [our documentation](https://deliciousbrains.com/wp-migrate-db-pro/doc/serialized-data/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin) for details.
73
+
74
+ = What are the requirements? =
75
+
76
+ They are the same as the [requirements for WP Migrate DB Pro](https://deliciousbrains.com/wp-migrate-db-pro/pricing/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin#requirements).
77
+
78
+ = Do you offer email support? =
79
+
80
+ If you upgrade to [WP Migrate DB Pro](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpress.org&utm_medium=web&utm_content=faq&utm_campaign=freeplugin), we will gladly provide you with email support. We take pride in delivering exceptional customer support. We do not provide email support for the free version.
81
+
82
  == Screenshots ==
83
 
84
  1. Main screen
87
 
88
  == Changelog ==
89
 
90
+ = WP Migrate DB 0.7.1 - 2015-07-09 =
91
+
92
+ * Improvement: Added more diagnostic info to facilitate debugging
93
+ * Improvement: Global JS variables moved to single global object to avoid conflicts
94
+ * Bug Fix: WP Migrate DB and Pro can be activated at the same time when activating plugins in bulk or via WP-CLI
95
+ * Bug Fix: `BINARY` data not exported properly
96
+ * Bug Fix: `BIT` data not exported properly
97
+ * Bug Fix: When `post_max_size` is set to 0 (unlimited), `wpmdb_bottleneck` is broken
98
+ * Bug Fix: Saved Profiles link is broken in certain situations
99
+
100
+ = WP Migrate DB 0.7 - 2015-06-12 =
101
 
102
  * New: [WP-CLI export subcommand](https://deliciousbrains.com/wp-migrate-db-pro/doc/cli-export-subcommand/)
103
  * New: Quick copy find textbox value to replace textbox by clicking arrow icon in between (hat tip Jonathan Perlman)
122
  * Bug fix: Custom post type links broken after migration with Compatibility Mode enabled
123
  * Bug fix: Saving a new profile does not change the URL to that saved profile URL
124
 
125
+ = WP Migrate DB 0.6.1 - 2014-10-29 =
126
  * New: breadcrumb-style UI for saved profiles
127
  * New: Brazilian Portugese translation
128
  * Security: Added .htaccess to backup folder to help prevent direct downloads
157
  * Bug fix: PHP Notice: Undefined variable: safe_mode
158
  * Bug fix: Fatal error: Cannot use object of type WP_Error as array in `verify_download()`
159
 
160
+ = WP Migrate DB 0.6 - 2014-08-19 =
161
  * New: Updated the migration UI to include a detailed progress bar, time elapsed, pause and cancel buttons and more!
162
  * New: Option to exclude transients (temporary cached data)
163
  * New: Migration profiles
164
  * New: Setting to configure the maximum request size (how much data is exported in a given HTTP request)
165
  * Improvement: Unlimited find & replace fields with drag & drop reordering
166
 
167
+ = WP Migrate DB 0.5 - 2013-07-26 =
168
  * Language support! Thanks to an awesome [pull request](https://github.com/bradt/wp-migrate-db/pull/19) from [Rafael Funchal](https://github.com/rafaelfunchal).
169
  * New Language: Brazilian Portugese
170
  * [Added filter for the filename of the exported file](https://github.com/bradt/wp-migrate-db/issues/16)
173
  * Bug fix: [Table names with dashes not exporting](https://github.com/bradt/wp-migrate-db/issues/15)
174
  * Bug fix: [Find & replace is case-sensitive but shouldn't](https://github.com/bradt/wp-migrate-db/issues/13)
175
 
176
+ = WP Migrate DB 0.4.4 - 2013-05-19 =
177
+ * [Pro version has arrived!](http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=wordpress.org&utm_medium=web&utm_content=changelog&utm_campaign=freeplugin) Added some info to the sidebar.
178
  * Updated required version to WordPress 3.0+
179
  * Bug fix: [Does not handle serialized objects](https://github.com/bradt/wp-migrate-db/issues/11)
180
  * Bug fix: [Admin menu disappears when DISALLOW_FILE_MODS is true](https://github.com/bradt/wp-migrate-db/issues/8)
181
  * Bug fix: [Duplicate records on export](https://github.com/bradt/wp-migrate-db/issues/5)
182
  * Bug fix: Updated spinner image for HiDPI displays
183
 
184
+ = WP Migrate DB 0.4.3 - 2012-12-18 =
185
  * Fixed deprecated error notices when debug mode is on
186
  * Bug fix: [Exports views as tables](https://github.com/bradt/wp-migrate-db/issues/3)
187
  * Compatibility tested with WordPress 3.5
188
 
189
+ = WP Migrate DB 0.4.2 - 2012-09-13 =
190
  * Moved screenshots to /assets folder and updated them to support retina
191
  * Added sidebar including author profile and survey to gauge interest for a pro version
192
 
193
+ = WP Migrate DB 0.4.1 - 2012-08-15 =
194
  * Removed WP App Store installer - not allowed in WP.org repo
195
 
196
+ = WP Migrate DB 0.4 - 2012-08-07 =
197
  * New: More than 4x faster than version 0.3 due to find & replace improvements
198
  * New: Option to turn off replacing GUIDs
199
  * New: Option to exclude spam comments and post revisions from the export
203
  * New: WP App Store installer integration
204
  * Bug fix: Notices and warnings displayed when WP_DEBUG is on
205
 
206
+ = WP Migrate DB 0.3 - 2011-12-16 =
207
  * Bug fix: [Null formatting error](http://plugins.trac.wordpress.org/ticket/1430)
208
  * Bug fix: [Deprecated capability](http://plugins.trac.wordpress.org/ticket/1431)
209
  * Bug fix: Serialized string lengths incorrect when string contains double quotes
210
 
211
+ = WP Migrate DB 0.2.2 - 2011-09-23 =
212
  * Bug fix: [Breaks Export](http://wordpress.org/support/topic/plugin-wp-migrate-db-breaks-export?replies=1)
213
 
214
+ = WP Migrate DB 0.2.1 - 2009-12-13 =
215
  * Moved to WordPress.org hosting
216
 
217
+ = WP Migrate DB 0.2 - 2009-04-03 =
218
  * Moved menu link from "Settings" to "Tools"
219
  * The random string of characters no longer appears in the filename on save.
220
 
221
+ = WP Migrate DB 0.1 - 2009-03-20 =
222
  * First release
223
 
224
  == Upgrade Notice ==
227
  Runs export over 4x faster and adds some nice new features often requested. Upgrade recommended.
228
 
229
  = 0.2.2 =
230
+ This version fixes a bug that breaks the WordPress core export feature. It is highly recommended that everyone upgrade.
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
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';
26
 
27
  if ( ! class_exists( 'WPMDB_Utils' ) ) {
28
  require dirname( __FILE__ ) . '/class/wpmdb-utils.php';
@@ -92,4 +92,6 @@ function wpmdb_cli() {
92
  do_action( 'wp_migrate_db_cli_after_load' );
93
 
94
  return $wpmdb_cli;
95
- }
 
 
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
  // 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';
92
  do_action( 'wp_migrate_db_cli_after_load' );
93
 
94
  return $wpmdb_cli;
95
+ }
96
+
97
+ add_action( 'activated_plugin', array( 'WPMDB_Utils', 'deactivate_other_instances' ) );