Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.2.50 |
Comparing to | |
See all releases |
Code changes from version 1.2.48 to 1.2.50
- assets/js/javascript.php +2 -2
- assets/js/parsley-standalone.min.js +0 -85
- classes/class.crypt.php +0 -57
- classes/package/class.pack.archive.zip.php +3 -3
- classes/package/class.pack.installer.php +2 -1
- classes/package/class.pack.php +15 -14
- classes/ui/class.ui.dialog.php +13 -16
- classes/ui/class.ui.notice.php +8 -8
- classes/ui/class.ui.screen.base.php +5 -5
- classes/utilities/class.u.php +5 -33
- ctrls/ctrl.package.php +6 -2
- ctrls/ctrl.tools.php +1 -1
- ctrls/ctrl.ui.php +17 -4
- debug/main.php +12 -13
- define.php +1 -1
- duplicator.php +7 -7
- installer/build/assets/inc.js.php +1 -0
- installer/build/assets/inc.libs.css.php +1 -0
- installer/build/assets/inc.libs.js.php +1 -0
- installer/build/classes/class.csrf.php +75 -0
- installer/build/classes/class.db.php +6 -5
- installer/build/classes/class.engine.php +7 -6
- installer/build/classes/class.http.php +3 -2
- installer/build/classes/class.logging.php +3 -2
- installer/build/classes/class.password.php +2 -0
- installer/build/classes/class.server.php +1 -0
- installer/build/classes/config/class.conf.srv.php +5 -3
- installer/build/classes/config/class.conf.wp.php +32 -14
- installer/build/classes/utilities/class.u.php +934 -31
- installer/build/ctrls/ctrl.step1.php +6 -4
- installer/build/ctrls/ctrl.step2.php +54 -26
- installer/build/ctrls/ctrl.step3.php +71 -29
- installer/build/main.installer.php +88 -23
- installer/build/view.help.php +3 -1
- installer/build/view.init1.php +6 -3
- installer/build/view.step1.php +34 -24
- installer/build/view.step2.php +86 -77
- installer/build/view.step3.php +26 -25
- installer/build/view.step4.php +17 -14
- readme.txt +1 -1
- views/help/gopro.php +53 -44
- views/inc.header.php +1 -1
- views/javascript.php +0 -143
- views/packages/details/controller.php +12 -12
- views/packages/details/detail.php +43 -44
- views/packages/details/transfer.php +10 -10
- views/packages/main/controller.php +20 -1
- views/packages/main/packages.php +48 -44
- views/packages/main/s1.setup1.php +39 -39
- views/packages/main/s1.setup2.php +193 -158
- views/packages/main/s2.scan1.php +398 -363
- views/packages/main/s2.scan2.php +31 -32
- views/packages/main/s2.scan3.php +793 -789
- views/packages/main/s3.build.php +84 -80
- views/packages/screen.php +4 -4
- views/settings/about-info.php +10 -10
- views/settings/controller.php +7 -7
- views/settings/general.php +23 -23
- views/settings/license.php +39 -41
- views/settings/packages.php +49 -43
- views/settings/schedule.php +3 -3
- views/settings/storage.php +12 -9
- views/tools/controller.php +44 -18
- views/tools/diagnostics/inc.data.php +9 -8
- views/tools/diagnostics/inc.phpinfo.php +1 -1
- views/tools/diagnostics/inc.settings.php +73 -70
- views/tools/diagnostics/inc.validator.php +9 -9
- views/tools/diagnostics/information.php +1 -1
- views/tools/diagnostics/logging.php +30 -21
- views/tools/diagnostics/main.php +6 -5
- views/tools/diagnostics/support.php +17 -17
- views/tools/templates.php +4 -4
assets/js/javascript.php
CHANGED
@@ -50,7 +50,7 @@ Duplicator.OpenLogWindow = function(target)
|
|
50 |
if (target != null) {
|
51 |
window.open('?page=duplicator-tools', 'log-win');
|
52 |
} else {
|
53 |
-
window.open('<?php echo DUPLICATOR_SSDIR_URL; ?>' + '/' + log)
|
54 |
}
|
55 |
};
|
56 |
|
@@ -67,7 +67,7 @@ Duplicator.UI.SaveViewState = function (key, value)
|
|
67 |
type: "POST",
|
68 |
url: ajaxurl,
|
69 |
dataType: "json",
|
70 |
-
data: {action : 'DUP_CTRL_UI_SaveViewState', key: key, value: value},
|
71 |
success: function(data) {},
|
72 |
error: function(data) {}
|
73 |
});
|
50 |
if (target != null) {
|
51 |
window.open('?page=duplicator-tools', 'log-win');
|
52 |
} else {
|
53 |
+
window.open('<?php echo esc_js(DUPLICATOR_SSDIR_URL); ?>' + '/' + log)
|
54 |
}
|
55 |
};
|
56 |
|
67 |
type: "POST",
|
68 |
url: ajaxurl,
|
69 |
dataType: "json",
|
70 |
+
data: {action : 'DUP_CTRL_UI_SaveViewState', key: key, value: value, nonce: '<?php echo wp_create_nonce('DUP_CTRL_UI_SaveViewState'); ?>'},
|
71 |
success: function(data) {},
|
72 |
error: function(data) {}
|
73 |
});
|
assets/js/parsley-standalone.min.js
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
/* Parsley dist/parsley-standalone.min.js build version 1.1.18 http://parsleyjs.org */
|
2 |
-
(function(b){String.prototype.trim===b&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});Array.prototype.reduce===b&&(Array.prototype.reduce=function(l){if(void 0===this||null===this)throw new TypeError;var r=Object(this),q=r.length>>>0,m=0,a;if("function"!=typeof l)throw new TypeError;if(0==q&&1==arguments.length)throw new TypeError;if(2<=arguments.length)a=arguments[1];else{do{if(m in r){a=r[m++];break}if(++m>=q)throw new TypeError;}while(1)}for(;m<q;)m in r&&
|
3 |
-
(a=l.call(b,a,r[m],m,r)),m++;return a})})();
|
4 |
-
var Zepto=function(){function b(f){return"[object Function]"==M.call(f)}function l(f){return f instanceof Object}function r(f){return l(f)&&f.__proto__==Object.prototype}function q(f){return f instanceof Array}function m(f){return"number"==typeof f.length}function a(f){return f.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function c(f){return f in B?B[f]:B[f]=RegExp("(^|\\s)"+f+"(\\s|$)")}function d(f){return"children"in
|
5 |
-
f?u.call(f.children):e.map(f.childNodes,function(f){if(1==f.nodeType)return f})}function g(f,a,e){for(s in a)e&&r(a[s])?(r(f[s])||(f[s]={}),g(f[s],a[s],e)):a[s]!==n&&(f[s]=a[s])}function j(f,a){return a===n?e(f):e(f).filter(a)}function k(f,a,e,c){return b(a)?a.call(f,e,c):a}function w(f,a){var e=f.className,b=e&&e.baseVal!==n;if(a===n)return b?e.baseVal:e;b?e.baseVal=a:f.className=a}function x(f){var a;try{return f?"true"==f||("false"==f?!1:"null"==f?null:!isNaN(a=Number(f))?a:/^[\[\{]/.test(f)?e.parseJSON(f):
|
6 |
-
f):f}catch(b){return f}}function A(f,a){a(f);for(var e in f.childNodes)A(f.childNodes[e],a)}var n,s,e,y,z=[],u=z.slice,v=z.filter,p=window.document,h={},B={},C=p.defaultView.getComputedStyle,D={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},H=/^\s*<(\w+|!)[^>]*>/,N=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,I=/^(?:body|html)$/i,O="val css html text data width height offset".split(" "),F=p.createElement("table"),J=p.createElement("tr"),
|
7 |
-
K={tr:p.createElement("tbody"),tbody:F,thead:F,tfoot:F,td:J,th:J,"*":p.createElement("div")},P=/complete|loaded|interactive/,Q=/^\.([\w-]+)$/,R=/^#([\w-]*)$/,S=/^[\w-]+$/,M={}.toString,t={},G,E,L=p.createElement("div");t.matches=function(f,a){if(!f||1!==f.nodeType)return!1;var e=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.matchesSelector;if(e)return e.call(f,a);var b;b=f.parentNode;(e=!b)&&(b=L).appendChild(f);b=~t.qsa(b,a).indexOf(f);e&&L.removeChild(f);return b};G=function(f){return f.replace(/-+(.)?/g,
|
8 |
-
function(f,a){return a?a.toUpperCase():""})};E=function(f){return v.call(f,function(a,e){return f.indexOf(a)==e})};t.fragment=function(f,a,b){f.replace&&(f=f.replace(N,"<$1></$2>"));a===n&&(a=H.test(f)&&RegExp.$1);a in K||(a="*");var c,d=K[a];d.innerHTML=""+f;f=e.each(u.call(d.childNodes),function(){d.removeChild(this)});r(b)&&(c=e(f),e.each(b,function(f,a){if(-1<O.indexOf(f))c[f](a);else c.attr(f,a)}));return f};t.Z=function(f,a){f=f||[];f.__proto__=arguments.callee.prototype;f.selector=a||"";return f};
|
9 |
-
t.isZ=function(f){return f instanceof t.Z};t.init=function(f,a){if(f){if(b(f))return e(p).ready(f);if(t.isZ(f))return f;var c;if(q(f))c=v.call(f,function(f){return f!==n&&null!==f});else if(l(f))c=[r(f)?e.extend({},f):f],f=null;else if(H.test(f))c=t.fragment(f.trim(),RegExp.$1,a),f=null;else{if(a!==n)return e(a).find(f);c=t.qsa(p,f)}return t.Z(c,f)}return t.Z()};e=function(f,a){return t.init(f,a)};e.extend=function(f){var a,e=u.call(arguments,1);"boolean"==typeof f&&(a=f,f=e.shift());e.forEach(function(e){g(f,
|
10 |
-
e,a)});return f};t.qsa=function(f,a){var e;return f===p&&R.test(a)?(e=f.getElementById(RegExp.$1))?[e]:[]:1!==f.nodeType&&9!==f.nodeType?[]:u.call(Q.test(a)?f.getElementsByClassName(RegExp.$1):S.test(a)?f.getElementsByTagName(a):f.querySelectorAll(a))};e.contains=function(f,a){return f!==a&&f.contains(a)};e.isFunction=b;e.isObject=l;e.isArray=q;e.isPlainObject=r;e.inArray=function(f,a,e){return z.indexOf.call(a,f,e)};e.camelCase=G;e.trim=function(a){return a.trim()};e.uuid=0;e.support={};e.expr={};
|
11 |
-
e.map=function(a,b){var c,d=[],p;if(m(a))for(p=0;p<a.length;p++)c=b(a[p],p),null!=c&&d.push(c);else for(p in a)c=b(a[p],p),null!=c&&d.push(c);return 0<d.length?e.fn.concat.apply([],d):d};e.each=function(a,e){var b;if(m(a))for(b=0;b<a.length&&!1!==e.call(a[b],b,a[b]);b++);else for(b in a)if(!1===e.call(a[b],b,a[b]))break;return a};e.grep=function(a,e){return v.call(a,e)};window.JSON&&(e.parseJSON=JSON.parse);e.fn={forEach:z.forEach,reduce:z.reduce,push:z.push,sort:z.sort,indexOf:z.indexOf,concat:z.concat,
|
12 |
-
map:function(a){return e(e.map(this,function(e,b){return a.call(e,b,e)}))},slice:function(){return e(u.apply(this,arguments))},ready:function(a){P.test(p.readyState)?a(e):p.addEventListener("DOMContentLoaded",function(){a(e)},!1);return this},get:function(a){return a===n?u.call(this):this[a]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){this.forEach(function(e,
|
13 |
-
b){a.call(e,b,e)});return this},filter:function(a){return b(a)?this.not(this.not(a)):e(v.call(this,function(e){return t.matches(e,a)}))},add:function(a,b){return e(E(this.concat(e(a,b))))},is:function(a){return 0<this.length&&t.matches(this[0],a)},not:function(a){var c=[];if(b(a)&&a.call!==n)this.each(function(e){a.call(this,e)||c.push(this)});else{var d="string"==typeof a?this.filter(a):m(a)&&b(a.item)?u.call(a):e(a);this.forEach(function(a){0>d.indexOf(a)&&c.push(a)})}return e(c)},has:function(a){return this.filter(function(){return l(a)?
|
14 |
-
e.contains(this,a):e(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!l(a)?a:e(a)},last:function(){var a=this[this.length-1];return a&&!l(a)?a:e(a)},find:function(a){return 1==this.length?e(t.qsa(this[0],a)):this.map(function(){return t.qsa(this,a)})},closest:function(a,b){for(var c=this[0];c&&!t.matches(c,a);)c=c!==b&&c!==p&&c.parentNode;return e(c)},parents:function(a){for(var b=[],c=this;0<c.length;)c=e.map(c,function(a){if((a=
|
15 |
-
a.parentNode)&&a!==p&&0>b.indexOf(a))return b.push(a),a});return j(b,a)},parent:function(a){return j(E(this.pluck("parentNode")),a)},children:function(a){return j(this.map(function(){return d(this)}),a)},contents:function(){return this.map(function(){return u.call(this.childNodes)})},siblings:function(a){return j(this.map(function(a,f){return v.call(d(f.parentNode),function(a){return a!==f})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return e.map(this,
|
16 |
-
function(e){return e[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=null);if("none"==C(this,"").getPropertyValue("display")){var a=this.style,e=this.nodeName,b,c;h[e]||(b=p.createElement(e),p.body.appendChild(b),c=C(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),h[e]=c);a.display=h[e]}})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var c=b(a);if(this[0]&&!c)var d=e(a).get(0),p=d.parentNode||
|
17 |
-
1<this.length;return this.each(function(b){e(this).wrapAll(c?a.call(this,b):p?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){e(this[0]).before(a=e(a));for(var b;(b=a.children()).length;)a=b.first();e(a).append(this)}return this},wrapInner:function(a){var c=b(a);return this.each(function(b){var d=e(this),p=d.contents();b=c?a.call(this,b):a;p.length?p.wrapAll(b):d.append(b)})},unwrap:function(){this.parent().each(function(){e(this).replaceWith(e(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},
|
18 |
-
hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=e(this);(a===n?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return e(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return e(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return a===n?0<this.length?this[0].innerHTML:null:this.each(function(b){var c=this.innerHTML;e(this).empty().append(k(this,a,b,c))})},text:function(a){return a===
|
19 |
-
n?0<this.length?this[0].textContent:null:this.each(function(){this.textContent=a})},attr:function(a,e){var b;return"string"==typeof a&&e===n?0==this.length||1!==this[0].nodeType?n:"value"==a&&"INPUT"==this[0].nodeName?this.val():!(b=this[0].getAttribute(a))&&a in this[0]?this[0][a]:b:this.each(function(b){if(1===this.nodeType)if(l(a))for(s in a){b=s;var c=a[s];null==c?this.removeAttribute(b):this.setAttribute(b,c)}else b=k(this,e,b,this.getAttribute(a)),null==b?this.removeAttribute(a):this.setAttribute(a,
|
20 |
-
b)})},removeAttr:function(a){return this.each(function(){1===this.nodeType&&this.removeAttribute(a)})},prop:function(a,b){return b===n?this[0]?this[0][a]:n:this.each(function(e){this[a]=k(this,b,e,this[a])})},data:function(b,e){var c=this.attr("data-"+a(b),e);return null!==c?x(c):n},val:function(a){return a===n?0<this.length?this[0].multiple?e(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value:n:this.each(function(b){this.value=k(this,a,b,this.value)})},
|
21 |
-
offset:function(){if(0==this.length)return null;var a=this[0].getBoundingClientRect();return{left:a.left+window.pageXOffset,top:a.top+window.pageYOffset,width:a.width,height:a.height}},css:function(b,e){if(2>arguments.length&&"string"==typeof b)return 0==this.length?n:this[0].style[G(b)]||C(this[0],"").getPropertyValue(b);var c="";for(s in b)!b[s]&&0!==b[s]?this.each(function(){this.style.removeProperty(a(s))}):c+=a(s)+":"+("number"==typeof b[s]&&!D[a(s)]?b[s]+"px":b[s])+";";"string"==typeof b&&(!e&&
|
22 |
-
0!==e?this.each(function(){this.style.removeProperty(a(b))}):c=a(b)+":"+("number"==typeof e&&!D[a(b)]?e+"px":e));return this.each(function(){this.style.cssText+=";"+c})},index:function(a){return a?this.indexOf(e(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return 1>this.length?!1:c(a).test(w(this[0]))},addClass:function(a){return this.each(function(b){y=[];var c=w(this);k(this,a,b,c).split(/\s+/g).forEach(function(a){e(this).hasClass(a)||y.push(a)},this);y.length&&w(this,
|
23 |
-
c+(c?" ":"")+y.join(" "))})},removeClass:function(a){return this.each(function(b){if(a===n)return w(this,"");y=w(this);k(this,a,b,y).split(/\s+/g).forEach(function(a){y=y.replace(c(a)," ")});w(this,y.trim())})},toggleClass:function(a,b){return this.each(function(c){c=k(this,a,c,w(this));(b===n?!e(this).hasClass(c):b)?e(this).addClass(c):e(this).removeClass(c)})},scrollTop:function(){if(this.length)return"scrollTop"in this[0]?this[0].scrollTop:this[0].scrollY},position:function(){if(this.length){var a=
|
24 |
-
this[0],b=this.offsetParent(),c=this.offset(),d=I.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(e(a).css("margin-top"))||0;c.left-=parseFloat(e(a).css("margin-left"))||0;d.top+=parseFloat(e(b[0]).css("border-top-width"))||0;d.left+=parseFloat(e(b[0]).css("border-left-width"))||0;return{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||p.body;a&&!I.test(a.nodeName)&&"static"==e(a).css("position");)a=a.offsetParent;
|
25 |
-
return a})}};["width","height"].forEach(function(a){e.fn[a]=function(b){var c,d=a.replace(/./,function(a){return a[0].toUpperCase()});return b===n?this[0]==window?window["inner"+d]:this[0]==p?p.documentElement["offset"+d]:(c=this.offset())&&c[a]:this.each(function(c){var d=e(this);d.css(a,k(this,b,c,d[a]()))})}});["after","prepend","before","append"].forEach(function(a,b){var c=b%2;e.fn[a]=function(){var a=e.map(arguments,function(a){return l(a)?a:t.fragment(a)}),d,f=1<this.length;return 1>a.length?
|
26 |
-
this:this.each(function(p,h){d=c?h:h.parentNode;h=0==b?h.nextSibling:1==b?h.firstChild:2==b?h:null;a.forEach(function(a){if(f)a=a.cloneNode(!0);else if(!d)return e(a).remove();A(d.insertBefore(a,h),function(a){null!=a.nodeName&&("SCRIPT"===a.nodeName.toUpperCase()&&(!a.type||"text/javascript"===a.type)&&!a.src)&&window.eval.call(window,a.innerHTML)})})})};e.fn[c?a+"To":"insert"+(b?"Before":"After")]=function(b){e(b)[a](this);return this}});t.Z.prototype=e.fn;t.uniq=E;t.deserializeValue=x;e.zepto=
|
27 |
-
t;return e}();window.Zepto=Zepto;"$"in window||(window.$=Zepto);
|
28 |
-
(function(b){function l(a){return a._zid||(a._zid=j++)}function r(a,b,c,d){b=q(b);if(b.ns)var j=RegExp("(?:^| )"+b.ns.replace(" "," .* ?")+"(?: |$)");return(g[l(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||j.test(a.ns))&&(!c||l(a.fn)===l(c))&&(!d||a.sel==d)})}function q(a){a=(""+a).split(".");return{e:a[0],ns:a.slice(1).sort().join(" ")}}function m(a,c,d){b.isObject(a)?b.each(a,d):a.split(/\s/).forEach(function(a){d(a,c)})}function a(a,c,d,j,n,p){var h=l(a),B=g[h]||(g[h]=[]);m(c,
|
29 |
-
d,function(c,d){var h=q(c);h.fn=d;h.sel=j;h.e in w&&(d=function(a){var c=a.relatedTarget;if(!c||c!==this&&!b.contains(this,c))return h.fn.apply(this,arguments)});h.del=n&&n(d,c);var g=h.del||d;h.proxy=function(b){var c=g.apply(a,[b].concat(b.data));!1===c&&(b.preventDefault(),b.stopPropagation());return c};h.i=B.length;B.push(h);a.addEventListener(w[h.e]||h.e,h.proxy,h.del&&("focus"==h.e||"blur"==h.e)||!!p)})}function c(a,b,c,d,j){var p=l(a);m(b||"",c,function(b,c){r(a,b,c,d).forEach(function(b){delete g[p][b.i];
|
30 |
-
a.removeEventListener(w[b.e]||b.e,b.proxy,b.del&&("focus"==b.e||"blur"==b.e)||!!j)})})}function d(a){var c,d={originalEvent:a};for(c in a)!n.test(c)&&void 0!==a[c]&&(d[c]=a[c]);b.each(s,function(b,c){d[b]=function(){this[c]=x;return a[b].apply(a,arguments)};d[c]=A});return d}var g={},j=1,k={},w={mouseenter:"mouseover",mouseleave:"mouseout"};k.click=k.mousedown=k.mouseup=k.mousemove="MouseEvents";b.event={add:a,remove:c};b.proxy=function(a,c){if(b.isFunction(a)){var d=function(){return a.apply(c,arguments)};
|
31 |
-
d._zid=l(a);return d}if("string"==typeof c)return b.proxy(a[c],a);throw new TypeError("expected function");};b.fn.bind=function(b,c){return this.each(function(){a(this,b,c)})};b.fn.unbind=function(a,b){return this.each(function(){c(this,a,b)})};b.fn.one=function(b,d){return this.each(function(g,j){a(this,b,d,null,function(a,b){return function(){var e=a.apply(j,arguments);c(j,b,a);return e}})})};var x=function(){return!0},A=function(){return!1},n=/^([A-Z]|layer[XY]$)/,s={preventDefault:"isDefaultPrevented",
|
32 |
-
stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};b.fn.delegate=function(c,g,j){return this.each(function(n,k){a(k,g,j,c,function(a){return function(h){var g,j=b(h.target).closest(c,k).get(0);if(j)return g=b.extend(d(h),{currentTarget:j,liveFired:k}),a.apply(j,[g].concat([].slice.call(arguments,1)))}})})};b.fn.undelegate=function(a,b,d){return this.each(function(){c(this,b,d,a)})};b.fn.live=function(a,c){b(document.body).delegate(this.selector,a,c);return this};
|
33 |
-
b.fn.die=function(a,c){b(document.body).undelegate(this.selector,a,c);return this};b.fn.on=function(a,c,d){return!c||b.isFunction(c)?this.bind(a,c||d):this.delegate(c,a,d)};b.fn.off=function(a,c,d){return!c||b.isFunction(c)?this.unbind(a,c||d):this.undelegate(c,a,d)};b.fn.trigger=function(a,c){if("string"==typeof a||b.isPlainObject(a))a=b.Event(a);var d=a;if(!("defaultPrevented"in d)){d.defaultPrevented=!1;var g=d.preventDefault;d.preventDefault=function(){this.defaultPrevented=!0;g.call(this)}}a.data=
|
34 |
-
c;return this.each(function(){"dispatchEvent"in this&&this.dispatchEvent(a)})};b.fn.triggerHandler=function(a,c){var g,j;this.each(function(n,p){g=d("string"==typeof a?b.Event(a):a);g.data=c;g.target=p;b.each(r(p,a.type||a),function(a,b){j=b.proxy(g);if(g.isImmediatePropagationStopped())return!1})});return j};"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(a){b.fn[a]=
|
35 |
-
function(b){return b?this.bind(a,b):this.trigger(a)}});["focus","blur"].forEach(function(a){b.fn[a]=function(b){b?this.bind(a,b):this.each(function(){try{this[a]()}catch(b){}});return this}});b.Event=function(a,b){"string"!=typeof a&&(b=a,a=b.type);var c=document.createEvent(k[a]||"Events"),d=!0;if(b)for(var g in b)"bubbles"==g?d=!!b[g]:c[g]=b[g];c.initEvent(a,d,!0,null,null,null,null,null,null,null,null,null,null,null,null);c.isDefaultPrevented=function(){return this.defaultPrevented};return c}})(Zepto);
|
36 |
-
(function(b,l){function r(a){return a.toLowerCase()}var q="",m,a=window.document.createElement("div"),c=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,d,g,j,k,w,x,A,n={};b.each({Webkit:"webkit",Moz:"",O:"o",ms:"MS"},function(b,c){if(a.style[b+"TransitionProperty"]!==l)return q="-"+r(b)+"-",m=c,!1});d=q+"transform";n[g=q+"transition-property"]=n[j=q+"transition-duration"]=n[k=q+"transition-timing-function"]=n[w=q+"animation-name"]=n[x=q+"animation-duration"]=n[A=q+"animation-timing-function"]=
|
37 |
-
"";b.fx={off:m===l&&a.style.transitionProperty===l,speeds:{_default:400,fast:200,slow:600},cssPrefix:q,transitionEnd:m?m+"TransitionEnd":r("TransitionEnd"),animationEnd:m?m+"AnimationEnd":r("AnimationEnd")};b.fn.animate=function(a,c,d,g){b.isObject(c)&&(d=c.easing,g=c.complete,c=c.duration);c&&(c=("number"==typeof c?c:b.fx.speeds[c]||b.fx.speeds._default)/1E3);return this.anim(a,c,d,g)};b.fn.anim=function(a,e,m,q){var u,v={},p,h="",B=this,C,D=b.fx.transitionEnd;e===l&&(e=0.4);b.fx.off&&(e=0);if("string"==
|
38 |
-
typeof a)v[w]=a,v[x]=e+"s",v[A]=m||"linear",D=b.fx.animationEnd;else{p=[];for(u in a)c.test(u)?h+=u+"("+a[u]+") ":(v[u]=a[u],p.push(r(u.replace(/([a-z])([A-Z])/,"$1-$2"))));h&&(v[d]=h,p.push(d));0<e&&"object"===typeof a&&(v[g]=p.join(", "),v[j]=e+"s",v[k]=m||"linear")}C=function(a){if("undefined"!==typeof a){if(a.target!==a.currentTarget)return;b(a.target).unbind(D,arguments.callee)}b(this).css(n);q&&q.call(this)};0<e&&this.bind(D,C);this.size()&&this.get(0).clientLeft;this.css(v);0>=e&&setTimeout(function(){B.each(function(){C.call(this)})},
|
39 |
-
0);return this};a=null})(Zepto);
|
40 |
-
(function(b){function l(a,c,d,e){if(a.global)return a=c||w,d=b.Event(d),b(a).trigger(d,e),!d.defaultPrevented}function r(a,b,c){var d=c.context;c.success.call(d,a,"success",b);l(c,d,"ajaxSuccess",[b,c,a]);m("success",b,c)}function q(a,b,c,d){var e=d.context;d.error.call(e,c,b,a);l(d,e,"ajaxError",[c,d,a]);m(b,c,d)}function m(a,c,d){var e=d.context;d.complete.call(e,c,a);l(d,e,"ajaxComplete",[c,d]);d.global&&!--b.active&&l(d,null,"ajaxStop")}function a(){}function c(a){return a&&(a==z?"html":a==y?
|
41 |
-
"json":s.test(a)?"script":e.test(a)&&"xml")||"text"}function d(a){a.processData&&k(a.data)&&(a.data=b.param(a.data,a.traditional));if(a.data&&(!a.type||"GET"==a.type.toUpperCase()))a.url=(a.url+"&"+a.data).replace(/[&?]{1,2}/,"?")}function g(a,c,d,e){var j=b.isArray(c);b.each(c,function(c,h){e&&(c=d?e:e+"["+(j?"":c)+"]");!e&&j?a.add(h.name,h.value):(d?b.isArray(h):k(h))?g(a,h,d,c):a.add(c,h)})}var j=0,k=b.isObject,w=window.document,x,A,n=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,
|
42 |
-
e=/^(?:text|application)\/xml/i,y="application/json",z="text/html",u=/^\s*$/;b.active=0;b.ajaxJSONP=function(c){if(!("type"in c))return b.ajax(c);var e="jsonp"+ ++j,g=w.createElement("script"),n={abort:function(){b(g).remove();e in window&&(window[e]=a);m("abort",n,c)}},k;c.error&&(g.onerror=function(){n.abort();c.error()});window[e]=function(a){clearTimeout(k);b(g).remove();delete window[e];r(a,n,c)};d(c);g.src=c.url.replace(/=\?/,"="+e);b("head").append(g);0<c.timeout&&(k=setTimeout(function(){n.abort();
|
43 |
-
m("timeout",n,c)},c.timeout));return n};b.ajaxSettings={type:"GET",beforeSend:a,success:a,error:a,complete:a,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript",json:y,xml:"application/xml, text/xml",html:z,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0};b.ajax=function(e){var h=b.extend({},e||{});for(x in b.ajaxSettings)void 0===h[x]&&(h[x]=b.ajaxSettings[x]);h.global&&0===b.active++&&l(h,null,"ajaxStart");
|
44 |
-
h.crossDomain||(h.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(h.url)&&RegExp.$2!=window.location.host);var g=h.dataType;e=/=\?/.test(h.url);if("jsonp"==g||e)return e||(h.url=(h.url+"&callback=?").replace(/[&?]{1,2}/,"?")),b.ajaxJSONP(h);h.url||(h.url=window.location.toString());d(h);e=h.accepts[g];var j={},n=/^([\w-]+:)\/\//.test(h.url)?RegExp.$1:window.location.protocol,k=b.ajaxSettings.xhr(),m;h.crossDomain||(j["X-Requested-With"]="XMLHttpRequest");e&&(j.Accept=e,-1<e.indexOf(",")&&(e=e.split(",",
|
45 |
-
2)[0]),k.overrideMimeType&&k.overrideMimeType(e));if(h.contentType||!1!==h.contentType&&h.data&&"GET"!=h.type.toUpperCase())j["Content-Type"]=h.contentType||"application/x-www-form-urlencoded";h.headers=b.extend(j,h.headers||{});k.onreadystatechange=function(){if(4==k.readyState){clearTimeout(m);var a,d=!1;if(200<=k.status&&300>k.status||304==k.status||0==k.status&&"file:"==n){g=g||c(k.getResponseHeader("content-type"));a=k.responseText;try{"script"==g?(0,eval)(a):"xml"==g?a=k.responseXML:"json"==
|
46 |
-
g&&(a=u.test(a)?null:b.parseJSON(a))}catch(e){d=e}d?q(d,"parsererror",k,h):r(a,k,h)}else q(null,"error",k,h)}};k.open(h.type,h.url,"async"in h?h.async:!0);for(A in h.headers)k.setRequestHeader(A,h.headers[A]);e=h.context;!1===h.beforeSend.call(e,k,h)||!1===l(h,e,"ajaxBeforeSend",[k,h])?e=!1:(l(h,e,"ajaxSend",[k,h]),e=void 0);if(!1===e)return k.abort(),!1;0<h.timeout&&(m=setTimeout(function(){k.onreadystatechange=a;k.abort();q(null,"timeout",k,h)},h.timeout));k.send(h.data?h.data:null);return k};b.get=
|
47 |
-
function(a,c){return b.ajax({url:a,success:c})};b.post=function(a,c,d,e){b.isFunction(c)&&(e=e||d,d=c,c=null);return b.ajax({type:"POST",url:a,data:c,success:d,dataType:e})};b.getJSON=function(a,c){return b.ajax({url:a,success:c,dataType:"json"})};b.fn.load=function(a,c){if(!this.length)return this;var d=this,e=a.split(/\s/),g;1<e.length&&(a=e[0],g=e[1]);b.get(a,function(a){d.html(g?b("<div>").html(a.replace(n,"")).find(g):a);c&&c.apply(d,arguments)});return this};var v=encodeURIComponent;b.param=
|
48 |
-
function(a,c){var b=[];b.add=function(a,b){this.push(v(a)+"="+v(b))};g(b,a,c);return b.join("&").replace(/%20/g,"+")}})(Zepto);
|
49 |
-
(function(b){function l(d,g){var j=d[c],j=j&&q[j];if(void 0===g)return j||r(d);if(j){if(g in j)return j[g];var k=a(g);if(k in j)return j[k]}return m.call(b(d),g)}function r(d,g,j){var k=d[c]||(d[c]=++b.uuid),l;if(!(l=q[k])){l=q;var m={};b.each(d.attributes,function(c,d){0==d.name.indexOf("data-")&&(m[a(d.name.replace("data-",""))]=b.zepto.deserializeValue(d.value))});l=l[k]=m}d=l;void 0!==g&&(d[a(g)]=j);return d}var q={},m=b.fn.data,a=b.camelCase,c=b.expando="Zepto"+ +new Date;b.fn.data=function(a,
|
50 |
-
c){return void 0===c?b.isPlainObject(a)?this.each(function(c,g){b.each(a,function(a,c){r(g,a,c)})}):0==this.length?void 0:l(this[0],a):this.each(function(){r(this,a,c)})};b.fn.removeData=function(d){"string"==typeof d&&(d=d.split(/\s+/));return this.each(function(){var g=this[c],j=g&&q[g];j&&b.each(d,function(){delete j[a(this)]})})}})(Zepto);
|
51 |
-
(function(b,l){function r(a,c,j,k,m){"function"==typeof c&&!m&&(m=c,c=l);j={opacity:j};k&&(j.scale=k,a.css(b.fx.cssPrefix+"transform-origin","0 0"));return a.animate(j,c,null,m)}function q(c,g,j,k){return r(c,g,0,j,function(){a.call(b(this));k&&k.call(this)})}var m=b.fn.show,a=b.fn.hide,c=b.fn.toggle;b.fn.show=function(a,c){m.call(this);a===l?a=0:this.css("opacity",0);return r(this,a,1,"1,1",c)};b.fn.hide=function(c,b){return c===l?a.call(this):q(this,c,"0,0",b)};b.fn.toggle=function(a,g){return a===
|
52 |
-
l||"boolean"==typeof a?c.call(this,a):this.each(function(){var c=b(this);c["none"==c.css("display")?"show":"hide"](a,g)})};b.fn.fadeTo=function(a,c,b){return r(this,a,c,null,b)};b.fn.fadeIn=function(a,c){var b=this.css("opacity");0<b?this.css("opacity",0):b=1;return m.call(this).fadeTo(a,b,c)};b.fn.fadeOut=function(a,c){return q(this,a,null,c)};b.fn.fadeToggle=function(a,c){return this.each(function(){var j=b(this);j[0==j.css("opacity")||"none"==j.css("display")?"fadeIn":"fadeOut"](a,c)})}})(Zepto);!function(b){var l=function(a){this.messages={defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",urlstrict:"This value should be a valid url.",number:"This value should be a valid number.",digits:"This value should be digits.",dateIso:"This value should be a valid date (YYYY-MM-DD).",alphanum:"This value should be alphanumeric.",phone:"This value should be a valid phone number."},notnull:"This value should not be null.",
|
53 |
-
notblank:"This value should not be blank.",required:"This value is required.",regexp:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or less.",rangelength:"This value length is invalid. It should be between %s and %s characters long.",
|
54 |
-
mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or less.",rangecheck:"You must select between %s and %s choices.",equalto:"This value should be the same."};this.init(a)};l.prototype={constructor:l,validators:{notnull:function(a){return 0<a.length},notblank:function(a){return"string"===typeof a&&""!==a.replace(/^\s+/g,"").replace(/\s+$/g,"")},required:function(a){if("object"===typeof a){for(var c in a)if(this.required(a[c]))return!0;return!1}return this.notnull(a)&&
|
55 |
-
this.notblank(a)},type:function(a,c){var b;switch(c){case "number":b=/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/;break;case "digits":b=/^\d+$/;break;case "alphanum":b=/^\w+$/;break;case "email":b=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))){2,6}$/i;
|
56 |
-
break;case "url":a=/(https?|s?ftp|git)/i.test(a)?a:"http://"+a;case "urlstrict":b=/^(https?|s?ftp|git):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\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])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\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})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
|
57 |
-
break;case "dateIso":b=/^(\d{4})\D?(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])$/;break;case "phone":b=/^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/;break;default:return!1}return""!==a?b.test(a):!1},regexp:function(a,c,b){return RegExp(c,b.options.regexpFlag||"").test(a)},minlength:function(a,c){return a.length>=c},maxlength:function(a,c){return a.length<=c},rangelength:function(a,c){return this.minlength(a,c[0])&&this.maxlength(a,c[1])},
|
58 |
-
min:function(a,c){return Number(a)>=c},max:function(a,c){return Number(a)<=c},range:function(a,c){return a>=c[0]&&a<=c[1]},equalto:function(a,c,d){d.options.validateIfUnchanged=!0;return a===b(c).val()},remote:function(a,c,d){var g={},j={};g[d.$element.attr("name")]=a;"undefined"!==typeof d.options.remoteDatatype&&(j={dataType:d.options.remoteDatatype});var k=function(a,c){"undefined"!==typeof c&&("undefined"!==typeof d.Validator.messages.remote&&c!==d.Validator.messages.remote)&&b(d.ulError+" .remote").remove();
|
59 |
-
d.updtConstraint({name:"remote",valid:a},c);d.manageValidationResult()},m=function(a){if("object"===typeof a)return a;try{a=b.parseJSON(a)}catch(c){}return a},l=function(a){return"object"===typeof a&&null!==a?"undefined"!==typeof a.error?a.error:"undefined"!==typeof a.message?a.message:null:null};b.ajax(b.extend({},{url:c,data:g,type:d.options.remoteMethod||"GET",success:function(a){a=m(a);k(1===a||!0===a||"object"===typeof a&&null!==a&&"undefined"!==typeof a.success,l(a))},error:function(a){a=m(a);
|
60 |
-
k(!1,l(a))}},j));return null},mincheck:function(a,c){return this.minlength(a,c)},maxcheck:function(a,c){return this.maxlength(a,c)},rangecheck:function(a,c){return this.rangelength(a,c)}},init:function(a){var c=a.validators;a=a.messages;for(var b in c)this.addValidator(b,c[b]);for(b in a)this.addMessage(b,a[b])},formatMesssage:function(a,c){if("object"===typeof c){for(var b in c)a=this.formatMesssage(a,c[b]);return a}return"string"===typeof a?a.replace(/%s/i,c):""},addValidator:function(a,c){this.validators[a]=
|
61 |
-
c},addMessage:function(a,c,b){if("undefined"!==typeof b&&!0===b)this.messages.type[a]=c;else if("type"===a)for(var g in c)this.messages.type[g]=c[g];else this.messages[a]=c}};var r=function(a,c,b){this.options=c;this.Validator=new l(c);if("ParsleyFieldMultiple"===b)return this;this.init(a,b||"ParsleyField")};r.prototype={constructor:r,init:function(a,c){this.type=c;this.valid=!0;this.element=a;this.validatedOnce=!1;this.$element=b(a);this.val=this.$element.val();this.isRequired=!1;this.constraints=
|
62 |
-
{};"undefined"===typeof this.isRadioOrCheckbox&&(this.isRadioOrCheckbox=!1,this.hash=this.generateHash(),this.errorClassHandler=this.options.errors.classHandler(a,this.isRadioOrCheckbox)||this.$element);this.ulErrorManagement();this.bindHtml5Constraints();this.addConstraints();this.hasConstraints()&&this.bindValidationEvents()},setParent:function(a){this.$parent=b(a)},getParent:function(){return this.$parent},bindHtml5Constraints:function(){if(this.$element.hasClass("required")||this.$element.prop("required"))this.options.required=
|
63 |
-
!0;"undefined"!==typeof this.$element.attr("type")&&RegExp(this.$element.attr("type"),"i").test("email url number range")&&(this.options.type=this.$element.attr("type"),RegExp(this.options.type,"i").test("number range")&&(this.options.type="number","undefined"!==typeof this.$element.attr("min")&&this.$element.attr("min").length&&(this.options.min=this.$element.attr("min")),"undefined"!==typeof this.$element.attr("max")&&this.$element.attr("max").length&&(this.options.max=this.$element.attr("max"))));
|
64 |
-
"string"===typeof this.$element.attr("pattern")&&this.$element.attr("pattern").length&&(this.options.regexp=this.$element.attr("pattern"))},addConstraints:function(){for(var a in this.options){var b={};b[a]=this.options[a];this.addConstraint(b,!0)}},addConstraint:function(a,b){for(var d in a)d=d.toLowerCase(),"function"===typeof this.Validator.validators[d]&&(this.constraints[d]={name:d,requirements:a[d],valid:null},"required"===d&&(this.isRequired=!0),this.addCustomConstraintMessage(d));"undefined"===
|
65 |
-
typeof b&&this.bindValidationEvents()},updateConstraint:function(a,b){for(var d in a)this.updtConstraint({name:d,requirements:a[d],valid:null},b)},updtConstraint:function(a,c){this.constraints[a.name]=b.extend(!0,this.constraints[a.name],a);"string"===typeof c&&(this.Validator.messages[a.name]=c);this.bindValidationEvents()},removeConstraint:function(a){a=a.toLowerCase();delete this.constraints[a];"required"===a&&(this.isRequired=!1);this.hasConstraints()?this.bindValidationEvents():"ParsleyForm"===
|
66 |
-
typeof this.getParent()?this.getParent().removeItem(this.$element):this.destroy()},addCustomConstraintMessage:function(a){var b=a+("type"===a&&"undefined"!==typeof this.options[a]?this.options[a].charAt(0).toUpperCase()+this.options[a].substr(1):"")+"Message";"undefined"!==typeof this.options[b]&&this.Validator.addMessage("type"===a?this.options[a]:a,this.options[b],"type"===a)},bindValidationEvents:function(){this.valid=null;this.$element.addClass("parsley-validated");this.$element.off("."+this.type);
|
67 |
-
this.options.remote&&!/change/i.test(this.options.trigger)&&(this.options.trigger=!this.options.trigger?"change":" change");var a=(!this.options.trigger?"":this.options.trigger)+(/key/i.test(this.options.trigger)?"":" keyup");this.$element.is("select")&&(a+=/change/i.test(a)?"":" change");a=a.replace(/^\s+/g,"").replace(/\s+$/g,"");this.$element.on((a+" ").split(" ").join("."+this.type+" "),!1,b.proxy(this.eventValidation,this))},generateHash:function(){return"parsley-"+(Math.random()+"").substring(2)},
|
68 |
-
getHash:function(){return this.hash},getVal:function(){return this.$element.data("value")||this.$element.val()},eventValidation:function(a){var b=this.getVal();if("keyup"===a.type&&!/keyup/i.test(this.options.trigger)&&!this.validatedOnce||"change"===a.type&&!/change/i.test(this.options.trigger)&&!this.validatedOnce||!this.isRadioOrCheckbox&&this.getLength(b)<this.options.validationMinlength&&!this.validatedOnce)return!0;this.validate()},getLength:function(a){return!a||!a.hasOwnProperty("length")?
|
69 |
-
0:a.length},isValid:function(){return this.validate(!1)},hasConstraints:function(){for(var a in this.constraints)return!0;return!1},validate:function(a){var b=this.getVal(),d=null;if(!this.hasConstraints())return null;if(this.options.listeners.onFieldValidate(this.element,this)||""===b&&!this.isRequired)return this.reset(),null;if(!this.needsValidation(b))return this.valid;d=this.applyValidators();("undefined"!==typeof a?a:this.options.showErrors)&&this.manageValidationResult();return d},needsValidation:function(a){if(!this.options.validateIfUnchanged&&
|
70 |
-
null!==this.valid&&this.val===a&&this.validatedOnce)return!1;this.val=a;return this.validatedOnce=!0},applyValidators:function(){var a=null,b;for(b in this.constraints){var d=this.Validator.validators[this.constraints[b].name](this.val,this.constraints[b].requirements,this);!1===d?(a=!1,this.constraints[b].valid=a,this.options.listeners.onFieldError(this.element,this.constraints,this)):!0===d&&(this.constraints[b].valid=!0,a=!1!==a,!1===this.options.listeners.onFieldSuccess(this.element,this.constraints,
|
71 |
-
this)&&(a=!1))}return a},manageValidationResult:function(){var a=null,c;for(c in this.constraints)!1===this.constraints[c].valid?(this.manageError(this.constraints[c]),a=!1):!0===this.constraints[c].valid&&(this.removeError(this.constraints[c].name),a=!1!==a);this.valid=a;if(!0===this.valid)return this.removeErrors(),this.errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass),!0;if(!1===this.valid)return this.errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass),
|
72 |
-
!1;this.ulError&&0===b(this.ulError).children().length&&this.removeErrors();return a},ulErrorManagement:function(){this.ulError="#"+this.hash;this.ulTemplate=b(this.options.errors.errorsWrapper).attr("id",this.hash).addClass("parsley-error-list")},removeError:function(a){a=this.ulError+" ."+a;var c=this;this.options.animate?b(a).fadeOut(this.options.animateDuration,function(){b(this).remove();c.ulError&&0===b(c.ulError).children().length&&c.removeErrors()}):b(a).remove()},addError:function(a){for(var c in a){var d=
|
73 |
-
b(this.options.errors.errorElem).addClass(c);b(this.ulError).append(this.options.animate?b(d).html(a[c]).hide().fadeIn(this.options.animateDuration):b(d).html(a[c]))}},removeErrors:function(){this.options.animate?b(this.ulError).fadeOut(this.options.animateDuration,function(){b(this).remove()}):b(this.ulError).remove()},reset:function(){this.valid=null;this.removeErrors();this.validatedOnce=!1;this.errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass);for(var a in this.constraints)this.constraints[a].valid=
|
74 |
-
null;return this},manageError:function(a){b(this.ulError).length||this.manageErrorContainer();if(!("required"===a.name&&null!==this.getVal()&&0<this.getVal().length)&&(!this.isRequired||!("required"!==a.name&&(null===this.getVal()||0===this.getVal().length)))){var c=a.name,d=!1!==this.options.errorMessage?"custom-error-message":c,g={};a=!1!==this.options.errorMessage?this.options.errorMessage:"type"===a.name?this.Validator.messages[c][a.requirements]:"undefined"===typeof this.Validator.messages[c]?
|
75 |
-
this.Validator.messages.defaultMessage:this.Validator.formatMesssage(this.Validator.messages[c],a.requirements);b(this.ulError+" ."+d).length||(g[d]=a,this.addError(g))}},manageErrorContainer:function(){var a=this.options.errorContainer||this.options.errors.container(this.element,this.isRadioOrCheckbox),c=this.options.animate?this.ulTemplate.show():this.ulTemplate;"undefined"!==typeof a?b(a).append(c):!this.isRadioOrCheckbox?this.$element.after(c):this.$element.parent().after(c)},addListener:function(a){for(var b in a)this.options.listeners[b]=
|
76 |
-
a[b]},destroy:function(){this.$element.removeClass("parsley-validated");this.reset().$element.off("."+this.type).removeData(this.type)}};var q=function(a,b,d){this.initMultiple(a,b);this.inherit(a,b);this.Validator=new l(b);this.init(a,d||"ParsleyFieldMultiple")};q.prototype={constructor:q,initMultiple:function(a,c){this.element=a;this.$element=b(a);this.group=c.group||!1;this.hash=this.getName();this.siblings=this.group?'[data-group="'+this.group+'"]':'input[name="'+this.$element.attr("name")+'"]';
|
77 |
-
this.isRadioOrCheckbox=!0;this.isRadio=this.$element.is("input[type=radio]");this.isCheckbox=this.$element.is("input[type=checkbox]");this.errorClassHandler=c.errors.classHandler(a,this.isRadioOrCheckbox)||this.$element.parent()},inherit:function(a,b){var d=new r(a,b,"ParsleyFieldMultiple"),g;for(g in d)"undefined"===typeof this[g]&&(this[g]=d[g])},getName:function(){if(this.group)return"parsley-"+this.group;if("undefined"===typeof this.$element.attr("name"))throw"A radio / checkbox input must have a data-group attribute or a name to be Parsley validated !";
|
78 |
-
return"parsley-"+this.$element.attr("name").replace(/(:|\.|\[|\])/g,"")},getVal:function(){if(this.isRadio)return b(this.siblings+":checked").val()||"";if(this.isCheckbox){var a=[];b(this.siblings+":checked").each(function(){a.push(b(this).val())});return a}},bindValidationEvents:function(){this.valid=null;this.$element.addClass("parsley-validated");this.$element.off("."+this.type);var a=this,c=(!this.options.trigger?"":this.options.trigger)+(/change/i.test(this.options.trigger)?"":" change"),c=c.replace(/^\s+/g,
|
79 |
-
"").replace(/\s+$/g,"");b(this.siblings).each(function(){b(this).on(c.split(" ").join("."+a.type+" "),!1,b.proxy(a.eventValidation,a))})}};var m=function(a,b,d){this.init(a,b,d||"parsleyForm")};m.prototype={constructor:m,init:function(a,c,d){this.type=d;this.items=[];this.$element=b(a);this.options=c;var g=this;this.$element.find(c.inputs).each(function(){g.addItem(this)});this.$element.on("submit."+this.type,!1,b.proxy(this.validate,this))},addListener:function(a){for(var b in a)if(/Field/.test(b))for(var d=
|
80 |
-
0;d<this.items.length;d++)this.items[d].addListener(a);else this.options.listeners[b]=a[b]},addItem:function(a){if(b(a).is(this.options.excluded))return!1;a=b(a).parsley(this.options);a.setParent(this);this.items.push(a)},removeItem:function(a){a=b(a).parsley();for(var c=0;c<this.items.length;c++)if(this.items[c].hash===a.hash)return this.items[c].destroy(),this.items.splice(c,1),!0;return!1},validate:function(a){var b=!0;this.focusedField=!1;for(var d=0;d<this.items.length;d++)if("undefined"!==typeof this.items[d]&&
|
81 |
-
!1===this.items[d].validate()&&(b=!1,!this.focusedField&&"first"===this.options.focus||"last"===this.options.focus))this.focusedField=this.items[d].$element;this.focusedField&&!b&&this.focusedField.focus();a=this.options.listeners.onFormSubmit(b,a,this);return"undefined"!==typeof a?a:b},isValid:function(){for(var a=0;a<this.items.length;a++)if(!1===this.items[a].isValid())return!1;return!0},removeErrors:function(){for(var a=0;a<this.items.length;a++)this.items[a].parsley("reset")},destroy:function(){for(var a=
|
82 |
-
0;a<this.items.length;a++)this.items[a].destroy();this.$element.off("."+this.type).removeData(this.type)},reset:function(){for(var a=0;a<this.items.length;a++)this.items[a].reset()}};b.fn.parsley=function(a,c){function d(d,j){var l=b(d).data(j);if(!l){switch(j){case "parsleyForm":l=new m(d,g,"parsleyForm");break;case "parsleyField":l=new r(d,g,"parsleyField");break;case "parsleyFieldMultiple":l=new q(d,g,"parsleyFieldMultiple");break;default:return}b(d).data(j,l)}return"string"===typeof a&&"function"===
|
83 |
-
typeof l[a]?(l=l[a](c),"undefined"!==typeof l?l:b(d)):l}var g=b.extend(!0,{},b.fn.parsley.defaults,"undefined"!==typeof window.ParsleyConfig?window.ParsleyConfig:{},a,this.data()),j=null;b(this).is("form")||!0===b(this).data("bind")?j=d(b(this),"parsleyForm"):b(this).is(g.inputs)&&!b(this).is(g.excluded)&&(j=d(b(this),!b(this).is("input[type=radio], input[type=checkbox]")?"parsleyField":"parsleyFieldMultiple"));return"function"===typeof c?c():j};b.fn.parsley.Constructor=m;b.fn.parsley.defaults={inputs:"input, textarea, select",
|
84 |
-
excluded:"input[type=hidden], input[type=file], :disabled",trigger:!1,animate:!0,animateDuration:300,focus:"first",validationMinlength:3,successClass:"parsley-success",errorClass:"parsley-error",errorMessage:!1,validators:{},showErrors:!0,messages:{},validateIfUnchanged:!1,errors:{classHandler:function(){},container:function(){},errorsWrapper:"<ul></ul>",errorElem:"<li></li>"},listeners:{onFieldValidate:function(){return!1},onFormSubmit:function(){},onFieldError:function(){},onFieldSuccess:function(){}}};
|
85 |
-
b(window).on("load",function(){b('[data-validate="parsley"]').each(function(){b(this).parsley()})})}(window.jQuery||window.Zepto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class.crypt.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined("ABSPATH") or die("");
|
3 |
-
// New encryption class
|
4 |
-
|
5 |
-
class DUP_Crypt
|
6 |
-
{
|
7 |
-
public static function encrypt($key, $string)
|
8 |
-
{
|
9 |
-
$result = '';
|
10 |
-
for ($i = 0; $i < strlen($string); $i++)
|
11 |
-
{
|
12 |
-
$char = substr($string, $i, 1);
|
13 |
-
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
|
14 |
-
$char = chr(ord($char) + ord($keychar));
|
15 |
-
$result .= $char;
|
16 |
-
}
|
17 |
-
|
18 |
-
return urlencode(base64_encode($result));
|
19 |
-
}
|
20 |
-
|
21 |
-
public static function decrypt($key, $string)
|
22 |
-
{
|
23 |
-
$result = '';
|
24 |
-
$string = urldecode($string);
|
25 |
-
$string = base64_decode($string);
|
26 |
-
|
27 |
-
for ($i = 0; $i < strlen($string); $i++)
|
28 |
-
{
|
29 |
-
$char = substr($string, $i, 1);
|
30 |
-
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
|
31 |
-
$char = chr(ord($char) - ord($keychar));
|
32 |
-
$result .= $char;
|
33 |
-
}
|
34 |
-
|
35 |
-
return $result;
|
36 |
-
}
|
37 |
-
|
38 |
-
public static function scramble($string)
|
39 |
-
{
|
40 |
-
return self::encrypt(self::sk1() . self::sk2(), $string);
|
41 |
-
}
|
42 |
-
|
43 |
-
public static function unscramble($string)
|
44 |
-
{
|
45 |
-
return self::decrypt(self::sk1() . self::sk2(), $string);
|
46 |
-
}
|
47 |
-
|
48 |
-
public static function sk1()
|
49 |
-
{
|
50 |
-
return 'fdas' . self::encrypt('abx', 'v1');
|
51 |
-
}
|
52 |
-
|
53 |
-
public static function sk2()
|
54 |
-
{
|
55 |
-
return 'fres' . self::encrypt('ad3x', 'v2');
|
56 |
-
}
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/package/class.pack.archive.zip.php
CHANGED
@@ -85,7 +85,7 @@ class DUP_Zip extends DUP_Archive
|
|
85 |
} else {
|
86 |
//Don't warn when dirtory is the root path
|
87 |
if (strcmp($dir, rtrim(self::$compressDir, '/')) != 0) {
|
88 |
-
$dir_path = strlen($dir) ? "[
|
89 |
$info .= "DIR: {$dir_path}\n";
|
90 |
}
|
91 |
}
|
@@ -153,8 +153,8 @@ class DUP_Zip extends DUP_Archive
|
|
153 |
|
154 |
self::$zipFileSize = @filesize(self::$zipPath);
|
155 |
DUP_Log::Info("COMPRESSED SIZE: ".DUP_Util::byteSize(self::$zipFileSize));
|
156 |
-
DUP_Log::Info("ARCHIVE RUNTIME:
|
157 |
-
DUP_Log::Info("MEMORY STACK: ".DUP_Server::getPHPMemory());
|
158 |
} catch (Exception $e) {
|
159 |
DUP_Log::Error("Runtime error in class.pack.archive.zip.php constructor.", "Exception: {$e}");
|
160 |
}
|
85 |
} else {
|
86 |
//Don't warn when dirtory is the root path
|
87 |
if (strcmp($dir, rtrim(self::$compressDir, '/')) != 0) {
|
88 |
+
$dir_path = strlen($dir) ? "[".esc_html($dir)."]" : "[Read Error] - last successful read was: [{$lastDirSuccess}]";
|
89 |
$info .= "DIR: {$dir_path}\n";
|
90 |
}
|
91 |
}
|
153 |
|
154 |
self::$zipFileSize = @filesize(self::$zipPath);
|
155 |
DUP_Log::Info("COMPRESSED SIZE: ".DUP_Util::byteSize(self::$zipFileSize));
|
156 |
+
DUP_Log::Info("ARCHIVE RUNTIME: ".esc_html($timerAllSum));
|
157 |
+
DUP_Log::Info("MEMORY STACK: ".esc_html(DUP_Server::getPHPMemory()));
|
158 |
} catch (Exception $e) {
|
159 |
DUP_Log::Error("Runtime error in class.pack.archive.zip.php constructor.", "Exception: {$e}");
|
160 |
}
|
classes/package/class.pack.installer.php
CHANGED
@@ -62,6 +62,7 @@ class DUP_Installer
|
|
62 |
"assets/inc.libs.js.php" => "@@INC.LIBS.JS.PHP@@",
|
63 |
"assets/inc.js.php" => "@@INC.JS.PHP@@",
|
64 |
"classes/utilities/class.u.php" => "@@CLASS.U.PHP@@",
|
|
|
65 |
"classes/class.server.php" => "@@CLASS.SERVER.PHP@@",
|
66 |
"classes/class.db.php" => "@@CLASS.DB.PHP@@",
|
67 |
"classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
|
@@ -88,7 +89,7 @@ class DUP_Installer
|
|
88 |
$insert_data = @file_get_contents($file_path);
|
89 |
file_put_contents($template_path, str_replace("${token}", "{$insert_data}", $search_data));
|
90 |
if ($search_data === false || $insert_data == false) {
|
91 |
-
DUP_Log::Error("Installer generation failed at {$token}.");
|
92 |
}
|
93 |
@chmod($file_path, 0644);
|
94 |
}
|
62 |
"assets/inc.libs.js.php" => "@@INC.LIBS.JS.PHP@@",
|
63 |
"assets/inc.js.php" => "@@INC.JS.PHP@@",
|
64 |
"classes/utilities/class.u.php" => "@@CLASS.U.PHP@@",
|
65 |
+
"classes/class.csrf.php" => "@@CLASS.CSRF.PHP@@",
|
66 |
"classes/class.server.php" => "@@CLASS.SERVER.PHP@@",
|
67 |
"classes/class.db.php" => "@@CLASS.DB.PHP@@",
|
68 |
"classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
|
89 |
$insert_data = @file_get_contents($file_path);
|
90 |
file_put_contents($template_path, str_replace("${token}", "{$insert_data}", $search_data));
|
91 |
if ($search_data === false || $insert_data == false) {
|
92 |
+
DUP_Log::Error("Installer generation failed at {$token}.", '');
|
93 |
}
|
94 |
@chmod($file_path, 0644);
|
95 |
}
|
classes/package/class.pack.php
CHANGED
@@ -320,32 +320,33 @@ class DUP_Package
|
|
320 |
$this->VersionOS = defined('PHP_OS') ? PHP_OS : 'unknown';
|
321 |
$this->VersionWP = $wp_version;
|
322 |
$this->VersionPHP = phpversion();
|
323 |
-
$this->VersionDB =
|
324 |
$this->Name = sanitize_text_field($name);
|
325 |
$this->Hash = $this->makeHash();
|
326 |
$this->NameHash = "{$this->Name}_{$this->Hash}";
|
327 |
|
328 |
-
$this->Notes =
|
329 |
//ARCHIVE
|
330 |
$this->Archive->PackDir = rtrim(DUPLICATOR_WPROOTPATH, '/');
|
331 |
$this->Archive->Format = 'ZIP';
|
332 |
$this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
|
333 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
334 |
-
$this->Archive->FilterDirs =
|
335 |
-
$this->Archive->FilterFiles =
|
336 |
-
$this->Archive->FilterExts = str_replace(array('.', ' '), '',
|
337 |
//INSTALLER
|
338 |
-
$this->Installer->OptsDBHost =
|
339 |
-
$this->Installer->OptsDBPort =
|
340 |
-
$this->Installer->OptsDBName =
|
341 |
-
$this->Installer->OptsDBUser =
|
342 |
-
|
343 |
-
|
|
|
344 |
//DATABASE
|
345 |
$this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
|
346 |
-
$this->Database->FilterTables =
|
347 |
$this->Database->Compatible = $compatlist;
|
348 |
-
$this->Database->Comments =
|
349 |
|
350 |
update_option(self::OPT_ACTIVE, $this);
|
351 |
}
|
@@ -391,7 +392,7 @@ class DUP_Package
|
|
391 |
|
392 |
$wpdb->flush();
|
393 |
$table = $wpdb->prefix."duplicator_packages";
|
394 |
-
$sql = "UPDATE `{$table}` SET status =
|
395 |
$wpdb->query($sql);
|
396 |
}
|
397 |
|
320 |
$this->VersionOS = defined('PHP_OS') ? PHP_OS : 'unknown';
|
321 |
$this->VersionWP = $wp_version;
|
322 |
$this->VersionPHP = phpversion();
|
323 |
+
$this->VersionDB = sanitize_text_field($dbversion);
|
324 |
$this->Name = sanitize_text_field($name);
|
325 |
$this->Hash = $this->makeHash();
|
326 |
$this->NameHash = "{$this->Name}_{$this->Hash}";
|
327 |
|
328 |
+
$this->Notes = sanitize_textarea_field($post['package-notes']);
|
329 |
//ARCHIVE
|
330 |
$this->Archive->PackDir = rtrim(DUPLICATOR_WPROOTPATH, '/');
|
331 |
$this->Archive->Format = 'ZIP';
|
332 |
$this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
|
333 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
334 |
+
$this->Archive->FilterDirs = sanitize_textarea_field($filter_dirs);
|
335 |
+
$this->Archive->FilterFiles = sanitize_textarea_field($filter_files);
|
336 |
+
$this->Archive->FilterExts = str_replace(array('.', ' '), '', sanitize_textarea_field($filter_exts));
|
337 |
//INSTALLER
|
338 |
+
$this->Installer->OptsDBHost = sanitize_text_field($post['dbhost']);
|
339 |
+
$this->Installer->OptsDBPort = sanitize_text_field($post['dbport']);
|
340 |
+
$this->Installer->OptsDBName = sanitize_text_field($post['dbname']);
|
341 |
+
$this->Installer->OptsDBUser = sanitize_text_field($post['dbuser']);
|
342 |
+
$this->Installer->OptsSecureOn = isset($post['secure-on']) ? 1 : 0;
|
343 |
+
$post_secure_pass = sanitize_text_field($post['secure-pass']);
|
344 |
+
$this->Installer->OptsSecurePass = DUP_Util::installerScramble($post_secure_pass);
|
345 |
//DATABASE
|
346 |
$this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
|
347 |
+
$this->Database->FilterTables = sanitize_text_field($tablelist);
|
348 |
$this->Database->Compatible = $compatlist;
|
349 |
+
$this->Database->Comments = sanitize_text_field($dbcomments);
|
350 |
|
351 |
update_option(self::OPT_ACTIVE, $this);
|
352 |
}
|
392 |
|
393 |
$wpdb->flush();
|
394 |
$table = $wpdb->prefix."duplicator_packages";
|
395 |
+
$sql = "UPDATE `{$table}` SET status = ".intval($status).", package = '".esc_sql($packageObj)."' WHERE ID = ".intval($this->ID);
|
396 |
$wpdb->query($sql);
|
397 |
}
|
398 |
|
classes/ui/class.ui.dialog.php
CHANGED
@@ -109,17 +109,15 @@ class DUP_UI_Dialog
|
|
109 |
{
|
110 |
$ok = __('OK', 'duplicator');
|
111 |
|
112 |
-
$html =
|
113 |
-
<div id="{$this->id}" style="display:none">
|
114 |
<div class="dup-dlg-alert-txt">
|
115 |
-
|
116 |
<br/><br/>
|
117 |
</div>
|
118 |
<div class="dup-dlg-alert-btns">
|
119 |
-
<input type="button" class="button button-large" value="
|
120 |
</div>
|
121 |
-
</div>
|
122 |
-
HTML;
|
123 |
|
124 |
echo $html;
|
125 |
}
|
@@ -134,8 +132,8 @@ HTML;
|
|
134 |
$this->width = is_numeric($this->width) ? $this->width : 500;
|
135 |
$this->height = is_numeric($this->height) ? $this->height : 175;
|
136 |
|
137 |
-
$html = "tb_show('
|
138 |
-
"var styleData = jQuery('#TB_window').attr('style') + 'height:
|
139 |
"jQuery('#TB_window').attr('style', styleData);";
|
140 |
|
141 |
echo $html;
|
@@ -170,19 +168,18 @@ HTML;
|
|
170 |
HTML;
|
171 |
}
|
172 |
|
173 |
-
$html =
|
174 |
-
|
175 |
<div class="dup-dlg-confirm-txt">
|
176 |
-
<span id="
|
177 |
<br/><br/>
|
178 |
-
|
179 |
</div>
|
180 |
<div class="dup-dlg-confirm-btns">
|
181 |
-
<input type="button" class="button button-large" value="
|
182 |
-
<input type="button" class="button button-large" value="
|
183 |
</div>
|
184 |
-
</div>
|
185 |
-
HTML;
|
186 |
|
187 |
echo $html;
|
188 |
}
|
109 |
{
|
110 |
$ok = __('OK', 'duplicator');
|
111 |
|
112 |
+
$html = '<div id="'.esc_attr($this->id).'" style="display:none">
|
|
|
113 |
<div class="dup-dlg-alert-txt">
|
114 |
+
'.$this->message.'
|
115 |
<br/><br/>
|
116 |
</div>
|
117 |
<div class="dup-dlg-alert-btns">
|
118 |
+
<input type="button" class="button button-large" value="'.esc_attr($ok).'" onclick="tb_remove()" />
|
119 |
</div>
|
120 |
+
</div>';
|
|
|
121 |
|
122 |
echo $html;
|
123 |
}
|
132 |
$this->width = is_numeric($this->width) ? $this->width : 500;
|
133 |
$this->height = is_numeric($this->height) ? $this->height : 175;
|
134 |
|
135 |
+
$html = "tb_show('".esc_js($this->title)."', '#TB_inline?width=".esc_js($this->width)."&height=".esc_js($this->height)."&inlineId=".esc_js($this->id)."');\n" .
|
136 |
+
"var styleData = jQuery('#TB_window').attr('style') + 'height: ".esc_js($this->height)."px !important';\n" .
|
137 |
"jQuery('#TB_window').attr('style', styleData);";
|
138 |
|
139 |
echo $html;
|
168 |
HTML;
|
169 |
}
|
170 |
|
171 |
+
$html =
|
172 |
+
'<div id="'.esc_attr($this->id).'" style="display:none">
|
173 |
<div class="dup-dlg-confirm-txt">
|
174 |
+
<span id="'.esc_attr($this->id).'_message">'.esc_html($this->message).'</span>
|
175 |
<br/><br/>
|
176 |
+
'.$progress_data.'
|
177 |
</div>
|
178 |
<div class="dup-dlg-confirm-btns">
|
179 |
+
<input type="button" class="button button-large" value="'.esc_attr($ok).'" onclick="'.$this->jscallback.$progress_func2.'" />
|
180 |
+
<input type="button" class="button button-large" value="'.esc_attr($cancel).'" onclick="tb_remove()" />
|
181 |
</div>
|
182 |
+
</div>';
|
|
|
183 |
|
184 |
echo $html;
|
185 |
}
|
classes/ui/class.ui.notice.php
CHANGED
@@ -22,7 +22,7 @@ class DUP_UI_Notice
|
|
22 |
{
|
23 |
/**
|
24 |
* Shows a display message in the wp-admin if any reserved files are found
|
25 |
-
*
|
26 |
* @return string Html formated text notice warnings
|
27 |
*/
|
28 |
public static function showReservedFilesNotice()
|
@@ -32,11 +32,11 @@ class DUP_UI_Notice
|
|
32 |
$dup_perm = current_user_can('manage_options');
|
33 |
if (!$dup_active || !$dup_perm)
|
34 |
return;
|
35 |
-
|
36 |
$screen = get_current_screen();
|
37 |
if (!isset($screen))
|
38 |
return;
|
39 |
-
|
40 |
$is_installer_cleanup_req = ($screen->id == 'duplicator_page_duplicator-tools' && isset($_GET['action']) && $_GET['action'] == 'installer');
|
41 |
if (DUP_Server::hasInstallerFiles() && !$is_installer_cleanup_req) {
|
42 |
|
@@ -61,10 +61,10 @@ class DUP_UI_Notice
|
|
61 |
$msg2 = __('This message will be removed after all installer files are removed. Installer files must be removed to maintain a secure site.<br/>'
|
62 |
. 'Click the link above or button below to remove all installer files and complete the migration.', 'duplicator');
|
63 |
|
64 |
-
echo "<b class='pass-msg'><i class='fa fa-check-circle'></i>
|
65 |
-
printf("1. <a href='javascript:void(0)' onclick='jQuery(\"#dup-remove-installer-files-btn\").click()'>%s</a><br/>",
|
66 |
-
printf("2. <a href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5' target='wporg'>%s</a> <br/> ",
|
67 |
-
echo "<div class='pass-msg' style='color:maroon'>
|
68 |
|
69 |
//All other Pages
|
70 |
} else {
|
@@ -80,7 +80,7 @@ class DUP_UI_Notice
|
|
80 |
|
81 |
}
|
82 |
echo "</p></div>";
|
83 |
-
}
|
84 |
}
|
85 |
|
86 |
/**
|
22 |
{
|
23 |
/**
|
24 |
* Shows a display message in the wp-admin if any reserved files are found
|
25 |
+
*
|
26 |
* @return string Html formated text notice warnings
|
27 |
*/
|
28 |
public static function showReservedFilesNotice()
|
32 |
$dup_perm = current_user_can('manage_options');
|
33 |
if (!$dup_active || !$dup_perm)
|
34 |
return;
|
35 |
+
|
36 |
$screen = get_current_screen();
|
37 |
if (!isset($screen))
|
38 |
return;
|
39 |
+
|
40 |
$is_installer_cleanup_req = ($screen->id == 'duplicator_page_duplicator-tools' && isset($_GET['action']) && $_GET['action'] == 'installer');
|
41 |
if (DUP_Server::hasInstallerFiles() && !$is_installer_cleanup_req) {
|
42 |
|
61 |
$msg2 = __('This message will be removed after all installer files are removed. Installer files must be removed to maintain a secure site.<br/>'
|
62 |
. 'Click the link above or button below to remove all installer files and complete the migration.', 'duplicator');
|
63 |
|
64 |
+
echo "<b class='pass-msg'><i class='fa fa-check-circle'></i> ".esc_html($title)."</b> <br/> {$safe_html} <b>".esc_html($msg1)."</b> <br/>";
|
65 |
+
printf("1. <a href='javascript:void(0)' onclick='jQuery(\"#dup-remove-installer-files-btn\").click()'>%s</a><br/>", esc_html__('Remove Installation Files Now!', 'duplicator'));
|
66 |
+
printf("2. <a href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5' target='wporg'>%s</a> <br/> ", esc_html__('Optionally, Review Duplicator at WordPress.org...', 'duplicator'));
|
67 |
+
echo "<div class='pass-msg' style='color:maroon'>" . $msg2 . "</div>";
|
68 |
|
69 |
//All other Pages
|
70 |
} else {
|
80 |
|
81 |
}
|
82 |
echo "</p></div>";
|
83 |
+
}
|
84 |
}
|
85 |
|
86 |
/**
|
classes/ui/class.ui.screen.base.php
CHANGED
@@ -67,11 +67,11 @@ class DUP_UI_Screen
|
|
67 |
$txt_faq = __("Technical FAQs", 'duplicator');
|
68 |
$txt_sets = __("Package Settings", 'duplicator');
|
69 |
$this->screen->set_help_sidebar(
|
70 |
-
"<div class='dup-screen-hlp-info'><b>
|
71 |
-
."<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>
|
72 |
-
."<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>
|
73 |
-
."<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>
|
74 |
-
."<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>
|
75 |
);
|
76 |
}
|
77 |
}
|
67 |
$txt_faq = __("Technical FAQs", 'duplicator');
|
68 |
$txt_sets = __("Package Settings", 'duplicator');
|
69 |
$this->screen->set_help_sidebar(
|
70 |
+
"<div class='dup-screen-hlp-info'><b>".esc_html($txt_title).":</b> <br/>"
|
71 |
+
."<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>".esc_html($txt_home)."</a> <br/>"
|
72 |
+
."<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>".esc_html($txt_guide)."</a> <br/>"
|
73 |
+
."<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>".esc_html($txt_faq)."</a> <br/>"
|
74 |
+
."<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>".esc_html($txt_sets)."</a></div>"
|
75 |
);
|
76 |
}
|
77 |
}
|
classes/utilities/class.u.php
CHANGED
@@ -627,40 +627,12 @@ class DUP_Util
|
|
627 |
"{$wpdb->prefix}users");
|
628 |
}
|
629 |
|
630 |
-
|
631 |
-
*
|
632 |
-
|
633 |
-
|
634 |
-
*
|
635 |
-
* @return string Returns and escaped and sanitized string
|
636 |
-
*/
|
637 |
-
public static function escSanitizeTextAreaField($string)
|
638 |
-
{
|
639 |
-
if (!function_exists('sanitize_textarea_field')) {
|
640 |
-
return esc_html(sanitize_text_field($string));
|
641 |
-
} else {
|
642 |
-
return esc_html(sanitize_textarea_field($string));
|
643 |
-
}
|
644 |
-
}
|
645 |
-
|
646 |
-
/**
|
647 |
-
* Runs esc_html and sanitize_text_field on a string
|
648 |
-
*
|
649 |
-
* @param string The string to process
|
650 |
-
*
|
651 |
-
* @return string Returns and escaped and sanitized string
|
652 |
*/
|
653 |
-
public static function escSanitizeTextField($string)
|
654 |
-
{
|
655 |
-
return esc_html(sanitize_text_field($string));
|
656 |
-
}
|
657 |
-
|
658 |
-
/**
|
659 |
-
* Finds if its a valid executable or not
|
660 |
-
* @param type $exe A non zero length executable path to find if that is executable or not.
|
661 |
-
* @param type $expectedValue expected value for the result
|
662 |
-
* @return boolean
|
663 |
-
*/
|
664 |
public static function isExecutable($cmd)
|
665 |
{
|
666 |
if (strlen($cmd) < 1) return false;
|
627 |
"{$wpdb->prefix}users");
|
628 |
}
|
629 |
|
630 |
+
/**
|
631 |
+
* Finds if its a valid executable or not
|
632 |
+
* @param type $exe A non zero length executable path to find if that is executable or not.
|
633 |
+
* @param type $expectedValue expected value for the result
|
634 |
+
* @return boolean
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
public static function isExecutable($cmd)
|
637 |
{
|
638 |
if (strlen($cmd) < 1) return false;
|
ctrls/ctrl.package.php
CHANGED
@@ -13,7 +13,11 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/package/class.pack.php');
|
|
13 |
* @example to test: /wp-admin/admin-ajax.php?action=duplicator_package_scan
|
14 |
*/
|
15 |
function duplicator_package_scan() {
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
header('Content-Type: application/json;');
|
18 |
DUP_Util::hasCapability('export');
|
19 |
|
@@ -94,7 +98,7 @@ function duplicator_package_delete() {
|
|
94 |
$json = array();
|
95 |
$post = stripslashes_deep($_POST);
|
96 |
$tblName = $wpdb->prefix . 'duplicator_packages';
|
97 |
-
$postIDs = isset($post['duplicator_delid']) ? $post['duplicator_delid'] : null;
|
98 |
$list = explode(",", $postIDs);
|
99 |
$delCount = 0;
|
100 |
|
13 |
* @example to test: /wp-admin/admin-ajax.php?action=duplicator_package_scan
|
14 |
*/
|
15 |
function duplicator_package_scan() {
|
16 |
+
$nonce = sanitize_text_field($_REQUEST['nonce']);
|
17 |
+
if (!wp_verify_nonce($nonce, 'duplicator_package_scan')) {
|
18 |
+
die('Security check disrupted, please return to packages screen.');
|
19 |
+
}
|
20 |
+
|
21 |
header('Content-Type: application/json;');
|
22 |
DUP_Util::hasCapability('export');
|
23 |
|
98 |
$json = array();
|
99 |
$post = stripslashes_deep($_POST);
|
100 |
$tblName = $wpdb->prefix . 'duplicator_packages';
|
101 |
+
$postIDs = isset($post['duplicator_delid']) ? sanitize_text_field($post['duplicator_delid']) : null;
|
102 |
$list = explode(",", $postIDs);
|
103 |
$delCount = 0;
|
104 |
|
ctrls/ctrl.tools.php
CHANGED
@@ -37,7 +37,7 @@ class DUP_CTRL_Tools extends DUP_CTRL_Base
|
|
37 |
try
|
38 |
{
|
39 |
//CONTROLLER LOGIC
|
40 |
-
$path = isset($post['scan-path']) ? $post['scan-path'] : DUPLICATOR_WPROOTPATH;
|
41 |
if (!is_dir($path)) {
|
42 |
throw new Exception("Invalid directory provided '{$path}'!");
|
43 |
}
|
37 |
try
|
38 |
{
|
39 |
//CONTROLLER LOGIC
|
40 |
+
$path = isset($post['scan-path']) ? sanitize_text_field($post['scan-path']) : sanitize_text_field(DUPLICATOR_WPROOTPATH);
|
41 |
if (!is_dir($path)) {
|
42 |
throw new Exception("Invalid directory provided '{$path}'!");
|
43 |
}
|
ctrls/ctrl.ui.php
CHANGED
@@ -39,19 +39,25 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
|
|
39 |
public function SaveViewState($post)
|
40 |
{
|
41 |
$post = $this->postParamMerge($post);
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
$result = new DUP_CTRL_Result($this);
|
43 |
|
44 |
try
|
45 |
{
|
46 |
//CONTROLLER LOGIC
|
47 |
$post = stripslashes_deep($_POST);
|
48 |
-
$key =
|
49 |
-
$value =
|
50 |
$success = DUP_UI_ViewState::save($key, $value);
|
51 |
|
52 |
$payload = array();
|
53 |
-
$payload['key'] = $key;
|
54 |
-
$payload['value'] = $value;
|
55 |
$payload['update-success'] = $success;
|
56 |
|
57 |
//RETURN RESULT
|
@@ -78,6 +84,13 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
|
|
78 |
*/
|
79 |
public function GetViewStateList()
|
80 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
$result = new DUP_CTRL_Result($this);
|
82 |
|
83 |
try
|
39 |
public function SaveViewState($post)
|
40 |
{
|
41 |
$post = $this->postParamMerge($post);
|
42 |
+
|
43 |
+
$nonce = sanitize_text_field($post['nonce']);
|
44 |
+
if (!wp_verify_nonce($nonce, 'DUP_CTRL_UI_SaveViewState')) {
|
45 |
+
die('Security check disrupted, please return to packages screen.');
|
46 |
+
}
|
47 |
+
|
48 |
$result = new DUP_CTRL_Result($this);
|
49 |
|
50 |
try
|
51 |
{
|
52 |
//CONTROLLER LOGIC
|
53 |
$post = stripslashes_deep($_POST);
|
54 |
+
$key = sanitize_text_field($post['key']);
|
55 |
+
$value = sanitize_text_field($post['value']);
|
56 |
$success = DUP_UI_ViewState::save($key, $value);
|
57 |
|
58 |
$payload = array();
|
59 |
+
$payload['key'] = esc_html($key);
|
60 |
+
$payload['value'] = esc_html($value);
|
61 |
$payload['update-success'] = $success;
|
62 |
|
63 |
//RETURN RESULT
|
84 |
*/
|
85 |
public function GetViewStateList()
|
86 |
{
|
87 |
+
if (isset($_REQUEST['nonce'])) {
|
88 |
+
$nonce = sanitize_text_field($_REQUEST['nonce']);
|
89 |
+
if (!wp_verify_nonce($nonce, 'DUP_CTRL_UI_GetViewStateList')) {
|
90 |
+
die('Security check disrupted, please return to packages screen.');
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
$result = new DUP_CTRL_Result($this);
|
95 |
|
96 |
try
|
debug/main.php
CHANGED
@@ -13,18 +13,17 @@ function DUP_DEBUG_TestSetup($CTRL)
|
|
13 |
$test_css = $testable ? '' : 'style="display:none"';
|
14 |
$nonce = wp_create_nonce($action);
|
15 |
|
16 |
-
$html =
|
17 |
<div class="keys">
|
18 |
-
<input type="hidden" name="testable" value="
|
19 |
-
<input type="hidden" name="action" value="
|
20 |
-
<input type="hidden" name="nonce" value="
|
21 |
<span class="result"><i class="fa fa-cube fa-lg"></i></span>
|
22 |
-
<input type=
|
23 |
-
<label for='
|
24 |
-
<a href="javascript:void(0)" onclick
|
25 |
-
<a href="javascript:void(0)" onclick="jQuery(this).closest(
|
26 |
-
</div>
|
27 |
-
EOT;
|
28 |
echo $html;
|
29 |
}
|
30 |
|
@@ -55,7 +54,7 @@ EOT;
|
|
55 |
</script>
|
56 |
|
57 |
<div class="wrap dup-wrap dup-support-all">
|
58 |
-
<h1><?php
|
59 |
<hr size="1" />
|
60 |
|
61 |
<table class="debug-toolbar">
|
@@ -65,8 +64,8 @@ EOT;
|
|
65 |
<input id="test-checkall" type="checkbox" onclick="Duplicator.Debug.CheckAllTests()">
|
66 |
</td>
|
67 |
<td>
|
68 |
-
<input type="button" class="button button-small" value="<?php
|
69 |
-
<input type="button" class="button button-small" value="<?php
|
70 |
</td>
|
71 |
<td> <input type="checkbox" id="test-openwindow" onchange="Duplicator.Debug.TestNewWindow()" /> <label for="test-openwindow">Tests in new window</label> </td>
|
72 |
</tr>
|
13 |
$test_css = $testable ? '' : 'style="display:none"';
|
14 |
$nonce = wp_create_nonce($action);
|
15 |
|
16 |
+
$html = '
|
17 |
<div class="keys">
|
18 |
+
<input type="hidden" name="testable" value="'.esc_attr($testable).'" />
|
19 |
+
<input type="hidden" name="action" value="'.esc_attr($action).'" />
|
20 |
+
<input type="hidden" name="nonce" value="'.esc_attr($nonce).'" />
|
21 |
<span class="result"><i class="fa fa-cube fa-lg"></i></span>
|
22 |
+
<input type="checkbox" id="'.esc_attr($action).'" name="'.esc_attr($action).'" '.$test_css.' />
|
23 |
+
<label for="'.esc_attr($action).'">'.esc_html($title).'</label>
|
24 |
+
<a href="javascript:void(0)" onclick=\'jQuery(this).closest("form").find("div.params").toggle()\'>Params</a> |
|
25 |
+
<a href="javascript:void(0)" onclick="jQuery(this).closest("form").submit()">Test</a>
|
26 |
+
</div>';
|
|
|
27 |
echo $html;
|
28 |
}
|
29 |
|
54 |
</script>
|
55 |
|
56 |
<div class="wrap dup-wrap dup-support-all">
|
57 |
+
<h1><?php esc_html_e('Testing Interface', 'duplicator'); ?></h1>
|
58 |
<hr size="1" />
|
59 |
|
60 |
<table class="debug-toolbar">
|
64 |
<input id="test-checkall" type="checkbox" onclick="Duplicator.Debug.CheckAllTests()">
|
65 |
</td>
|
66 |
<td>
|
67 |
+
<input type="button" class="button button-small" value="<?php esc_attr_e('Run Tests', 'duplicator'); ?>" onclick="Duplicator.Debug.RunTests()" />
|
68 |
+
<input type="button" class="button button-small" value="<?php esc_html_e('Refresh Page', 'duplicator'); ?>" onclick="window.location.reload();" />
|
69 |
</td>
|
70 |
<td> <input type="checkbox" id="test-openwindow" onchange="Duplicator.Debug.TestNewWindow()" /> <label for="test-openwindow">Tests in new window</label> </td>
|
71 |
</tr>
|
define.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url'))
|
4 |
{
|
5 |
-
define('DUPLICATOR_VERSION', '1.2.
|
6 |
define('DUPLICATOR_HOMEPAGE', 'https://snapcreek.com/duplicator/duplicator-free/');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url'))
|
4 |
{
|
5 |
+
define('DUPLICATOR_VERSION', '1.2.50');
|
6 |
define('DUPLICATOR_HOMEPAGE', 'https://snapcreek.com/duplicator/duplicator-free/');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
duplicator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: https://snapcreek.com/duplicator/duplicator-free/
|
5 |
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
-
Version: 1.2.
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
@@ -177,7 +177,7 @@ if (is_admin() == true)
|
|
177 |
*/
|
178 |
function duplicator_get_menu()
|
179 |
{
|
180 |
-
$current_page = isset($_REQUEST['page']) ?
|
181 |
switch ($current_page)
|
182 |
{
|
183 |
case 'duplicator': include('views/packages/controller.php'); break;
|
@@ -207,22 +207,22 @@ if (is_admin() == true)
|
|
207 |
|
208 |
$perms = 'export';
|
209 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
210 |
-
$lang_txt =
|
211 |
$page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
|
212 |
$GLOBALS['DUP_PRO_Package_Screen'] = new DUP_Package_Screen($page_packages);
|
213 |
|
214 |
$perms = 'manage_options';
|
215 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
216 |
-
$lang_txt =
|
217 |
$page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
|
218 |
|
219 |
$perms = 'manage_options';
|
220 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
221 |
-
$lang_txt =
|
222 |
$page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
|
223 |
|
224 |
$perms = 'manage_options';
|
225 |
-
$lang_txt =
|
226 |
$go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
|
227 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
228 |
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
|
@@ -232,7 +232,7 @@ if (is_admin() == true)
|
|
232 |
{
|
233 |
$perms = 'manage_options';
|
234 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
235 |
-
$lang_txt =
|
236 |
$page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
|
237 |
add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
|
238 |
add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: https://snapcreek.com/duplicator/duplicator-free/
|
5 |
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
+
Version: 1.2.50
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
177 |
*/
|
178 |
function duplicator_get_menu()
|
179 |
{
|
180 |
+
$current_page = isset($_REQUEST['page']) ? sanitize_text_field($_REQUEST['page']) : 'duplicator';
|
181 |
switch ($current_page)
|
182 |
{
|
183 |
case 'duplicator': include('views/packages/controller.php'); break;
|
207 |
|
208 |
$perms = 'export';
|
209 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
210 |
+
$lang_txt = esc_html__('Packages', 'duplicator');
|
211 |
$page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
|
212 |
$GLOBALS['DUP_PRO_Package_Screen'] = new DUP_Package_Screen($page_packages);
|
213 |
|
214 |
$perms = 'manage_options';
|
215 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
216 |
+
$lang_txt = esc_html__('Tools', 'duplicator');
|
217 |
$page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
|
218 |
|
219 |
$perms = 'manage_options';
|
220 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
221 |
+
$lang_txt = esc_html__('Settings', 'duplicator');
|
222 |
$page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
|
223 |
|
224 |
$perms = 'manage_options';
|
225 |
+
$lang_txt = esc_html__('Go Pro!', 'duplicator');
|
226 |
$go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
|
227 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
228 |
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
|
232 |
{
|
233 |
$perms = 'manage_options';
|
234 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
235 |
+
$lang_txt = esc_html__('Debug', 'duplicator');
|
236 |
$page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
|
237 |
add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
|
238 |
add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
|
installer/build/assets/inc.js.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<script>
|
2 |
//Unique namespace
|
3 |
DUPX = new Object();
|
1 |
+
<?php defined("DUPXABSPATH") or die(""); ?>
|
2 |
<script>
|
3 |
//Unique namespace
|
4 |
DUPX = new Object();
|
installer/build/assets/inc.libs.css.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<?php
|
2 |
// Exit if accessed directly
|
3 |
if (! defined('DUPLICATOR_INIT')) {
|
1 |
+
<?php defined("DUPXABSPATH") or die(""); ?>
|
2 |
<?php
|
3 |
// Exit if accessed directly
|
4 |
if (! defined('DUPLICATOR_INIT')) {
|
installer/build/assets/inc.libs.js.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<?php
|
2 |
// Exit if accessed directly
|
3 |
if (! defined('DUPLICATOR_INIT')) {
|
1 |
+
<?php defined("DUPXABSPATH") or die(""); ?>
|
2 |
<?php
|
3 |
// Exit if accessed directly
|
4 |
if (! defined('DUPLICATOR_INIT')) {
|
installer/build/classes/class.csrf.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
+
/******************************************************************
|
5 |
+
*
|
6 |
+
* Projectname: PHP Cross-Site Request Forgery (DUPX_CSRF) Protection Class
|
7 |
+
* Version: 1.0
|
8 |
+
* Author: Radovan Janjic <hi@radovanjanjic.com>
|
9 |
+
* Last modified: 19 06 2014
|
10 |
+
* Copyright (C): 2014 IT-radionica.com, All Rights Reserved
|
11 |
+
*
|
12 |
+
* GNU General Public License (Version 2, June 1991)
|
13 |
+
*
|
14 |
+
* This program is free software; you can redistribute
|
15 |
+
* it and/or modify it under the terms of the GNU
|
16 |
+
* General Public License as published by the Free
|
17 |
+
* Software Foundation; either version 2 of the License,
|
18 |
+
* or (at your option) any later version.
|
19 |
+
*
|
20 |
+
* This program is distributed in the hope that it will
|
21 |
+
* be useful, but WITHOUT ANY WARRANTY; without even the
|
22 |
+
* implied warranty of MERCHANTABILITY or FITNESS FOR A
|
23 |
+
* PARTICULAR PURPOSE. See the GNU General Public License
|
24 |
+
* for more details.
|
25 |
+
*
|
26 |
+
******************************************************************/
|
27 |
+
|
28 |
+
class DUPX_CSRF {
|
29 |
+
|
30 |
+
/** Session var name
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public static $session = '_DUPX_CSRF';
|
34 |
+
|
35 |
+
/** Generate DUPX_CSRF value for form
|
36 |
+
* @param string $form - Form name as session key
|
37 |
+
* @return string - token
|
38 |
+
*/
|
39 |
+
static function generate($form = NULL) {
|
40 |
+
$token = DUPX_CSRF::token() . DUPX_CSRF::fingerprint();
|
41 |
+
$_SESSION[DUPX_CSRF::$session . '_' . $form] = $token;
|
42 |
+
return $token;
|
43 |
+
}
|
44 |
+
|
45 |
+
/** Check DUPX_CSRF value of form
|
46 |
+
* @param string $token - Token
|
47 |
+
* @param string $form - Form name as session key
|
48 |
+
* @return boolean
|
49 |
+
*/
|
50 |
+
public static function check($token, $form = NULL) {
|
51 |
+
if (isset($_SESSION[DUPX_CSRF::$session . '_' . $form]) && $_SESSION[DUPX_CSRF::$session . '_' . $form] == $token) { // token OK
|
52 |
+
return (substr($token, -32) == DUPX_CSRF::fingerprint()); // fingerprint OK?
|
53 |
+
}
|
54 |
+
return FALSE;
|
55 |
+
}
|
56 |
+
|
57 |
+
/** Generate token
|
58 |
+
* @param void
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
protected static function token() {
|
62 |
+
mt_srand((double) microtime() * 10000);
|
63 |
+
$charid = strtoupper(md5(uniqid(rand(), TRUE)));
|
64 |
+
return substr($charid, 0, 8) . substr($charid, 8, 4) . substr($charid, 12, 4) . substr($charid, 16, 4) . substr($charid, 20, 12);
|
65 |
+
}
|
66 |
+
|
67 |
+
/** Returns "digital fingerprint" of user
|
68 |
+
* @param void
|
69 |
+
* @return string - MD5 hashed data
|
70 |
+
*/
|
71 |
+
protected static function fingerprint() {
|
72 |
+
return strtoupper(md5(implode('|', array($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']))));
|
73 |
+
}
|
74 |
+
}
|
75 |
+
?>
|
installer/build/classes/class.db.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
/**
|
4 |
* Lightweight abstraction layer for common simple database routines
|
@@ -45,7 +46,7 @@ class DUPX_DB
|
|
45 |
*/
|
46 |
public static function countTables($dbh, $dbname)
|
47 |
{
|
48 |
-
$res = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = '
|
49 |
$row = mysqli_fetch_row($res);
|
50 |
return is_null($row) ? 0 : $row[0];
|
51 |
}
|
@@ -58,7 +59,7 @@ class DUPX_DB
|
|
58 |
*/
|
59 |
public static function countTableRows($dbh, $name)
|
60 |
{
|
61 |
-
$total = mysqli_query($dbh, "SELECT COUNT(*) FROM
|
62 |
if ($total) {
|
63 |
$total = @mysqli_fetch_array($total);
|
64 |
return $total[0];
|
@@ -98,7 +99,7 @@ class DUPX_DB
|
|
98 |
*/
|
99 |
public static function getVariable($dbh, $name)
|
100 |
{
|
101 |
-
$result = @mysqli_query($dbh, "SHOW VARIABLES LIKE '
|
102 |
$row = @mysqli_fetch_array($result);
|
103 |
@mysqli_free_result($result);
|
104 |
return isset($row[1]) ? $row[1] : null;
|
@@ -204,8 +205,8 @@ class DUPX_DB
|
|
204 |
if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
|
205 |
return mysqli_set_charset($dbh, $charset);
|
206 |
} else {
|
207 |
-
$sql = " SET NAMES
|
208 |
-
if (!empty($collate)) $sql .= " COLLATE
|
209 |
return mysqli_query($dbh, $sql);
|
210 |
}
|
211 |
}
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
/**
|
5 |
* Lightweight abstraction layer for common simple database routines
|
46 |
*/
|
47 |
public static function countTables($dbh, $dbname)
|
48 |
{
|
49 |
+
$res = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = '".mysqli_real_escape_string($dbh, $dbname)."' ");
|
50 |
$row = mysqli_fetch_row($res);
|
51 |
return is_null($row) ? 0 : $row[0];
|
52 |
}
|
59 |
*/
|
60 |
public static function countTableRows($dbh, $name)
|
61 |
{
|
62 |
+
$total = mysqli_query($dbh, "SELECT COUNT(*) FROM `".mysqli_real_escape_string($dbh, $name)."`");
|
63 |
if ($total) {
|
64 |
$total = @mysqli_fetch_array($total);
|
65 |
return $total[0];
|
99 |
*/
|
100 |
public static function getVariable($dbh, $name)
|
101 |
{
|
102 |
+
$result = @mysqli_query($dbh, "SHOW VARIABLES LIKE '".mysqli_real_escape_string($dbh, $name)."'");
|
103 |
$row = @mysqli_fetch_array($result);
|
104 |
@mysqli_free_result($result);
|
105 |
return isset($row[1]) ? $row[1] : null;
|
205 |
if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
|
206 |
return mysqli_set_charset($dbh, $charset);
|
207 |
} else {
|
208 |
+
$sql = " SET NAMES ".mysqli_real_escape_string($dbh, $charset);
|
209 |
+
if (!empty($collate)) $sql .= " COLLATE ".mysqli_real_escape_string($dbh, $collate);
|
210 |
return mysqli_query($dbh, $sql);
|
211 |
}
|
212 |
}
|
installer/build/classes/class.engine.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
/**
|
4 |
* Walks every table in db that then walks every row and column replacing searches with replaces
|
@@ -94,7 +95,7 @@ class DUPX_UpdateEngine
|
|
94 |
$type_where .= "type NOT LIKE 'time%' AND ";
|
95 |
$type_where .= "type NOT LIKE 'year%' ";
|
96 |
|
97 |
-
$result = mysqli_query($dbh, "SHOW COLUMNS FROM `
|
98 |
if (!$result) {
|
99 |
return null;
|
100 |
}
|
@@ -107,7 +108,7 @@ class DUPX_UpdateEngine
|
|
107 |
|
108 |
//Return Primary which is needed for index lookup
|
109 |
//$result = mysqli_query($dbh, "SHOW INDEX FROM `{$table}` WHERE KEY_NAME LIKE '%PRIMARY%'"); 1.1.15 updated
|
110 |
-
$result = mysqli_query($dbh, "SHOW INDEX FROM `
|
111 |
if (mysqli_num_rows($result) > 0) {
|
112 |
while ($row = mysqli_fetch_assoc($result)) {
|
113 |
$fields[] = $row['Column_name'];
|
@@ -158,13 +159,13 @@ class DUPX_UpdateEngine
|
|
158 |
$columns = array();
|
159 |
|
160 |
// Get a list of columns in this table
|
161 |
-
$fields = mysqli_query($dbh, 'DESCRIBE '
|
162 |
while ($column = mysqli_fetch_array($fields)) {
|
163 |
$columns[$column['Field']] = $column['Key'] == 'PRI' ? true : false;
|
164 |
}
|
165 |
|
166 |
// Count the number of rows we have in the table if large we'll split into blocks
|
167 |
-
$row_count = mysqli_query($dbh, "SELECT COUNT(*) FROM `
|
168 |
$rows_result = mysqli_fetch_array($row_count);
|
169 |
@mysqli_free_result($row_count);
|
170 |
$row_count = $rows_result[0];
|
@@ -202,7 +203,7 @@ class DUPX_UpdateEngine
|
|
202 |
$current_row = 0;
|
203 |
$start = $page * $page_size;
|
204 |
$end = $start + $page_size;
|
205 |
-
$sql = sprintf("SELECT {$colList} FROM `%s` LIMIT %d, %d", $table, $start, $offset);
|
206 |
$data = mysqli_query($dbh, $sql);
|
207 |
|
208 |
if (!$data) $report['errsql'][] = mysqli_error($dbh);
|
@@ -290,7 +291,7 @@ class DUPX_UpdateEngine
|
|
290 |
|
291 |
//PERFORM ROW UPDATE
|
292 |
if ($upd && !empty($where_sql)) {
|
293 |
-
$sql = "UPDATE `
|
294 |
$result = mysqli_query($dbh, $sql);
|
295 |
if ($result) {
|
296 |
if ($serial_err > 0) {
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
/**
|
5 |
* Walks every table in db that then walks every row and column replacing searches with replaces
|
95 |
$type_where .= "type NOT LIKE 'time%' AND ";
|
96 |
$type_where .= "type NOT LIKE 'year%' ";
|
97 |
|
98 |
+
$result = mysqli_query($dbh, "SHOW COLUMNS FROM `".mysqli_real_escape_string($dbh, $table)."` WHERE {$type_where}");
|
99 |
if (!$result) {
|
100 |
return null;
|
101 |
}
|
108 |
|
109 |
//Return Primary which is needed for index lookup
|
110 |
//$result = mysqli_query($dbh, "SHOW INDEX FROM `{$table}` WHERE KEY_NAME LIKE '%PRIMARY%'"); 1.1.15 updated
|
111 |
+
$result = mysqli_query($dbh, "SHOW INDEX FROM `".mysqli_real_escape_string($dbh, $table)."`");
|
112 |
if (mysqli_num_rows($result) > 0) {
|
113 |
while ($row = mysqli_fetch_assoc($result)) {
|
114 |
$fields[] = $row['Column_name'];
|
159 |
$columns = array();
|
160 |
|
161 |
// Get a list of columns in this table
|
162 |
+
$fields = mysqli_query($dbh, 'DESCRIBE '.mysqli_real_escape_string($dbh, $table));
|
163 |
while ($column = mysqli_fetch_array($fields)) {
|
164 |
$columns[$column['Field']] = $column['Key'] == 'PRI' ? true : false;
|
165 |
}
|
166 |
|
167 |
// Count the number of rows we have in the table if large we'll split into blocks
|
168 |
+
$row_count = mysqli_query($dbh, "SELECT COUNT(*) FROM `".mysqli_real_escape_string($dbh, $table)."`");
|
169 |
$rows_result = mysqli_fetch_array($row_count);
|
170 |
@mysqli_free_result($row_count);
|
171 |
$row_count = $rows_result[0];
|
203 |
$current_row = 0;
|
204 |
$start = $page * $page_size;
|
205 |
$end = $start + $page_size;
|
206 |
+
$sql = sprintf("SELECT {$colList} FROM `%s` LIMIT %d, %d", mysqli_real_escape_string($dbh, $table), $start, $offset);
|
207 |
$data = mysqli_query($dbh, $sql);
|
208 |
|
209 |
if (!$data) $report['errsql'][] = mysqli_error($dbh);
|
291 |
|
292 |
//PERFORM ROW UPDATE
|
293 |
if ($upd && !empty($where_sql)) {
|
294 |
+
$sql = "UPDATE `".mysqli_real_escape_string($dbh, $table)."` SET ".implode(', ', $upd_sql).' WHERE '.implode(' AND ', array_filter($where_sql));
|
295 |
$result = mysqli_query($dbh, $sql);
|
296 |
if ($result) {
|
297 |
if ($serial_err > 0) {
|
installer/build/classes/class.http.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
/** * *****************************************************
|
4 |
* CLASS::DUPX_Http
|
@@ -15,10 +16,10 @@ class DUPX_HTTP
|
|
15 |
public static function post_with_html($url, $data)
|
16 |
{
|
17 |
$id = uniqid();
|
18 |
-
$html = "<form id='
|
19 |
foreach ($data as $name => $value)
|
20 |
{
|
21 |
-
$html .= "<input type='hidden' name='
|
22 |
}
|
23 |
$html .= "</form>\n";
|
24 |
$html .= "<script>$(document).ready(function() { $('#{$id}').submit(); });</script>";
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
/** * *****************************************************
|
5 |
* CLASS::DUPX_Http
|
16 |
public static function post_with_html($url, $data)
|
17 |
{
|
18 |
$id = uniqid();
|
19 |
+
$html = "<form id='".DUPX_U::esc_attr($id)."' method='post' action='".DUPX_U::esc_url($url)."' />\n";
|
20 |
foreach ($data as $name => $value)
|
21 |
{
|
22 |
+
$html .= "<input type='hidden' name='".DUPX_U::esc_attr($name)."' value='".DUPX_U::esc_attr($value)."' />\n";
|
23 |
}
|
24 |
$html .= "</form>\n";
|
25 |
$html .= "<script>$(document).ready(function() { $('#{$id}').submit(); });</script>";
|
installer/build/classes/class.logging.php
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have three options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li><li>Check the "Manual package extraction" checkbox under advanced options to skip extraction</li></ul>');
|
4 |
define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
|
5 |
define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
|
6 |
define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar or your hosts cPanel to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> <b>Workarounds:</b> <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive Extraction" option and perform the install.');
|
7 |
-
define('ERR_ZIPMANUAL', "When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and dup-database__{$GLOBALS['PACKAGE_HASH']}.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and dup-database__
|
8 |
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\".$GLOBALS["LOG_FILE_NAME"]." .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
|
9 |
define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
|
10 |
define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
|
@@ -16,7 +17,7 @@ define('ERR_DBCREATE', 'The database "%s" does not exists.<br/> Change mode t
|
|
16 |
define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
|
17 |
define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
|
18 |
define('ERR_TESTDB_VERSION_INFO', 'If the current version detected is below 5.5.3 (release on April 8th 2010) then support for utf8mb4 tables will not work. The utf8mb4 format is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
|
19 |
-
define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If a version of 10.N.N shows then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the <?php echo $GLOBALS["LOG_FILE_NAME"];?> file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=database_incompatibility#faq-installer-260-q" target="_blank">What if I get database errors or general warnings on the install report?</a>.');
|
20 |
|
21 |
/**
|
22 |
* Class used to log information to the installer-log.txt file
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have three options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li><li>Check the "Manual package extraction" checkbox under advanced options to skip extraction</li></ul>');
|
5 |
define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
|
6 |
define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
|
7 |
define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar or your hosts cPanel to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> <b>Workarounds:</b> <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive Extraction" option and perform the install.');
|
8 |
+
define('ERR_ZIPMANUAL', "When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and dup-database__{$GLOBALS['PACKAGE_HASH']}.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and dup-database__[HASH].sql files are present.");
|
9 |
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\".$GLOBALS["LOG_FILE_NAME"]." .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
|
10 |
define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
|
11 |
define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
|
17 |
define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
|
18 |
define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
|
19 |
define('ERR_TESTDB_VERSION_INFO', 'If the current version detected is below 5.5.3 (release on April 8th 2010) then support for utf8mb4 tables will not work. The utf8mb4 format is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
|
20 |
+
define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If a version of 10.N.N shows then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the <?php echo DUPX_U::esc_html($GLOBALS["LOG_FILE_NAME"]);?> file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=database_incompatibility#faq-installer-260-q" target="_blank">What if I get database errors or general warnings on the install report?</a>.');
|
21 |
|
22 |
/**
|
23 |
* Class used to log information to the installer-log.txt file
|
installer/build/classes/class.password.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
#
|
3 |
# Portable PHP password hashing framework.
|
4 |
#
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
#
|
5 |
# Portable PHP password hashing framework.
|
6 |
#
|
installer/build/classes/class.server.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
/**
|
4 |
* Lightweight abstraction layer for common simple server based routines
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
/**
|
5 |
* Lightweight abstraction layer for common simple server based routines
|
installer/build/classes/config/class.conf.srv.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Class used to update and edit web server configuration files
|
5 |
*
|
@@ -60,8 +60,10 @@ class DUPX_ServerConfig
|
|
60 |
}
|
61 |
|
62 |
DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
|
|
|
63 |
$currdata = parse_url($_POST['url_old']);
|
64 |
-
$
|
|
|
65 |
$currpath = DUPX_U::addSlash(isset($currdata['path']) ? $currdata['path'] : "");
|
66 |
$newpath = DUPX_U::addSlash(isset($newdata['path']) ? $newdata['path'] : "");
|
67 |
$timestamp = date("Y-m-d H:i:s");
|
@@ -71,7 +73,7 @@ class DUPX_ServerConfig
|
|
71 |
$update_msg .= "# Duplicator only writes to this file once during the install process while running the installer.php file.\n";
|
72 |
|
73 |
$empty_htaccess = false;
|
74 |
-
$query_result = @mysqli_query($dbh, "SELECT option_value FROM `
|
75 |
|
76 |
//If the permalink is set to Plain then don't update the rewrite rules
|
77 |
if ($query_result) {
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
/**
|
4 |
* Class used to update and edit web server configuration files
|
5 |
*
|
60 |
}
|
61 |
|
62 |
DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
|
63 |
+
$post_url_old = DUPX_U::sanitize_text_field($_POST['url_old']);
|
64 |
$currdata = parse_url($_POST['url_old']);
|
65 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
66 |
+
$newdata = parse_url($post_url_new);
|
67 |
$currpath = DUPX_U::addSlash(isset($currdata['path']) ? $currdata['path'] : "");
|
68 |
$newpath = DUPX_U::addSlash(isset($newdata['path']) ? $newdata['path'] : "");
|
69 |
$timestamp = date("Y-m-d H:i:s");
|
73 |
$update_msg .= "# Duplicator only writes to this file once during the install process while running the installer.php file.\n";
|
74 |
|
75 |
$empty_htaccess = false;
|
76 |
+
$query_result = @mysqli_query($dbh, "SELECT option_value FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` WHERE option_name = 'permalink_structure' ");
|
77 |
|
78 |
//If the permalink is set to Plain then don't update the rewrite rules
|
79 |
if ($query_result) {
|
installer/build/classes/config/class.conf.wp.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Class used to update and edit and update the wp-config.php
|
4 |
*
|
@@ -17,17 +18,19 @@ class DUPX_WPConfig
|
|
17 |
*/
|
18 |
public static function updateStandard()
|
19 |
{
|
20 |
-
if (!file_exists('wp-config.php'))
|
|
|
21 |
return;
|
|
|
22 |
|
23 |
$root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
24 |
$wpconfig = @file_get_contents('wp-config.php', true);
|
25 |
|
26 |
-
$db_port = is_int($_POST['dbport']) ? $_POST['dbport'] : 3306;
|
27 |
-
$db_host = ($db_port == 3306) ? $_POST['dbhost'] :
|
28 |
-
$db_name = isset($_POST['dbname']) ? DUPX_U::
|
29 |
-
$db_user = isset($_POST['dbuser']) ? DUPX_U::
|
30 |
-
$db_pass = isset($_POST['dbpass']) ? DUPX_U::
|
31 |
|
32 |
$patterns = array(
|
33 |
"/'DB_NAME',\s*'.*?'/",
|
@@ -75,7 +78,12 @@ class DUPX_WPConfig
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
79 |
$wpconfig = preg_replace($patterns, $replace, $wpconfig);
|
80 |
|
81 |
file_put_contents('wp-config.php', $wpconfig);
|
@@ -101,9 +109,11 @@ class DUPX_WPConfig
|
|
101 |
$patterns = array(
|
102 |
"/('|\")WP_HOME.*?\)\s*;/",
|
103 |
"/('|\")WP_SITEURL.*?\)\s*;/");
|
|
|
|
|
104 |
$replace = array(
|
105 |
-
"'WP_HOME', '
|
106 |
-
"'WP_SITEURL', '
|
107 |
|
108 |
//Not sure how well tokenParser works on all servers so only using for not critical constants at this point.
|
109 |
//$count checks for dynamic variable types such as: define('WP_TEMP_DIR', 'D:/' . $var . 'somepath/');
|
@@ -112,7 +122,9 @@ class DUPX_WPConfig
|
|
112 |
|
113 |
//WP_CONTENT_DIR
|
114 |
if (isset($defines['WP_CONTENT_DIR'])) {
|
115 |
-
$
|
|
|
|
|
116 |
if ($count > 0) {
|
117 |
array_push($patterns, "/('|\")WP_CONTENT_DIR.*?\)\s*;/");
|
118 |
array_push($replace, "'WP_CONTENT_DIR', '{$val}');");
|
@@ -121,7 +133,9 @@ class DUPX_WPConfig
|
|
121 |
|
122 |
//WP_CONTENT_URL
|
123 |
if (isset($defines['WP_CONTENT_URL'])) {
|
124 |
-
$
|
|
|
|
|
125 |
if ($count > 0) {
|
126 |
array_push($patterns, "/('|\")WP_CONTENT_URL.*?\)\s*;/");
|
127 |
array_push($replace, "'WP_CONTENT_URL', '{$val}');");
|
@@ -130,7 +144,9 @@ class DUPX_WPConfig
|
|
130 |
|
131 |
//WP_TEMP_DIR
|
132 |
if (isset($defines['WP_TEMP_DIR'])) {
|
133 |
-
$
|
|
|
|
|
134 |
if ($count > 0) {
|
135 |
array_push($patterns, "/('|\")WP_TEMP_DIR.*?\)\s*;/");
|
136 |
array_push($replace, "'WP_TEMP_DIR', '{$val}');");
|
@@ -139,14 +155,16 @@ class DUPX_WPConfig
|
|
139 |
|
140 |
//DOMAIN_CURRENT_SITE
|
141 |
if (isset($defines['DOMAIN_CURRENT_SITE'])) {
|
142 |
-
$
|
|
|
143 |
array_push($patterns, "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/");
|
144 |
array_push($replace, "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');");
|
145 |
}
|
146 |
|
147 |
//PATH_CURRENT_SITE
|
148 |
if (isset($defines['PATH_CURRENT_SITE'])) {
|
149 |
-
$
|
|
|
150 |
array_push($patterns, "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
|
151 |
array_push($replace, "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
|
152 |
}
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
/**
|
4 |
* Class used to update and edit and update the wp-config.php
|
5 |
*
|
18 |
*/
|
19 |
public static function updateStandard()
|
20 |
{
|
21 |
+
if (!file_exists('wp-config.php')) {
|
22 |
+
DUPX_Log::info('WARNING: Unable to locate wp-config.php file during standard update process. Be sure the file is present in your archive.');
|
23 |
return;
|
24 |
+
}
|
25 |
|
26 |
$root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
27 |
$wpconfig = @file_get_contents('wp-config.php', true);
|
28 |
|
29 |
+
$db_port = is_int($_POST['dbport']) ? DUPX_U::sanitize_text_field($_POST['dbport']) : 3306;
|
30 |
+
$db_host = ($db_port == 3306) ? DUPX_U::sanitize_text_field($_POST['dbhost']) : DUPX_U::sanitize_text_field($_POST['dbhost']).':'.DUPX_U::sanitize_text_field($db_port);
|
31 |
+
$db_name = isset($_POST['dbname']) ? DUPX_U::sanitize_text_field($_POST['dbname']) : null;
|
32 |
+
$db_user = isset($_POST['dbuser']) ? DUPX_U::sanitize_text_field($_POST['dbuser']) : null;
|
33 |
+
$db_pass = isset($_POST['dbpass']) ? DUPX_U::sanitize_text_field($_POST['dbpass']) : null;
|
34 |
|
35 |
$patterns = array(
|
36 |
"/'DB_NAME',\s*'.*?'/",
|
78 |
}
|
79 |
}
|
80 |
|
81 |
+
// array_map replaced because of installer error in PHP 5.2.9 - Cannot call method self::customEscape() or method does not exist in installer.php on line 1480
|
82 |
+
// $replace = array_map('self::customEscape', $replace);
|
83 |
+
foreach ($replace as $key=>$val) {
|
84 |
+
$replace[$key] = self::customEscape($val);
|
85 |
+
}
|
86 |
+
|
87 |
$wpconfig = preg_replace($patterns, $replace, $wpconfig);
|
88 |
|
89 |
file_put_contents('wp-config.php', $wpconfig);
|
109 |
$patterns = array(
|
110 |
"/('|\")WP_HOME.*?\)\s*;/",
|
111 |
"/('|\")WP_SITEURL.*?\)\s*;/");
|
112 |
+
|
113 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
114 |
$replace = array(
|
115 |
+
"'WP_HOME', '".$post_url_new."');",
|
116 |
+
"'WP_SITEURL', '".$post_url_new."');");
|
117 |
|
118 |
//Not sure how well tokenParser works on all servers so only using for not critical constants at this point.
|
119 |
//$count checks for dynamic variable types such as: define('WP_TEMP_DIR', 'D:/' . $var . 'somepath/');
|
122 |
|
123 |
//WP_CONTENT_DIR
|
124 |
if (isset($defines['WP_CONTENT_DIR'])) {
|
125 |
+
$post_path_old = DUPX_U::sanitize_text_field($_POST['path_old']);
|
126 |
+
$post_path_new = DUPX_U::sanitize_text_field($_POST['path_new']);
|
127 |
+
$val = str_replace($post_path_old, $post_path_new, DUPX_U::setSafePath($defines['WP_CONTENT_DIR']), $count);
|
128 |
if ($count > 0) {
|
129 |
array_push($patterns, "/('|\")WP_CONTENT_DIR.*?\)\s*;/");
|
130 |
array_push($replace, "'WP_CONTENT_DIR', '{$val}');");
|
133 |
|
134 |
//WP_CONTENT_URL
|
135 |
if (isset($defines['WP_CONTENT_URL'])) {
|
136 |
+
$post_url_old = DUPX_U::sanitize_text_field($_POST['url_old']);
|
137 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
138 |
+
$val = str_replace($post_url_old . '/', $post_url_new . '/', $defines['WP_CONTENT_URL'], $count);
|
139 |
if ($count > 0) {
|
140 |
array_push($patterns, "/('|\")WP_CONTENT_URL.*?\)\s*;/");
|
141 |
array_push($replace, "'WP_CONTENT_URL', '{$val}');");
|
144 |
|
145 |
//WP_TEMP_DIR
|
146 |
if (isset($defines['WP_TEMP_DIR'])) {
|
147 |
+
$post_path_old = DUPX_U::sanitize_text_field($_POST['path_old']);
|
148 |
+
$post_path_new = DUPX_U::sanitize_text_field($_POST['path_new']);
|
149 |
+
$val = str_replace($post_path_old, $post_path_new, DUPX_U::setSafePath($defines['WP_TEMP_DIR']) , $count);
|
150 |
if ($count > 0) {
|
151 |
array_push($patterns, "/('|\")WP_TEMP_DIR.*?\)\s*;/");
|
152 |
array_push($replace, "'WP_TEMP_DIR', '{$val}');");
|
155 |
|
156 |
//DOMAIN_CURRENT_SITE
|
157 |
if (isset($defines['DOMAIN_CURRENT_SITE'])) {
|
158 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
159 |
+
$mu_newDomainHost = parse_url($post_url_new, PHP_URL_HOST);
|
160 |
array_push($patterns, "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/");
|
161 |
array_push($replace, "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');");
|
162 |
}
|
163 |
|
164 |
//PATH_CURRENT_SITE
|
165 |
if (isset($defines['PATH_CURRENT_SITE'])) {
|
166 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
167 |
+
$mu_newUrlPath = parse_url($post_url_new, PHP_URL_PATH);
|
168 |
array_push($patterns, "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
|
169 |
array_push($replace, "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
|
170 |
}
|
installer/build/classes/utilities/class.u.php
CHANGED
@@ -8,6 +8,8 @@
|
|
8 |
* @package SC\DUPX\U
|
9 |
*
|
10 |
*/
|
|
|
|
|
11 |
class DUPX_U
|
12 |
{
|
13 |
/**
|
@@ -41,24 +43,6 @@ class DUPX_U
|
|
41 |
return sprintf("%.4f sec.", abs($end - $start));
|
42 |
}
|
43 |
|
44 |
-
/**
|
45 |
-
* Convert all applicable characters to HTML entities
|
46 |
-
*
|
47 |
-
* @param string $string String that needs conversion
|
48 |
-
* @param bool $echo Echo or return as a variable
|
49 |
-
*
|
50 |
-
* @return string Escaped string.
|
51 |
-
*/
|
52 |
-
public static function escapeHTML($string = '', $echo = false)
|
53 |
-
{
|
54 |
-
$output = htmlentities($string, ENT_QUOTES, 'UTF-8');
|
55 |
-
if ($echo) {
|
56 |
-
echo $output;
|
57 |
-
} else {
|
58 |
-
return $output;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
/**
|
63 |
* Returns 256 spaces
|
64 |
*
|
@@ -94,7 +78,7 @@ class DUPX_U
|
|
94 |
*/
|
95 |
public static function getActivePlugins($dbh)
|
96 |
{
|
97 |
-
$query = @mysqli_query($dbh, "SELECT option_value FROM `
|
98 |
if ($query) {
|
99 |
$row = @mysqli_fetch_array($query);
|
100 |
$all_plugins = unserialize($row[0]);
|
@@ -260,18 +244,6 @@ class DUPX_U
|
|
260 |
return str_replace("/", "\\", $path);
|
261 |
}
|
262 |
|
263 |
-
/**
|
264 |
-
* Sanitize input for XSS code
|
265 |
-
*
|
266 |
-
* @param string $val The value to sanitize
|
267 |
-
*
|
268 |
-
* @return string Returns the input value cleaned up.
|
269 |
-
*/
|
270 |
-
public static function sanitize($input)
|
271 |
-
{
|
272 |
-
return filter_var($input, FILTER_SANITIZE_STRING);
|
273 |
-
}
|
274 |
-
|
275 |
/**
|
276 |
* Filter the string to escape the quote
|
277 |
*
|
@@ -297,5 +269,936 @@ class DUPX_U
|
|
297 |
return (version_compare(PHP_VERSION, $version) >= 0);
|
298 |
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
}
|
301 |
?>
|
8 |
* @package SC\DUPX\U
|
9 |
*
|
10 |
*/
|
11 |
+
defined("DUPXABSPATH") or die("");
|
12 |
+
|
13 |
class DUPX_U
|
14 |
{
|
15 |
/**
|
43 |
return sprintf("%.4f sec.", abs($end - $start));
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
/**
|
47 |
* Returns 256 spaces
|
48 |
*
|
78 |
*/
|
79 |
public static function getActivePlugins($dbh)
|
80 |
{
|
81 |
+
$query = @mysqli_query($dbh, "SELECT option_value FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` WHERE option_name = 'active_plugins' ");
|
82 |
if ($query) {
|
83 |
$row = @mysqli_fetch_array($query);
|
84 |
$all_plugins = unserialize($row[0]);
|
244 |
return str_replace("/", "\\", $path);
|
245 |
}
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
/**
|
248 |
* Filter the string to escape the quote
|
249 |
*
|
269 |
return (version_compare(PHP_VERSION, $version) >= 0);
|
270 |
}
|
271 |
|
272 |
+
// START ESCAPING AND SANITIZATION
|
273 |
+
/**
|
274 |
+
* Escaping for HTML blocks.
|
275 |
+
*
|
276 |
+
* @since 2.8.0
|
277 |
+
*
|
278 |
+
* @param string $text
|
279 |
+
* @return string
|
280 |
+
*/
|
281 |
+
public static function esc_html( $text ) {
|
282 |
+
$safe_text = self::wp_check_invalid_utf8( $text );
|
283 |
+
$safe_text = self::_wp_specialchars( $safe_text, ENT_QUOTES );
|
284 |
+
/**
|
285 |
+
* Filters a string cleaned and escaped for output in HTML.
|
286 |
+
*
|
287 |
+
* Text passed to esc_html() is stripped of invalid or special characters
|
288 |
+
* before output.
|
289 |
+
*
|
290 |
+
* @since 2.8.0
|
291 |
+
*
|
292 |
+
* @param string $safe_text The text after it has been escaped.
|
293 |
+
* @param string $text The text prior to being escaped.
|
294 |
+
*/
|
295 |
+
return $safe_text;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Escape single quotes, htmlspecialchar " < > &, and fix line endings.
|
300 |
+
*
|
301 |
+
* Escapes text strings for echoing in JS. It is intended to be used for inline JS
|
302 |
+
* (in a tag attribute, for example onclick="..."). Note that the strings have to
|
303 |
+
* be in single quotes. The {@see 'js_escape'} filter is also applied here.
|
304 |
+
*
|
305 |
+
* @since 2.8.0
|
306 |
+
*
|
307 |
+
* @param string $text The text to be escaped.
|
308 |
+
* @return string Escaped text.
|
309 |
+
*/
|
310 |
+
public static function esc_js( $text ) {
|
311 |
+
$safe_text = self::wp_check_invalid_utf8( $text );
|
312 |
+
$safe_text = self::_wp_specialchars( $safe_text, ENT_COMPAT );
|
313 |
+
$safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) );
|
314 |
+
$safe_text = str_replace( "\r", '', $safe_text );
|
315 |
+
$safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) );
|
316 |
+
/**
|
317 |
+
* Filters a string cleaned and escaped for output in JavaScript.
|
318 |
+
*
|
319 |
+
* Text passed to esc_js() is stripped of invalid or special characters,
|
320 |
+
* and properly slashed for output.
|
321 |
+
*
|
322 |
+
* @since 2.0.6
|
323 |
+
*
|
324 |
+
* @param string $safe_text The text after it has been escaped.
|
325 |
+
* @param string $text The text prior to being escaped.
|
326 |
+
*/
|
327 |
+
return $safe_text;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Escaping for HTML attributes.
|
332 |
+
*
|
333 |
+
* @since 2.8.0
|
334 |
+
*
|
335 |
+
* @param string $text
|
336 |
+
* @return string
|
337 |
+
*/
|
338 |
+
public static function esc_attr( $text ) {
|
339 |
+
$safe_text = self::wp_check_invalid_utf8( $text );
|
340 |
+
$safe_text = self::_wp_specialchars( $safe_text, ENT_QUOTES );
|
341 |
+
/**
|
342 |
+
* Filters a string cleaned and escaped for output in an HTML attribute.
|
343 |
+
*
|
344 |
+
* Text passed to esc_attr() is stripped of invalid or special characters
|
345 |
+
* before output.
|
346 |
+
*
|
347 |
+
* @since 2.0.6
|
348 |
+
*
|
349 |
+
* @param string $safe_text The text after it has been escaped.
|
350 |
+
* @param string $text The text prior to being escaped.
|
351 |
+
*/
|
352 |
+
return $safe_text;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Escaping for textarea values.
|
357 |
+
*
|
358 |
+
* @since 3.1.0
|
359 |
+
*
|
360 |
+
* @param string $text
|
361 |
+
* @return string
|
362 |
+
*/
|
363 |
+
public static function esc_textarea( $text ) {
|
364 |
+
// $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
|
365 |
+
$safe_text = htmlspecialchars( $text, ENT_QUOTES, 'UTF-8' );
|
366 |
+
/**
|
367 |
+
* Filters a string cleaned and escaped for output in a textarea element.
|
368 |
+
*
|
369 |
+
* @since 3.1.0
|
370 |
+
*
|
371 |
+
* @param string $safe_text The text after it has been escaped.
|
372 |
+
* @param string $text The text prior to being escaped.
|
373 |
+
*/
|
374 |
+
return $safe_text;
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Escape an HTML tag name.
|
379 |
+
*
|
380 |
+
* @since 2.5.0
|
381 |
+
*
|
382 |
+
* @param string $tag_name
|
383 |
+
* @return string
|
384 |
+
*/
|
385 |
+
function tag_escape( $tag_name ) {
|
386 |
+
$safe_tag = strtolower( preg_replace('/[^a-zA-Z0-9_:]/', '', $tag_name) );
|
387 |
+
/**
|
388 |
+
* Filters a string cleaned and escaped for output as an HTML tag.
|
389 |
+
*
|
390 |
+
* @since 2.8.0
|
391 |
+
*
|
392 |
+
* @param string $safe_tag The tag name after it has been escaped.
|
393 |
+
* @param string $tag_name The text before it was escaped.
|
394 |
+
*/
|
395 |
+
return $safe_tag;
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Converts a number of special characters into their HTML entities.
|
400 |
+
*
|
401 |
+
* Specifically deals with: &, <, >, ", and '.
|
402 |
+
*
|
403 |
+
* $quote_style can be set to ENT_COMPAT to encode " to
|
404 |
+
* ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
|
405 |
+
*
|
406 |
+
* @since 1.2.2
|
407 |
+
* @access private
|
408 |
+
*
|
409 |
+
* @staticvar string $_charset
|
410 |
+
*
|
411 |
+
* @param string $string The text which is to be encoded.
|
412 |
+
* @param int|string $quote_style Optional. Converts double quotes if set to ENT_COMPAT,
|
413 |
+
* both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES.
|
414 |
+
* Also compatible with old values; converting single quotes if set to 'single',
|
415 |
+
* double if set to 'double' or both if otherwise set.
|
416 |
+
* Default is ENT_NOQUOTES.
|
417 |
+
* @param string $charset Optional. The character encoding of the string. Default is false.
|
418 |
+
* @param bool $double_encode Optional. Whether to encode existing html entities. Default is false.
|
419 |
+
* @return string The encoded text with HTML entities.
|
420 |
+
*/
|
421 |
+
public static function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
|
422 |
+
$string = (string) $string;
|
423 |
+
|
424 |
+
if ( 0 === strlen( $string ) )
|
425 |
+
return '';
|
426 |
+
|
427 |
+
// Don't bother if there are no specialchars - saves some processing
|
428 |
+
if ( ! preg_match( '/[&<>"\']/', $string ) )
|
429 |
+
return $string;
|
430 |
+
|
431 |
+
// Account for the previous behaviour of the function when the $quote_style is not an accepted value
|
432 |
+
if ( empty( $quote_style ) )
|
433 |
+
$quote_style = ENT_NOQUOTES;
|
434 |
+
elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) )
|
435 |
+
$quote_style = ENT_QUOTES;
|
436 |
+
|
437 |
+
// Store the site charset as a static to avoid multiple calls to wp_load_alloptions()
|
438 |
+
if ( ! $charset ) {
|
439 |
+
static $_charset = null;
|
440 |
+
if ( ! isset( $_charset ) ) {
|
441 |
+
$_charset = '';
|
442 |
+
}
|
443 |
+
$charset = $_charset;
|
444 |
+
}
|
445 |
+
|
446 |
+
if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) )
|
447 |
+
$charset = 'UTF-8';
|
448 |
+
|
449 |
+
$_quote_style = $quote_style;
|
450 |
+
|
451 |
+
if ( $quote_style === 'double' ) {
|
452 |
+
$quote_style = ENT_COMPAT;
|
453 |
+
$_quote_style = ENT_COMPAT;
|
454 |
+
} elseif ( $quote_style === 'single' ) {
|
455 |
+
$quote_style = ENT_NOQUOTES;
|
456 |
+
}
|
457 |
+
|
458 |
+
if ( ! $double_encode ) {
|
459 |
+
// Guarantee every &entity; is valid, convert &garbage; into &garbage;
|
460 |
+
// This is required for PHP < 5.4.0 because ENT_HTML401 flag is unavailable.
|
461 |
+
$string = self::wp_kses_normalize_entities( $string );
|
462 |
+
}
|
463 |
+
|
464 |
+
$string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode );
|
465 |
+
|
466 |
+
// Back-compat.
|
467 |
+
if ( 'single' === $_quote_style )
|
468 |
+
$string = str_replace( "'", ''', $string );
|
469 |
+
|
470 |
+
return $string;
|
471 |
+
}
|
472 |
+
|
473 |
+
/**
|
474 |
+
* Converts a number of HTML entities into their special characters.
|
475 |
+
*
|
476 |
+
* Specifically deals with: &, <, >, ", and '.
|
477 |
+
*
|
478 |
+
* $quote_style can be set to ENT_COMPAT to decode " entities,
|
479 |
+
* or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.
|
480 |
+
*
|
481 |
+
* @since 2.8.0
|
482 |
+
*
|
483 |
+
* @param string $string The text which is to be decoded.
|
484 |
+
* @param string|int $quote_style Optional. Converts double quotes if set to ENT_COMPAT,
|
485 |
+
* both single and double if set to ENT_QUOTES or
|
486 |
+
* none if set to ENT_NOQUOTES.
|
487 |
+
* Also compatible with old _wp_specialchars() values;
|
488 |
+
* converting single quotes if set to 'single',
|
489 |
+
* double if set to 'double' or both if otherwise set.
|
490 |
+
* Default is ENT_NOQUOTES.
|
491 |
+
* @return string The decoded text without HTML entities.
|
492 |
+
*/
|
493 |
+
public static function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
|
494 |
+
$string = (string) $string;
|
495 |
+
|
496 |
+
if ( 0 === strlen( $string ) ) {
|
497 |
+
return '';
|
498 |
+
}
|
499 |
+
|
500 |
+
// Don't bother if there are no entities - saves a lot of processing
|
501 |
+
if ( strpos( $string, '&' ) === false ) {
|
502 |
+
return $string;
|
503 |
+
}
|
504 |
+
|
505 |
+
// Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value
|
506 |
+
if ( empty( $quote_style ) ) {
|
507 |
+
$quote_style = ENT_NOQUOTES;
|
508 |
+
} elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
|
509 |
+
$quote_style = ENT_QUOTES;
|
510 |
+
}
|
511 |
+
|
512 |
+
// More complete than get_html_translation_table( HTML_SPECIALCHARS )
|
513 |
+
$single = array( ''' => '\'', ''' => '\'' );
|
514 |
+
$single_preg = array( '/�*39;/' => ''', '/�*27;/i' => ''' );
|
515 |
+
$double = array( '"' => '"', '"' => '"', '"' => '"' );
|
516 |
+
$double_preg = array( '/�*34;/' => '"', '/�*22;/i' => '"' );
|
517 |
+
$others = array( '<' => '<', '<' => '<', '>' => '>', '>' => '>', '&' => '&', '&' => '&', '&' => '&' );
|
518 |
+
$others_preg = array( '/�*60;/' => '<', '/�*62;/' => '>', '/�*38;/' => '&', '/�*26;/i' => '&' );
|
519 |
+
|
520 |
+
if ( $quote_style === ENT_QUOTES ) {
|
521 |
+
$translation = array_merge( $single, $double, $others );
|
522 |
+
$translation_preg = array_merge( $single_preg, $double_preg, $others_preg );
|
523 |
+
} elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) {
|
524 |
+
$translation = array_merge( $double, $others );
|
525 |
+
$translation_preg = array_merge( $double_preg, $others_preg );
|
526 |
+
} elseif ( $quote_style === 'single' ) {
|
527 |
+
$translation = array_merge( $single, $others );
|
528 |
+
$translation_preg = array_merge( $single_preg, $others_preg );
|
529 |
+
} elseif ( $quote_style === ENT_NOQUOTES ) {
|
530 |
+
$translation = $others;
|
531 |
+
$translation_preg = $others_preg;
|
532 |
+
}
|
533 |
+
|
534 |
+
// Remove zero padding on numeric entities
|
535 |
+
$string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string );
|
536 |
+
|
537 |
+
// Replace characters according to translation table
|
538 |
+
return strtr( $string, $translation );
|
539 |
+
}
|
540 |
+
|
541 |
+
/**
|
542 |
+
* Checks for invalid UTF8 in a string.
|
543 |
+
*
|
544 |
+
* @since 2.8.0
|
545 |
+
*
|
546 |
+
* @staticvar bool $is_utf8
|
547 |
+
* @staticvar bool $utf8_pcre
|
548 |
+
*
|
549 |
+
* @param string $string The text which is to be checked.
|
550 |
+
* @param bool $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false.
|
551 |
+
* @return string The checked text.
|
552 |
+
*/
|
553 |
+
public static function wp_check_invalid_utf8( $string, $strip = false ) {
|
554 |
+
$string = (string) $string;
|
555 |
+
|
556 |
+
if ( 0 === strlen( $string ) ) {
|
557 |
+
return '';
|
558 |
+
}
|
559 |
+
|
560 |
+
// Store the site charset as a static to avoid multiple calls to get_option()
|
561 |
+
static $is_utf8 = null;
|
562 |
+
if ( ! isset( $is_utf8 ) ) {
|
563 |
+
// $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );
|
564 |
+
$is_utf8 = true;
|
565 |
+
}
|
566 |
+
if ( ! $is_utf8 ) {
|
567 |
+
return $string;
|
568 |
+
}
|
569 |
+
|
570 |
+
// Check for support for utf8 in the installed PCRE library once and store the result in a static
|
571 |
+
static $utf8_pcre = null;
|
572 |
+
if ( ! isset( $utf8_pcre ) ) {
|
573 |
+
$utf8_pcre = @preg_match( '/^./u', 'a' );
|
574 |
+
}
|
575 |
+
// We can't demand utf8 in the PCRE installation, so just return the string in those cases
|
576 |
+
if ( !$utf8_pcre ) {
|
577 |
+
return $string;
|
578 |
+
}
|
579 |
+
|
580 |
+
// preg_match fails when it encounters invalid UTF8 in $string
|
581 |
+
if ( 1 === @preg_match( '/^./us', $string ) ) {
|
582 |
+
return $string;
|
583 |
+
}
|
584 |
+
|
585 |
+
// Attempt to strip the bad chars if requested (not recommended)
|
586 |
+
if ( $strip && function_exists( 'iconv' ) ) {
|
587 |
+
return iconv( 'utf-8', 'utf-8', $string );
|
588 |
+
}
|
589 |
+
|
590 |
+
return '';
|
591 |
+
}
|
592 |
+
|
593 |
+
/**
|
594 |
+
* Perform a deep string replace operation to ensure the values in $search are no longer present
|
595 |
+
*
|
596 |
+
* Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values
|
597 |
+
* e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that
|
598 |
+
* str_replace would return
|
599 |
+
*
|
600 |
+
* @since 2.8.1
|
601 |
+
* @access private
|
602 |
+
*
|
603 |
+
* @param string|array $search The value being searched for, otherwise known as the needle.
|
604 |
+
* An array may be used to designate multiple needles.
|
605 |
+
* @param string $subject The string being searched and replaced on, otherwise known as the haystack.
|
606 |
+
* @return string The string with the replaced svalues.
|
607 |
+
*/
|
608 |
+
private static function _deep_replace( $search, $subject ) {
|
609 |
+
$subject = (string) $subject;
|
610 |
+
|
611 |
+
$count = 1;
|
612 |
+
while ( $count ) {
|
613 |
+
$subject = str_replace( $search, '', $subject, $count );
|
614 |
+
}
|
615 |
+
|
616 |
+
return $subject;
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Converts and fixes HTML entities.
|
621 |
+
*
|
622 |
+
* This function normalizes HTML entities. It will convert `AT&T` to the correct
|
623 |
+
* `AT&T`, `:` to `:`, `&#XYZZY;` to `&#XYZZY;` and so on.
|
624 |
+
*
|
625 |
+
* @since 1.0.0
|
626 |
+
*
|
627 |
+
* @param string $string Content to normalize entities
|
628 |
+
* @return string Content with normalized entities
|
629 |
+
*/
|
630 |
+
public static function wp_kses_normalize_entities($string) {
|
631 |
+
// Disarm all entities by converting & to &
|
632 |
+
$string = str_replace('&', '&', $string);
|
633 |
+
|
634 |
+
// Change back the allowed entities in our entity whitelist
|
635 |
+
$string = preg_replace_callback('/&([A-Za-z]{2,8}[0-9]{0,2});/', 'self::wp_kses_named_entities', $string);
|
636 |
+
$string = preg_replace_callback('/&#(0*[0-9]{1,7});/', 'self::wp_kses_normalize_entities2', $string);
|
637 |
+
$string = preg_replace_callback('/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'self::wp_kses_normalize_entities3', $string);
|
638 |
+
|
639 |
+
return $string;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Callback for wp_kses_normalize_entities() regular expression.
|
644 |
+
*
|
645 |
+
* This function only accepts valid named entity references, which are finite,
|
646 |
+
* case-sensitive, and highly scrutinized by HTML and XML validators.
|
647 |
+
*
|
648 |
+
* @since 3.0.0
|
649 |
+
*
|
650 |
+
* @global array $allowedentitynames
|
651 |
+
*
|
652 |
+
* @param array $matches preg_replace_callback() matches array
|
653 |
+
* @return string Correctly encoded entity
|
654 |
+
*/
|
655 |
+
public static function wp_kses_named_entities($matches) {
|
656 |
+
global $allowedentitynames;
|
657 |
+
|
658 |
+
if ( empty($matches[1]) )
|
659 |
+
return '';
|
660 |
+
|
661 |
+
$i = $matches[1];
|
662 |
+
return ( ! in_array( $i, $allowedentitynames ) ) ? "&$i;" : "&$i;";
|
663 |
+
}
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Helper function to determine if a Unicode value is valid.
|
667 |
+
*
|
668 |
+
* @since 2.7.0
|
669 |
+
*
|
670 |
+
* @param int $i Unicode value
|
671 |
+
* @return bool True if the value was a valid Unicode number
|
672 |
+
*/
|
673 |
+
public static function wp_valid_unicode($i) {
|
674 |
+
return ( $i == 0x9 || $i == 0xa || $i == 0xd ||
|
675 |
+
($i >= 0x20 && $i <= 0xd7ff) ||
|
676 |
+
($i >= 0xe000 && $i <= 0xfffd) ||
|
677 |
+
($i >= 0x10000 && $i <= 0x10ffff) );
|
678 |
+
}
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Callback for wp_kses_normalize_entities() regular expression.
|
682 |
+
*
|
683 |
+
* This function helps wp_kses_normalize_entities() to only accept 16-bit
|
684 |
+
* values and nothing more for `&#number;` entities.
|
685 |
+
*
|
686 |
+
* @access private
|
687 |
+
* @since 1.0.0
|
688 |
+
*
|
689 |
+
* @param array $matches preg_replace_callback() matches array
|
690 |
+
* @return string Correctly encoded entity
|
691 |
+
*/
|
692 |
+
public static function wp_kses_normalize_entities2($matches) {
|
693 |
+
if ( empty($matches[1]) )
|
694 |
+
return '';
|
695 |
+
|
696 |
+
$i = $matches[1];
|
697 |
+
if (self::wp_valid_unicode($i)) {
|
698 |
+
$i = str_pad(ltrim($i,'0'), 3, '0', STR_PAD_LEFT);
|
699 |
+
$i = "&#$i;";
|
700 |
+
} else {
|
701 |
+
$i = "&#$i;";
|
702 |
+
}
|
703 |
+
|
704 |
+
return $i;
|
705 |
+
}
|
706 |
+
|
707 |
+
/**
|
708 |
+
* Callback for wp_kses_normalize_entities() for regular expression.
|
709 |
+
*
|
710 |
+
* This function helps wp_kses_normalize_entities() to only accept valid Unicode
|
711 |
+
* numeric entities in hex form.
|
712 |
+
*
|
713 |
+
* @since 2.7.0
|
714 |
+
* @access private
|
715 |
+
*
|
716 |
+
* @param array $matches preg_replace_callback() matches array
|
717 |
+
* @return string Correctly encoded entity
|
718 |
+
*/
|
719 |
+
public static function wp_kses_normalize_entities3($matches) {
|
720 |
+
if ( empty($matches[1]) )
|
721 |
+
return '';
|
722 |
+
|
723 |
+
$hexchars = $matches[1];
|
724 |
+
return ( ! self::wp_valid_unicode( hexdec( $hexchars ) ) ) ? "&#x$hexchars;" : '&#x'.ltrim($hexchars,'0').';';
|
725 |
+
}
|
726 |
+
|
727 |
+
/**
|
728 |
+
* Retrieve a list of protocols to allow in HTML attributes.
|
729 |
+
*
|
730 |
+
* @since 3.3.0
|
731 |
+
* @since 4.3.0 Added 'webcal' to the protocols array.
|
732 |
+
* @since 4.7.0 Added 'urn' to the protocols array.
|
733 |
+
*
|
734 |
+
* @see wp_kses()
|
735 |
+
* @see esc_url()
|
736 |
+
*
|
737 |
+
* @staticvar array $protocols
|
738 |
+
*
|
739 |
+
* @return array Array of allowed protocols. Defaults to an array containing 'http', 'https',
|
740 |
+
* 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
|
741 |
+
* 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
|
742 |
+
*/
|
743 |
+
public static function wp_allowed_protocols() {
|
744 |
+
static $protocols = array();
|
745 |
+
|
746 |
+
if ( empty( $protocols ) ) {
|
747 |
+
$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
|
748 |
+
}
|
749 |
+
|
750 |
+
return $protocols;
|
751 |
+
}
|
752 |
+
|
753 |
+
/**
|
754 |
+
* Checks and cleans a URL.
|
755 |
+
*
|
756 |
+
* A number of characters are removed from the URL. If the URL is for displaying
|
757 |
+
* (the default behaviour) ampersands are also replaced. The {@see 'clean_url'} filter
|
758 |
+
* is applied to the returned cleaned URL.
|
759 |
+
*
|
760 |
+
* @since 2.8.0
|
761 |
+
*
|
762 |
+
* @param string $url The URL to be cleaned.
|
763 |
+
* @param array $protocols Optional. An array of acceptable protocols.
|
764 |
+
* Defaults to return value of wp_allowed_protocols()
|
765 |
+
* @param string $_context Private. Use esc_url_raw() for database usage.
|
766 |
+
* @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
|
767 |
+
*/
|
768 |
+
public static function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
769 |
+
$original_url = $url;
|
770 |
+
|
771 |
+
if ( '' == $url )
|
772 |
+
return $url;
|
773 |
+
|
774 |
+
$url = str_replace( ' ', '%20', $url );
|
775 |
+
$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url);
|
776 |
+
|
777 |
+
if ( '' === $url ) {
|
778 |
+
return $url;
|
779 |
+
}
|
780 |
+
|
781 |
+
if ( 0 !== stripos( $url, 'mailto:' ) ) {
|
782 |
+
$strip = array('%0d', '%0a', '%0D', '%0A');
|
783 |
+
$url = self::_deep_replace($strip, $url);
|
784 |
+
}
|
785 |
+
|
786 |
+
$url = str_replace(';//', '://', $url);
|
787 |
+
/* If the URL doesn't appear to contain a scheme, we
|
788 |
+
* presume it needs http:// prepended (unless a relative
|
789 |
+
* link starting with /, # or ? or a php file).
|
790 |
+
*/
|
791 |
+
if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&
|
792 |
+
! preg_match('/^[a-z0-9-]+?\.php/i', $url) )
|
793 |
+
$url = 'http://' . $url;
|
794 |
+
|
795 |
+
// Replace ampersands and single quotes only when displaying.
|
796 |
+
if ( 'display' == $_context ) {
|
797 |
+
$url = self::wp_kses_normalize_entities( $url );
|
798 |
+
$url = str_replace( '&', '&', $url );
|
799 |
+
$url = str_replace( "'", ''', $url );
|
800 |
+
}
|
801 |
+
|
802 |
+
if ( ( false !== strpos( $url, '[' ) ) || ( false !== strpos( $url, ']' ) ) ) {
|
803 |
+
|
804 |
+
$parsed = wp_parse_url( $url );
|
805 |
+
$front = '';
|
806 |
+
|
807 |
+
if ( isset( $parsed['scheme'] ) ) {
|
808 |
+
$front .= $parsed['scheme'] . '://';
|
809 |
+
} elseif ( '/' === $url[0] ) {
|
810 |
+
$front .= '//';
|
811 |
+
}
|
812 |
+
|
813 |
+
if ( isset( $parsed['user'] ) ) {
|
814 |
+
$front .= $parsed['user'];
|
815 |
+
}
|
816 |
+
|
817 |
+
if ( isset( $parsed['pass'] ) ) {
|
818 |
+
$front .= ':' . $parsed['pass'];
|
819 |
+
}
|
820 |
+
|
821 |
+
if ( isset( $parsed['user'] ) || isset( $parsed['pass'] ) ) {
|
822 |
+
$front .= '@';
|
823 |
+
}
|
824 |
+
|
825 |
+
if ( isset( $parsed['host'] ) ) {
|
826 |
+
$front .= $parsed['host'];
|
827 |
+
}
|
828 |
+
|
829 |
+
if ( isset( $parsed['port'] ) ) {
|
830 |
+
$front .= ':' . $parsed['port'];
|
831 |
+
}
|
832 |
+
|
833 |
+
$end_dirty = str_replace( $front, '', $url );
|
834 |
+
$end_clean = str_replace( array( '[', ']' ), array( '%5B', '%5D' ), $end_dirty );
|
835 |
+
$url = str_replace( $end_dirty, $end_clean, $url );
|
836 |
+
|
837 |
+
}
|
838 |
+
|
839 |
+
if ( '/' === $url[0] ) {
|
840 |
+
$good_protocol_url = $url;
|
841 |
+
} else {
|
842 |
+
if ( ! is_array( $protocols ) )
|
843 |
+
$protocols = self::wp_allowed_protocols();
|
844 |
+
$good_protocol_url = self::wp_kses_bad_protocol( $url, $protocols );
|
845 |
+
if ( strtolower( $good_protocol_url ) != strtolower( $url ) )
|
846 |
+
return '';
|
847 |
+
}
|
848 |
+
|
849 |
+
/**
|
850 |
+
* Filters a string cleaned and escaped for output as a URL.
|
851 |
+
*
|
852 |
+
* @since 2.3.0
|
853 |
+
*
|
854 |
+
* @param string $good_protocol_url The cleaned URL to be returned.
|
855 |
+
* @param string $original_url The URL prior to cleaning.
|
856 |
+
* @param string $_context If 'display', replace ampersands and single quotes only.
|
857 |
+
*/
|
858 |
+
return $good_protocol_url;
|
859 |
+
}
|
860 |
+
|
861 |
+
|
862 |
+
/**
|
863 |
+
* Removes any invalid control characters in $string.
|
864 |
+
*
|
865 |
+
* Also removes any instance of the '\0' string.
|
866 |
+
*
|
867 |
+
* @since 1.0.0
|
868 |
+
*
|
869 |
+
* @param string $string
|
870 |
+
* @param array $options Set 'slash_zero' => 'keep' when '\0' is allowed. Default is 'remove'.
|
871 |
+
* @return string
|
872 |
+
*/
|
873 |
+
public static function wp_kses_no_null( $string, $options = null ) {
|
874 |
+
if ( ! isset( $options['slash_zero'] ) ) {
|
875 |
+
$options = array( 'slash_zero' => 'remove' );
|
876 |
+
}
|
877 |
+
|
878 |
+
$string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string );
|
879 |
+
if ( 'remove' == $options['slash_zero'] ) {
|
880 |
+
$string = preg_replace( '/\\\\+0+/', '', $string );
|
881 |
+
}
|
882 |
+
|
883 |
+
return $string;
|
884 |
+
}
|
885 |
+
|
886 |
+
|
887 |
+
/**
|
888 |
+
* Sanitize string from bad protocols.
|
889 |
+
*
|
890 |
+
* This function removes all non-allowed protocols from the beginning of
|
891 |
+
* $string. It ignores whitespace and the case of the letters, and it does
|
892 |
+
* understand HTML entities. It does its work in a while loop, so it won't be
|
893 |
+
* fooled by a string like "javascript:javascript:alert(57)".
|
894 |
+
*
|
895 |
+
* @since 1.0.0
|
896 |
+
*
|
897 |
+
* @param string $string Content to filter bad protocols from
|
898 |
+
* @param array $allowed_protocols Allowed protocols to keep
|
899 |
+
* @return string Filtered content
|
900 |
+
*/
|
901 |
+
public static function wp_kses_bad_protocol($string, $allowed_protocols) {
|
902 |
+
$string = self::wp_kses_no_null($string);
|
903 |
+
$iterations = 0;
|
904 |
+
|
905 |
+
do {
|
906 |
+
$original_string = $string;
|
907 |
+
$string = self::wp_kses_bad_protocol_once($string, $allowed_protocols);
|
908 |
+
} while ( $original_string != $string && ++$iterations < 6 );
|
909 |
+
|
910 |
+
if ( $original_string != $string )
|
911 |
+
return '';
|
912 |
+
|
913 |
+
return $string;
|
914 |
+
}
|
915 |
+
|
916 |
+
/**
|
917 |
+
* Sanitizes content from bad protocols and other characters.
|
918 |
+
*
|
919 |
+
* This function searches for URL protocols at the beginning of $string, while
|
920 |
+
* handling whitespace and HTML entities.
|
921 |
+
*
|
922 |
+
* @since 1.0.0
|
923 |
+
*
|
924 |
+
* @param string $string Content to check for bad protocols
|
925 |
+
* @param string $allowed_protocols Allowed protocols
|
926 |
+
* @return string Sanitized content
|
927 |
+
*/
|
928 |
+
public static function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1 ) {
|
929 |
+
$string2 = preg_split( '/:|�*58;|�*3a;/i', $string, 2 );
|
930 |
+
if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
|
931 |
+
$string = trim( $string2[1] );
|
932 |
+
$protocol = self::wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
|
933 |
+
if ( 'feed:' == $protocol ) {
|
934 |
+
if ( $count > 2 )
|
935 |
+
return '';
|
936 |
+
$string = wp_kses_bad_protocol_once( $string, $allowed_protocols, ++$count );
|
937 |
+
if ( empty( $string ) )
|
938 |
+
return $string;
|
939 |
+
}
|
940 |
+
$string = $protocol . $string;
|
941 |
+
}
|
942 |
+
|
943 |
+
return $string;
|
944 |
+
}
|
945 |
+
|
946 |
+
/**
|
947 |
+
* Convert all entities to their character counterparts.
|
948 |
+
*
|
949 |
+
* This function decodes numeric HTML entities (`A` and `A`).
|
950 |
+
* It doesn't do anything with other entities like ä, but we don't
|
951 |
+
* need them in the URL protocol whitelisting system anyway.
|
952 |
+
*
|
953 |
+
* @since 1.0.0
|
954 |
+
*
|
955 |
+
* @param string $string Content to change entities
|
956 |
+
* @return string Content after decoded entities
|
957 |
+
*/
|
958 |
+
public static function wp_kses_decode_entities($string) {
|
959 |
+
$string = preg_replace_callback('/&#([0-9]+);/', 'self::_wp_kses_decode_entities_chr', $string);
|
960 |
+
$string = preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/', 'self::_wp_kses_decode_entities_chr_hexdec', $string);
|
961 |
+
|
962 |
+
return $string;
|
963 |
+
}
|
964 |
+
|
965 |
+
/**
|
966 |
+
* Regex callback for wp_kses_decode_entities()
|
967 |
+
*
|
968 |
+
* @since 2.9.0
|
969 |
+
*
|
970 |
+
* @param array $match preg match
|
971 |
+
* @return string
|
972 |
+
*/
|
973 |
+
public static function _wp_kses_decode_entities_chr( $match ) {
|
974 |
+
return chr( $match[1] );
|
975 |
+
}
|
976 |
+
|
977 |
+
/**
|
978 |
+
* Regex callback for wp_kses_decode_entities()
|
979 |
+
*
|
980 |
+
* @since 2.9.0
|
981 |
+
*
|
982 |
+
* @param array $match preg match
|
983 |
+
* @return string
|
984 |
+
*/
|
985 |
+
public static function _wp_kses_decode_entities_chr_hexdec( $match ) {
|
986 |
+
return chr( hexdec( $match[1] ) );
|
987 |
+
}
|
988 |
+
|
989 |
+
/**
|
990 |
+
* Callback for wp_kses_bad_protocol_once() regular expression.
|
991 |
+
*
|
992 |
+
* This function processes URL protocols, checks to see if they're in the
|
993 |
+
* whitelist or not, and returns different data depending on the answer.
|
994 |
+
*
|
995 |
+
* @access private
|
996 |
+
* @since 1.0.0
|
997 |
+
*
|
998 |
+
* @param string $string URI scheme to check against the whitelist
|
999 |
+
* @param string $allowed_protocols Allowed protocols
|
1000 |
+
* @return string Sanitized content
|
1001 |
+
*/
|
1002 |
+
public static function wp_kses_bad_protocol_once2( $string, $allowed_protocols ) {
|
1003 |
+
$string2 = self::wp_kses_decode_entities($string);
|
1004 |
+
$string2 = preg_replace('/\s/', '', $string2);
|
1005 |
+
$string2 = self::wp_kses_no_null($string2);
|
1006 |
+
$string2 = strtolower($string2);
|
1007 |
+
|
1008 |
+
$allowed = false;
|
1009 |
+
foreach ( (array) $allowed_protocols as $one_protocol )
|
1010 |
+
if ( strtolower($one_protocol) == $string2 ) {
|
1011 |
+
$allowed = true;
|
1012 |
+
break;
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
if ($allowed)
|
1016 |
+
return "$string2:";
|
1017 |
+
else
|
1018 |
+
return '';
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
/**
|
1022 |
+
* Performs esc_url() for database usage.
|
1023 |
+
*
|
1024 |
+
* @since 2.8.0
|
1025 |
+
*
|
1026 |
+
* @param string $url The URL to be cleaned.
|
1027 |
+
* @param array $protocols An array of acceptable protocols.
|
1028 |
+
* @return string The cleaned URL.
|
1029 |
+
*/
|
1030 |
+
public static function esc_url_raw( $url, $protocols = null ) {
|
1031 |
+
return self::esc_url( $url, $protocols, 'db' );
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
// SANITIZE Functions
|
1035 |
+
|
1036 |
+
/**
|
1037 |
+
* Normalize EOL characters and strip duplicate whitespace.
|
1038 |
+
*
|
1039 |
+
* @since 2.7.0
|
1040 |
+
*
|
1041 |
+
* @param string $str The string to normalize.
|
1042 |
+
* @return string The normalized string.
|
1043 |
+
*/
|
1044 |
+
public static function normalize_whitespace( $str ) {
|
1045 |
+
$str = trim( $str );
|
1046 |
+
$str = str_replace( "\r", "\n", $str );
|
1047 |
+
$str = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str );
|
1048 |
+
return $str;
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
/**
|
1052 |
+
* Properly strip all HTML tags including script and style
|
1053 |
+
*
|
1054 |
+
* This differs from strip_tags() because it removes the contents of
|
1055 |
+
* the `<script>` and `<style>` tags. E.g. `strip_tags( '<script>something</script>' )`
|
1056 |
+
* will return 'something'. wp_strip_all_tags will return ''
|
1057 |
+
*
|
1058 |
+
* @since 2.9.0
|
1059 |
+
*
|
1060 |
+
* @param string $string String containing HTML tags
|
1061 |
+
* @param bool $remove_breaks Optional. Whether to remove left over line breaks and white space chars
|
1062 |
+
* @return string The processed string.
|
1063 |
+
*/
|
1064 |
+
public static function wp_strip_all_tags($string, $remove_breaks = false) {
|
1065 |
+
$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
|
1066 |
+
$string = strip_tags($string);
|
1067 |
+
|
1068 |
+
if ( $remove_breaks )
|
1069 |
+
$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
|
1070 |
+
|
1071 |
+
return trim( $string );
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
/**
|
1075 |
+
* Sanitizes a string from user input or from the database.
|
1076 |
+
*
|
1077 |
+
* - Checks for invalid UTF-8,
|
1078 |
+
* - Converts single `<` characters to entities
|
1079 |
+
* - Strips all tags
|
1080 |
+
* - Removes line breaks, tabs, and extra whitespace
|
1081 |
+
* - Strips octets
|
1082 |
+
*
|
1083 |
+
* @since 2.9.0
|
1084 |
+
*
|
1085 |
+
* @see sanitize_textarea_field()
|
1086 |
+
* @see wp_check_invalid_utf8()
|
1087 |
+
* @see wp_strip_all_tags()
|
1088 |
+
*
|
1089 |
+
* @param string $str String to sanitize.
|
1090 |
+
* @return string Sanitized string.
|
1091 |
+
*/
|
1092 |
+
public static function sanitize_text_field( $str ) {
|
1093 |
+
$filtered = self::_sanitize_text_fields( $str, false );
|
1094 |
+
|
1095 |
+
/**
|
1096 |
+
* Filters a sanitized text field string.
|
1097 |
+
*
|
1098 |
+
* @since 2.9.0
|
1099 |
+
*
|
1100 |
+
* @param string $filtered The sanitized string.
|
1101 |
+
* @param string $str The string prior to being sanitized.
|
1102 |
+
*/
|
1103 |
+
return $filtered;
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
/**
|
1107 |
+
* Sanitizes a multiline string from user input or from the database.
|
1108 |
+
*
|
1109 |
+
* The function is like sanitize_text_field(), but preserves
|
1110 |
+
* new lines (\n) and other whitespace, which are legitimate
|
1111 |
+
* input in textarea elements.
|
1112 |
+
*
|
1113 |
+
* @see sanitize_text_field()
|
1114 |
+
*
|
1115 |
+
* @since 4.7.0
|
1116 |
+
*
|
1117 |
+
* @param string $str String to sanitize.
|
1118 |
+
* @return string Sanitized string.
|
1119 |
+
*/
|
1120 |
+
public static function sanitize_textarea_field( $str ) {
|
1121 |
+
$filtered = self::_sanitize_text_fields( $str, true );
|
1122 |
+
|
1123 |
+
/**
|
1124 |
+
* Filters a sanitized textarea field string.
|
1125 |
+
*
|
1126 |
+
* @since 4.7.0
|
1127 |
+
*
|
1128 |
+
* @param string $filtered The sanitized string.
|
1129 |
+
* @param string $str The string prior to being sanitized.
|
1130 |
+
*/
|
1131 |
+
return $filtered;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
/**
|
1135 |
+
* Internal helper function to sanitize a string from user input or from the db
|
1136 |
+
*
|
1137 |
+
* @since 4.7.0
|
1138 |
+
* @access private
|
1139 |
+
*
|
1140 |
+
* @param string $str String to sanitize.
|
1141 |
+
* @param bool $keep_newlines optional Whether to keep newlines. Default: false.
|
1142 |
+
* @return string Sanitized string.
|
1143 |
+
*/
|
1144 |
+
public static function _sanitize_text_fields( $str, $keep_newlines = false ) {
|
1145 |
+
$filtered = self::wp_check_invalid_utf8( $str );
|
1146 |
+
|
1147 |
+
if ( strpos($filtered, '<') !== false ) {
|
1148 |
+
$filtered = self::wp_pre_kses_less_than( $filtered );
|
1149 |
+
// This will strip extra whitespace for us.
|
1150 |
+
$filtered = self::wp_strip_all_tags( $filtered, false );
|
1151 |
+
|
1152 |
+
// Use html entities in a special case to make sure no later
|
1153 |
+
// newline stripping stage could lead to a functional tag
|
1154 |
+
$filtered = str_replace("<\n", "<\n", $filtered);
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
if ( ! $keep_newlines ) {
|
1158 |
+
$filtered = preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
|
1159 |
+
}
|
1160 |
+
$filtered = trim( $filtered );
|
1161 |
+
|
1162 |
+
$found = false;
|
1163 |
+
while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {
|
1164 |
+
$filtered = str_replace($match[0], '', $filtered);
|
1165 |
+
$found = true;
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
if ( $found ) {
|
1169 |
+
// Strip out the whitespace that may now exist after removing the octets.
|
1170 |
+
$filtered = trim( preg_replace('/ +/', ' ', $filtered) );
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
return $filtered;
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
/**
|
1177 |
+
* Convert lone less than signs.
|
1178 |
+
*
|
1179 |
+
* KSES already converts lone greater than signs.
|
1180 |
+
*
|
1181 |
+
* @since 2.3.0
|
1182 |
+
*
|
1183 |
+
* @param string $text Text to be converted.
|
1184 |
+
* @return string Converted text.
|
1185 |
+
*/
|
1186 |
+
public static function wp_pre_kses_less_than( $text ) {
|
1187 |
+
return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', array('self', 'wp_pre_kses_less_than_callback'), $text);
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
/**
|
1191 |
+
* Callback function used by preg_replace.
|
1192 |
+
*
|
1193 |
+
* @since 2.3.0
|
1194 |
+
*
|
1195 |
+
* @param array $matches Populated by matches to preg_replace.
|
1196 |
+
* @return string The text returned after esc_html if needed.
|
1197 |
+
*/
|
1198 |
+
public static function wp_pre_kses_less_than_callback( $matches ) {
|
1199 |
+
if ( false === strpos($matches[0], '>') )
|
1200 |
+
return esc_html($matches[0]);
|
1201 |
+
return $matches[0];
|
1202 |
+
}
|
1203 |
}
|
1204 |
?>
|
installer/build/ctrls/ctrl.step1.php
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
//POST PARAMS
|
4 |
-
$_POST['archive_engine'] = isset($_POST['archive_engine']) ? $_POST['archive_engine'] : 'manual';
|
5 |
-
$_POST['archive_filetime'] = (isset($_POST['archive_filetime'])) ? $_POST['archive_filetime'] : 'current';
|
6 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
7 |
-
$_POST['exe_safe_mode']
|
8 |
//LOGGING
|
9 |
$POST_LOG = $_POST;
|
10 |
unset($POST_LOG['dbpass']);
|
@@ -35,7 +36,8 @@ error_reporting(E_ERROR);
|
|
35 |
|
36 |
if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) {
|
37 |
//ERR_ZIPMANUAL
|
38 |
-
|
|
|
39 |
if (!file_exists("wp-config.php") && !file_exists("dup-database__{$GLOBALS['PACKAGE_HASH']}.sql")) {
|
40 |
DUPX_Log::error(ERR_ZIPMANUAL);
|
41 |
}
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
|
4 |
//POST PARAMS
|
5 |
+
$_POST['archive_engine'] = isset($_POST['archive_engine']) ? DUPX_U::sanitize_text_field($_POST['archive_engine']) : 'manual';
|
6 |
+
$_POST['archive_filetime'] = (isset($_POST['archive_filetime'])) ? DUPX_U::sanitize_text_field($_POST['archive_filetime']) : 'current';
|
7 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
8 |
+
$_POST['exe_safe_mode'] = (isset($_POST['exe_safe_mode'])) ? DUPX_U::sanitize_text_field($_POST['exe_safe_mode']) : 0;
|
9 |
//LOGGING
|
10 |
$POST_LOG = $_POST;
|
11 |
unset($POST_LOG['dbpass']);
|
36 |
|
37 |
if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) {
|
38 |
//ERR_ZIPMANUAL
|
39 |
+
$post_archive_engine = DUPX_U::sanitize_text_field($_POST['archive_engine']);
|
40 |
+
if ($post_archive_engine == 'manual') {
|
41 |
if (!file_exists("wp-config.php") && !file_exists("dup-database__{$GLOBALS['PACKAGE_HASH']}.sql")) {
|
42 |
DUPX_Log::error(ERR_ZIPMANUAL);
|
43 |
}
|
installer/build/ctrls/ctrl.step2.php
CHANGED
@@ -1,18 +1,46 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
//POST PARAMS
|
3 |
-
$_POST['dbaction']
|
4 |
-
|
5 |
-
|
6 |
-
$
|
7 |
-
$_POST['
|
8 |
-
|
9 |
-
$_POST['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
$_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
|
11 |
$_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
|
12 |
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
13 |
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
14 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
15 |
-
$_POST['dbcollatefb'] = isset($_POST['dbcollatefb']) ? $_POST['dbcollatefb'] : false;
|
16 |
|
17 |
//LOGGING
|
18 |
$POST_LOG = $_POST;
|
@@ -42,7 +70,7 @@ if (isset($_GET['dbtest']))
|
|
42 |
$dbErr = mysqli_connect_error();
|
43 |
|
44 |
$dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
|
45 |
-
$port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port=".
|
46 |
|
47 |
$tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
48 |
$tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
@@ -56,18 +84,18 @@ if (isset($_GET['dbtest']))
|
|
56 |
$dbversion_compat_fail = $dbConn && version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
|
57 |
|
58 |
$tstInfo = ($dbversion_info_fail)
|
59 |
-
? "<div class='dupx-notice'>".
|
60 |
-
: "<div class='dupx-pass'>".
|
61 |
|
62 |
$tstCompat = ($dbversion_compat_fail)
|
63 |
-
? "<div class='dupx-notice'>This Server: [".
|
64 |
-
: "<div class='dupx-pass'>This Server: [".
|
65 |
|
66 |
$html .= "
|
67 |
<div class='s2-db-test'>
|
68 |
<small>
|
69 |
Using Connection String:<br/>
|
70 |
-
Host=".
|
71 |
</small>
|
72 |
<table class='s2-db-test-dtls'>
|
73 |
<tr>
|
@@ -99,7 +127,7 @@ if (isset($_GET['dbtest']))
|
|
99 |
{
|
100 |
$tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
|
101 |
$html .= ($tblcount > 0)
|
102 |
-
? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY,
|
103 |
: '';
|
104 |
}
|
105 |
|
@@ -144,7 +172,7 @@ function_exists('mysqli_connect') or DUPX_Log::error(ERR_MYSQLI_SUPPORT);
|
|
144 |
|
145 |
//ERR_DBCONNECT
|
146 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
147 |
-
@mysqli_query($dbh, "SET wait_timeout =
|
148 |
($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
|
149 |
if ($_POST['dbaction'] == 'empty') {
|
150 |
mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
|
@@ -282,8 +310,8 @@ if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !
|
|
282 |
|
283 |
//=================================
|
284 |
//START DB RUN
|
285 |
-
@mysqli_query($dbh, "SET wait_timeout =
|
286 |
-
@mysqli_query($dbh, "SET max_allowed_packet =
|
287 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
288 |
|
289 |
//Will set mode to null only for this db handle session
|
@@ -295,7 +323,7 @@ switch ($_POST['dbmysqlmode']) {
|
|
295 |
break;
|
296 |
case 'CUSTOM':
|
297 |
$dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
|
298 |
-
$qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '
|
299 |
if ($qry_session_custom == false) {
|
300 |
$sql_error = mysqli_error($dbh);
|
301 |
$log = "WARNING: Trying to set a custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
|
@@ -335,8 +363,8 @@ if ($qry_session_custom == false) {
|
|
335 |
//CREATE DB
|
336 |
switch ($_POST['dbaction']) {
|
337 |
case "create":
|
338 |
-
mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `
|
339 |
-
mysqli_select_db($dbh, $_POST['dbname'])
|
340 |
or DUPX_Log::error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
|
341 |
break;
|
342 |
case "empty":
|
@@ -350,7 +378,7 @@ switch ($_POST['dbaction']) {
|
|
350 |
}
|
351 |
if (count($found_tables) > 0) {
|
352 |
foreach ($found_tables as $table_name) {
|
353 |
-
$sql = "DROP TABLE `
|
354 |
if (!$result = mysqli_query($dbh, $sql)) {
|
355 |
DUPX_Log::error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
|
356 |
}
|
@@ -396,7 +424,7 @@ while ($counter < $sql_result_file_length) {
|
|
396 |
mysqli_close($dbh);
|
397 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
|
398 |
// Reset session setup
|
399 |
-
@mysqli_query($dbh, "SET wait_timeout =
|
400 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
401 |
}
|
402 |
DUPX_Log::info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
|
@@ -441,15 +469,15 @@ if ($dbtable_count == 0) {
|
|
441 |
//DATA CLEANUP: Perform Transient Cache Cleanup
|
442 |
//Remove all duplicator entries and record this one since this is a new install.
|
443 |
$dbdelete_count = 0;
|
444 |
-
@mysqli_query($dbh, "DELETE FROM `
|
445 |
$dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
|
446 |
-
@mysqli_query($dbh, "DELETE FROM `
|
447 |
$dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
|
448 |
$dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
|
449 |
DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
|
450 |
//Reset Duplicator Options
|
451 |
foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
|
452 |
-
mysqli_query($dbh, "DELETE FROM `
|
453 |
}
|
454 |
|
455 |
@mysqli_close($dbh);
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
//POST PARAMS
|
5 |
+
$_POST['dbaction'] = isset($_POST['dbaction']) ? DUPX_U::sanitize_text_field($_POST['dbaction']) : 'create';
|
6 |
+
|
7 |
+
if (isset($_POST['dbhost'])) {
|
8 |
+
$post_db_host = DUPX_U::sanitize_text_field($_POST['dbhost']);
|
9 |
+
$_POST['dbhost'] = DUPX_U::sanitize_text_field($post_db_host);
|
10 |
+
} else {
|
11 |
+
$_POST['dbhost'] = null;
|
12 |
+
}
|
13 |
+
|
14 |
+
if (isset($_POST['dbname'])) {
|
15 |
+
$post_db_name = DUPX_U::sanitize_text_field($_POST['dbname']);
|
16 |
+
$_POST['dbname'] = trim($post_db_name);
|
17 |
+
} else {
|
18 |
+
$_POST['dbname'] = null;
|
19 |
+
}
|
20 |
+
|
21 |
+
$_POST['dbuser'] = isset($_POST['dbuser']) ? DUPX_U::sanitize_text_field($_POST['dbuser']) : null;
|
22 |
+
$_POST['dbpass'] = isset($_POST['dbpass']) ? DUPX_U::sanitize_text_field($_POST['dbpass']) : null;
|
23 |
+
|
24 |
+
if (isset($_POST['dbcharset'])) {
|
25 |
+
$post_db_charset = DUPX_U::sanitize_text_field($_POST['dbcharset']);
|
26 |
+
$_POST['dbcharset'] = trim($post_db_charset);
|
27 |
+
} else {
|
28 |
+
$_POST['dbcharset'] = $GLOBALS['DBCHARSET_DEFAULT'];
|
29 |
+
}
|
30 |
+
|
31 |
+
if (isset($_POST['dbcollate'])) {
|
32 |
+
$post_db_collate = DUPX_U::sanitize_text_field($_POST['dbcollate']);
|
33 |
+
$_POST['dbcollate'] = trim($post_db_collate);
|
34 |
+
} else {
|
35 |
+
$_POST['dbcollate'] = $GLOBALS['DBCOLLATE_DEFAULT'];
|
36 |
+
}
|
37 |
+
|
38 |
$_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
|
39 |
$_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
|
40 |
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
41 |
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
42 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
43 |
+
$_POST['dbcollatefb'] = isset($_POST['dbcollatefb']) ? DUPX_U::sanitize_text_field($_POST['dbcollatefb']) : false;
|
44 |
|
45 |
//LOGGING
|
46 |
$POST_LOG = $_POST;
|
70 |
$dbErr = mysqli_connect_error();
|
71 |
|
72 |
$dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
|
73 |
+
$port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port=".DUPX_U::esc_html($_POST['dbport']);
|
74 |
|
75 |
$tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
76 |
$tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
|
84 |
$dbversion_compat_fail = $dbConn && version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
|
85 |
|
86 |
$tstInfo = ($dbversion_info_fail)
|
87 |
+
? "<div class='dupx-notice'>".DUPX_U::esc_html($dbversion_info)."</div>"
|
88 |
+
: "<div class='dupx-pass'>".DUPX_U::esc_html($dbversion_info)."</div>";
|
89 |
|
90 |
$tstCompat = ($dbversion_compat_fail)
|
91 |
+
? "<div class='dupx-notice'>This Server: [".DUPX_U::esc_html($dbversion_compat)."] -- Package Server: [".DUPX_U::esc_html($GLOBALS['FW_VERSION_DB'])."]</div>"
|
92 |
+
: "<div class='dupx-pass'>This Server: [".DUPX_U::esc_html($dbversion_compat)."] -- Package Server: [".DUPX_U::esc_html($GLOBALS['FW_VERSION_DB'])."]</div>";
|
93 |
|
94 |
$html .= "
|
95 |
<div class='s2-db-test'>
|
96 |
<small>
|
97 |
Using Connection String:<br/>
|
98 |
+
Host=".DUPX_U::esc_html($_POST['dbhost'])."; Database=".DUPX_U::esc_html($_POST['dbname'])."; Uid=".DUPX_U::esc_html($_POST['dbuser'])."; Pwd=".DUPX_U::esc_html($_POST['dbpass'])."; {$port_view}
|
99 |
</small>
|
100 |
<table class='s2-db-test-dtls'>
|
101 |
<tr>
|
127 |
{
|
128 |
$tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
|
129 |
$html .= ($tblcount > 0)
|
130 |
+
? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, DUPX_U::esc_html($_POST['dbname']), DUPX_U::esc_html($tblcount)) . "</div>"
|
131 |
: '';
|
132 |
}
|
133 |
|
172 |
|
173 |
//ERR_DBCONNECT
|
174 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
|
175 |
+
@mysqli_query($dbh, "SET wait_timeout = ".mysqli_real_escape_string($dbh, $GLOBALS['DB_MAX_TIME']));
|
176 |
($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
|
177 |
if ($_POST['dbaction'] == 'empty') {
|
178 |
mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
|
310 |
|
311 |
//=================================
|
312 |
//START DB RUN
|
313 |
+
@mysqli_query($dbh, "SET wait_timeout = ".mysqli_real_escape_string($dbh, $GLOBALS['DB_MAX_TIME']));
|
314 |
+
@mysqli_query($dbh, "SET max_allowed_packet = ".mysqli_real_escape_string($dbh, $GLOBALS['DB_MAX_PACKETS']));
|
315 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
316 |
|
317 |
//Will set mode to null only for this db handle session
|
323 |
break;
|
324 |
case 'CUSTOM':
|
325 |
$dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
|
326 |
+
$qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '".mysqli_real_escape_string($dbh, $dbmysqlmode_opts)."'");
|
327 |
if ($qry_session_custom == false) {
|
328 |
$sql_error = mysqli_error($dbh);
|
329 |
$log = "WARNING: Trying to set a custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
|
363 |
//CREATE DB
|
364 |
switch ($_POST['dbaction']) {
|
365 |
case "create":
|
366 |
+
mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `".mysqli_real_escape_string($dbh, $_POST['dbname'])."`");
|
367 |
+
mysqli_select_db($dbh, mysqli_real_escape_string($dbh, $_POST['dbname']))
|
368 |
or DUPX_Log::error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
|
369 |
break;
|
370 |
case "empty":
|
378 |
}
|
379 |
if (count($found_tables) > 0) {
|
380 |
foreach ($found_tables as $table_name) {
|
381 |
+
$sql = "DROP TABLE `".mysqli_real_escape_string($dbh, $_POST['dbname'])."`.`".mysqli_real_escape_string($dbh, $table_name)."`";
|
382 |
if (!$result = mysqli_query($dbh, $sql)) {
|
383 |
DUPX_Log::error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
|
384 |
}
|
424 |
mysqli_close($dbh);
|
425 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
|
426 |
// Reset session setup
|
427 |
+
@mysqli_query($dbh, "SET wait_timeout = ".mysqli_real_escape_string($dbh, $GLOBALS['DB_MAX_TIME']));
|
428 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
429 |
}
|
430 |
DUPX_Log::info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
|
469 |
//DATA CLEANUP: Perform Transient Cache Cleanup
|
470 |
//Remove all duplicator entries and record this one since this is a new install.
|
471 |
$dbdelete_count = 0;
|
472 |
+
@mysqli_query($dbh, "DELETE FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."duplicator_packages`");
|
473 |
$dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
|
474 |
+
@mysqli_query($dbh, "DELETE FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
|
475 |
$dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
|
476 |
$dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
|
477 |
DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
|
478 |
//Reset Duplicator Options
|
479 |
foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
|
480 |
+
mysqli_query($dbh, "DELETE FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` WHERE `option_name` = '".mysqli_real_escape_string($dbh, $value)."'");
|
481 |
}
|
482 |
|
483 |
@mysqli_close($dbh);
|
installer/build/ctrls/ctrl.step3.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
// Exit if accessed directly from admin
|
3 |
if (function_exists('duplicator_secure_check')) {
|
4 |
duplicator_secure_check();
|
@@ -16,21 +18,55 @@ error_reporting(E_ERROR);
|
|
16 |
$ajax2_start = DUPX_U::getMicrotime();
|
17 |
|
18 |
//POST PARAMS
|
19 |
-
|
20 |
-
$
|
21 |
-
$_POST['
|
22 |
-
|
23 |
-
$_POST['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
$_POST['postguid'] = isset($_POST['postguid']) && $_POST['postguid'] == 1 ? 1 : 0;
|
25 |
$_POST['fullsearch'] = isset($_POST['fullsearch']) && $_POST['fullsearch'] == 1 ? 1 : 0;
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
$_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '/') : null;
|
29 |
$_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
|
30 |
$_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
|
31 |
$_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
|
32 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
33 |
-
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
|
34 |
|
35 |
|
36 |
//MYSQL CONNECTION: If inputs are bad then die
|
@@ -43,7 +79,7 @@ if (!$dbh) {
|
|
43 |
}
|
44 |
|
45 |
$charset_server = @mysqli_character_set_name($dbh);
|
46 |
-
@mysqli_query($dbh, "SET wait_timeout =
|
47 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
48 |
|
49 |
|
@@ -96,8 +132,8 @@ if (!in_array('duplicator/duplicator.php', $plugin_list)) {
|
|
96 |
}
|
97 |
$serial_plugin_list = @serialize($plugin_list);
|
98 |
|
99 |
-
mysqli_query($dbh, "UPDATE `
|
100 |
-
mysqli_query($dbh, "UPDATE `
|
101 |
|
102 |
$log = "--------------------------------------\n";
|
103 |
$log .= "SERIALIZER ENGINE\n";
|
@@ -184,16 +220,17 @@ DUPX_UpdateEngine::logErrors($report);
|
|
184 |
|
185 |
//Reset the postguid data
|
186 |
if ($_POST['postguid']) {
|
187 |
-
mysqli_query($dbh, "UPDATE `
|
188 |
$update_guid = @mysqli_affected_rows($dbh) or 0;
|
189 |
DUPX_Log::info("Reverted '{$update_guid}' post guid columns back to '{$_POST['url_old']}'");
|
190 |
}
|
191 |
|
192 |
/** FINAL UPDATES: Must happen after the global replace to prevent double pathing
|
193 |
http://xyz.com/abc01 will become http://xyz.com/abc0101 with trailing data */
|
194 |
-
mysqli_query($dbh, "UPDATE `
|
195 |
-
mysqli_query($dbh, "UPDATE `
|
196 |
-
mysqli_query($dbh, "INSERT INTO `
|
|
|
197 |
//===============================================
|
198 |
//CONFIGURATION FILE UPDATES
|
199 |
//===============================================
|
@@ -225,8 +262,13 @@ DUPX_Log::info("====================================\n");
|
|
225 |
|
226 |
/** CREATE NEW USER LOGIC */
|
227 |
if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
-
$newuser_check = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM `
|
230 |
$newuser_row = mysqli_fetch_row($newuser_check);
|
231 |
$newuser_count = is_null($newuser_row) ? 0 : $newuser_row[0];
|
232 |
|
@@ -235,27 +277,27 @@ if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
|
|
235 |
$newuser_datetime = @date("Y-m-d H:i:s");
|
236 |
$newuser_security = mysqli_real_escape_string($dbh, 'a:1:{s:13:"administrator";s:1:"1";}');
|
237 |
|
238 |
-
$newuser_test1 = @mysqli_query($dbh, "INSERT INTO `
|
239 |
(`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_registered`, `user_activation_key`, `user_status`, `display_name`)
|
240 |
-
VALUES ('{$
|
241 |
|
242 |
$newuser_insert_id = mysqli_insert_id($dbh);
|
243 |
|
244 |
-
$newuser_test2 = @mysqli_query($dbh, "INSERT INTO `
|
245 |
-
(`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', '
|
246 |
|
247 |
-
$newuser_test3 = @mysqli_query($dbh, "INSERT INTO `
|
248 |
-
(`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', '
|
249 |
|
250 |
//Misc Meta-Data Settings:
|
251 |
-
@mysqli_query($dbh, "INSERT INTO `
|
252 |
-
@mysqli_query($dbh, "INSERT INTO `
|
253 |
-
@mysqli_query($dbh, "INSERT INTO `
|
254 |
|
255 |
if ($newuser_test1 && $newuser_test2 && $newuser_test3) {
|
256 |
DUPX_Log::info("NEW WP-ADMIN USER: New username '{$_POST['wp_username']}' was created successfully \n ");
|
257 |
} else {
|
258 |
-
$newuser_warnmsg = "NEW WP-ADMIN USER: Failed to create the user '{$
|
259 |
$JSON['step3']['warnlist'][] = $newuser_warnmsg;
|
260 |
DUPX_Log::info($newuser_warnmsg);
|
261 |
}
|
@@ -280,10 +322,10 @@ $mu_oldUrlPath = parse_url($_POST['url_old'], PHP_URL_PATH);
|
|
280 |
$mu_newUrlPath = (empty($mu_newUrlPath) || ($mu_newUrlPath == '/')) ? '/' : rtrim($mu_newUrlPath, '/') . '/';
|
281 |
$mu_oldUrlPath = (empty($mu_oldUrlPath) || ($mu_oldUrlPath == '/')) ? '/' : rtrim($mu_oldUrlPath, '/') . '/';
|
282 |
|
283 |
-
$mu_updates = @mysqli_query($dbh, "UPDATE `
|
284 |
if ($mu_updates) {
|
285 |
DUPX_Log::info("Update MU table blogs: domain {$mu_newDomainHost} ");
|
286 |
-
DUPX_Log::info("UPDATE `
|
287 |
}
|
288 |
|
289 |
|
@@ -317,7 +359,7 @@ if (! empty($config_found)) {
|
|
317 |
}
|
318 |
|
319 |
//Database:
|
320 |
-
$result = @mysqli_query($dbh, "SELECT option_value FROM `
|
321 |
if ($result) {
|
322 |
while ($row = mysqli_fetch_row($result)) {
|
323 |
if (strlen($row[0])) {
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
// Exit if accessed directly from admin
|
5 |
if (function_exists('duplicator_secure_check')) {
|
6 |
duplicator_secure_check();
|
18 |
$ajax2_start = DUPX_U::getMicrotime();
|
19 |
|
20 |
//POST PARAMS
|
21 |
+
if (isset($_POST['dbhost'])) {
|
22 |
+
$post_db_host = DUPX_U::sanitize_text_field($_POST['dbhost']);
|
23 |
+
$_POST['dbhost'] = trim($post_db_host);
|
24 |
+
} else {
|
25 |
+
$_POST['dbhost'] = null;
|
26 |
+
}
|
27 |
+
|
28 |
+
if (isset($_POST['dbname'])) {
|
29 |
+
$post_db_name = DUPX_U::sanitize_text_field($_POST['dbname']);
|
30 |
+
$_POST['dbname'] = trim($post_db_name);
|
31 |
+
} else {
|
32 |
+
$_POST['dbname'] = null;
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
$_POST['dbuser'] = isset($_POST['dbuser']) ? DUPX_U::sanitize_text_field($_POST['dbuser']) : null;
|
37 |
+
$_POST['dbpass'] = isset($_POST['dbpass']) ? DUPX_U::sanitize_text_field($_POST['dbpass']) : null;
|
38 |
+
|
39 |
+
if (isset($_POST['blogname'])) {
|
40 |
+
$post_blog_name = DUPX_U::sanitize_text_field($_POST['blogname']);
|
41 |
+
$_POST['blogname'] = trim($post_blog_name);
|
42 |
+
} else {
|
43 |
+
$_POST['blogname'] = '';
|
44 |
+
}
|
45 |
+
|
46 |
$_POST['postguid'] = isset($_POST['postguid']) && $_POST['postguid'] == 1 ? 1 : 0;
|
47 |
$_POST['fullsearch'] = isset($_POST['fullsearch']) && $_POST['fullsearch'] == 1 ? 1 : 0;
|
48 |
+
|
49 |
+
if (isset($_POST['path_old'])) {
|
50 |
+
$post_path_old = DUPX_U::sanitize_text_field($_POST['path_old']);
|
51 |
+
$_POST['path_old'] = trim($post_path_old);
|
52 |
+
} else {
|
53 |
+
$_POST['path_old'] = null;
|
54 |
+
}
|
55 |
+
|
56 |
+
if (isset($_POST['path_new'])) {
|
57 |
+
$post_path_new = DUPX_U::sanitize_text_field($_POST['path_new']);
|
58 |
+
$_POST['path_new'] = trim($post_path_new);
|
59 |
+
} else {
|
60 |
+
$_POST['path_new'] = null;
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
$_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '/') : null;
|
65 |
$_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
|
66 |
$_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
|
67 |
$_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
|
68 |
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
69 |
+
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? DUPX_U::sanitize_text_field($_POST['exe_safe_mode']) : 0;
|
70 |
|
71 |
|
72 |
//MYSQL CONNECTION: If inputs are bad then die
|
79 |
}
|
80 |
|
81 |
$charset_server = @mysqli_character_set_name($dbh);
|
82 |
+
@mysqli_query($dbh, "SET wait_timeout = ".mysqli_real_escape_string($dbh, $GLOBALS['DB_MAX_TIME']));
|
83 |
DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
|
84 |
|
85 |
|
132 |
}
|
133 |
$serial_plugin_list = @serialize($plugin_list);
|
134 |
|
135 |
+
mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` SET option_value = '{$blog_name}' WHERE option_name = 'blogname' ");
|
136 |
+
mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` SET option_value = '{$serial_plugin_list}' WHERE option_name = 'active_plugins' ");
|
137 |
|
138 |
$log = "--------------------------------------\n";
|
139 |
$log .= "SERIALIZER ENGINE\n";
|
220 |
|
221 |
//Reset the postguid data
|
222 |
if ($_POST['postguid']) {
|
223 |
+
mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."posts` SET guid = REPLACE(guid, '".mysqli_real_escape_string($dbh, $_POST['url_new'])."', '".mysqli_real_escape_string($dbh, $_POST['url_old'])."')");
|
224 |
$update_guid = @mysqli_affected_rows($dbh) or 0;
|
225 |
DUPX_Log::info("Reverted '{$update_guid}' post guid columns back to '{$_POST['url_old']}'");
|
226 |
}
|
227 |
|
228 |
/** FINAL UPDATES: Must happen after the global replace to prevent double pathing
|
229 |
http://xyz.com/abc01 will become http://xyz.com/abc0101 with trailing data */
|
230 |
+
mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` SET option_value = '".mysqli_real_escape_string($dbh, $_POST['url_new'])."' WHERE option_name = 'home' ");
|
231 |
+
mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` SET option_value = '".mysqli_real_escape_string($dbh, $_POST['siteurl'])."' WHERE option_name = 'siteurl' ");
|
232 |
+
mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` (option_value, option_name) VALUES('".mysqli_real_escape_string($dbh, $_POST['exe_safe_mode'])."','duplicator_exe_safe_mode')");
|
233 |
+
|
234 |
//===============================================
|
235 |
//CONFIGURATION FILE UPDATES
|
236 |
//===============================================
|
262 |
|
263 |
/** CREATE NEW USER LOGIC */
|
264 |
if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
|
265 |
+
$post_wp_username = DUPX_U::sanitize_text_field($_POST['wp_username']);
|
266 |
+
$post_wp_password = DUPX_U::sanitize_text_field($_POST['wp_password']);
|
267 |
+
|
268 |
+
$post_wp_username = mysqli_real_escape_string($dbh, $post_wp_username);
|
269 |
+
$post_wp_password = mysqli_real_escape_string($dbh, $post_wp_password);
|
270 |
|
271 |
+
$newuser_check = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."users` WHERE user_login = '{$post_wp_username}' ");
|
272 |
$newuser_row = mysqli_fetch_row($newuser_check);
|
273 |
$newuser_count = is_null($newuser_row) ? 0 : $newuser_row[0];
|
274 |
|
277 |
$newuser_datetime = @date("Y-m-d H:i:s");
|
278 |
$newuser_security = mysqli_real_escape_string($dbh, 'a:1:{s:13:"administrator";s:1:"1";}');
|
279 |
|
280 |
+
$newuser_test1 = @mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."users`
|
281 |
(`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_registered`, `user_activation_key`, `user_status`, `display_name`)
|
282 |
+
VALUES ('{$post_wp_username}', MD5('{$post_wp_password}'), '{$post_wp_username}', '', '{$newuser_datetime}', '', '0', '{$post_wp_username}')");
|
283 |
|
284 |
$newuser_insert_id = mysqli_insert_id($dbh);
|
285 |
|
286 |
+
$newuser_test2 = @mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."usermeta`
|
287 |
+
(`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', '".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."capabilities', '{$newuser_security}')");
|
288 |
|
289 |
+
$newuser_test3 = @mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."usermeta`
|
290 |
+
(`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', '".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."user_level', '10')");
|
291 |
|
292 |
//Misc Meta-Data Settings:
|
293 |
+
@mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', 'rich_editing', 'true')");
|
294 |
+
@mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', 'admin_color', 'fresh')");
|
295 |
+
@mysqli_query($dbh, "INSERT INTO `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES ('{$newuser_insert_id}', 'nickname', '{$post_wp_username}')");
|
296 |
|
297 |
if ($newuser_test1 && $newuser_test2 && $newuser_test3) {
|
298 |
DUPX_Log::info("NEW WP-ADMIN USER: New username '{$_POST['wp_username']}' was created successfully \n ");
|
299 |
} else {
|
300 |
+
$newuser_warnmsg = "NEW WP-ADMIN USER: Failed to create the user '{".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."}' \n ";
|
301 |
$JSON['step3']['warnlist'][] = $newuser_warnmsg;
|
302 |
DUPX_Log::info($newuser_warnmsg);
|
303 |
}
|
322 |
$mu_newUrlPath = (empty($mu_newUrlPath) || ($mu_newUrlPath == '/')) ? '/' : rtrim($mu_newUrlPath, '/') . '/';
|
323 |
$mu_oldUrlPath = (empty($mu_oldUrlPath) || ($mu_oldUrlPath == '/')) ? '/' : rtrim($mu_oldUrlPath, '/') . '/';
|
324 |
|
325 |
+
$mu_updates = @mysqli_query($dbh, "UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."blogs` SET domain = '".mysqli_real_escape_string($dbh, $mu_newDomainHost)."' WHERE domain = '".mysqli_real_escape_string($dbh, $mu_oldDomainHost)."'");
|
326 |
if ($mu_updates) {
|
327 |
DUPX_Log::info("Update MU table blogs: domain {$mu_newDomainHost} ");
|
328 |
+
DUPX_Log::info("UPDATE `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."blogs` SET domain = '".mysqli_real_escape_string($dbh, $mu_newDomainHost)."' WHERE domain = '".mysqli_real_escape_string($dbh, $mu_oldDomainHost)."'");
|
329 |
}
|
330 |
|
331 |
|
359 |
}
|
360 |
|
361 |
//Database:
|
362 |
+
$result = @mysqli_query($dbh, "SELECT option_value FROM `".mysqli_real_escape_string($dbh, $GLOBALS['FW_TABLEPREFIX'])."options` WHERE option_name IN ('upload_url_path','upload_path')");
|
363 |
if ($result) {
|
364 |
while ($row = mysqli_fetch_row($result)) {
|
365 |
if (strlen($row[0])) {
|
installer/build/main.installer.php
CHANGED
@@ -17,6 +17,9 @@
|
|
17 |
GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html
|
18 |
*/
|
19 |
|
|
|
|
|
|
|
20 |
if (file_exists('dtoken.php')) {
|
21 |
//This is most likely inside the snapshot folder.
|
22 |
|
@@ -145,12 +148,13 @@ define("DUPLICATOR_INIT", 1);
|
|
145 |
define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots'); //This should match DUPLICATOR_SSDIR_NAME in duplicator.php
|
146 |
|
147 |
//SHARED POST PARMS
|
148 |
-
$_POST['action_step'] = isset($_POST['action_step']) ? $_POST['action_step'] : "0";
|
149 |
-
$_POST['secure-pass'] = isset($_POST['secure-pass']) ? $_POST['secure-pass'] : '';
|
150 |
|
151 |
if ($GLOBALS['FW_SECUREON']) {
|
152 |
$pass_hasher = new DUPX_PasswordHash(8, FALSE);
|
153 |
-
$
|
|
|
154 |
if (! $pass_check) {
|
155 |
$_POST['action_step'] = 0;
|
156 |
}
|
@@ -158,19 +162,56 @@ if ($GLOBALS['FW_SECUREON']) {
|
|
158 |
|
159 |
/** Host has several combinations :
|
160 |
localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
|
161 |
-
|
162 |
-
$
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
//GLOBALS
|
170 |
// Constants which are dependent on the $GLOBALS['DUPX_AC']
|
171 |
$GLOBALS['SQL_FILE_NAME'] = "dup-installer-data__{$GLOBALS['PACKAGE_HASH']}.sql";
|
172 |
$GLOBALS['LOG_FILE_NAME'] = "dup-installer-log__{$GLOBALS['PACKAGE_HASH']}.txt";
|
173 |
-
$GLOBALS['LOGGING'] = isset($_POST['logging']) ? $_POST['logging'] : 1;
|
174 |
$GLOBALS['CURRENT_ROOT_PATH'] = dirname(__FILE__);
|
175 |
$GLOBALS['CHOWN_ROOT_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}", 0755);
|
176 |
$GLOBALS['CHOWN_LOG_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}/{$GLOBALS['LOG_FILE_NAME']}", 0644);
|
@@ -180,6 +221,13 @@ $GLOBALS['PHP_MEMORY_LIMIT'] = ini_get('memory_limit') === false ? 'n/a' : in
|
|
180 |
$GLOBALS['PHP_SUHOSIN_ON'] = extension_loaded('suhosin') ? 'enabled' : 'disabled';
|
181 |
$GLOBALS['ARCHIVE_PATH'] = $GLOBALS['CURRENT_ROOT_PATH'] . '/' . $GLOBALS['FW_PACKAGE_NAME'];
|
182 |
$GLOBALS['ARCHIVE_PATH'] = str_replace("\\", "/", $GLOBALS['ARCHIVE_PATH']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
//Restart log if user starts from step 1
|
185 |
if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
|
@@ -189,6 +237,7 @@ if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
|
|
189 |
}
|
190 |
?>
|
191 |
@@CLASS.U.PHP@@
|
|
|
192 |
@@CLASS.SERVER.PHP@@
|
193 |
@@CLASS.DB.PHP@@
|
194 |
@@CLASS.LOGGING.PHP@@
|
@@ -198,6 +247,22 @@ if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
|
|
198 |
@@CLASS.HTTP.PHP@@
|
199 |
@@CLASS.PASSWORD.PHP@@
|
200 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
if (isset($_POST['action_ajax'])) :
|
202 |
|
203 |
if ($GLOBALS['FW_SECUREON']) {
|
@@ -255,7 +320,7 @@ HEADER TEMPLATE: Common header on all steps -->
|
|
255 |
</div>
|
256 |
</td>
|
257 |
<td class="dupx-header-version">
|
258 |
-
<a href="javascript:void(0)" onclick="DUPX.showServerInfo()">version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?></a><br/>
|
259 |
<a href="?help=1" target="_blank">help</a>
|
260 |
<?php
|
261 |
echo ' » <a href="?help=1#secure" target="_blank">';
|
@@ -316,23 +381,23 @@ switch ($_POST['action_step']) {
|
|
316 |
$ini_memory = ini_get('memory_limit');
|
317 |
?>
|
318 |
<div class="hdr">Current Server</div>
|
319 |
-
<label>Web Server:</label> <?php echo $_SERVER['SERVER_SOFTWARE']; ?><br/>
|
320 |
-
<label>Operating System:</label> <?php echo PHP_OS ?><br/>
|
321 |
-
<label>PHP Version:</label> <?php echo DUPX_Server::$php_version; ?><br/>
|
322 |
<label>PHP INI Path:</label> <?php echo empty($ini_path ) ? 'Unable to detect loaded php.ini file' : $ini_path; ?> <br/>
|
323 |
-
<label>PHP SAPI:</label> <?php echo php_sapi_name(); ?><br/>
|
324 |
<label>PHP ZIP Archive:</label> <?php echo class_exists('ZipArchive') ? 'Is Installed' : 'Not Installed'; ?> <br/>
|
325 |
-
<label>PHP max_execution_time:</label> <?php echo $ini_max_time === false ? 'unable to find' : $ini_max_time; ?><br/>
|
326 |
-
<label>PHP memory_limit:</label> <?php echo empty($ini_memory) ? 'unable to find' : $ini_memory; ?><br/>
|
327 |
|
328 |
<br/>
|
329 |
<div class="hdr">Package Server</div>
|
330 |
<div class="info-txt">The server where the package was created</div>
|
331 |
-
<label>Plugin Version:</label> <?php echo $GLOBALS['FW_VERSION_DUP'] ?><br/>
|
332 |
-
<label>WordPress Version:</label> <?php echo $GLOBALS['FW_VERSION_WP'] ?><br/>
|
333 |
-
<label>PHP Version:</label> <?php echo $GLOBALS['FW_VERSION_PHP'] ?><br/>
|
334 |
-
<label>Database Version:</label> <?php echo $GLOBALS['FW_VERSION_DB'] ?><br/>
|
335 |
-
<label>Operating System:</label> <?php echo $GLOBALS['FW_VERSION_OS'] ?><br/>
|
336 |
<br/><br/>
|
337 |
</div>
|
338 |
</div>
|
17 |
GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html
|
18 |
*/
|
19 |
|
20 |
+
if ( !defined('DUPXABSPATH') )
|
21 |
+
define('DUPXABSPATH', dirname(__FILE__) . '/');
|
22 |
+
|
23 |
if (file_exists('dtoken.php')) {
|
24 |
//This is most likely inside the snapshot folder.
|
25 |
|
148 |
define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots'); //This should match DUPLICATOR_SSDIR_NAME in duplicator.php
|
149 |
|
150 |
//SHARED POST PARMS
|
151 |
+
$_POST['action_step'] = isset($_POST['action_step']) ? DUPX_U::sanitize_text_field($_POST['action_step']) : "0";
|
152 |
+
$_POST['secure-pass'] = isset($_POST['secure-pass']) ? DUPX_U::sanitize_text_field($_POST['secure-pass']) : '';
|
153 |
|
154 |
if ($GLOBALS['FW_SECUREON']) {
|
155 |
$pass_hasher = new DUPX_PasswordHash(8, FALSE);
|
156 |
+
$post_secure_pass = DUPX_U::sanitize_text_field($_POST['secure-pass']);
|
157 |
+
$pass_check = $pass_hasher->CheckPassword(base64_encode($post_secure_pass), $GLOBALS['FW_SECUREPASS']);
|
158 |
if (! $pass_check) {
|
159 |
$_POST['action_step'] = 0;
|
160 |
}
|
162 |
|
163 |
/** Host has several combinations :
|
164 |
localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
|
165 |
+
if (isset($_POST['dbhost'])) {
|
166 |
+
$post_db_host = DUPX_U::sanitize_text_field($_POST['dbhost']);
|
167 |
+
$_POST['dbhost'] = DUPX_U::sanitize_text_field($post_db_host);
|
168 |
+
} else {
|
169 |
+
$_POST['dbhost'] = null;
|
170 |
+
}
|
171 |
+
|
172 |
+
if (isset($_POST['dbport'])) {
|
173 |
+
$post_db_port = DUPX_U::sanitize_text_field($_POST['dbport']);
|
174 |
+
$_POST['dbport'] = trim($post_db_port);
|
175 |
+
} else {
|
176 |
+
$_POST['dbport'] = 3306;
|
177 |
+
}
|
178 |
+
|
179 |
+
$_POST['dbuser'] = isset($_POST['dbuser']) ? DUPX_U::sanitize_text_field($_POST['dbuser']) : null;
|
180 |
+
|
181 |
+
if (isset($_POST['dbpass'])) {
|
182 |
+
$post_db_pass = DUPX_U::sanitize_text_field($_POST['dbpass']);
|
183 |
+
$_POST['dbpass'] = trim($post_db_pass);
|
184 |
+
} else {
|
185 |
+
$_POST['dbpass'] = null;
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
if (isset($_POST['dbname'])) {
|
190 |
+
$post_db_name = DUPX_U::sanitize_text_field($_POST['dbname']);
|
191 |
+
$_POST['dbname'] = trim($post_db_name);
|
192 |
+
} else {
|
193 |
+
$_POST['dbname'] = null;
|
194 |
+
}
|
195 |
+
|
196 |
+
if (isset($_POST['dbcharset'])) {
|
197 |
+
$post_db_charset = DUPX_U::sanitize_text_field($_POST['dbcharset']);
|
198 |
+
$_POST['dbcharset'] = trim($post_db_charset);
|
199 |
+
} else {
|
200 |
+
$_POST['dbcharset'] = $GLOBALS['DBCHARSET_DEFAULT'];
|
201 |
+
}
|
202 |
+
|
203 |
+
if (isset($_POST['dbcollate'])) {
|
204 |
+
$post_db_collate = DUPX_U::sanitize_text_field($_POST['dbcollate']);
|
205 |
+
$_POST['dbcollate'] = trim($post_db_collate);
|
206 |
+
} else {
|
207 |
+
$_POST['dbcollate'] = $GLOBALS['DBCOLLATE_DEFAULT'];
|
208 |
+
}
|
209 |
|
210 |
//GLOBALS
|
211 |
// Constants which are dependent on the $GLOBALS['DUPX_AC']
|
212 |
$GLOBALS['SQL_FILE_NAME'] = "dup-installer-data__{$GLOBALS['PACKAGE_HASH']}.sql";
|
213 |
$GLOBALS['LOG_FILE_NAME'] = "dup-installer-log__{$GLOBALS['PACKAGE_HASH']}.txt";
|
214 |
+
$GLOBALS['LOGGING'] = isset($_POST['logging']) ? DUPX_U::sanitize_text_field($_POST['logging']) : 1;
|
215 |
$GLOBALS['CURRENT_ROOT_PATH'] = dirname(__FILE__);
|
216 |
$GLOBALS['CHOWN_ROOT_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}", 0755);
|
217 |
$GLOBALS['CHOWN_LOG_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}/{$GLOBALS['LOG_FILE_NAME']}", 0644);
|
221 |
$GLOBALS['PHP_SUHOSIN_ON'] = extension_loaded('suhosin') ? 'enabled' : 'disabled';
|
222 |
$GLOBALS['ARCHIVE_PATH'] = $GLOBALS['CURRENT_ROOT_PATH'] . '/' . $GLOBALS['FW_PACKAGE_NAME'];
|
223 |
$GLOBALS['ARCHIVE_PATH'] = str_replace("\\", "/", $GLOBALS['ARCHIVE_PATH']);
|
224 |
+
if (isset($_GET["view"])) {
|
225 |
+
$GLOBALS["VIEW"] = $_GET["view"];
|
226 |
+
} elseif (!empty($_POST["view"])) {
|
227 |
+
$GLOBALS["VIEW"] = $_POST["view"];
|
228 |
+
} else {
|
229 |
+
$GLOBALS["VIEW"] = 'step1';
|
230 |
+
}
|
231 |
|
232 |
//Restart log if user starts from step 1
|
233 |
if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
|
237 |
}
|
238 |
?>
|
239 |
@@CLASS.U.PHP@@
|
240 |
+
@@CLASS.CSRF.PHP@@
|
241 |
@@CLASS.SERVER.PHP@@
|
242 |
@@CLASS.DB.PHP@@
|
243 |
@@CLASS.LOGGING.PHP@@
|
247 |
@@CLASS.HTTP.PHP@@
|
248 |
@@CLASS.PASSWORD.PHP@@
|
249 |
<?php
|
250 |
+
// CSRF checking
|
251 |
+
if (!empty($GLOBAL['view'])) {
|
252 |
+
$csrf_views = array(
|
253 |
+
'secure',
|
254 |
+
'step1',
|
255 |
+
'step2',
|
256 |
+
'step3',
|
257 |
+
'step4',
|
258 |
+
);
|
259 |
+
if (in_array($GLOBAL['view'], $csrf_views)) {
|
260 |
+
if (!DUPX_CSRF::check($_POST['csrf_token'], $GLOBAL['view'])) {
|
261 |
+
die('CSRF security issue for the view: '.$GLOBAL['view']);
|
262 |
+
}
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
if (isset($_POST['action_ajax'])) :
|
267 |
|
268 |
if ($GLOBALS['FW_SECUREON']) {
|
320 |
</div>
|
321 |
</td>
|
322 |
<td class="dupx-header-version">
|
323 |
+
<a href="javascript:void(0)" onclick="DUPX.showServerInfo()">version: <?php echo DUPX_U::esc_html($GLOBALS['FW_DUPLICATOR_VERSION']); ?></a><br/>
|
324 |
<a href="?help=1" target="_blank">help</a>
|
325 |
<?php
|
326 |
echo ' » <a href="?help=1#secure" target="_blank">';
|
381 |
$ini_memory = ini_get('memory_limit');
|
382 |
?>
|
383 |
<div class="hdr">Current Server</div>
|
384 |
+
<label>Web Server:</label> <?php echo DUPX_U::esc_html($_SERVER['SERVER_SOFTWARE']); ?><br/>
|
385 |
+
<label>Operating System:</label> <?php echo DUPX_U::esc_html(PHP_OS); ?><br/>
|
386 |
+
<label>PHP Version:</label> <?php echo DUPX_U::esc_html(DUPX_Server::$php_version); ?><br/>
|
387 |
<label>PHP INI Path:</label> <?php echo empty($ini_path ) ? 'Unable to detect loaded php.ini file' : $ini_path; ?> <br/>
|
388 |
+
<label>PHP SAPI:</label> <?php echo DUPX_U::esc_html(php_sapi_name()); ?><br/>
|
389 |
<label>PHP ZIP Archive:</label> <?php echo class_exists('ZipArchive') ? 'Is Installed' : 'Not Installed'; ?> <br/>
|
390 |
+
<label>PHP max_execution_time:</label> <?php echo $ini_max_time === false ? 'unable to find' : DUPX_U::esc_html($ini_max_time); ?><br/>
|
391 |
+
<label>PHP memory_limit:</label> <?php echo empty($ini_memory) ? 'unable to find' : DUPX_U::esc_html($ini_memory); ?><br/>
|
392 |
|
393 |
<br/>
|
394 |
<div class="hdr">Package Server</div>
|
395 |
<div class="info-txt">The server where the package was created</div>
|
396 |
+
<label>Plugin Version:</label> <?php echo DUPX_U::esc_html($GLOBALS['FW_VERSION_DUP']); ?><br/>
|
397 |
+
<label>WordPress Version:</label> <?php echo DUPX_U::esc_html($GLOBALS['FW_VERSION_WP']); ?><br/>
|
398 |
+
<label>PHP Version:</label> <?php echo DUPX_U::esc_html($GLOBALS['FW_VERSION_PHP']); ?><br/>
|
399 |
+
<label>Database Version:</label> <?php echo DUPX_U::esc_html($GLOBALS['FW_VERSION_DB']); ?><br/>
|
400 |
+
<label>Operating System:</label> <?php echo DUPX_U::esc_html($GLOBALS['FW_VERSION_OS']); ?><br/>
|
401 |
<br/><br/>
|
402 |
</div>
|
403 |
</div>
|
installer/build/view.help.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
//The help for both pro and lite are shared. Pro is where the master lives. Use the flag below to
|
3 |
//indicate if this help lives in lite or pro
|
4 |
$pro_version = false;
|
@@ -311,7 +313,7 @@ STEP 2
|
|
311 |
<br/><br/>
|
312 |
|
313 |
<b>Connect and Backup Any Existing Data:</b><sup>pro</sup> This options will RENAME all tables in the database you are connecting to with a prefix of
|
314 |
-
"<?php echo $GLOBALS['DB_RENAME_PREFIX'] ?>".
|
315 |
<br/><br/>
|
316 |
|
317 |
<b>Manual SQL Execution:</b><sup>pro</sup> This options requires that you manually run your own SQL import to an existing database before running the installer.
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
//The help for both pro and lite are shared. Pro is where the master lives. Use the flag below to
|
5 |
//indicate if this help lives in lite or pro
|
6 |
$pro_version = false;
|
313 |
<br/><br/>
|
314 |
|
315 |
<b>Connect and Backup Any Existing Data:</b><sup>pro</sup> This options will RENAME all tables in the database you are connecting to with a prefix of
|
316 |
+
"<?php echo DUPX_U::esc_html($GLOBALS['DB_RENAME_PREFIX']); ?>".
|
317 |
<br/><br/>
|
318 |
|
319 |
<b>Manual SQL Execution:</b><sup>pro</sup> This options requires that you manually run your own SQL import to an existing database before running the installer.
|
installer/build/view.init1.php
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
<?php
|
|
|
2 |
/** IDE HELPERS */
|
3 |
/* @var $GLOBALS['DUPX_AC'] DUPX_ArchiveConfig */
|
4 |
|
5 |
-
$_POST['secure-pass'] = isset($_POST['secure-pass']) ? $_POST['secure-pass'] : '' ;
|
6 |
$_POST['secure-try'] = isset($_POST['secure-try']) ? 1 : 0 ;
|
7 |
-
$_GET['debug'] = isset($_GET['debug']) ? $_GET['debug'] : 0;
|
8 |
$page_url = DUPX_HTTP::get_request_uri();
|
9 |
$page_err = 0;
|
10 |
$pass_hasher = new DUPX_PasswordHash(8, FALSE);
|
@@ -12,7 +13,7 @@ $pass_check = $pass_hasher->CheckPassword(base64_encode($_POST['secure-pass']),
|
|
12 |
|
13 |
//FORWARD: password not enabled
|
14 |
if (! $GLOBALS['FW_SECUREON'] && ! $_GET['debug']) {
|
15 |
-
DUPX_HTTP::post_with_html($page_url, array('action_step' => '1'));
|
16 |
exit;
|
17 |
}
|
18 |
|
@@ -21,6 +22,7 @@ if ($pass_check) {
|
|
21 |
DUPX_HTTP::post_with_html($page_url,
|
22 |
array(
|
23 |
'action_step' => '1',
|
|
|
24 |
'secure-pass' => $_POST['secure-pass']));
|
25 |
exit;
|
26 |
}
|
@@ -35,6 +37,7 @@ if ($_POST['secure-try'] && ! $pass_check) {
|
|
35 |
VIEW: STEP 0 - PASSWORD -->
|
36 |
<form method="post" id="i1-pass-form" class="content-form" data-parsley-validate="" autocomplete="oldpassword">
|
37 |
<input type="hidden" name="view" value="secure" />
|
|
|
38 |
<input type="hidden" name="secure-try" value="1" />
|
39 |
|
40 |
<div class="hdr-main">
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
/** IDE HELPERS */
|
4 |
/* @var $GLOBALS['DUPX_AC'] DUPX_ArchiveConfig */
|
5 |
|
6 |
+
$_POST['secure-pass'] = isset($_POST['secure-pass']) ? DUPX_U::sanitize_text_field($_POST['secure-pass']) : '' ;
|
7 |
$_POST['secure-try'] = isset($_POST['secure-try']) ? 1 : 0 ;
|
8 |
+
$_GET['debug'] = isset($_GET['debug']) ? DUPX_U::sanitize_text_field($_GET['debug']) : 0;
|
9 |
$page_url = DUPX_HTTP::get_request_uri();
|
10 |
$page_err = 0;
|
11 |
$pass_hasher = new DUPX_PasswordHash(8, FALSE);
|
13 |
|
14 |
//FORWARD: password not enabled
|
15 |
if (! $GLOBALS['FW_SECUREON'] && ! $_GET['debug']) {
|
16 |
+
DUPX_HTTP::post_with_html($page_url, array('action_step' => '1', 'csrf_token' => DUPX_CSRF::generate('step1')));
|
17 |
exit;
|
18 |
}
|
19 |
|
22 |
DUPX_HTTP::post_with_html($page_url,
|
23 |
array(
|
24 |
'action_step' => '1',
|
25 |
+
'csrf_token' => DUPX_CSRF::generate('step1'),
|
26 |
'secure-pass' => $_POST['secure-pass']));
|
27 |
exit;
|
28 |
}
|
37 |
VIEW: STEP 0 - PASSWORD -->
|
38 |
<form method="post" id="i1-pass-form" class="content-form" data-parsley-validate="" autocomplete="oldpassword">
|
39 |
<input type="hidden" name="view" value="secure" />
|
40 |
+
<input type="hidden" name="csrf_token" value="<?php echo DUPX_CSRF::generate('secure'); ?>">
|
41 |
<input type="hidden" name="secure-try" value="1" />
|
42 |
|
43 |
<div class="hdr-main">
|
installer/build/view.step1.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
//VIEW: STEP 1- INPUT
|
3 |
|
4 |
//ARCHIVE FILE
|
@@ -100,7 +101,7 @@ $actualSize = DUPX_U::readableByteSize($arcSize);
|
|
100 |
<form id='s1-input-form' method="post" class="content-form" >
|
101 |
<input type="hidden" name="action_ajax" value="1" />
|
102 |
<input type="hidden" name="action_step" value="1" />
|
103 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
104 |
|
105 |
<div class="hdr-main">
|
106 |
Step <span class="step">1</span> of 4: Deployment
|
@@ -125,11 +126,11 @@ ARCHIVE
|
|
125 |
</tr>
|
126 |
<tr>
|
127 |
<td>Site:</td>
|
128 |
-
<td><?php echo $GLOBALS['FW_BLOGNAME'];?> </td>
|
129 |
</tr>
|
130 |
<tr>
|
131 |
<td>Notes:</td>
|
132 |
-
<td><?php echo strlen($GLOBALS['FW_PACKAGE_NOTES']) ?
|
133 |
</tr>
|
134 |
<?php if ($GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
135 |
<tr>
|
@@ -197,8 +198,8 @@ ARCHIVE
|
|
197 |
<?php else : ?>
|
198 |
<div class="s1-archive-failed-msg">
|
199 |
<b class='dupx-fail'>Archive File Size Incorrect!</b><br/>
|
200 |
-
The archive is showing a size that is currently as <b><?php echo $actualSize; ?></b>. Its estimated file size should be around
|
201 |
-
<b><?php echo $projectedSize; ?></b>. The archive file may not have been fully downloaded to the server. If so please wait for the file
|
202 |
to completely download and then refresh this page.<br/><br/>
|
203 |
|
204 |
This warning is only shown when the file has more than a 10% size ratio difference from when it was originally built. Please review the file sizes
|
@@ -268,7 +269,10 @@ VALIDATION
|
|
268 |
</div>
|
269 |
|
270 |
<!-- REQ 1 -->
|
271 |
-
|
|
|
|
|
|
|
272 |
<div class="title" data-type="toggle" data-target="#s1-reqs01">+ Permissions</div>
|
273 |
<div class="info" id="s1-reqs01">
|
274 |
<table>
|
@@ -294,17 +298,20 @@ VALIDATION
|
|
294 |
</div>
|
295 |
|
296 |
<!-- REQ 2
|
297 |
-
<div class="status <?php echo strtolower($req['02']); ?>"><?php echo $req['02']; ?></div>
|
298 |
<div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
|
299 |
<div class="info" id="s1-reqs02"></div>-->
|
300 |
|
301 |
<!-- REQ 3
|
302 |
-
<div class="status <?php echo strtolower($req['03']); ?>"><?php echo $req['03']; ?></div>
|
303 |
<div class="title" data-type="toggle" data-target="#s1-reqs03">+ Place Holder</div>
|
304 |
<div class="info" id="s1-reqs03"></div> -->
|
305 |
|
306 |
<!-- REQ 4 -->
|
307 |
-
|
|
|
|
|
|
|
308 |
<div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP Mysqli</div>
|
309 |
<div class="info" id="s1-reqs04">
|
310 |
Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
|
@@ -313,7 +320,10 @@ VALIDATION
|
|
313 |
</div>
|
314 |
|
315 |
<!-- REQ 5 -->
|
316 |
-
|
|
|
|
|
|
|
317 |
<div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Min Version</div>
|
318 |
<div class="info" id="s1-reqs05">
|
319 |
This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
|
@@ -336,7 +346,7 @@ VALIDATION
|
|
336 |
<?php if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
337 |
|
338 |
<!-- NOTICE 1 -->
|
339 |
-
<div class="status <?php echo ($notice['01'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['01']; ?></div>
|
340 |
<div class="title" data-type="toggle" data-target="#s1-notice01">+ Configuration File</div>
|
341 |
<div class="info" id="s1-notice01">
|
342 |
Duplicator works best by placing the installer and archive files into an empty directory. If a wp-config.php file is found in the extraction
|
@@ -350,10 +360,10 @@ VALIDATION
|
|
350 |
</div>
|
351 |
|
352 |
<!-- NOTICE 2 -->
|
353 |
-
<div class="status <?php echo ($notice['02'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['02']; ?></div>
|
354 |
<div class="title" data-type="toggle" data-target="#s1-notice02">+ Directory Setup</div>
|
355 |
<div class="info" id="s1-notice02">
|
356 |
-
<b>Deployment Path:</b> <i><?php echo
|
357 |
<br/><br/>
|
358 |
There are currently <?php echo "<b>[{$scancount}]</b>";?> items in the deployment path. These items will be overwritten if they also exist
|
359 |
inside the archive file. The notice is to prevent overwriting an existing site or trying to install on-top of one which
|
@@ -371,7 +381,7 @@ VALIDATION
|
|
371 |
<?php endif; ?>
|
372 |
|
373 |
<!-- NOTICE 3 -->
|
374 |
-
<div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['03']; ?></div>
|
375 |
<div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
|
376 |
<div class="info" id="s1-notice03">
|
377 |
<?php echo "The package is {$fulldays} day(s) old. Packages older than 120 days might be considered stale. If you are comfortable with a package that that was created over "
|
@@ -379,13 +389,13 @@ VALIDATION
|
|
379 |
</div>
|
380 |
|
381 |
<!-- NOTICE 4
|
382 |
-
<div class="status <?php echo ($notice['04'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['04']; ?></div>
|
383 |
<div class="title" data-type="toggle" data-target="#s1-notice04">+ Placeholder</div>
|
384 |
<div class="info" id="s1-notice04">
|
385 |
</div>-->
|
386 |
|
387 |
<!-- NOTICE 5 -->
|
388 |
-
<div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['05']; ?></div>
|
389 |
<div class="title" data-type="toggle" data-target="#s1-notice05">+ PHP Version 5.2</div>
|
390 |
<div class="info" id="s1-notice05">
|
391 |
<?php
|
@@ -403,7 +413,7 @@ VALIDATION
|
|
403 |
</div>
|
404 |
|
405 |
<!-- NOTICE 6 -->
|
406 |
-
<div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['06']; ?></div>
|
407 |
<div class="title" data-type="toggle" data-target="#s1-notice06">+ PHP Open Base</div>
|
408 |
<div class="info" id="s1-notice06">
|
409 |
<b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
|
@@ -423,7 +433,7 @@ VALIDATION
|
|
423 |
</div>
|
424 |
|
425 |
<!-- NOTICE 7 -->
|
426 |
-
<div class="status <?php echo ($notice['07'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['07']; ?></div>
|
427 |
<div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
|
428 |
<div class="info" id="s1-notice07">
|
429 |
<b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
|
@@ -618,7 +628,7 @@ NOTICES
|
|
618 |
<br/><br/><br/>
|
619 |
<br/><br/><br/>
|
620 |
<div class="dupx-footer-buttons">
|
621 |
-
<button id="s1-deploy-btn" type="button" class="default-btn" onclick="DUPX.runExtraction()" title="<?php echo $agree_msg; ?>"> Next </button>
|
622 |
</div>
|
623 |
<?php endif; ?>
|
624 |
|
@@ -632,7 +642,7 @@ Auto Posts to view.step2.php
|
|
632 |
========================================= -->
|
633 |
<form id='s1-result-form' method="post" class="content-form" style="display:none">
|
634 |
|
635 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>" target="install_log">dup-installer-log.txt</a></div>
|
636 |
<div class="hdr-main">
|
637 |
Step <span class="step">1</span> of 4: Deployment
|
638 |
</div>
|
@@ -640,7 +650,7 @@ Auto Posts to view.step2.php
|
|
640 |
<!-- POST PARAMS -->
|
641 |
<div class="dupx-debug">
|
642 |
<input type="hidden" name="action_step" value="2" />
|
643 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
644 |
<input type="hidden" name="logging" id="ajax-logging" />
|
645 |
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="0" />
|
646 |
<input type="hidden" name="retain_config" id="ajax-retain-config" />
|
@@ -662,7 +672,7 @@ Auto Posts to view.step2.php
|
|
662 |
<div id="ajaxerr-area" style="display:none">
|
663 |
<p>Please try again an issue has occurred.</p>
|
664 |
<div style="padding: 0px 10px 10px 0px;">
|
665 |
-
<div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the <?php echo $GLOBALS["LOG_FILE_NAME"];?> file for more details.</div>
|
666 |
<div style="text-align:center; margin:10px auto 0px auto">
|
667 |
<input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="« Try Again" /><br/><br/>
|
668 |
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxerr_ticket' target='_blank'>snapcreek.com</a></i>
|
@@ -722,7 +732,7 @@ Auto Posts to view.step2.php
|
|
722 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
723 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
724 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
725 |
-
status += "- Check the <a href='<?php echo $GLOBALS["LOG_FILE_NAME"];?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
726 |
status += "- Check the web server and PHP error logs. <br/>";
|
727 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxextract_tofaq#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
728 |
$('#ajaxerr-data').html(status);
|
@@ -740,7 +750,7 @@ Auto Posts to view.step2.php
|
|
740 |
$("#s1-deploy-btn").removeAttr("title");
|
741 |
} else {
|
742 |
$("#s1-deploy-btn").attr("disabled", "true");
|
743 |
-
$("#s1-deploy-btn").attr("title", "<?php echo $agree_msg; ?>");
|
744 |
}
|
745 |
}
|
746 |
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
//VIEW: STEP 1- INPUT
|
4 |
|
5 |
//ARCHIVE FILE
|
101 |
<form id='s1-input-form' method="post" class="content-form" >
|
102 |
<input type="hidden" name="action_ajax" value="1" />
|
103 |
<input type="hidden" name="action_step" value="1" />
|
104 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
105 |
|
106 |
<div class="hdr-main">
|
107 |
Step <span class="step">1</span> of 4: Deployment
|
126 |
</tr>
|
127 |
<tr>
|
128 |
<td>Site:</td>
|
129 |
+
<td><?php echo DUPX_U::esc_html($GLOBALS['FW_BLOGNAME']);?> </td>
|
130 |
</tr>
|
131 |
<tr>
|
132 |
<td>Notes:</td>
|
133 |
+
<td><?php echo strlen($GLOBALS['FW_PACKAGE_NOTES']) ? DUPX_U::esc_html($GLOBALS['FW_PACKAGE_NOTES']) : " - no notes - ";?></td>
|
134 |
</tr>
|
135 |
<?php if ($GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
136 |
<tr>
|
198 |
<?php else : ?>
|
199 |
<div class="s1-archive-failed-msg">
|
200 |
<b class='dupx-fail'>Archive File Size Incorrect!</b><br/>
|
201 |
+
The archive is showing a size that is currently as <b><?php echo DUPX_U::esc_html($actualSize); ?></b>. Its estimated file size should be around
|
202 |
+
<b><?php echo DUPX_U::esc_html($projectedSize); ?></b>. The archive file may not have been fully downloaded to the server. If so please wait for the file
|
203 |
to completely download and then refresh this page.<br/><br/>
|
204 |
|
205 |
This warning is only shown when the file has more than a 10% size ratio difference from when it was originally built. Please review the file sizes
|
269 |
</div>
|
270 |
|
271 |
<!-- REQ 1 -->
|
272 |
+
<?php
|
273 |
+
$status_1 = strtolower($req['01']);
|
274 |
+
?>
|
275 |
+
<div class="status <?php echo DUPX_U::esc_html($status_1); ?>"><?php echo DUPX_U::esc_html($req['01']); ?></div>
|
276 |
<div class="title" data-type="toggle" data-target="#s1-reqs01">+ Permissions</div>
|
277 |
<div class="info" id="s1-reqs01">
|
278 |
<table>
|
298 |
</div>
|
299 |
|
300 |
<!-- REQ 2
|
301 |
+
<div class="status <?php echo strtolower($req['02']); ?>"><?php echo DUPX_U::esc_html($req['02']); ?></div>
|
302 |
<div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
|
303 |
<div class="info" id="s1-reqs02"></div>-->
|
304 |
|
305 |
<!-- REQ 3
|
306 |
+
<div class="status <?php echo strtolower($req['03']); ?>"><?php echo DUPX_U::esc_html($req['03']); ?></div>
|
307 |
<div class="title" data-type="toggle" data-target="#s1-reqs03">+ Place Holder</div>
|
308 |
<div class="info" id="s1-reqs03"></div> -->
|
309 |
|
310 |
<!-- REQ 4 -->
|
311 |
+
<?php
|
312 |
+
$status_4 = strtolower($req['04']);
|
313 |
+
?>
|
314 |
+
<div class="status <?php echo DUPX_U::esc_html($status_4); ?>"><?php echo DUPX_U::esc_html($req['04']); ?></div>
|
315 |
<div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP Mysqli</div>
|
316 |
<div class="info" id="s1-reqs04">
|
317 |
Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
|
320 |
</div>
|
321 |
|
322 |
<!-- REQ 5 -->
|
323 |
+
<?php
|
324 |
+
$status_5 = strtolower($req['05']);
|
325 |
+
?>
|
326 |
+
<div class="status <?php echo DUPX_U::esc_html($status_5); ?>"><?php echo DUPX_U::esc_html($req['05']); ?></div>
|
327 |
<div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Min Version</div>
|
328 |
<div class="info" id="s1-reqs05">
|
329 |
This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
|
346 |
<?php if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
347 |
|
348 |
<!-- NOTICE 1 -->
|
349 |
+
<div class="status <?php echo ($notice['01'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['01']); ?></div>
|
350 |
<div class="title" data-type="toggle" data-target="#s1-notice01">+ Configuration File</div>
|
351 |
<div class="info" id="s1-notice01">
|
352 |
Duplicator works best by placing the installer and archive files into an empty directory. If a wp-config.php file is found in the extraction
|
360 |
</div>
|
361 |
|
362 |
<!-- NOTICE 2 -->
|
363 |
+
<div class="status <?php echo ($notice['02'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['02']); ?></div>
|
364 |
<div class="title" data-type="toggle" data-target="#s1-notice02">+ Directory Setup</div>
|
365 |
<div class="info" id="s1-notice02">
|
366 |
+
<b>Deployment Path:</b> <i><?php echo DUPX_U::esc_html($GLOBALS['CURRENT_ROOT_PATH']); ?></i>
|
367 |
<br/><br/>
|
368 |
There are currently <?php echo "<b>[{$scancount}]</b>";?> items in the deployment path. These items will be overwritten if they also exist
|
369 |
inside the archive file. The notice is to prevent overwriting an existing site or trying to install on-top of one which
|
381 |
<?php endif; ?>
|
382 |
|
383 |
<!-- NOTICE 3 -->
|
384 |
+
<div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['03']); ?></div>
|
385 |
<div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
|
386 |
<div class="info" id="s1-notice03">
|
387 |
<?php echo "The package is {$fulldays} day(s) old. Packages older than 120 days might be considered stale. If you are comfortable with a package that that was created over "
|
389 |
</div>
|
390 |
|
391 |
<!-- NOTICE 4
|
392 |
+
<div class="status <?php echo ($notice['04'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['04']); ?></div>
|
393 |
<div class="title" data-type="toggle" data-target="#s1-notice04">+ Placeholder</div>
|
394 |
<div class="info" id="s1-notice04">
|
395 |
</div>-->
|
396 |
|
397 |
<!-- NOTICE 5 -->
|
398 |
+
<div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['05']); ?></div>
|
399 |
<div class="title" data-type="toggle" data-target="#s1-notice05">+ PHP Version 5.2</div>
|
400 |
<div class="info" id="s1-notice05">
|
401 |
<?php
|
413 |
</div>
|
414 |
|
415 |
<!-- NOTICE 6 -->
|
416 |
+
<div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['06']); ?></div>
|
417 |
<div class="title" data-type="toggle" data-target="#s1-notice06">+ PHP Open Base</div>
|
418 |
<div class="info" id="s1-notice06">
|
419 |
<b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
|
433 |
</div>
|
434 |
|
435 |
<!-- NOTICE 7 -->
|
436 |
+
<div class="status <?php echo ($notice['07'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo DUPX_U::esc_html($notice['07']); ?></div>
|
437 |
<div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
|
438 |
<div class="info" id="s1-notice07">
|
439 |
<b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
|
628 |
<br/><br/><br/>
|
629 |
<br/><br/><br/>
|
630 |
<div class="dupx-footer-buttons">
|
631 |
+
<button id="s1-deploy-btn" type="button" class="default-btn" onclick="DUPX.runExtraction()" title="<?php echo DUPX_U::esc_js($agree_msg); ?>"> Next </button>
|
632 |
</div>
|
633 |
<?php endif; ?>
|
634 |
|
642 |
========================================= -->
|
643 |
<form id='s1-result-form' method="post" class="content-form" style="display:none">
|
644 |
|
645 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>" target="install_log">dup-installer-log.txt</a></div>
|
646 |
<div class="hdr-main">
|
647 |
Step <span class="step">1</span> of 4: Deployment
|
648 |
</div>
|
650 |
<!-- POST PARAMS -->
|
651 |
<div class="dupx-debug">
|
652 |
<input type="hidden" name="action_step" value="2" />
|
653 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
654 |
<input type="hidden" name="logging" id="ajax-logging" />
|
655 |
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="0" />
|
656 |
<input type="hidden" name="retain_config" id="ajax-retain-config" />
|
672 |
<div id="ajaxerr-area" style="display:none">
|
673 |
<p>Please try again an issue has occurred.</p>
|
674 |
<div style="padding: 0px 10px 10px 0px;">
|
675 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the <?php echo DUPX_U::esc_html($GLOBALS["LOG_FILE_NAME"]);?> file for more details.</div>
|
676 |
<div style="text-align:center; margin:10px auto 0px auto">
|
677 |
<input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="« Try Again" /><br/><br/>
|
678 |
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxerr_ticket' target='_blank'>snapcreek.com</a></i>
|
732 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
733 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
734 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
735 |
+
status += "- Check the <a href='<?php echo DUPX_U::esc_js($GLOBALS["LOG_FILE_NAME"]);?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
736 |
status += "- Check the web server and PHP error logs. <br/>";
|
737 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxextract_tofaq#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
738 |
$('#ajaxerr-data').html(status);
|
750 |
$("#s1-deploy-btn").removeAttr("title");
|
751 |
} else {
|
752 |
$("#s1-deploy-btn").attr("disabled", "true");
|
753 |
+
$("#s1-deploy-btn").attr("title", "<?php echo DUPX_U::esc_js($agree_msg); ?>");
|
754 |
}
|
755 |
}
|
756 |
|
installer/build/view.step2.php
CHANGED
@@ -1,6 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
?>
|
5 |
|
6 |
|
@@ -9,10 +19,10 @@ VIEW: STEP 2- INPUT -->
|
|
9 |
<form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
10 |
<input type="hidden" name="action_ajax" value="2" />
|
11 |
<input type="hidden" name="action_step" value="2" />
|
12 |
-
<input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
|
13 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
14 |
|
15 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">dup-installer-log.txt</a></div>
|
16 |
<div class="hdr-main">
|
17 |
Step <span class="step">2</span> of 4: Install Database
|
18 |
</div>
|
@@ -45,10 +55,10 @@ VIEW: STEP 2- INPUT -->
|
|
45 |
<td>
|
46 |
<table class="s2-opts-dbhost">
|
47 |
<tr>
|
48 |
-
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo
|
49 |
<td style="vertical-align:top">
|
50 |
-
<input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo
|
51 |
-
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo
|
52 |
</td>
|
53 |
</tr>
|
54 |
</table>
|
@@ -57,7 +67,7 @@ VIEW: STEP 2- INPUT -->
|
|
57 |
<tr>
|
58 |
<td>Database:</td>
|
59 |
<td>
|
60 |
-
<input type="text" name="dbname" id="dbname" required="true" value="<?php echo
|
61 |
<div id="s2-warning-emptydb">
|
62 |
<label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
|
63 |
</div>
|
@@ -65,14 +75,73 @@ VIEW: STEP 2- INPUT -->
|
|
65 |
</tr>
|
66 |
<tr>
|
67 |
<td>User:</td>
|
68 |
-
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo
|
69 |
</tr>
|
70 |
<tr>
|
71 |
<td>Password:</td>
|
72 |
-
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</div>
|
|
|
|
|
76 |
</div>
|
77 |
|
78 |
|
@@ -85,7 +154,7 @@ VIEW: STEP 2- INPUT -->
|
|
85 |
<?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
|
86 |
<div class='s2-cpanel-login'>
|
87 |
<b>Login to this server's cPanel</b><br/>
|
88 |
-
<a href
|
89 |
</div>
|
90 |
<?php else : ?>
|
91 |
<div class='s2-cpanel-off'>
|
@@ -113,66 +182,6 @@ VIEW: STEP 2- INPUT -->
|
|
113 |
</div>
|
114 |
</div>
|
115 |
|
116 |
-
<!-- =========================================
|
117 |
-
DIALOG: DB CONNECTION CHECK -->
|
118 |
-
<div id="s2-dbconn">
|
119 |
-
<div id="s2-dbconn-status" style="display:none">
|
120 |
-
<div style="padding: 0px 10px 10px 10px;">
|
121 |
-
<div id="s2-dbconn-test-msg" style="min-height:80px"></div>
|
122 |
-
</div>
|
123 |
-
<small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
|
124 |
-
</div>
|
125 |
-
</div>
|
126 |
-
|
127 |
-
|
128 |
-
<br/>
|
129 |
-
|
130 |
-
<!-- ====================================
|
131 |
-
OPTIONS
|
132 |
-
==================================== -->
|
133 |
-
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
|
134 |
-
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
135 |
-
</div>
|
136 |
-
<div id='s2-area-adv-opts' style="display:none">
|
137 |
-
<div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
|
138 |
-
|
139 |
-
<table class="dupx-opts dupx-advopts">
|
140 |
-
<tr>
|
141 |
-
<td>Legacy:</td>
|
142 |
-
<td><input type="checkbox" name="dbcollatefb" id="dbcollatefb" value="1" /> <label for="dbcollatefb">Apply legacy collation fallback support for unknown collations types</label></td>
|
143 |
-
</tr>
|
144 |
-
<tr>
|
145 |
-
<td>Spacing:</td>
|
146 |
-
<td colspan="2">
|
147 |
-
<input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
|
148 |
-
</td>
|
149 |
-
</tr>
|
150 |
-
<tr>
|
151 |
-
<td style="vertical-align:top">Mode:</td>
|
152 |
-
<td colspan="2">
|
153 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label>
|
154 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label>
|
155 |
-
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label>
|
156 |
-
<div id="dbmysqlmode_3_view" style="display:none; padding:5px">
|
157 |
-
<input type="text" name="dbmysqlmode_opts" value="" /><br/>
|
158 |
-
<small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas & no spaces.<br/>
|
159 |
-
Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
|
160 |
-
</div>
|
161 |
-
</td>
|
162 |
-
</tr>
|
163 |
-
<tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
|
164 |
-
<tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
|
165 |
-
</table>
|
166 |
-
|
167 |
-
</div>
|
168 |
-
<br/><br/><br/>
|
169 |
-
<br/><br/><br/>
|
170 |
-
|
171 |
-
<div class="dupx-footer-buttons">
|
172 |
-
<input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
|
173 |
-
<input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
|
174 |
-
</div>
|
175 |
-
|
176 |
</form>
|
177 |
|
178 |
|
@@ -182,18 +191,18 @@ Auto Posts to view.step3.php
|
|
182 |
========================================= -->
|
183 |
<form id='s2-result-form' method="post" class="content-form" style="display:none">
|
184 |
|
185 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>" target="install_log">dup-installer-log.txt</a></div>
|
186 |
<div class="hdr-main">
|
187 |
Step <span class="step">2</span> of 4: Install Database
|
188 |
</div>
|
189 |
|
190 |
<!-- POST PARAMS -->
|
191 |
<div class="dupx-debug">
|
192 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
193 |
<input type="hidden" name="action_step" value="3" />
|
194 |
<input type="hidden" name="logging" id="ajax-logging" />
|
195 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
196 |
-
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
|
197 |
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
198 |
<input type="hidden" name="dbport" id="ajax-dbport" />
|
199 |
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
@@ -338,7 +347,7 @@ DUPX.runDeployment = function()
|
|
338 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
339 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
340 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
341 |
-
status += "- Check the <a href='<?php echo $GLOBALS["LOG_FILE_NAME"];?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
342 |
status += "- Check the web server and PHP error logs. <br/>";
|
343 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step2deploy_timout#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
344 |
$('#ajaxerr-data').html(status);
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
+
if (isset($_POST['logging'])) {
|
5 |
+
$post_logging = DUPX_U::sanitize_text_field($_POST['logging']);
|
6 |
+
$_POST['logging'] = trim($post_logging);
|
7 |
+
}
|
8 |
+
|
9 |
+
if (isset($_POST['exe_safe_mode'])) {
|
10 |
+
$_POST['exe_safe_mode'] = DUPX_U::sanitize_text_field($_POST['exe_safe_mode']);
|
11 |
+
} else {
|
12 |
+
$_POST['exe_safe_mode'] = 0;
|
13 |
+
}
|
14 |
?>
|
15 |
|
16 |
|
19 |
<form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
20 |
<input type="hidden" name="action_ajax" value="2" />
|
21 |
<input type="hidden" name="action_step" value="2" />
|
22 |
+
<input type="hidden" name="logging" id="logging" value="<?php echo DUPX_U::esc_attr($_POST['logging']); ?>" />
|
23 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
24 |
|
25 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>?now=<?php echo DUPX_U::esc_attr($GLOBALS['NOW_DATE']); ?>" target="install_log">dup-installer-log.txt</a></div>
|
26 |
<div class="hdr-main">
|
27 |
Step <span class="step">2</span> of 4: Install Database
|
28 |
</div>
|
55 |
<td>
|
56 |
<table class="s2-opts-dbhost">
|
57 |
<tr>
|
58 |
+
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
|
59 |
<td style="vertical-align:top">
|
60 |
+
<input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo DUPX_U::esc_attr($GLOBALS['FW_DBPORT']); ?>" />
|
61 |
+
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_DBPORT']); ?>" />
|
62 |
</td>
|
63 |
</tr>
|
64 |
</table>
|
67 |
<tr>
|
68 |
<td>Database:</td>
|
69 |
<td>
|
70 |
+
<input type="text" name="dbname" id="dbname" required="true" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
|
71 |
<div id="s2-warning-emptydb">
|
72 |
<label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
|
73 |
</div>
|
75 |
</tr>
|
76 |
<tr>
|
77 |
<td>User:</td>
|
78 |
+
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
|
79 |
</tr>
|
80 |
<tr>
|
81 |
<td>Password:</td>
|
82 |
+
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<!-- =========================================
|
88 |
+
DIALOG: DB CONNECTION CHECK -->
|
89 |
+
<div id="s2-dbconn">
|
90 |
+
<div id="s2-dbconn-status" style="display:none">
|
91 |
+
<div style="padding: 0px 10px 10px 10px;">
|
92 |
+
<div id="s2-dbconn-test-msg" style="min-height:80px"></div>
|
93 |
+
</div>
|
94 |
+
<small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
|
95 |
+
</div>
|
96 |
+
</div><br/>
|
97 |
+
|
98 |
+
<!-- ====================================
|
99 |
+
OPTIONS
|
100 |
+
==================================== -->
|
101 |
+
<div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
|
102 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
103 |
+
</div>
|
104 |
+
<div id='s2-area-adv-opts' style="display:none">
|
105 |
+
<div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
|
106 |
+
|
107 |
+
<table class="dupx-opts dupx-advopts">
|
108 |
+
<tr>
|
109 |
+
<td>Legacy:</td>
|
110 |
+
<td><input type="checkbox" name="dbcollatefb" id="dbcollatefb" value="1" /> <label for="dbcollatefb">Apply legacy collation fallback support for unknown collations types</label></td>
|
111 |
</tr>
|
112 |
+
<tr>
|
113 |
+
<td>Spacing:</td>
|
114 |
+
<td colspan="2">
|
115 |
+
<input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
<tr>
|
119 |
+
<td style="vertical-align:top">Mode:</td>
|
120 |
+
<td colspan="2">
|
121 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label>
|
122 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label>
|
123 |
+
<input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label>
|
124 |
+
<div id="dbmysqlmode_3_view" style="display:none; padding:5px">
|
125 |
+
<input type="text" name="dbmysqlmode_opts" value="" /><br/>
|
126 |
+
<small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas & no spaces.<br/>
|
127 |
+
Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
|
128 |
+
</div>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
+
<tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo DUPX_U::esc_attr($_POST['dbcharset']) ?>" /> </td></tr>
|
132 |
+
<tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo DUPX_U::esc_attr($_POST['dbcollate']); ?>" /> </tr>
|
133 |
</table>
|
134 |
+
|
135 |
+
</div>
|
136 |
+
<br/><br/><br/>
|
137 |
+
<br/><br/><br/>
|
138 |
+
|
139 |
+
<div class="dupx-footer-buttons">
|
140 |
+
<input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
|
141 |
+
<input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
|
142 |
</div>
|
143 |
+
|
144 |
+
|
145 |
</div>
|
146 |
|
147 |
|
154 |
<?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
|
155 |
<div class='s2-cpanel-login'>
|
156 |
<b>Login to this server's cPanel</b><br/>
|
157 |
+
<a href=<?php echo DUPX_U::esc_url('https://'.$_SERVER['SERVER_NAME'].':2083'); ?>" target="cpanel" style="color:#fff">[<?php echo DUPX_U::esc_html($_SERVER['SERVER_NAME']); ?>:2083]</a>
|
158 |
</div>
|
159 |
<?php else : ?>
|
160 |
<div class='s2-cpanel-off'>
|
182 |
</div>
|
183 |
</div>
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
</form>
|
186 |
|
187 |
|
191 |
========================================= -->
|
192 |
<form id='s2-result-form' method="post" class="content-form" style="display:none">
|
193 |
|
194 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>" target="install_log">dup-installer-log.txt</a></div>
|
195 |
<div class="hdr-main">
|
196 |
Step <span class="step">2</span> of 4: Install Database
|
197 |
</div>
|
198 |
|
199 |
<!-- POST PARAMS -->
|
200 |
<div class="dupx-debug">
|
201 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
202 |
<input type="hidden" name="action_step" value="3" />
|
203 |
<input type="hidden" name="logging" id="ajax-logging" />
|
204 |
+
<input type="hidden" name="retain_config" value="<?php echo DUPX_U::esc_attr($_POST['retain_config']); ?>" />
|
205 |
+
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo DUPX_U::esc_attr($_POST['exe_safe_mode']); ?>"/>
|
206 |
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
207 |
<input type="hidden" name="dbport" id="ajax-dbport" />
|
208 |
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
347 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
348 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
349 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
350 |
+
status += "- Check the <a href='<?php echo DUPX_U::esc_js($GLOBALS["LOG_FILE_NAME"]);?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
351 |
status += "- Check the web server and PHP error logs. <br/>";
|
352 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step2deploy_timout#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
353 |
$('#ajaxerr-data').html(status);
|
installer/build/view.step3.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
|
3 |
|
4 |
$all_tables = DUPX_DB::getTables($dbh);
|
@@ -18,20 +20,20 @@ VIEW: STEP 3- INPUT -->
|
|
18 |
<!-- POST PARAMS -->
|
19 |
<input type="hidden" name="action_ajax" value="3" />
|
20 |
<input type="hidden" name="action_step" value="3" />
|
21 |
-
<input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
|
22 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
23 |
-
<input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
|
24 |
-
<input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
|
25 |
-
<input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
|
26 |
-
<input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
|
27 |
-
<input type="hidden" name="dbpass" value="<?php echo
|
28 |
-
<input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
|
29 |
-
<input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
|
30 |
-
<input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
|
31 |
-
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode'] ?>" />
|
32 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
33 |
|
34 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">dup-installer-log.txt</a></div>
|
35 |
<div class="hdr-main">
|
36 |
Step <span class="step">3</span> of 4: Update Data
|
37 |
</div>
|
@@ -53,11 +55,11 @@ VIEW: STEP 3- INPUT -->
|
|
53 |
</tr>
|
54 |
<tr>
|
55 |
<td>Path:</td>
|
56 |
-
<td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
<td>Title:</td>
|
60 |
-
<td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
|
61 |
</tr>
|
62 |
</table>
|
63 |
</div>
|
@@ -101,14 +103,14 @@ VIEW: STEP 3- INPUT -->
|
|
101 |
<tr>
|
102 |
<td>Old URL:</td>
|
103 |
<td>
|
104 |
-
<input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
|
105 |
<a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
|
106 |
</td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
<td>Old Path:</td>
|
110 |
<td>
|
111 |
-
<input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
|
112 |
<a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
|
113 |
</td>
|
114 |
</tr>
|
@@ -125,7 +127,7 @@ VIEW: STEP 3- INPUT -->
|
|
125 |
<select id="tables" name="tables[]" multiple="multiple">
|
126 |
<?php
|
127 |
foreach( $all_tables as $table ) {
|
128 |
-
echo '<option selected="selected" value="' . DUPX_U::
|
129 |
}
|
130 |
?>
|
131 |
</select>
|
@@ -141,9 +143,8 @@ VIEW: STEP 3- INPUT -->
|
|
141 |
<?php
|
142 |
$selected_string = ($_POST['exe_safe_mode'] > 0) ? '' : 'selected="selected"';
|
143 |
foreach ($active_plugins as $plugin) {
|
144 |
-
$plug_val = DUPX_U::escapeHTML($plugin);
|
145 |
$plug_name = dirname($plugin);
|
146 |
-
echo "<option {$selected_string} value='
|
147 |
}
|
148 |
?>
|
149 |
</select>
|
@@ -185,17 +186,17 @@ VIEW: STEP 3 - AJAX RESULT
|
|
185 |
========================================= -->
|
186 |
<form id='s3-result-form' method="post" class="content-form" style="display:none">
|
187 |
|
188 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>" target="install_log">dup-installer-log.txt</a></div>
|
189 |
<div class="hdr-main">
|
190 |
Step <span class="step">3</span> of 4: Update Data
|
191 |
</div>
|
192 |
|
193 |
<!-- POST PARAMS -->
|
194 |
<div class="dupx-debug">
|
195 |
-
<input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
|
196 |
<input type="hidden" name="action_step" value="4" />
|
197 |
-
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
198 |
-
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
|
199 |
<input type="hidden" name="url_new" id="ajax-url_new" />
|
200 |
<input type="hidden" name="json" id="ajax-json" />
|
201 |
<br/>
|
@@ -266,7 +267,7 @@ DUPX.runUpdate = function()
|
|
266 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
267 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
268 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
269 |
-
status += "- Check the <a href='<?php echo $GLOBALS["LOG_FILE_NAME"];?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
270 |
status += "- Check the web server and PHP error logs. <br/>";
|
271 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax_rundepl#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
272 |
$('#ajaxerr-data').html(status);
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
$dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
|
5 |
|
6 |
$all_tables = DUPX_DB::getTables($dbh);
|
20 |
<!-- POST PARAMS -->
|
21 |
<input type="hidden" name="action_ajax" value="3" />
|
22 |
<input type="hidden" name="action_step" value="3" />
|
23 |
+
<input type="hidden" name="logging" value="<?php echo DUPX_U::esc_attr($_POST['logging']); ?>" />
|
24 |
+
<input type="hidden" name="retain_config" value="<?php echo DUPX_U::esc_attr($_POST['retain_config']); ?>" />
|
25 |
+
<input type="hidden" name="json" value="<?php echo DUPX_U::esc_attr($_POST['json']); ?>" />
|
26 |
+
<input type="hidden" name="dbhost" value="<?php echo DUPX_U::esc_attr($_POST['dbhost']); ?>" />
|
27 |
+
<input type="hidden" name="dbport" value="<?php echo DUPX_U::esc_attr($_POST['dbport']); ?>" />
|
28 |
+
<input type="hidden" name="dbuser" value="<?php echo DUPX_U::esc_attr($_POST['dbuser']); ?>" />
|
29 |
+
<input type="hidden" name="dbpass" value="<?php echo DUPX_U::esc_attr($_POST['dbpass']); ?>" />
|
30 |
+
<input type="hidden" name="dbname" value="<?php echo DUPX_U::esc_attr($_POST['dbname']); ?>" />
|
31 |
+
<input type="hidden" name="dbcharset" value="<?php echo DUPX_U::esc_attr($_POST['dbcharset']); ?>" />
|
32 |
+
<input type="hidden" name="dbcollate" value="<?php echo DUPX_U::esc_attr($_POST['dbcollate']); ?>" />
|
33 |
+
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo DUPX_U::esc_attr($_POST['exe_safe_mode']); ?>" />
|
34 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
35 |
|
36 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>?now=<?php echo DUPX_U::esc_attr($GLOBALS['NOW_DATE']); ?>" target="install_log">dup-installer-log.txt</a></div>
|
37 |
<div class="hdr-main">
|
38 |
Step <span class="step">3</span> of 4: Update Data
|
39 |
</div>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
<td>Path:</td>
|
58 |
+
<td><input type="text" name="path_new" id="path_new" value="<?php echo DUPX_U::esc_attr($new_path); ?>" /></td>
|
59 |
</tr>
|
60 |
<tr>
|
61 |
<td>Title:</td>
|
62 |
+
<td><input type="text" name="blogname" id="blogname" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_BLOGNAME']); ?>" /></td>
|
63 |
</tr>
|
64 |
</table>
|
65 |
</div>
|
103 |
<tr>
|
104 |
<td>Old URL:</td>
|
105 |
<td>
|
106 |
+
<input type="text" name="url_old" id="url_old" value="<?php echo DUPX_U::esc_attr($GLOBALS['FW_URL_OLD']); ?>" readonly="readonly" class="readonly" />
|
107 |
<a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
|
108 |
</td>
|
109 |
</tr>
|
110 |
<tr>
|
111 |
<td>Old Path:</td>
|
112 |
<td>
|
113 |
+
<input type="text" name="path_old" id="path_old" value="<?php echo DUPX_U::esc_attr($old_path); ?>" readonly="readonly" class="readonly" />
|
114 |
<a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
|
115 |
</td>
|
116 |
</tr>
|
127 |
<select id="tables" name="tables[]" multiple="multiple">
|
128 |
<?php
|
129 |
foreach( $all_tables as $table ) {
|
130 |
+
echo '<option selected="selected" value="' . DUPX_U::esc_attr( $table ) . '">' . DUPX_U::esc_html($table) . '</option>';
|
131 |
}
|
132 |
?>
|
133 |
</select>
|
143 |
<?php
|
144 |
$selected_string = ($_POST['exe_safe_mode'] > 0) ? '' : 'selected="selected"';
|
145 |
foreach ($active_plugins as $plugin) {
|
|
|
146 |
$plug_name = dirname($plugin);
|
147 |
+
echo "<option {$selected_string} value='".DUPX_U::esc_attr($plugin)."'>".DUPX_U::esc_html($plug_name)."</option>";
|
148 |
}
|
149 |
?>
|
150 |
</select>
|
186 |
========================================= -->
|
187 |
<form id='s3-result-form' method="post" class="content-form" style="display:none">
|
188 |
|
189 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>" target="install_log">dup-installer-log.txt</a></div>
|
190 |
<div class="hdr-main">
|
191 |
Step <span class="step">3</span> of 4: Update Data
|
192 |
</div>
|
193 |
|
194 |
<!-- POST PARAMS -->
|
195 |
<div class="dupx-debug">
|
196 |
+
<input type="hidden" name="secure-pass" value="<?php echo DUPX_U::esc_attr($_POST['secure-pass']); ?>" />
|
197 |
<input type="hidden" name="action_step" value="4" />
|
198 |
+
<input type="hidden" name="retain_config" value="<?php echo DUPX_U::esc_attr($_POST['retain_config']); ?>" />
|
199 |
+
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo DUPX_U::esc_attr($_POST['exe_safe_mode']); ?>"/>
|
200 |
<input type="hidden" name="url_new" id="ajax-url_new" />
|
201 |
<input type="hidden" name="json" id="ajax-json" />
|
202 |
<br/>
|
267 |
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
268 |
status += "<b>Response:</b> " + xhr.responseText + "";
|
269 |
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
270 |
+
status += "- Check the <a href='<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>' target='install_log'>dup-installer-log.txt</a> file for warnings or errors.<br/>";
|
271 |
status += "- Check the web server and PHP error logs. <br/>";
|
272 |
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax_rundepl#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
273 |
$('#ajaxerr-data').html(status);
|
installer/build/view.step4.php
CHANGED
@@ -1,16 +1,19 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
3 |
$_POST['retain_config'] = isset($_POST['retain_config']) && $_POST['retain_config'] == '1' ? true : false;
|
4 |
-
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
|
5 |
|
6 |
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
7 |
|
8 |
-
|
9 |
-
$
|
|
|
10 |
$admin_redirect = urlencode($admin_redirect);
|
11 |
$admin_url_qry = (strpos($admin_base, '?') === false) ? '?' : '&';
|
12 |
-
$admin_login = rtrim($
|
13 |
-
$url_new_rtrim = rtrim($
|
14 |
?>
|
15 |
|
16 |
<script>
|
@@ -24,8 +27,8 @@ DUPX.getAdminLogin = function() {
|
|
24 |
<!-- =========================================
|
25 |
VIEW: STEP 4 - INPUT -->
|
26 |
<form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
|
27 |
-
<input type="hidden" name="url_new" id="url_new" value="<?php echo $url_new_rtrim; ?>" />
|
28 |
-
<div class="dupx-logfile-link"><a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">dup-installer-log.txt</a></div>
|
29 |
|
30 |
<div class="hdr-main">
|
31 |
Step <span class="step">4</span> of 4: Test Site
|
@@ -71,8 +74,8 @@ VIEW: STEP 4 - INPUT -->
|
|
71 |
</i>
|
72 |
</li>
|
73 |
<li>
|
74 |
-
Review this sites <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
|
75 |
-
re-run the installer and <a href="<?php echo
|
76 |
</li>
|
77 |
<li>If the .htaccess file was reset some plugin settings might need to be re-saved.</li>
|
78 |
<li>For additional help and questions visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst4_step4_troubleshoot' target='_blank'>online FAQs</a>.</li>
|
@@ -131,7 +134,7 @@ VIEW: STEP 4 - INPUT -->
|
|
131 |
<div class="s4-err-title">STEP 2 - INSTALL NOTICES:</div>
|
132 |
<b data-bind="with: status.step2">ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
|
133 |
<div class="info-error">
|
134 |
-
Queries that error during the deploy step are logged to the <a href="<?php echo $GLOBALS["LOG_FILE_NAME"];?>" target="dpro-installer">dup-installer-log.txt</a> file and
|
135 |
and marked with an **ERROR** status. If you experience a few errors (under 5), in many cases they can be ignored as long as your site is working correctly.
|
136 |
However if you see a large amount of errors or you experience an issue with your site then the error messages in the log file will need to be investigated.
|
137 |
<br/><br/>
|
@@ -237,8 +240,8 @@ VIEW: STEP 4 - INPUT -->
|
|
237 |
?>
|
238 |
|
239 |
<div class="s4-gopro-btn">
|
240 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content
|
241 |
-
<?php echo $txt;?>
|
242 |
</a>
|
243 |
</div>
|
244 |
<br/><br/><br/>
|
@@ -250,7 +253,7 @@ VIEW: STEP 4 - INPUT -->
|
|
250 |
$json_data = utf8_decode(urldecode($_POST['json']));
|
251 |
$json_decode = json_decode($json_data);
|
252 |
if ($json_decode == NULL || $json_decode == FALSE) {
|
253 |
-
$json_data = "{'json reset invalid form value sent'}";
|
254 |
$json_result = false;
|
255 |
}
|
256 |
?>
|
1 |
<?php
|
2 |
+
defined("DUPXABSPATH") or die("");
|
3 |
+
|
4 |
+
$_POST['url_new'] = isset($_POST['url_new']) ? DUPX_U::sanitize_text_field($_POST['url_new']) : '';
|
5 |
$_POST['retain_config'] = isset($_POST['retain_config']) && $_POST['retain_config'] == '1' ? true : false;
|
6 |
+
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? DUPX_U::sanitize_text_field($_POST['exe_safe_mode']) : 0;
|
7 |
|
8 |
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
9 |
|
10 |
+
$safe_mode = DUPX_U::sanitize_text_field($_POST['exe_safe_mode']);
|
11 |
+
$post_url_new = DUPX_U::sanitize_text_field($_POST['url_new']);
|
12 |
+
$admin_redirect = rtrim($post_url_new, "/") . "/wp-admin/admin.php?page=duplicator-tools&tab=diagnostics§ion=info&package={$GLOBALS['FW_PACKAGE_NAME']}&safe_mode={$safe_mode}";
|
13 |
$admin_redirect = urlencode($admin_redirect);
|
14 |
$admin_url_qry = (strpos($admin_base, '?') === false) ? '?' : '&';
|
15 |
+
$admin_login = rtrim($post_url_new, '/') . "/{$admin_base}{$admin_url_qry}redirect_to={$admin_redirect}";
|
16 |
+
$url_new_rtrim = rtrim($post_url_new, '/');
|
17 |
?>
|
18 |
|
19 |
<script>
|
27 |
<!-- =========================================
|
28 |
VIEW: STEP 4 - INPUT -->
|
29 |
<form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
|
30 |
+
<input type="hidden" name="url_new" id="url_new" value="<?php echo DUPX_U::esc_attr($url_new_rtrim); ?>" />
|
31 |
+
<div class="dupx-logfile-link"><a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>?now=<?php echo DUPX_U::esc_attr($GLOBALS['NOW_DATE']); ?>" target="install_log">dup-installer-log.txt</a></div>
|
32 |
|
33 |
<div class="hdr-main">
|
34 |
Step <span class="step">4</span> of 4: Test Site
|
74 |
</i>
|
75 |
</li>
|
76 |
<li>
|
77 |
+
Review this sites <a href="<?php echo DUPX_U::esc_url($url_new_rtrim); ?>" target="_blank">front-end</a> or
|
78 |
+
re-run the installer and <a href="<?php echo DUPX_U::esc_url($url_new_rtrim.'/installer.php'); ?>">go back to step 1</a>.
|
79 |
</li>
|
80 |
<li>If the .htaccess file was reset some plugin settings might need to be re-saved.</li>
|
81 |
<li>For additional help and questions visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst4_step4_troubleshoot' target='_blank'>online FAQs</a>.</li>
|
134 |
<div class="s4-err-title">STEP 2 - INSTALL NOTICES:</div>
|
135 |
<b data-bind="with: status.step2">ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
|
136 |
<div class="info-error">
|
137 |
+
Queries that error during the deploy step are logged to the <a href="<?php echo DUPX_U::esc_attr($GLOBALS["LOG_FILE_NAME"]);?>" target="dpro-installer">dup-installer-log.txt</a> file and
|
138 |
and marked with an **ERROR** status. If you experience a few errors (under 5), in many cases they can be ignored as long as your site is working correctly.
|
139 |
However if you see a large amount of errors or you experience an issue with your site then the error messages in the log file will need to be investigated.
|
140 |
<br/><br/>
|
240 |
?>
|
241 |
|
242 |
<div class="s4-gopro-btn">
|
243 |
+
<a href="<?php echo DUPX_U::esc_url('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content='.$key); ?>" target="_blank">
|
244 |
+
<?php echo DUPX_U::esc_html($txt);?>
|
245 |
</a>
|
246 |
</div>
|
247 |
<br/><br/><br/>
|
253 |
$json_data = utf8_decode(urldecode($_POST['json']));
|
254 |
$json_decode = json_decode($json_data);
|
255 |
if ($json_decode == NULL || $json_decode == FALSE) {
|
256 |
+
$json_data = "{'json reset invalid form value sent. Possible site script attempt'}";
|
257 |
$json_result = false;
|
258 |
}
|
259 |
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, aut
|
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2.17
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2
|
9 |
|
10 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2.17
|
7 |
+
Stable tag: 1.2.50
|
8 |
License: GPLv2
|
9 |
|
10 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
views/help/gopro.php
CHANGED
@@ -35,63 +35,63 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
35 |
<div class="dup-pro-area">
|
36 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50-nosnap.png" />
|
37 |
<div style="font-size:18px; font-style:italic; color:gray">
|
38 |
-
<?php
|
39 |
-
<?php
|
40 |
</div>
|
41 |
|
42 |
<table id="comparison-table">
|
43 |
<tr>
|
44 |
-
<th class="feature-column"><?php
|
45 |
-
<th class="check-column"><?php
|
46 |
-
<th class="check-column"><?php
|
47 |
</tr>
|
48 |
<!-- =====================
|
49 |
CORE FEATURES
|
50 |
<tr>
|
51 |
-
<td colspan="3" class="group-header"><?php
|
52 |
</tr> -->
|
53 |
<tr>
|
54 |
-
<td class="feature-column"><?php
|
55 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
56 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
-
<td class="feature-column"><?php
|
60 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
61 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
62 |
</tr>
|
63 |
<tr>
|
64 |
-
<td class="feature-column"><?php
|
65 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
66 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
67 |
</tr>
|
68 |
<tr>
|
69 |
-
<td class="feature-column"><?php
|
70 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
71 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
72 |
</tr>
|
73 |
<tr>
|
74 |
-
<td class="feature-column"><?php
|
75 |
<td class="check-column"></td>
|
76 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
77 |
</tr>
|
78 |
<!-- =====================
|
79 |
CLOUD STORAGE
|
80 |
<tr>
|
81 |
-
<td colspan="3" class="group-header"><?php
|
82 |
</tr>-->
|
83 |
<tr>
|
84 |
<td class="feature-column">
|
85 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
|
86 |
-
<?php
|
87 |
</td>
|
88 |
<td class="check-column"></td>
|
89 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
<td class="feature-column">
|
93 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
94 |
-
<?php
|
95 |
</td>
|
96 |
<td class="check-column"></td>
|
97 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
@@ -99,7 +99,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
99 |
<tr>
|
100 |
<td class="feature-column">
|
101 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px' />
|
102 |
-
<?php
|
103 |
</td>
|
104 |
<td class="check-column"></td>
|
105 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
@@ -107,7 +107,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
107 |
<tr>
|
108 |
<td class="feature-column">
|
109 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px' />
|
110 |
-
<?php
|
111 |
</td>
|
112 |
<td class="check-column"></td>
|
113 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
@@ -115,7 +115,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
115 |
<tr>
|
116 |
<td class="feature-column">
|
117 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/onedrive-48px.png" style='height:16px; width:16px' />
|
118 |
-
<?php
|
119 |
</td>
|
120 |
<td class="check-column"></td>
|
121 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
@@ -124,29 +124,38 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
124 |
<!-- =====================
|
125 |
ENHANCED PROCCESING
|
126 |
<tr>
|
127 |
-
<td colspan="3" class="group-header"><?php
|
128 |
</tr>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
<tr>
|
130 |
-
<td class="feature-column"><?php
|
131 |
<i class="fa fa-question-circle dup-gopro-help"
|
132 |
-
data-tooltip-title="<?php
|
133 |
-
data-tooltip="<?php
|
134 |
</td>
|
135 |
<td class="check-column"></td>
|
136 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
137 |
</tr>
|
138 |
<tr>
|
139 |
-
<td class="feature-column"><?php
|
140 |
<td class="check-column"></td>
|
141 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
142 |
</tr>
|
143 |
<tr>
|
144 |
-
<td class="feature-column"><?php
|
145 |
<td class="check-column"></td>
|
146 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
147 |
</tr>
|
148 |
<tr>
|
149 |
-
<td class="feature-column"><?php
|
150 |
<td class="check-column"></td>
|
151 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
152 |
</tr>
|
@@ -154,21 +163,21 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
154 |
<!-- =====================
|
155 |
ROBUST INSTALLATION
|
156 |
<tr>
|
157 |
-
<td colspan="3" class="group-header"><?php
|
158 |
</tr>-->
|
159 |
<tr>
|
160 |
-
<td class="feature-column"><?php
|
161 |
<td class="check-column"></td>
|
162 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
163 |
</tr>
|
164 |
<tr>
|
165 |
<td class="feature-column">
|
166 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
167 |
-
<?php
|
168 |
<sup>
|
169 |
<i class="fa fa-question-circle dup-gopro-help"
|
170 |
-
data-tooltip-title="<?php
|
171 |
-
data-tooltip="<?php
|
172 |
</td>
|
173 |
<td class="check-column"></td>
|
174 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
@@ -178,30 +187,30 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
178 |
<!-- =====================
|
179 |
MULTI-SITE
|
180 |
<tr>
|
181 |
-
<td colspan="3" class="group-header"><?php
|
182 |
</tr>-->
|
183 |
<tr>
|
184 |
-
<td class="feature-column"><?php
|
185 |
<td class="check-column"></td>
|
186 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
187 |
</tr>
|
188 |
<tr>
|
189 |
-
<td class="feature-column"><?php
|
190 |
<i class="fa fa-question-circle dup-gopro-help"
|
191 |
-
data-tooltip-title="<?php
|
192 |
-
data-tooltip="<?php
|
193 |
</td>
|
194 |
<td class="check-column"></td>
|
195 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
196 |
</tr>
|
197 |
|
198 |
<tr>
|
199 |
-
<td class="feature-column"><?php
|
200 |
<td class="check-column"></td>
|
201 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
202 |
</tr>
|
203 |
<!--tr>
|
204 |
-
<td class="feature-column"><?php
|
205 |
<td class="check-column"></td>
|
206 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
207 |
</tr-->
|
@@ -209,26 +218,26 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
209 |
<!-- =====================
|
210 |
ENHANCED EXPERIENCE
|
211 |
<tr>
|
212 |
-
<td colspan="3" class="group-header"><?php
|
213 |
</tr>-->
|
214 |
<tr>
|
215 |
-
<td class="feature-column"><?php
|
216 |
<td class="check-column"></td>
|
217 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
218 |
</tr>
|
219 |
|
220 |
<tr>
|
221 |
-
<td class="feature-column"><?php
|
222 |
<td class="check-column"></td>
|
223 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
224 |
</tr>
|
225 |
<tr>
|
226 |
-
<td class="feature-column"><?php
|
227 |
<td class="check-column"></td>
|
228 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
229 |
</tr>
|
230 |
<tr>
|
231 |
-
<td class="feature-column"><?php
|
232 |
<td class="check-column"></td>
|
233 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
234 |
</tr>
|
@@ -237,7 +246,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
237 |
<br style="clear:both" />
|
238 |
<p style="text-align:center">
|
239 |
<button onclick="window.open('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_go_pro&utm_campaign=duplicator_pro');" class="button button-large dup-check-it-btn" >
|
240 |
-
<?php
|
241 |
</button>
|
242 |
</p>
|
243 |
<br/><br/>
|
35 |
<div class="dup-pro-area">
|
36 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50-nosnap.png" />
|
37 |
<div style="font-size:18px; font-style:italic; color:gray">
|
38 |
+
<?php esc_html_e('The simplicity of Duplicator', 'duplicator') ?>
|
39 |
+
<?php esc_html_e('with power for the professional.', 'duplicator') ?>
|
40 |
</div>
|
41 |
|
42 |
<table id="comparison-table">
|
43 |
<tr>
|
44 |
+
<th class="feature-column"><?php esc_html_e('Feature', 'duplicator') ?></th>
|
45 |
+
<th class="check-column"><?php esc_html_e('Free', 'duplicator') ?></th>
|
46 |
+
<th class="check-column"><?php esc_html_e('Professional', 'duplicator') ?></th>
|
47 |
</tr>
|
48 |
<!-- =====================
|
49 |
CORE FEATURES
|
50 |
<tr>
|
51 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Core Features', 'duplicator') ?></td>
|
52 |
</tr> -->
|
53 |
<tr>
|
54 |
+
<td class="feature-column"><?php esc_html_e('Backup Files & Database', 'duplicator') ?></td>
|
55 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
56 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
+
<td class="feature-column"><?php esc_html_e('File Filters', 'duplicator') ?></td>
|
60 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
61 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
62 |
</tr>
|
63 |
<tr>
|
64 |
+
<td class="feature-column"><?php esc_html_e('Database Table Filters', 'duplicator') ?></td>
|
65 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
66 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
67 |
</tr>
|
68 |
<tr>
|
69 |
+
<td class="feature-column"><?php esc_html_e('Migration Wizard', 'duplicator') ?></td>
|
70 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
71 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
72 |
</tr>
|
73 |
<tr>
|
74 |
+
<td class="feature-column"><?php esc_html_e('Scheduled Backups', 'duplicator') ?></td>
|
75 |
<td class="check-column"></td>
|
76 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
77 |
</tr>
|
78 |
<!-- =====================
|
79 |
CLOUD STORAGE
|
80 |
<tr>
|
81 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Cloud Storage', 'duplicator') ?></td>
|
82 |
</tr>-->
|
83 |
<tr>
|
84 |
<td class="feature-column">
|
85 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
|
86 |
+
<?php esc_html_e('Amazon S3 Storage', 'duplicator') ?>
|
87 |
</td>
|
88 |
<td class="check-column"></td>
|
89 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
<td class="feature-column">
|
93 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/dropbox-64.png"); ?>" style='height:16px; width:16px' />
|
94 |
+
<?php esc_html_e('Dropbox Storage ', 'duplicator') ?>
|
95 |
</td>
|
96 |
<td class="check-column"></td>
|
97 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
99 |
<tr>
|
100 |
<td class="feature-column">
|
101 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px' />
|
102 |
+
<?php esc_html_e('Google Drive Storage', 'duplicator') ?>
|
103 |
</td>
|
104 |
<td class="check-column"></td>
|
105 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
107 |
<tr>
|
108 |
<td class="feature-column">
|
109 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px' />
|
110 |
+
<?php esc_html_e('FTP/SFTP Storage', 'duplicator') ?>
|
111 |
</td>
|
112 |
<td class="check-column"></td>
|
113 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
115 |
<tr>
|
116 |
<td class="feature-column">
|
117 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/onedrive-48px.png" style='height:16px; width:16px' />
|
118 |
+
<?php esc_html_e('OneDrive Storage', 'duplicator') ?>
|
119 |
</td>
|
120 |
<td class="check-column"></td>
|
121 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
124 |
<!-- =====================
|
125 |
ENHANCED PROCCESING
|
126 |
<tr>
|
127 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Improved Processing', 'duplicator') ?></td>
|
128 |
</tr>-->
|
129 |
+
<tr>
|
130 |
+
<td class="feature-column"><?php _e('Overwrite Live Site', 'duplicator') ?><sup>
|
131 |
+
<i class="fa fa-question-circle dup-gopro-help"
|
132 |
+
data-tooltip-title="<?php _e("Overwrite Existing Site", 'duplicator'); ?>"
|
133 |
+
data-tooltip="<?php _e('Overwrite a live site. Makes installing super-fast!', 'duplicator'); ?>"/></i></sup>
|
134 |
+
</td>
|
135 |
+
<td class="check-column"></td>
|
136 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
137 |
+
</tr>
|
138 |
<tr>
|
139 |
+
<td class="feature-column"><?php esc_attr_e('Large Site Support', 'duplicator') ?><sup>
|
140 |
<i class="fa fa-question-circle dup-gopro-help"
|
141 |
+
data-tooltip-title="<?php esc_attr_e("Large Site Support", 'duplicator'); ?>"
|
142 |
+
data-tooltip="<?php esc_attr_e('Advanced archive engine processes multi-gig sites - even on stubborn budget hosts!', 'duplicator'); ?>"/></i></sup>
|
143 |
</td>
|
144 |
<td class="check-column"></td>
|
145 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
146 |
</tr>
|
147 |
<tr>
|
148 |
+
<td class="feature-column"><?php esc_html_e('Multiple Archive Engines', 'duplicator') ?></td>
|
149 |
<td class="check-column"></td>
|
150 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
151 |
</tr>
|
152 |
<tr>
|
153 |
+
<td class="feature-column"><?php esc_html_e('Server Throttling', 'duplicator') ?></td>
|
154 |
<td class="check-column"></td>
|
155 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
156 |
</tr>
|
157 |
<tr>
|
158 |
+
<td class="feature-column"><?php esc_html_e('Background Processing', 'duplicator') ?></td>
|
159 |
<td class="check-column"></td>
|
160 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
161 |
</tr>
|
163 |
<!-- =====================
|
164 |
ROBUST INSTALLATION
|
165 |
<tr>
|
166 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Robust Installation', 'duplicator') ?></td>
|
167 |
</tr>-->
|
168 |
<tr>
|
169 |
+
<td class="feature-column"><?php esc_html_e('Installer Passwords', 'duplicator') ?></td>
|
170 |
<td class="check-column"></td>
|
171 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
172 |
</tr>
|
173 |
<tr>
|
174 |
<td class="feature-column">
|
175 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/cpanel-48.png"); ?>" style="width:16px; height:12px" />
|
176 |
+
<?php esc_html_e('cPanel Database API', 'duplicator') ?>
|
177 |
<sup>
|
178 |
<i class="fa fa-question-circle dup-gopro-help"
|
179 |
+
data-tooltip-title="<?php esc_attr_e("cPanel", 'duplicator'); ?>"
|
180 |
+
data-tooltip="<?php esc_attr_e('Create the database and database user directly in the installer. No need to browse to your host\'s cPanel application.', 'duplicator'); ?>"/></i></sup>
|
181 |
</td>
|
182 |
<td class="check-column"></td>
|
183 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
187 |
<!-- =====================
|
188 |
MULTI-SITE
|
189 |
<tr>
|
190 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Multisite', 'duplicator') ?></td>
|
191 |
</tr>-->
|
192 |
<tr>
|
193 |
+
<td class="feature-column"><?php esc_html_e('Multisite Network Migration', 'duplicator') ?></td>
|
194 |
<td class="check-column"></td>
|
195 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
196 |
</tr>
|
197 |
<tr>
|
198 |
+
<td class="feature-column"><?php esc_html_e('Multisite Subsite > Standalone', 'duplicator') ?><sup>
|
199 |
<i class="fa fa-question-circle dup-gopro-help"
|
200 |
+
data-tooltip-title="<?php esc_attr_e("Multisite", 'duplicator'); ?>"
|
201 |
+
data-tooltip="<?php esc_attr_e('Install an individual subsite from a Multisite as a standalone site. This feature is only available with a business license purchase.', 'duplicator'); ?>"/></i></sup>
|
202 |
</td>
|
203 |
<td class="check-column"></td>
|
204 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
205 |
</tr>
|
206 |
|
207 |
<tr>
|
208 |
+
<td class="feature-column"><?php esc_html_e('Custom Search & Replace', 'duplicator') ?></td>
|
209 |
<td class="check-column"></td>
|
210 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
211 |
</tr>
|
212 |
<!--tr>
|
213 |
+
<td class="feature-column"><?php esc_html_e('Duplicate Subsite in Network', 'duplicator') ?></td>
|
214 |
<td class="check-column"></td>
|
215 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
216 |
</tr-->
|
218 |
<!-- =====================
|
219 |
ENHANCED EXPERIENCE
|
220 |
<tr>
|
221 |
+
<td colspan="3" class="group-header"><?php esc_html_e('Enhanced Experience', 'duplicator') ?></td>
|
222 |
</tr>-->
|
223 |
<tr>
|
224 |
+
<td class="feature-column"><?php esc_html_e('Email Alerts', 'duplicator') ?></td>
|
225 |
<td class="check-column"></td>
|
226 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
227 |
</tr>
|
228 |
|
229 |
<tr>
|
230 |
+
<td class="feature-column"><?php esc_html_e('Manual Transfers', 'duplicator') ?></td>
|
231 |
<td class="check-column"></td>
|
232 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
233 |
</tr>
|
234 |
<tr>
|
235 |
+
<td class="feature-column"><?php esc_html_e('Active Customer Support', 'duplicator') ?></td>
|
236 |
<td class="check-column"></td>
|
237 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
238 |
</tr>
|
239 |
<tr>
|
240 |
+
<td class="feature-column"><?php esc_html_e('Plus Many Other Features...', 'duplicator') ?></td>
|
241 |
<td class="check-column"></td>
|
242 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
243 |
</tr>
|
246 |
<br style="clear:both" />
|
247 |
<p style="text-align:center">
|
248 |
<button onclick="window.open('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_go_pro&utm_campaign=duplicator_pro');" class="button button-large dup-check-it-btn" >
|
249 |
+
<?php esc_html_e('Check It Out!', 'duplicator') ?>
|
250 |
</button>
|
251 |
</p>
|
252 |
<br/><br/>
|
views/inc.header.php
CHANGED
@@ -2,5 +2,5 @@
|
|
2 |
<!-- !!DO NOT CHANGE OR EDIT PRODUCT NAME!!
|
3 |
If your interested in Private Label Rights please contact us for
|
4 |
customizations to product labeling: snapcreek.com -->
|
5 |
-
<h1><?php echo $title ?><br/></h1>
|
6 |
<?php } ?>
|
2 |
<!-- !!DO NOT CHANGE OR EDIT PRODUCT NAME!!
|
3 |
If your interested in Private Label Rights please contact us for
|
4 |
customizations to product labeling: snapcreek.com -->
|
5 |
+
<h1><?php echo esc_html($title); ?><br/></h1>
|
6 |
<?php } ?>
|
views/javascript.php
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<script type="text/javascript">
|
2 |
-
/* DESCRIPTION: Methods and Objects in this file are global and common in
|
3 |
-
* nature use this file to place all shared methods and varibles */
|
4 |
-
|
5 |
-
//UNIQUE NAMESPACE
|
6 |
-
Duplicator = new Object();
|
7 |
-
Duplicator.UI = new Object();
|
8 |
-
Duplicator.Pack = new Object();
|
9 |
-
Duplicator.Settings = new Object();
|
10 |
-
Duplicator.Tools = new Object();
|
11 |
-
Duplicator.Tasks = new Object();
|
12 |
-
|
13 |
-
//GLOBAL CONSTANTS
|
14 |
-
Duplicator.DEBUG_AJAX_RESPONSE = false;
|
15 |
-
Duplicator.AJAX_TIMER = null;
|
16 |
-
|
17 |
-
|
18 |
-
/* ============================================================================
|
19 |
-
* BASE NAMESPACE: All methods at the top of the Duplicator Namespace
|
20 |
-
* ============================================================================ */
|
21 |
-
|
22 |
-
/* ----------------------------------------
|
23 |
-
* METHOD: Starts a timer for Ajax calls */
|
24 |
-
Duplicator.StartAjaxTimer = function() {
|
25 |
-
Duplicator.AJAX_TIMER = new Date();
|
26 |
-
};
|
27 |
-
|
28 |
-
/* ----------------------------------------
|
29 |
-
* METHOD: Ends a timer for Ajax calls */
|
30 |
-
Duplicator.EndAjaxTimer = function() {
|
31 |
-
var endTime = new Date();
|
32 |
-
Duplicator.AJAX_TIMER = (endTime.getTime() - Duplicator.AJAX_TIMER) /1000;
|
33 |
-
};
|
34 |
-
|
35 |
-
/* ----------------------------------------
|
36 |
-
* METHOD: Reloads the current window
|
37 |
-
* @param data An xhr object */
|
38 |
-
Duplicator.ReloadWindow = function(data) {
|
39 |
-
if (Duplicator.DEBUG_AJAX_RESPONSE) {
|
40 |
-
Duplicator.Pack.ShowError('debug on', data);
|
41 |
-
} else {
|
42 |
-
window.location.reload(true);
|
43 |
-
}
|
44 |
-
};
|
45 |
-
|
46 |
-
//Basic Util Methods here:
|
47 |
-
Duplicator.OpenLogWindow = function(log) {
|
48 |
-
var logFile = log || null;
|
49 |
-
if (logFile == null) {
|
50 |
-
window.open('?page=duplicator-tools', 'Log Window');
|
51 |
-
} else {
|
52 |
-
window.open('<?php echo DUPLICATOR_SSDIR_URL; ?>' + '/' + log)
|
53 |
-
}
|
54 |
-
};
|
55 |
-
|
56 |
-
|
57 |
-
/* ============================================================================
|
58 |
-
* UI NAMESPACE: All methods at the top of the Duplicator Namespace
|
59 |
-
* ============================================================================ */
|
60 |
-
|
61 |
-
/* ----------------------------------------
|
62 |
-
* METHOD: */
|
63 |
-
Duplicator.UI.SaveViewStateByPost = function (key, value) {
|
64 |
-
if (key != undefined && value != undefined ) {
|
65 |
-
jQuery.ajax({
|
66 |
-
type: "POST",
|
67 |
-
url: ajaxurl,
|
68 |
-
dataType: "json",
|
69 |
-
data: {action : 'DUP_UI_SaveViewStateByPost', key: key, value: value},
|
70 |
-
success: function(data) {},
|
71 |
-
error: function(data) {}
|
72 |
-
});
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
/* ----------------------------------------
|
77 |
-
* METHOD: */
|
78 |
-
Duplicator.UI.AnimateProgressBar = function(id) {
|
79 |
-
//Create Progress Bar
|
80 |
-
var $mainbar = jQuery("#" + id);
|
81 |
-
$mainbar.progressbar({ value: 100 });
|
82 |
-
$mainbar.height(25);
|
83 |
-
runAnimation($mainbar);
|
84 |
-
|
85 |
-
function runAnimation($pb) {
|
86 |
-
$pb.css({ "padding-left": "0%", "padding-right": "90%" });
|
87 |
-
$pb.progressbar("option", "value", 100);
|
88 |
-
$pb.animate({ paddingLeft: "90%", paddingRight: "0%" }, 3000, "linear", function () { runAnimation($pb); });
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
/* ----------------------------------------
|
94 |
-
* METHOD: Toggle MetaBoxes */
|
95 |
-
Duplicator.UI.ToggleMetaBox = function() {
|
96 |
-
var $title = jQuery(this);
|
97 |
-
var $panel = $title.parent().find('.dup-box-panel');
|
98 |
-
var $arrow = $title.parent().find('.dup-box-arrow i');
|
99 |
-
var key = $panel.attr('id');
|
100 |
-
var value = $panel.is(":visible") ? 0 : 1;
|
101 |
-
$panel.toggle();
|
102 |
-
Duplicator.UI.SaveViewStateByPost(key, value);
|
103 |
-
(value)
|
104 |
-
? $arrow.removeClass().addClass('fa fa-caret-up')
|
105 |
-
: $arrow.removeClass().addClass('fa fa-caret-down');
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
jQuery(document).ready(function($) {
|
111 |
-
//Init: Toggle MetaBoxes
|
112 |
-
$('div.dup-box div.dup-box-title').each(function() {
|
113 |
-
var $title = $(this);
|
114 |
-
var $panel = $title.parent().find('.dup-box-panel');
|
115 |
-
var $arrow = $title.find('.dup-box-arrow');
|
116 |
-
$title.click(Duplicator.UI.ToggleMetaBox);
|
117 |
-
($panel.is(":visible"))
|
118 |
-
? $arrow.html('<i class="fa fa-caret-up"></i>')
|
119 |
-
: $arrow.html('<i class="fa fa-caret-down"></i>');
|
120 |
-
});
|
121 |
-
|
122 |
-
//Look for tooltip data
|
123 |
-
$('i[data-tooltip!=""]').qtip({
|
124 |
-
content: {
|
125 |
-
attr: 'data-tooltip',
|
126 |
-
title: {
|
127 |
-
text: function() { return $(this).attr('data-tooltip-title'); }
|
128 |
-
}
|
129 |
-
},
|
130 |
-
style: {
|
131 |
-
classes: 'qtip-light qtip-rounded qtip-shadow',
|
132 |
-
width: 500
|
133 |
-
},
|
134 |
-
position: {
|
135 |
-
my: 'top left',
|
136 |
-
at: 'bottom center'
|
137 |
-
}
|
138 |
-
});
|
139 |
-
|
140 |
-
|
141 |
-
});
|
142 |
-
|
143 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/packages/details/controller.php
CHANGED
@@ -3,15 +3,15 @@ DUP_Util::hasCapability('manage_options');
|
|
3 |
global $wpdb;
|
4 |
|
5 |
//COMMON HEADER DISPLAY
|
6 |
-
$current_tab = isset($_REQUEST['tab']) ?
|
7 |
-
$package_id = isset($_REQUEST["id"]) ?
|
8 |
|
9 |
$package = DUP_Package::getByID($package_id);
|
10 |
$err_found = ($package == null || $package->Status < 100);
|
11 |
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
-
$err_link_log = "<a target='_blank' href='
|
13 |
-
$err_link_faq = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_faq">' .
|
14 |
-
$err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_resources#faq-resource">' .
|
15 |
?>
|
16 |
|
17 |
<style>
|
@@ -30,21 +30,21 @@ $err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/do
|
|
30 |
<?php if ($err_found) :?>
|
31 |
<div class="error">
|
32 |
<p>
|
33 |
-
<?php echo
|
34 |
-
<?php echo
|
35 |
</p>
|
36 |
</div>
|
37 |
<?php endif; ?>
|
38 |
|
39 |
<h2 class="nav-tab-wrapper">
|
40 |
-
<a href="?page=duplicator&action=detail&tab=detail&id=<?php echo $package_id ?>" class="nav-tab <?php echo ($current_tab == 'detail') ? 'nav-tab-active' : '' ?>">
|
41 |
-
<?php
|
42 |
</a>
|
43 |
-
<a href="?page=duplicator&action=detail&tab=transfer&id=<?php echo $package_id ?>" class="nav-tab <?php echo ($current_tab == 'transfer') ? 'nav-tab-active' : '' ?>">
|
44 |
-
<?php
|
45 |
</a>
|
46 |
</h2>
|
47 |
-
<div class="all-packages"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php
|
48 |
|
49 |
<?php
|
50 |
switch ($current_tab) {
|
3 |
global $wpdb;
|
4 |
|
5 |
//COMMON HEADER DISPLAY
|
6 |
+
$current_tab = isset($_REQUEST['tab']) ? sanitize_text_field($_REQUEST['tab']) : 'detail';
|
7 |
+
$package_id = isset($_REQUEST["id"]) ? sanitize_text_field($_REQUEST["id"]) : 0;
|
8 |
|
9 |
$package = DUP_Package::getByID($package_id);
|
10 |
$err_found = ($package == null || $package->Status < 100);
|
11 |
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
+
$err_link_log = "<a target='_blank' href='".esc_url($link_log)."' >" . esc_html__('package log', 'duplicator') . '</a>';
|
13 |
+
$err_link_faq = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_faq">' . esc_html__('FAQ', 'duplicator') . '</a>';
|
14 |
+
$err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_details_resources#faq-resource">' . esc_html__('resources page', 'duplicator') . '</a>';
|
15 |
?>
|
16 |
|
17 |
<style>
|
30 |
<?php if ($err_found) :?>
|
31 |
<div class="error">
|
32 |
<p>
|
33 |
+
<?php echo esc_html__('This package contains an error. Please review the ', 'duplicator') . $err_link_log . esc_html__(' for details.', 'duplicator'); ?>
|
34 |
+
<?php echo esc_html__('For help visit the ', 'duplicator') . $err_link_faq . esc_html__(' and ', 'duplicator') . $err_link_ticket; ?>
|
35 |
</p>
|
36 |
</div>
|
37 |
<?php endif; ?>
|
38 |
|
39 |
<h2 class="nav-tab-wrapper">
|
40 |
+
<a href="?page=duplicator&action=detail&tab=detail&id=<?php echo absint($package_id); ?>" class="nav-tab <?php echo ($current_tab == 'detail') ? 'nav-tab-active' : '' ?>">
|
41 |
+
<?php esc_html_e('Details', 'duplicator'); ?>
|
42 |
</a>
|
43 |
+
<a href="?page=duplicator&action=detail&tab=transfer&id=<?php echo absint($package_id); ?>" class="nav-tab <?php echo ($current_tab == 'transfer') ? 'nav-tab-active' : '' ?>">
|
44 |
+
<?php esc_html_e('Transfer', 'duplicator'); ?>
|
45 |
</a>
|
46 |
</h2>
|
47 |
+
<div class="all-packages"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php esc_html_e('Packages', 'duplicator'); ?></a></div>
|
48 |
|
49 |
<?php
|
50 |
switch ($current_tab) {
|
views/packages/details/detail.php
CHANGED
@@ -71,39 +71,39 @@ GENERAL -->
|
|
71 |
<i class="fa fa-archive"></i> <?php _e('General', 'duplicator') ?>
|
72 |
<div class="dup-box-arrow"></div>
|
73 |
</div>
|
74 |
-
<div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo $ui_css_general ?>">
|
75 |
<table class='dup-dtl-data-tbl'>
|
76 |
<tr>
|
77 |
<td><?php _e('Name', 'duplicator') ?>:</td>
|
78 |
<td>
|
79 |
-
<a href="javascript:void(0);" onclick="jQuery('#dup-name-info').toggle()"><?php echo $package->Name ?></a>
|
80 |
<div id="dup-name-info">
|
81 |
-
<b><?php _e('ID', 'duplicator') ?>:</b> <?php echo $package->ID ?><br/>
|
82 |
-
<b><?php _e('Hash', 'duplicator') ?>:</b> <?php echo $package->Hash ?><br/>
|
83 |
-
<b><?php _e('Full Name', 'duplicator') ?>:</b> <?php echo $package->NameHash ?><br/>
|
84 |
</div>
|
85 |
</td>
|
86 |
</tr>
|
87 |
<tr>
|
88 |
<td><?php _e('Notes', 'duplicator') ?>:</td>
|
89 |
-
<td><?php echo strlen($package->Notes) ? $package->Notes : __('- no notes -', 'duplicator') ?></td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
<td><?php _e('Versions', 'duplicator') ?>:</td>
|
93 |
<td>
|
94 |
-
<a href="javascript:void(0);" onclick="jQuery('#dup-version-info').toggle()"><?php echo $package->Version ?></a>
|
95 |
<div id="dup-version-info">
|
96 |
-
<b><?php _e('WordPress', 'duplicator') ?>:</b> <?php echo strlen($package->VersionWP) ? $package->VersionWP : __('- unknown -', 'duplicator') ?><br/>
|
97 |
-
<b><?php _e('PHP', 'duplicator') ?>:</b> <?php echo strlen($package->VersionPHP) ? $package->VersionPHP : __('- unknown -', 'duplicator') ?><br/>
|
98 |
<b><?php _e('Mysql', 'duplicator') ?>:</b>
|
99 |
-
<?php echo strlen($package->VersionDB) ? $package->VersionDB : __('- unknown -', 'duplicator') ?> |
|
100 |
-
<?php echo strlen($package->Database->Comments) ? $package->Database->Comments : __('- unknown -', 'duplicator') ?><br/>
|
101 |
</div>
|
102 |
</td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
<td><?php _e('Runtime', 'duplicator') ?>:</td>
|
106 |
-
<td><?php echo strlen($package->Runtime) ? $package->Runtime : __("error running", 'duplicator'); ?></td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
<td><?php _e('Status', 'duplicator') ?>:</td>
|
@@ -111,36 +111,35 @@ GENERAL -->
|
|
111 |
</tr>
|
112 |
<tr>
|
113 |
<td><?php _e('User', 'duplicator') ?>:</td>
|
114 |
-
<td><?php echo strlen($package->WPUser) ? $package->WPUser : __('- unknown -', 'duplicator') ?></td>
|
115 |
</tr>
|
116 |
<tr>
|
117 |
<td><?php _e('Files', 'duplicator') ?>: </td>
|
118 |
<td>
|
119 |
<div id="dup-downloads-area">
|
120 |
-
<?php if (!$err_found) :?>
|
121 |
-
|
122 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $
|
123 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $
|
124 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $
|
125 |
-
<button class="button" onclick="Duplicator.Pack.
|
126 |
-
<button class="button" onclick="Duplicator.Pack.ShowLinksDialog(<?php echo "'{$link_sql}','{$link_archive}','{$link_installer}','{$link_log}'" ;?>);" class="thickbox"><i class="fa fa-lock"></i> <?php _e("Share", 'duplicator')?></button>
|
127 |
<?php else: ?>
|
128 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_log; ?>', this);return false;"><i class="fa fa-list-alt"></i> Log </button>
|
129 |
<?php endif; ?>
|
130 |
</div>
|
131 |
<?php if (!$err_found) :?>
|
132 |
<table class="dup-sub-list">
|
133 |
<tr>
|
134 |
<td><?php _e('Archive', 'duplicator') ?>: </td>
|
135 |
-
<td><a href="<?php echo $link_archive ?>" target="_blank"><?php echo $package->Archive->File ?></a></td>
|
136 |
</tr>
|
137 |
<tr>
|
138 |
<td><?php _e('Installer', 'duplicator') ?>: </td>
|
139 |
-
<td><a href="<?php echo $link_installer ?>" target="_blank"><?php echo $package->Installer->File ?></a></td>
|
140 |
</tr>
|
141 |
<tr>
|
142 |
<td><?php _e('Database', 'duplicator') ?>: </td>
|
143 |
-
<td><a href="<?php echo $link_sql ?>" target="_blank"><?php echo $package->Database->File ?></a></td>
|
144 |
</tr>
|
145 |
</table>
|
146 |
<?php endif; ?>
|
@@ -156,7 +155,7 @@ DIALOG: QUICK PATH -->
|
|
156 |
<div id="dup-dlg-quick-path" title="<?php _e('Download Links', 'duplicator'); ?>" style="display:none">
|
157 |
<p>
|
158 |
<i class="fa fa-lock"></i>
|
159 |
-
<?php _e("The following links contain sensitive data. Please share with caution!", 'duplicator');
|
160 |
</p>
|
161 |
|
162 |
<div style="padding: 0px 15px 15px 15px;">
|
@@ -170,10 +169,10 @@ DIALOG: QUICK PATH -->
|
|
170 |
STORAGE -->
|
171 |
<div class="dup-box">
|
172 |
<div class="dup-box-title">
|
173 |
-
<i class="fa fa-database"></i> <?php
|
174 |
<div class="dup-box-arrow"></div>
|
175 |
</div>
|
176 |
-
<div class="dup-box-panel" id="dup-package-dtl-storage-panel" style="<?php echo $ui_css_storage ?>">
|
177 |
<table class="widefat package-tbl">
|
178 |
<thead>
|
179 |
<tr>
|
@@ -191,16 +190,16 @@ STORAGE -->
|
|
191 |
<tr>
|
192 |
<td colspan="4">
|
193 |
<div class="dup-store-pro">
|
194 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
195 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
196 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
197 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
198 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
199 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP', 'OneDrive'); ?>
|
200 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
201 |
<i class="fa fa-lightbulb-o"
|
202 |
-
data-tooltip-title="<?php
|
203 |
-
data-tooltip="<?php
|
204 |
. 'based location such as Google Drive, Amazon, Dropbox, OneDrive or FTP.', 'duplicator'); ?>">
|
205 |
</i>
|
206 |
</div>
|
@@ -222,7 +221,7 @@ ARCHIVE -->
|
|
222 |
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?>
|
223 |
<div class="dup-box-arrow"></div>
|
224 |
</div>
|
225 |
-
<div class="dup-box-panel" id="dup-package-dtl-archive-panel" style="<?php echo $ui_css_archive ?>">
|
226 |
|
227 |
<!-- FILES -->
|
228 |
<div class="dup-box-panel-hdr"><i class="fa fa-files-o"></i> <?php _e('FILES', 'duplicator'); ?></div>
|
@@ -249,14 +248,14 @@ ARCHIVE -->
|
|
249 |
? str_replace(';', ";\n", $package->Archive->FilterDirs)
|
250 |
: __('- no filters -', 'duplicator');
|
251 |
?>
|
252 |
-
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
253 |
</div>
|
254 |
|
255 |
<div class="sub-section">
|
256 |
<b><?php _e('Extensions', 'duplicator') ?>: </b><br/>
|
257 |
<?php
|
258 |
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
259 |
-
? $package->Archive->FilterExts
|
260 |
: __('- no filters -', 'duplicator');
|
261 |
?>
|
262 |
</div>
|
@@ -268,7 +267,7 @@ ARCHIVE -->
|
|
268 |
? str_replace(';', ";\n", $package->Archive->FilterFiles)
|
269 |
: __('- no filters -', 'duplicator');
|
270 |
?>
|
271 |
-
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
272 |
</div>
|
273 |
</td>
|
274 |
</tr>
|
@@ -280,12 +279,12 @@ ARCHIVE -->
|
|
280 |
<table class='dup-dtl-data-tbl'>
|
281 |
<tr>
|
282 |
<td><?php _e('Type', 'duplicator') ?>: </td>
|
283 |
-
<td><?php echo $package->Database->Type ?></td>
|
284 |
</tr>
|
285 |
<tr>
|
286 |
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
287 |
<td>
|
288 |
-
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode; ?></a>
|
289 |
<?php if ($mysqlcompat_on) : ?>
|
290 |
<br/>
|
291 |
<small style="font-style:italic; color:maroon">
|
@@ -299,12 +298,12 @@ ARCHIVE -->
|
|
299 |
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
300 |
<td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
|
301 |
</tr>
|
302 |
-
<tr class="sub-item <?php echo $css_db_filter_on ?>">
|
303 |
<td><?php _e('Tables', 'duplicator') ?>: </td>
|
304 |
<td>
|
305 |
<?php
|
306 |
echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
|
307 |
-
? str_replace(',', ' | ', $package->Database->FilterTables)
|
308 |
: __('- no filters -', 'duplicator');
|
309 |
?>
|
310 |
</td>
|
@@ -321,7 +320,7 @@ INSTALLER -->
|
|
321 |
<i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
|
322 |
<div class="dup-box-arrow"></div>
|
323 |
</div>
|
324 |
-
<div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo $ui_css_install ?>">
|
325 |
<table class='dup-dtl-data-tbl'>
|
326 |
<tr>
|
327 |
<td colspan="2"><div class="dup-installer-header-2"><?php _e(" Security", 'duplicator') ?></div></td>
|
@@ -336,7 +335,7 @@ INSTALLER -->
|
|
336 |
<tr>
|
337 |
<td colspan="2">
|
338 |
<div id="dup-pass-toggle">
|
339 |
-
<input type="password" name="secure-pass" id="secure-pass" readonly="true" value="<?php echo $dup_install_secure_pass;
|
340 |
<button type="button" id="secure-btn" onclick="Duplicator.Pack.TogglePassword()" title="<?php _e('Show/Hide Password', 'duplicator'); ?>"><i class="fa fa-eye"></i></button>
|
341 |
</div>
|
342 |
</td>
|
71 |
<i class="fa fa-archive"></i> <?php _e('General', 'duplicator') ?>
|
72 |
<div class="dup-box-arrow"></div>
|
73 |
</div>
|
74 |
+
<div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo esc_attr($ui_css_general); ?>">
|
75 |
<table class='dup-dtl-data-tbl'>
|
76 |
<tr>
|
77 |
<td><?php _e('Name', 'duplicator') ?>:</td>
|
78 |
<td>
|
79 |
+
<a href="javascript:void(0);" onclick="jQuery('#dup-name-info').toggle()"><?php echo esc_html($package->Name); ?></a>
|
80 |
<div id="dup-name-info">
|
81 |
+
<b><?php _e('ID', 'duplicator') ?>:</b> <?php echo absint($package->ID); ?><br/>
|
82 |
+
<b><?php _e('Hash', 'duplicator') ?>:</b> <?php echo esc_html($package->Hash); ?><br/>
|
83 |
+
<b><?php _e('Full Name', 'duplicator') ?>:</b> <?php echo esc_html($package->NameHash); ?><br/>
|
84 |
</div>
|
85 |
</td>
|
86 |
</tr>
|
87 |
<tr>
|
88 |
<td><?php _e('Notes', 'duplicator') ?>:</td>
|
89 |
+
<td><?php echo strlen($package->Notes) ? esc_html($package->Notes) : __('- no notes -', 'duplicator') ?></td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
<td><?php _e('Versions', 'duplicator') ?>:</td>
|
93 |
<td>
|
94 |
+
<a href="javascript:void(0);" onclick="jQuery('#dup-version-info').toggle()"><?php echo esc_html($package->Version); ?></a>
|
95 |
<div id="dup-version-info">
|
96 |
+
<b><?php _e('WordPress', 'duplicator') ?>:</b> <?php echo strlen($package->VersionWP) ? esc_html($package->VersionWP) : __('- unknown -', 'duplicator') ?><br/>
|
97 |
+
<b><?php _e('PHP', 'duplicator') ?>:</b> <?php echo strlen($package->VersionPHP) ? esc_html($package->VersionPHP) : __('- unknown -', 'duplicator') ?><br/>
|
98 |
<b><?php _e('Mysql', 'duplicator') ?>:</b>
|
99 |
+
<?php echo strlen($package->VersionDB) ? esc_html($package->VersionDB) : __('- unknown -', 'duplicator') ?> |
|
100 |
+
<?php echo strlen($package->Database->Comments) ? esc_html($package->Database->Comments) : __('- unknown -', 'duplicator') ?><br/>
|
101 |
</div>
|
102 |
</td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
<td><?php _e('Runtime', 'duplicator') ?>:</td>
|
106 |
+
<td><?php echo strlen($package->Runtime) ? esc_html($package->Runtime) : __("error running", 'duplicator'); ?></td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
<td><?php _e('Status', 'duplicator') ?>:</td>
|
111 |
</tr>
|
112 |
<tr>
|
113 |
<td><?php _e('User', 'duplicator') ?>:</td>
|
114 |
+
<td><?php echo strlen($package->WPUser) ? esc_html($package->WPUser) : __('- unknown -', 'duplicator') ?></td>
|
115 |
</tr>
|
116 |
<tr>
|
117 |
<td><?php _e('Files', 'duplicator') ?>: </td>
|
118 |
<td>
|
119 |
<div id="dup-downloads-area">
|
120 |
+
<?php if (!$err_found) :?>
|
121 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($link_installer); ?>', this);return false;"><i class="fa fa-bolt"></i> Installer</button>
|
122 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($link_archive); ?>', this);return false;"><i class="fa fa-file-archive-o"></i> Archive - <?php echo esc_html($package->ZipSize); ?></button>
|
123 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_html($link_sql); ?>', this);return false;"><i class="fa fa-table"></i> SQL - <?php echo esc_html(DUP_Util::byteSize($package->Database->Size)); ?></button>
|
124 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($link_log); ?>', this);return false;"><i class="fa fa-list-alt"></i> <?php _e('Log', 'duplicator'); ?> </button>
|
125 |
+
<button class="button" onclick="Duplicator.Pack.ShowLinksDialog(<?php echo "'{$link_sql}','{$link_archive}','{$link_installer}','{$link_log}'"; ?>);" class="thickbox"><i class="fa fa-lock"></i> <?php _e("Share", 'duplicator')?></button>
|
|
|
126 |
<?php else: ?>
|
127 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($link_log); ?>', this);return false;"><i class="fa fa-list-alt"></i> <?php _e('Log', 'duplicator'); ?> </button>
|
128 |
<?php endif; ?>
|
129 |
</div>
|
130 |
<?php if (!$err_found) :?>
|
131 |
<table class="dup-sub-list">
|
132 |
<tr>
|
133 |
<td><?php _e('Archive', 'duplicator') ?>: </td>
|
134 |
+
<td><a href="<?php echo esc_url($link_archive); ?>" target="_blank"><?php echo esc_html($package->Archive->File); ?></a></td>
|
135 |
</tr>
|
136 |
<tr>
|
137 |
<td><?php _e('Installer', 'duplicator') ?>: </td>
|
138 |
+
<td><a href="<?php echo esc_url($link_installer); ?>" target="_blank"><?php echo esc_html($package->Installer->File); ?></a></td>
|
139 |
</tr>
|
140 |
<tr>
|
141 |
<td><?php _e('Database', 'duplicator') ?>: </td>
|
142 |
+
<td><a href="<?php echo esc_url($link_sql) ?>" target="_blank"><?php echo esc_html($package->Database->File); ?></a></td>
|
143 |
</tr>
|
144 |
</table>
|
145 |
<?php endif; ?>
|
155 |
<div id="dup-dlg-quick-path" title="<?php _e('Download Links', 'duplicator'); ?>" style="display:none">
|
156 |
<p>
|
157 |
<i class="fa fa-lock"></i>
|
158 |
+
<?php _e("The following links contain sensitive data. Please share with caution!", 'duplicator'); ?>
|
159 |
</p>
|
160 |
|
161 |
<div style="padding: 0px 15px 15px 15px;">
|
169 |
STORAGE -->
|
170 |
<div class="dup-box">
|
171 |
<div class="dup-box-title">
|
172 |
+
<i class="fa fa-database"></i> <?php esc_html_e('Storage', 'duplicator') ?>
|
173 |
<div class="dup-box-arrow"></div>
|
174 |
</div>
|
175 |
+
<div class="dup-box-panel" id="dup-package-dtl-storage-panel" style="<?php echo esc_attr($ui_css_storage); ?>">
|
176 |
<table class="widefat package-tbl">
|
177 |
<thead>
|
178 |
<tr>
|
190 |
<tr>
|
191 |
<td colspan="4">
|
192 |
<div class="dup-store-pro">
|
193 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/amazon-64.png"); ?>" />
|
194 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/dropbox-64.png"); ?>" />
|
195 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/google_drive_64px.png"); ?>" />
|
196 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/ftp-64.png"); ?>" />
|
197 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/onedrive-48px.png"); ?>" />
|
198 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP', 'OneDrive'); ?>
|
199 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
200 |
<i class="fa fa-lightbulb-o"
|
201 |
+
data-tooltip-title="<?php esc_attr_e('Additional Storage:', 'duplicator'); ?>"
|
202 |
+
data-tooltip="<?php esc_attr_e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
203 |
. 'based location such as Google Drive, Amazon, Dropbox, OneDrive or FTP.', 'duplicator'); ?>">
|
204 |
</i>
|
205 |
</div>
|
221 |
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?>
|
222 |
<div class="dup-box-arrow"></div>
|
223 |
</div>
|
224 |
+
<div class="dup-box-panel" id="dup-package-dtl-archive-panel" style="<?php echo esc_attr($ui_css_archive); ?>">
|
225 |
|
226 |
<!-- FILES -->
|
227 |
<div class="dup-box-panel-hdr"><i class="fa fa-files-o"></i> <?php _e('FILES', 'duplicator'); ?></div>
|
248 |
? str_replace(';', ";\n", $package->Archive->FilterDirs)
|
249 |
: __('- no filters -', 'duplicator');
|
250 |
?>
|
251 |
+
<textarea class='file-info' readonly="true"><?php echo esc_html($txt); ?></textarea>
|
252 |
</div>
|
253 |
|
254 |
<div class="sub-section">
|
255 |
<b><?php _e('Extensions', 'duplicator') ?>: </b><br/>
|
256 |
<?php
|
257 |
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
258 |
+
? esc_html($package->Archive->FilterExts)
|
259 |
: __('- no filters -', 'duplicator');
|
260 |
?>
|
261 |
</div>
|
267 |
? str_replace(';', ";\n", $package->Archive->FilterFiles)
|
268 |
: __('- no filters -', 'duplicator');
|
269 |
?>
|
270 |
+
<textarea class='file-info' readonly="true"><?php echo esc_html($txt); ?></textarea>
|
271 |
</div>
|
272 |
</td>
|
273 |
</tr>
|
279 |
<table class='dup-dtl-data-tbl'>
|
280 |
<tr>
|
281 |
<td><?php _e('Type', 'duplicator') ?>: </td>
|
282 |
+
<td><?php echo esc_html($package->Database->Type); ?></td>
|
283 |
</tr>
|
284 |
<tr>
|
285 |
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
286 |
<td>
|
287 |
+
<a href="?page=duplicator-settings" target="_blank"><?php echo esc_html($dbbuild_mode); ?></a>
|
288 |
<?php if ($mysqlcompat_on) : ?>
|
289 |
<br/>
|
290 |
<small style="font-style:italic; color:maroon">
|
298 |
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
299 |
<td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
|
300 |
</tr>
|
301 |
+
<tr class="sub-item <?php echo esc_attr($css_db_filter_on); ?>">
|
302 |
<td><?php _e('Tables', 'duplicator') ?>: </td>
|
303 |
<td>
|
304 |
<?php
|
305 |
echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
|
306 |
+
? str_replace(',', ' | ', esc_html($package->Database->FilterTables))
|
307 |
: __('- no filters -', 'duplicator');
|
308 |
?>
|
309 |
</td>
|
320 |
<i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
|
321 |
<div class="dup-box-arrow"></div>
|
322 |
</div>
|
323 |
+
<div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo esc_attr($ui_css_install); ?>">
|
324 |
<table class='dup-dtl-data-tbl'>
|
325 |
<tr>
|
326 |
<td colspan="2"><div class="dup-installer-header-2"><?php _e(" Security", 'duplicator') ?></div></td>
|
335 |
<tr>
|
336 |
<td colspan="2">
|
337 |
<div id="dup-pass-toggle">
|
338 |
+
<input type="password" name="secure-pass" id="secure-pass" readonly="true" value="<?php echo esc_attr($dup_install_secure_pass); ?>" />
|
339 |
<button type="button" id="secure-btn" onclick="Duplicator.Pack.TogglePassword()" title="<?php _e('Show/Hide Password', 'duplicator'); ?>"><i class="fa fa-eye"></i></button>
|
340 |
</div>
|
341 |
</td>
|
views/packages/details/transfer.php
CHANGED
@@ -7,30 +7,30 @@
|
|
7 |
<div class="panel">
|
8 |
|
9 |
<br/>
|
10 |
-
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
-
<?php
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
17 |
<ul>
|
18 |
-
<li><i class="fa fa-amazon"></i> <?php
|
19 |
-
<li><i class="fa fa-dropbox"></i> <?php
|
20 |
-
<li><i class="fa fa-google"></i> <?php
|
21 |
-
<li><i class="fa fa-upload"></i> <?php
|
22 |
-
<li><i class="fa fa-cloud"></i> <?php
|
23 |
-
<li><i class="fa fa-folder-open-o"></i> <?php
|
24 |
</ul>
|
25 |
</div>
|
26 |
<?php
|
27 |
-
|
28 |
?>
|
29 |
</div><br/>
|
30 |
|
31 |
<p style="text-align:center">
|
32 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=manual_transfer&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
33 |
-
<?php
|
34 |
</a>
|
35 |
</p>
|
36 |
</div>
|
7 |
<div class="panel">
|
8 |
|
9 |
<br/>
|
10 |
+
<div class="area" style="width: 450px">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
+
<?php esc_html_e('Transfer your packages to multiple locations with Duplicator Pro', 'duplicator') ?>
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
17 |
<ul>
|
18 |
+
<li><i class="fa fa-amazon"></i> <?php esc_html_e('Amazon S3', 'duplicator'); ?></li>
|
19 |
+
<li><i class="fa fa-dropbox"></i> <?php esc_html_e('Dropbox', 'duplicator'); ?></li>
|
20 |
+
<li><i class="fa fa-google"></i> <?php esc_html_e('Google Drive', 'duplicator'); ?></li>
|
21 |
+
<li><i class="fa fa-upload"></i> <?php esc_html_e('FTP', 'duplicator'); ?></li>
|
22 |
+
<li><i class="fa fa-cloud"></i> <?php esc_html_e('OneDrive', 'duplicator'); ?></li>
|
23 |
+
<li><i class="fa fa-folder-open-o"></i> <?php esc_html_e('Custom Directory', 'duplicator'); ?></li>
|
24 |
</ul>
|
25 |
</div>
|
26 |
<?php
|
27 |
+
esc_html_e('Set up a one-time storage location and automatically push the package to your destination.', 'duplicator');
|
28 |
?>
|
29 |
</div><br/>
|
30 |
|
31 |
<p style="text-align:center">
|
32 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=manual_transfer&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
33 |
+
<?php esc_html_e('Learn More', 'duplicator') ?>
|
34 |
</a>
|
35 |
</p>
|
36 |
</div>
|
views/packages/main/controller.php
CHANGED
@@ -1,6 +1,25 @@
|
|
1 |
<?php
|
2 |
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
|
3 |
-
$current_tab = isset($_REQUEST['tab']) ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
?>
|
5 |
|
6 |
<style>
|
1 |
<?php
|
2 |
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
|
3 |
+
$current_tab = isset($_REQUEST['tab']) ? sanitize_text_field($_REQUEST['tab']) : 'list';
|
4 |
+
$_GET['_wpnonce'] = isset($_GET['_wpnonce']) ? $_GET['_wpnonce'] : null;
|
5 |
+
|
6 |
+
switch ($current_tab) {
|
7 |
+
case 'new1':
|
8 |
+
if (!wp_verify_nonce($_GET['_wpnonce'], 'new1-package')) {
|
9 |
+
die('Security check disrupted, please return to step 1.');
|
10 |
+
}
|
11 |
+
break;
|
12 |
+
case 'new2':
|
13 |
+
if (!wp_verify_nonce($_GET['_wpnonce'], 'new2-package')) {
|
14 |
+
die('Security check disrupted, please return to step 1.');
|
15 |
+
}
|
16 |
+
break;
|
17 |
+
case 'new3':
|
18 |
+
if (!wp_verify_nonce($_GET['_wpnonce'], 'new3-package')) {
|
19 |
+
die('Security check disrupted, please return to step 1.');
|
20 |
+
}
|
21 |
+
break;
|
22 |
+
}
|
23 |
?>
|
24 |
|
25 |
<style>
|
views/packages/main/packages.php
CHANGED
@@ -47,12 +47,12 @@ TOOL-BAR -->
|
|
47 |
<tr valign="top">
|
48 |
<td style="white-space: nowrap">
|
49 |
<select id="dup-pack-bulk-actions">
|
50 |
-
<option value="-1" selected="selected"><?php
|
51 |
-
<option value="delete" title="<?php
|
52 |
</select>
|
53 |
-
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php
|
54 |
<span class="btn-separator"></span>
|
55 |
-
<a href="javascript:void(0)" class="button" title="<?php
|
56 |
<?php echo ($statusCount == 1)
|
57 |
? '<i class="fa fa-question-circle" style="color:green"></i>'
|
58 |
: '<i class="fa fa-question-circle grey-icon"></i>';
|
@@ -61,8 +61,12 @@ TOOL-BAR -->
|
|
61 |
<a href="admin.php?page=duplicator-settings&tab=package" class="button grey-icon" title="<?php _e("Settings", 'duplicator') ?>"><i class="fa fa-gear"></i></a>
|
62 |
</td>
|
63 |
<td>
|
64 |
-
<span><i class="fa fa-archive"></i> <?php
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
</td>
|
67 |
</tr>
|
68 |
</table>
|
@@ -78,12 +82,12 @@ TOOL-BAR -->
|
|
78 |
<td>
|
79 |
<div id='dup-list-alert-nodata'>
|
80 |
<i class="fa fa-archive"></i>
|
81 |
-
<?php
|
82 |
-
<?php
|
83 |
<div class="dup-quick-start">
|
84 |
-
<?php
|
85 |
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=packages_empty&utm_campaign=quick_start" target="_blank">
|
86 |
-
<?php
|
87 |
</a>
|
88 |
</div>
|
89 |
<div style="height:75px"> </div>
|
@@ -99,12 +103,12 @@ TOOL-BAR -->
|
|
99 |
<table class="widefat dup-pack-table">
|
100 |
<thead>
|
101 |
<tr>
|
102 |
-
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php
|
103 |
-
<th><?php
|
104 |
-
<th><?php
|
105 |
-
<th style="width:90%;"><?php
|
106 |
<th style="text-align:center;" colspan="2">
|
107 |
-
<?php
|
108 |
</th>
|
109 |
</tr>
|
110 |
</thead>
|
@@ -140,21 +144,21 @@ TOOL-BAR -->
|
|
140 |
|
141 |
<!-- COMPLETE -->
|
142 |
<?php if ($row['status'] >= 100) : ?>
|
143 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
144 |
-
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id']
|
145 |
-
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt);?></td>
|
146 |
-
<td><?php echo DUP_Util::byteSize($pack_archive_size); ?></td>
|
147 |
<td class='pack-name'>
|
148 |
-
<?php echo ($pack_dbonly) ?
|
149 |
</td>
|
150 |
<td class="get-btns">
|
151 |
-
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;">
|
152 |
-
<i class="fa fa-bolt"></i> <?php
|
153 |
-
</button>
|
154 |
-
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;">
|
155 |
-
<i class="fa fa-file-archive-o"></i> <?php
|
156 |
</button>
|
157 |
-
<button type="button" class="button no-select" title="<?php
|
158 |
<i class="fa fa-archive" ></i>
|
159 |
</button>
|
160 |
</td>
|
@@ -171,19 +175,19 @@ TOOL-BAR -->
|
|
171 |
$size = array_sum($result);
|
172 |
}
|
173 |
$pack_archive_size = $size;
|
174 |
-
$error_url = "?page=duplicator&action=detail&tab=detail&id=
|
175 |
?>
|
176 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
177 |
-
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id']
|
178 |
-
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt)
|
179 |
-
<td><?php echo DUP_Util::byteSize($size); ?></td>
|
180 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
181 |
<td class="get-btns error-msg" colspan="2">
|
182 |
<span>
|
183 |
<i class="fa fa-exclamation-triangle"></i>
|
184 |
-
<a href="<?php echo $error_url; ?>"><?php
|
185 |
</span>
|
186 |
-
<a class="button no-select" title="<?php
|
187 |
<i class="fa fa-archive"></i>
|
188 |
</a>
|
189 |
</td>
|
@@ -197,8 +201,8 @@ TOOL-BAR -->
|
|
197 |
<tfoot>
|
198 |
<tr>
|
199 |
<th colspan="11" style='text-align:right; font-size:12px'>
|
200 |
-
<?php echo
|
201 |
-
<?php echo
|
202 |
</th>
|
203 |
</tr>
|
204 |
</tfoot>
|
@@ -237,17 +241,17 @@ THICK-BOX DIALOGS: -->
|
|
237 |
<!-- =======================
|
238 |
DIALOG: HELP DIALOG -->
|
239 |
<div id="dup-help-dlg-info" style="display:none">
|
240 |
-
<b><?php
|
241 |
-
<i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_pack_help&utm_campaign=duplicator_free#quick-010-q" target="_blank"><?php
|
242 |
-
<i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank"><?php
|
243 |
-
<i class="fa fa-file-code-o"></i> <a href="https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_faq&utm_campaign=duplicator_free" target="_blank"><?php
|
244 |
<br/><br/>
|
245 |
|
246 |
-
<b><?php
|
247 |
-
<i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_ticket&utm_campaign=duplicator_free" target="_blank"><?php
|
248 |
-
<i class="fa fa-lightbulb-o"></i> <a href="https://snapcreek.com/support?idea=1&utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_idea&utm_campaign=duplicator_free" target="_blank"><?php
|
249 |
<?php if($statusCount >= 3) : ?>
|
250 |
-
<i class="fa fa-star-o"></i> <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php
|
251 |
<?php endif; ?>
|
252 |
</div>
|
253 |
|
47 |
<tr valign="top">
|
48 |
<td style="white-space: nowrap">
|
49 |
<select id="dup-pack-bulk-actions">
|
50 |
+
<option value="-1" selected="selected"><?php esc_html_e("Bulk Actions", 'duplicator') ?></option>
|
51 |
+
<option value="delete" title="<?php esc_attr_e("Delete selected package(s)", 'duplicator') ?>"><?php esc_html_e("Delete", 'duplicator') ?></option>
|
52 |
</select>
|
53 |
+
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php esc_attr_e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.ConfirmDelete()">
|
54 |
<span class="btn-separator"></span>
|
55 |
+
<a href="javascript:void(0)" class="button" title="<?php esc_attr_e("Get Help", 'duplicator') ?>" onclick="Duplicator.Pack.showHelp()">
|
56 |
<?php echo ($statusCount == 1)
|
57 |
? '<i class="fa fa-question-circle" style="color:green"></i>'
|
58 |
: '<i class="fa fa-question-circle grey-icon"></i>';
|
61 |
<a href="admin.php?page=duplicator-settings&tab=package" class="button grey-icon" title="<?php _e("Settings", 'duplicator') ?>"><i class="fa fa-gear"></i></a>
|
62 |
</td>
|
63 |
<td>
|
64 |
+
<span><i class="fa fa-archive"></i> <?php esc_html_e("Packages", 'duplicator'); ?></span>
|
65 |
+
<?php
|
66 |
+
$new_package_url = admin_url('admin.php?page=duplicator&tab=new1');
|
67 |
+
$new_package_nonce_url = wp_nonce_url($new_package_url, 'new1-package');
|
68 |
+
?>
|
69 |
+
<a href="<?php echo $new_package_nonce_url;?>" class="add-new-h2"><?php esc_html_e("Create New", 'duplicator'); ?></a>
|
70 |
</td>
|
71 |
</tr>
|
72 |
</table>
|
82 |
<td>
|
83 |
<div id='dup-list-alert-nodata'>
|
84 |
<i class="fa fa-archive"></i>
|
85 |
+
<?php esc_html_e("No Packages Found.", 'duplicator'); ?><br/>
|
86 |
+
<?php esc_html_e("Click the 'Create New' button to build a package.", 'duplicator'); ?><br/>
|
87 |
<div class="dup-quick-start">
|
88 |
+
<?php esc_html_e("New to Duplicator?", 'duplicator'); ?><br/>
|
89 |
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=packages_empty&utm_campaign=quick_start" target="_blank">
|
90 |
+
<?php esc_html_e("Check out the 'Quick Start' guide!", 'duplicator'); ?>
|
91 |
</a>
|
92 |
</div>
|
93 |
<div style="height:75px"> </div>
|
103 |
<table class="widefat dup-pack-table">
|
104 |
<thead>
|
105 |
<tr>
|
106 |
+
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php esc_attr_e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
107 |
+
<th><?php esc_html_e("Created", 'duplicator') ?></th>
|
108 |
+
<th><?php esc_html_e("Size", 'duplicator') ?></th>
|
109 |
+
<th style="width:90%;"><?php esc_html_e("Name", 'duplicator'); ?></th>
|
110 |
<th style="text-align:center;" colspan="2">
|
111 |
+
<?php esc_html_e("Package", 'duplicator'); ?>
|
112 |
</th>
|
113 |
</tr>
|
114 |
</thead>
|
144 |
|
145 |
<!-- COMPLETE -->
|
146 |
<?php if ($row['status'] >= 100) : ?>
|
147 |
+
<tr class="dup-pack-info <?php echo esc_attr($css_alt); ?>">
|
148 |
+
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo absint($row['id']); ?>" /></td>
|
149 |
+
<td><?php echo esc_html(DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt));?></td>
|
150 |
+
<td><?php echo esc_html(DUP_Util::byteSize($pack_archive_size)); ?></td>
|
151 |
<td class='pack-name'>
|
152 |
+
<?php echo ($pack_dbonly) ? esc_html($pack_name)." <sup title='".esc_attr($txt_dbonly)."'>DB</sup>" : esc_html($pack_name); ?>
|
153 |
</td>
|
154 |
<td class="get-btns">
|
155 |
+
<button id="<?php echo esc_attr("{$uniqueid}_installer.php"); ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($installfilelink); ?>', this); return false;">
|
156 |
+
<i class="fa fa-bolt"></i> <?php esc_html_e("Installer", 'duplicator') ?>
|
157 |
+
</button>
|
158 |
+
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo esc_js($packagepath); ?>', this); return false;">
|
159 |
+
<i class="fa fa-file-archive-o"></i> <?php esc_html_e("Archive", 'duplicator') ?>
|
160 |
</button>
|
161 |
+
<button type="button" class="button no-select" title="<?php esc_html_e("Package Details", 'duplicator') ?>" onclick="Duplicator.Pack.OpenPackageDetails(<?php echo absint($row['id']); ?>);">
|
162 |
<i class="fa fa-archive" ></i>
|
163 |
</button>
|
164 |
</td>
|
175 |
$size = array_sum($result);
|
176 |
}
|
177 |
$pack_archive_size = $size;
|
178 |
+
$error_url = "?page=duplicator&action=detail&tab=detail&id=".absint($row['id']);
|
179 |
?>
|
180 |
+
<tr class="dup-pack-info <?php echo esc_attr($css_alt); ?>">
|
181 |
+
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo absint($row['id']); ?>" /></td>
|
182 |
+
<td><?php echo esc_html(DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt)); ?></td>
|
183 |
+
<td><?php echo esc_html(DUP_Util::byteSize($size)); ?></td>
|
184 |
+
<td class='pack-name'><?php echo esc_html($pack_name) ;?></td>
|
185 |
<td class="get-btns error-msg" colspan="2">
|
186 |
<span>
|
187 |
<i class="fa fa-exclamation-triangle"></i>
|
188 |
+
<a href="<?php echo esc_url($error_url); ?>"><?php esc_html_e("Error Processing", 'duplicator') ?></a>
|
189 |
</span>
|
190 |
+
<a class="button no-select" title="<?php esc_html_e("Package Details", 'duplicator') ?>" href="<?php echo esc_url($error_url); ?>">
|
191 |
<i class="fa fa-archive"></i>
|
192 |
</a>
|
193 |
</td>
|
201 |
<tfoot>
|
202 |
<tr>
|
203 |
<th colspan="11" style='text-align:right; font-size:12px'>
|
204 |
+
<?php echo esc_html_e("Packages", 'duplicator') . ': ' . absint($totalElements); ?> |
|
205 |
+
<?php echo esc_html_e("Total Size", 'duplicator') . ': ' . esc_html(DUP_Util::byteSize($totalSize)); ?>
|
206 |
</th>
|
207 |
</tr>
|
208 |
</tfoot>
|
241 |
<!-- =======================
|
242 |
DIALOG: HELP DIALOG -->
|
243 |
<div id="dup-help-dlg-info" style="display:none">
|
244 |
+
<b><?php esc_html_e("Common Questions:", 'duplicator') ?></b><hr size='1'/>
|
245 |
+
<i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_pack_help&utm_campaign=duplicator_free#quick-010-q" target="_blank"><?php esc_html_e("How do I create a package", 'duplicator') ?></a> <br/>
|
246 |
+
<i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank"><?php esc_html_e('How do I install a package?', 'duplicator'); ?></a> <br/>
|
247 |
+
<i class="fa fa-file-code-o"></i> <a href="https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_faq&utm_campaign=duplicator_free" target="_blank"><?php esc_html_e("Frequently Asked Questions!", 'duplicator') ?></a>
|
248 |
<br/><br/>
|
249 |
|
250 |
+
<b><?php esc_html_e("Other Resources:", 'duplicator') ?></b><hr size='1'/>
|
251 |
+
<i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_ticket&utm_campaign=duplicator_free" target="_blank"><?php esc_html_e("Need help with the plugin?", 'duplicator') ?></a> <br/>
|
252 |
+
<i class="fa fa-lightbulb-o"></i> <a href="https://snapcreek.com/support?idea=1&utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_idea&utm_campaign=duplicator_free" target="_blank"><?php esc_html_e("Have an idea for the plugin?", 'duplicator') ?></a> <br/>
|
253 |
<?php if($statusCount >= 3) : ?>
|
254 |
+
<i class="fa fa-star-o"></i> <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php esc_html_e("Help review the plugin!", 'duplicator') ?></a>
|
255 |
<?php endif; ?>
|
256 |
</div>
|
257 |
|
views/packages/main/s1.setup1.php
CHANGED
@@ -56,18 +56,18 @@ TOOL BAR: STEPS -->
|
|
56 |
<td style="white-space: nowrap">
|
57 |
<div id="dup-wiz">
|
58 |
<div id="dup-wiz-steps">
|
59 |
-
<div class="active-step"><a>1-<?php
|
60 |
-
<div><a>2-<?php
|
61 |
-
<div><a>3-<?php
|
62 |
</div>
|
63 |
<div id="dup-wiz-title">
|
64 |
-
<?php
|
65 |
</div>
|
66 |
</div>
|
67 |
</td>
|
68 |
<td>
|
69 |
-
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php
|
70 |
-
<span> <?php
|
71 |
</td>
|
72 |
</tr>
|
73 |
</table>
|
@@ -83,8 +83,8 @@ SYSTEM REQUIREMENTS -->
|
|
83 |
<div class="dup-box">
|
84 |
<div class="dup-box-title">
|
85 |
<?php
|
86 |
-
|
87 |
-
echo ($dup_tests['Success']) ? ' <div class="dup-sys-pass">Pass</div>' : ' <div class="dup-sys-fail">Fail</div>';
|
88 |
?>
|
89 |
<div class="dup-box-arrow"></div>
|
90 |
</div>
|
@@ -92,44 +92,44 @@ SYSTEM REQUIREMENTS -->
|
|
92 |
<div class="dup-box-panel">
|
93 |
|
94 |
<div class="dup-sys-section">
|
95 |
-
<i><?php
|
96 |
</div>
|
97 |
|
98 |
<!-- PHP SUPPORT -->
|
99 |
<div class='dup-sys-req'>
|
100 |
<div class='dup-sys-title'>
|
101 |
-
<a><?php
|
102 |
-
<div><?php echo $dup_tests['PHP']['ALL']; ?></div>
|
103 |
</div>
|
104 |
<div class="dup-sys-info dup-info-box">
|
105 |
<table class="dup-sys-info-results">
|
106 |
<tr>
|
107 |
<td><?php printf("%s [%s]", __("PHP Version", 'duplicator'), phpversion()); ?></td>
|
108 |
-
<td><?php echo $dup_tests['PHP']['VERSION'] ?></td>
|
109 |
</tr>
|
110 |
<tr>
|
111 |
-
<td><?php
|
112 |
-
<td><?php echo $dup_tests['PHP']['ZIP'] ?></td>
|
113 |
</tr>
|
114 |
<tr>
|
115 |
-
<td><?php
|
116 |
-
<td><?php echo $dup_tests['PHP']['SAFE_MODE'] ?></td>
|
117 |
</tr>
|
118 |
<tr>
|
119 |
-
<td><?php
|
120 |
-
<td><?php echo $dup_tests['PHP']['FUNC_1'] ?></td>
|
121 |
</tr>
|
122 |
<tr>
|
123 |
-
<td><?php
|
124 |
-
<td><?php echo $dup_tests['PHP']['FUNC_2'] ?></td>
|
125 |
</tr>
|
126 |
<tr>
|
127 |
-
<td><?php
|
128 |
-
<td><?php echo $dup_tests['PHP']['FUNC_3'] ?></td>
|
129 |
</tr>
|
130 |
</table>
|
131 |
<small>
|
132 |
-
<?php
|
133 |
</small>
|
134 |
</div>
|
135 |
</div>
|
@@ -137,7 +137,7 @@ SYSTEM REQUIREMENTS -->
|
|
137 |
<!-- PERMISSIONS -->
|
138 |
<div class='dup-sys-req'>
|
139 |
<div class='dup-sys-title'>
|
140 |
-
<a><?php
|
141 |
<div>
|
142 |
<?php
|
143 |
if ($dup_tests['IO']['ALL']) {
|
@@ -157,10 +157,10 @@ SYSTEM REQUIREMENTS -->
|
|
157 |
<div style="font-size:11px; padding-top: 3px">
|
158 |
<?php
|
159 |
if ($dup_tests['IO']['WPROOT'] == 'Warn') {
|
160 |
-
|
161 |
echo '<br/>';
|
162 |
}
|
163 |
-
|
164 |
?>
|
165 |
</div>
|
166 |
</div>
|
@@ -169,24 +169,24 @@ SYSTEM REQUIREMENTS -->
|
|
169 |
<!-- SERVER SUPPORT -->
|
170 |
<div class='dup-sys-req'>
|
171 |
<div class='dup-sys-title'>
|
172 |
-
<a><?php
|
173 |
-
<div><?php echo $dup_tests['SRV']['ALL']; ?></div>
|
174 |
</div>
|
175 |
<div class="dup-sys-info dup-info-box">
|
176 |
<table class="dup-sys-info-results">
|
177 |
<tr>
|
178 |
<td><?php printf("%s [%s]", __("MySQL Version", 'duplicator'), DUP_DB::getVersion()); ?></td>
|
179 |
-
<td><?php echo $dup_tests['SRV']['MYSQL_VER'] ?></td>
|
180 |
</tr>
|
181 |
<tr>
|
182 |
-
<td><?php
|
183 |
-
<td><?php echo $dup_tests['SRV']['MYSQLi'] ?></td>
|
184 |
</tr>
|
185 |
</table>
|
186 |
<small>
|
187 |
<?php
|
188 |
-
|
189 |
-
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" .
|
190 |
?>
|
191 |
</small>
|
192 |
</div>
|
@@ -195,21 +195,21 @@ SYSTEM REQUIREMENTS -->
|
|
195 |
<!-- RESERVED FILES -->
|
196 |
<div class='dup-sys-req'>
|
197 |
<div class='dup-sys-title'>
|
198 |
-
<a><?php
|
199 |
</div>
|
200 |
<div class="dup-sys-info dup-info-box">
|
201 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
202 |
<?php
|
203 |
-
|
204 |
-
echo " [
|
205 |
?>
|
206 |
<?php else:
|
207 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
208 |
?>
|
209 |
<form method="post" action="admin.php?page=duplicator-tools&tab=diagnostics§ion=info&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
|
210 |
-
<b><?php
|
211 |
-
<?php
|
212 |
-
<br/><input type='submit' class='button button-small' value='<?php
|
213 |
</form>
|
214 |
<?php endif; ?>
|
215 |
</div>
|
56 |
<td style="white-space: nowrap">
|
57 |
<div id="dup-wiz">
|
58 |
<div id="dup-wiz-steps">
|
59 |
+
<div class="active-step"><a>1-<?php esc_html_e('Setup', 'duplicator'); ?></a></div>
|
60 |
+
<div><a>2-<?php esc_html_e('Scan', 'duplicator'); ?> </a></div>
|
61 |
+
<div><a>3-<?php esc_html_e('Build', 'duplicator'); ?> </a></div>
|
62 |
</div>
|
63 |
<div id="dup-wiz-title">
|
64 |
+
<?php esc_html_e('Step 1: Package Setup', 'duplicator'); ?>
|
65 |
</div>
|
66 |
</div>
|
67 |
</td>
|
68 |
<td>
|
69 |
+
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php esc_html_e("Packages", 'duplicator'); ?></a>
|
70 |
+
<span> <?php esc_html_e("Create New", 'duplicator'); ?></span>
|
71 |
</td>
|
72 |
</tr>
|
73 |
</table>
|
83 |
<div class="dup-box">
|
84 |
<div class="dup-box-title">
|
85 |
<?php
|
86 |
+
esc_html_e("Requirements:", 'duplicator');
|
87 |
+
echo esc_html($dup_tests['Success']) ? ' <div class="dup-sys-pass">'.esc_html_e('Pass', 'duplicator').'</div>' : ' <div class="dup-sys-fail">'.esc_html_e('Fail', 'duplicator').'</div>';
|
88 |
?>
|
89 |
<div class="dup-box-arrow"></div>
|
90 |
</div>
|
92 |
<div class="dup-box-panel">
|
93 |
|
94 |
<div class="dup-sys-section">
|
95 |
+
<i><?php esc_html_e("System requirements must pass for the Duplicator to work properly. Click each link for details.", 'duplicator'); ?></i>
|
96 |
</div>
|
97 |
|
98 |
<!-- PHP SUPPORT -->
|
99 |
<div class='dup-sys-req'>
|
100 |
<div class='dup-sys-title'>
|
101 |
+
<a><?php esc_html_e('PHP Support', 'duplicator'); ?></a>
|
102 |
+
<div><?php echo esc_html($dup_tests['PHP']['ALL']); ?></div>
|
103 |
</div>
|
104 |
<div class="dup-sys-info dup-info-box">
|
105 |
<table class="dup-sys-info-results">
|
106 |
<tr>
|
107 |
<td><?php printf("%s [%s]", __("PHP Version", 'duplicator'), phpversion()); ?></td>
|
108 |
+
<td><?php echo esc_html($dup_tests['PHP']['VERSION']); ?></td>
|
109 |
</tr>
|
110 |
<tr>
|
111 |
+
<td><?php esc_html_e('Zip Archive Enabled', 'duplicator'); ?></td>
|
112 |
+
<td><?php echo esc_html($dup_tests['PHP']['ZIP']); ?></td>
|
113 |
</tr>
|
114 |
<tr>
|
115 |
+
<td><?php esc_html_e('Safe Mode Off', 'duplicator'); ?></td>
|
116 |
+
<td><?php echo esc_html($dup_tests['PHP']['SAFE_MODE']); ?></td>
|
117 |
</tr>
|
118 |
<tr>
|
119 |
+
<td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/function.file-get-contents.php" target="_blank">file_get_contents</a></td>
|
120 |
+
<td><?php echo esc_html($dup_tests['PHP']['FUNC_1']); ?></td>
|
121 |
</tr>
|
122 |
<tr>
|
123 |
+
<td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/function.file-put-contents.php" target="_blank">file_put_contents</a></td>
|
124 |
+
<td><?php echo esc_html($dup_tests['PHP']['FUNC_2']); ?></td>
|
125 |
</tr>
|
126 |
<tr>
|
127 |
+
<td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/mbstring.installation.php" target="_blank">mb_strlen</a></td>
|
128 |
+
<td><?php echo esc_html($dup_tests['PHP']['FUNC_3']); ?></td>
|
129 |
</tr>
|
130 |
</table>
|
131 |
<small>
|
132 |
+
<?php esc_html_e("PHP versions 5.2.9+ or higher is required. For compression to work the ZipArchive extension for PHP is required. Safe Mode should be set to 'Off' in you php.ini file and is deprecated as of PHP 5.3.0. For any issues in this section please contact your hosting provider or server administrator. For additional information see our online documentation.", 'duplicator'); ?>
|
133 |
</small>
|
134 |
</div>
|
135 |
</div>
|
137 |
<!-- PERMISSIONS -->
|
138 |
<div class='dup-sys-req'>
|
139 |
<div class='dup-sys-title'>
|
140 |
+
<a><?php esc_html_e('Required Paths', 'duplicator'); ?></a>
|
141 |
<div>
|
142 |
<?php
|
143 |
if ($dup_tests['IO']['ALL']) {
|
157 |
<div style="font-size:11px; padding-top: 3px">
|
158 |
<?php
|
159 |
if ($dup_tests['IO']['WPROOT'] == 'Warn') {
|
160 |
+
esc_html_e('If the root WordPress path is not writable by PHP on some systems this can cause issues.', 'duplicator');
|
161 |
echo '<br/>';
|
162 |
}
|
163 |
+
esc_html_e("If Duplicator does not have enough permissions then you will need to manually create the paths above. ", 'duplicator');
|
164 |
?>
|
165 |
</div>
|
166 |
</div>
|
169 |
<!-- SERVER SUPPORT -->
|
170 |
<div class='dup-sys-req'>
|
171 |
<div class='dup-sys-title'>
|
172 |
+
<a><?php esc_html_e('Server Support', 'duplicator'); ?></a>
|
173 |
+
<div><?php echo esc_html($dup_tests['SRV']['ALL']); ?></div>
|
174 |
</div>
|
175 |
<div class="dup-sys-info dup-info-box">
|
176 |
<table class="dup-sys-info-results">
|
177 |
<tr>
|
178 |
<td><?php printf("%s [%s]", __("MySQL Version", 'duplicator'), DUP_DB::getVersion()); ?></td>
|
179 |
+
<td><?php echo esc_html($dup_tests['SRV']['MYSQL_VER']); ?></td>
|
180 |
</tr>
|
181 |
<tr>
|
182 |
+
<td><?php esc_html_e("MySQLi Support", 'duplicator'); ?></td>
|
183 |
+
<td><?php echo esc_html($dup_tests['SRV']['MYSQLi']); ?></td>
|
184 |
</tr>
|
185 |
</table>
|
186 |
<small>
|
187 |
<?php
|
188 |
+
esc_html_e("MySQL version 5.0+ or better is required and the PHP MySQLi extension (note the trailing 'i') is also required. Contact your server administrator and request that mysqli extension and MySQL Server 5.0+ be installed.", 'duplicator');
|
189 |
+
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . esc_html__('more info', 'duplicator') . "]</a></i>";
|
190 |
?>
|
191 |
</small>
|
192 |
</div>
|
195 |
<!-- RESERVED FILES -->
|
196 |
<div class='dup-sys-req'>
|
197 |
<div class='dup-sys-title'>
|
198 |
+
<a><?php esc_html_e('Reserved Files', 'duplicator'); ?></a> <div><?php echo esc_html($dup_tests['RES']['INSTALL']); ?></div>
|
199 |
</div>
|
200 |
<div class="dup-sys-info dup-info-box">
|
201 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
202 |
<?php
|
203 |
+
esc_html_e("None of the reserved files where found from a previous install. This means you are clear to create a new package.", 'duplicator');
|
204 |
+
echo " [".esc_html($dup_intaller_files)."]";
|
205 |
?>
|
206 |
<?php else:
|
207 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
208 |
?>
|
209 |
<form method="post" action="admin.php?page=duplicator-tools&tab=diagnostics§ion=info&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
|
210 |
+
<b><?php esc_html_e('WordPress Root Path:', 'duplicator'); ?></b> <?php echo esc_html(DUPLICATOR_WPROOTPATH); ?><br/>
|
211 |
+
<?php esc_html_e("A reserved file(s) was found in the WordPress root directory. Reserved file names include [{$dup_intaller_files}]. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.", 'duplicator'); ?>
|
212 |
+
<br/><input type='submit' class='button button-small' value='<?php esc_attr_e('Remove Files Now', 'duplicator') ?>' style='font-size:10px; margin-top:5px;' />
|
213 |
</form>
|
214 |
<?php endif; ?>
|
215 |
</div>
|
views/packages/main/s1.setup2.php
CHANGED
@@ -14,12 +14,11 @@
|
|
14 |
/*ARCHIVE SECTION*/
|
15 |
form#dup-form-opts div.tabs-panel{max-height:800px; padding:10px; min-height:280px}
|
16 |
form#dup-form-opts ul li.tabs{font-weight:bold}
|
|
|
17 |
ul.category-tabs li {padding:4px 15px 4px 15px}
|
18 |
select#archive-format {min-width:100px; margin:1px 0 4px 0}
|
19 |
span#dup-archive-filter-file {color:#A62426; display:none}
|
20 |
span#dup-archive-filter-db {color:#A62426; display:none}
|
21 |
-
span#dup-installer-secure-lock {color:#A62426; display:none; font-size:14px}
|
22 |
-
span#dup-installer-secure-unlock {color:#A62426; display:none; font-size:14px}
|
23 |
span#dup-archive-db-only {color:#A62426; display:none}
|
24 |
div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
|
25 |
div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
|
@@ -42,12 +41,14 @@
|
|
42 |
|
43 |
/*INSTALLER SECTION*/
|
44 |
div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
|
45 |
-
div.dup-
|
|
|
|
|
46 |
label.chk-labels {display:inline-block; margin-top:1px}
|
47 |
-
|
|
|
48 |
div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:maroon}
|
49 |
div.secure-pass-area {}
|
50 |
-
input#secure-pass
|
51 |
label.secure-pass-lbl {display:inline-block; width:125px}
|
52 |
div#dup-pass-toggle {position: relative; margin:8px 0 0 0; width:243px}
|
53 |
input#secure-pass {border-radius:4px 0 0 4px; width:220px; height: 23px; margin:0}
|
@@ -55,24 +56,28 @@
|
|
55 |
|
56 |
/*TABS*/
|
57 |
ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
|
|
|
58 |
</style>
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
61 |
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
62 |
<?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
|
63 |
|
64 |
<div>
|
65 |
-
<label for="package-name" class="lbl-larger"><b> <?php
|
66 |
<div class="dup-notes-add">
|
67 |
<a href="javascript:void(0)" onclick="jQuery('#dup-notes-area').toggle()">
|
68 |
-
[<?php
|
69 |
</a>
|
70 |
</div>
|
71 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php
|
72 |
-
<input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40"
|
73 |
<div id="dup-notes-area">
|
74 |
-
<label class="lbl-larger"><b> <?php
|
75 |
-
<textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
|
76 |
</div>
|
77 |
</div>
|
78 |
<br/>
|
@@ -81,39 +86,39 @@
|
|
81 |
STORAGE -->
|
82 |
<div class="dup-box">
|
83 |
<div class="dup-box-title">
|
84 |
-
<i class="fa fa-database"></i> <?php
|
85 |
<div class="dup-box-arrow"></div>
|
86 |
</div>
|
87 |
-
<div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
|
88 |
<table class="widefat package-tbl">
|
89 |
<thead>
|
90 |
<tr>
|
91 |
-
<th style='width:275px'><?php
|
92 |
-
<th style='width:100px'><?php
|
93 |
-
<th style="white-space:nowrap"><?php
|
94 |
</tr>
|
95 |
</thead>
|
96 |
<tbody>
|
97 |
<tr class="package-row">
|
98 |
-
<td><i class="fa fa-server"></i> <?php
|
99 |
-
<td><?php
|
100 |
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
101 |
</tr>
|
102 |
<tr>
|
103 |
<td colspan="4" style="padding:0 0 7px 7px">
|
104 |
<div class="dup-store-pro">
|
105 |
<span class="dup-pro-text">
|
106 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
107 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
108 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
109 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL
|
110 |
-
|
111 |
-
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', '
|
112 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php
|
113 |
<i class="fa fa-lightbulb-o"
|
114 |
-
data-tooltip-title="<?php
|
115 |
-
data-tooltip="<?php
|
116 |
-
. 'based location such as Google Drive, Amazon, Dropbox
|
117 |
</i>
|
118 |
</span>
|
119 |
</div>
|
@@ -129,22 +134,22 @@ STORAGE -->
|
|
129 |
ARCHIVE -->
|
130 |
<div class="dup-box">
|
131 |
<div class="dup-box-title">
|
132 |
-
<i class="fa fa-file-archive-o"></i> <?php
|
133 |
<span style="font-size:13px">
|
134 |
-
<span id="dup-archive-filter-file" title="<?php
|
135 |
-
<span id="dup-archive-filter-db" title="<?php
|
136 |
-
<span id="dup-archive-db-only" title="<?php
|
137 |
</span>
|
138 |
<div class="dup-box-arrow"></div>
|
139 |
</div>
|
140 |
-
<div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
|
141 |
<input type="hidden" name="archive-format" value="ZIP" />
|
142 |
|
143 |
<!-- NESTED TABS -->
|
144 |
<div data-dup-tabs='true'>
|
145 |
<ul>
|
146 |
-
<li><?php
|
147 |
-
<li><?php
|
148 |
</ul>
|
149 |
|
150 |
<!-- TAB1:PACKAGE -->
|
@@ -158,55 +163,55 @@ ARCHIVE -->
|
|
158 |
?>
|
159 |
|
160 |
<input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
|
161 |
-
<label for="export-onlydb"><?php
|
162 |
|
163 |
<div id="dup-exportdb-items-off" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'none' : 'block'; ?>">
|
164 |
<input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" :""; ?> />
|
165 |
-
<label for="filter-on" id="filter-on-label"><?php
|
166 |
<i class="fa fa-question-circle"
|
167 |
-
data-tooltip-title="<?php
|
168 |
-
data-tooltip="<?php
|
169 |
. 'want and need. This helps to improve the overall archive build time and keep your backups simple and clean.', 'duplicator'); ?>">
|
170 |
</i>
|
171 |
|
172 |
<div id="dup-file-filter-items">
|
173 |
-
<label for="filter-dirs" title="<?php
|
174 |
<?php
|
175 |
_e("Directories:", 'duplicator');
|
176 |
-
echo sprintf("<sup title='%s'>({$filter_dir_count})</sup>",
|
177 |
?>
|
178 |
</label>
|
179 |
<div class='dup-quick-links'>
|
180 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php
|
181 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php
|
182 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::safePath(WP_CONTENT_DIR); ?>/cache')">[<?php
|
183 |
-
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php
|
184 |
</div>
|
185 |
<textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
|
186 |
|
187 |
-
<label class="no-select" title="<?php
|
188 |
<div class='dup-quick-links'>
|
189 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php
|
190 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php
|
191 |
-
<a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php
|
192 |
</div>
|
193 |
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
194 |
|
195 |
-
<label class="no-select" title="<?php
|
196 |
<?php
|
197 |
_e("Files:", 'duplicator');
|
198 |
-
echo sprintf("<sup title='%s'>({$filter_file_count})</sup>",
|
199 |
?>
|
200 |
</label>
|
201 |
<div class='dup-quick-links'>
|
202 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php
|
203 |
-
<a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php
|
204 |
</div>
|
205 |
<textarea name="filter-files" id="filter-files" placeholder="/full_path/exclude_file_1.ext;/full_path/exclude_file2.ext"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterFiles)) ?></textarea>
|
206 |
|
207 |
<div class="dup-tabs-opts-help">
|
208 |
-
<?php
|
209 |
-
<?php
|
210 |
</div>
|
211 |
</div>
|
212 |
</div>
|
@@ -218,8 +223,8 @@ ARCHIVE -->
|
|
218 |
echo '<i style="color:maroon">';
|
219 |
_e("This option has automatically been checked because you have opted for a <i class='fa fa-random'></i> Two-Part Install Process. Please complete the package build and continue with the ", 'duplicator');
|
220 |
printf('%s <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>.',
|
221 |
-
|
222 |
-
|
223 |
echo '</i><br/><br/>';
|
224 |
}
|
225 |
|
@@ -245,23 +250,23 @@ ARCHIVE -->
|
|
245 |
<table>
|
246 |
<tr>
|
247 |
<td colspan="2" style="padding:0 0 10px 0">
|
248 |
-
<?php
|
249 |
</td>
|
250 |
</tr>
|
251 |
<tr>
|
252 |
<td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" :""; ?> /></td>
|
253 |
<td>
|
254 |
-
<label for="dbfilter-on"><?php
|
255 |
<i class="fa fa-question-circle"
|
256 |
-
data-tooltip-title="<?php
|
257 |
-
data-tooltip="<?php
|
258 |
</i>
|
259 |
</td>
|
260 |
</tr>
|
261 |
</table>
|
262 |
<div id="dup-db-filter-items">
|
263 |
-
<a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php
|
264 |
-
<a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php
|
265 |
<div style="white-space:nowrap">
|
266 |
<?php
|
267 |
$coreTables = DUP_Util::getWPCoreTables();
|
@@ -312,15 +317,15 @@ ARCHIVE -->
|
|
312 |
</div>
|
313 |
|
314 |
<br/>
|
315 |
-
<?php
|
316 |
<i class="fa fa-question-circle"
|
317 |
-
data-tooltip-title="<?php
|
318 |
-
data-tooltip="<?php
|
319 |
. ' If the database server version is lower than the version where the package was built then these options may help generate a script that is more compliant'
|
320 |
. ' with the older database server. It is recommended to try each option separately starting with mysql40.', 'duplicator'); ?>">
|
321 |
</i>
|
322 |
<small style="font-style:italic">
|
323 |
-
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php
|
324 |
</small>
|
325 |
<br/>
|
326 |
|
@@ -336,24 +341,24 @@ ARCHIVE -->
|
|
336 |
<tr>
|
337 |
<td>
|
338 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' :''; ?> >
|
339 |
-
<label for="dbcompat-mysql40"><?php
|
340 |
</td>
|
341 |
<td>
|
342 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_table_options" value="no_table_options" <?php echo $is_no_table ? 'checked="true"' :''; ?>>
|
343 |
-
<label for="dbcompat-no_table_options"><?php
|
344 |
</td>
|
345 |
<td>
|
346 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' :''; ?>>
|
347 |
-
<label for="dbcompat-no_key_options"><?php
|
348 |
</td>
|
349 |
<td>
|
350 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_field_options" value="no_field_options" <?php echo $is_no_field ? 'checked="true"' :''; ?>>
|
351 |
-
<label for="dbcompat-no_field_options"><?php
|
352 |
</td>
|
353 |
</tr>
|
354 |
</table>
|
355 |
<?php else :?>
|
356 |
-
<i><?php
|
357 |
<?php endif; ?>
|
358 |
|
359 |
</div>
|
@@ -364,93 +369,126 @@ ARCHIVE -->
|
|
364 |
<!-- ============================
|
365 |
INSTALLER -->
|
366 |
<div class="dup-box">
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
</
|
384 |
-
|
385 |
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
. 'password below must be entered before proceeding with an install. This password is a general deterrent and should not be substituted for properly '
|
402 |
. 'keeping your files secure. Be sure to remove all installer files when the install process is completed.', 'duplicator'); ?>"></i>
|
403 |
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
</div>
|
446 |
|
447 |
-
|
|
|
|
|
|
|
448 |
</div><br/>
|
449 |
|
450 |
|
451 |
<div class="dup-button-footer">
|
452 |
-
<input type="button" value="<?php
|
453 |
-
<input type="submit" value="<?php
|
454 |
</div>
|
455 |
|
456 |
</form>
|
@@ -458,7 +496,6 @@ INSTALLER -->
|
|
458 |
<!-- ==========================================
|
459 |
THICK-BOX DIALOGS: -->
|
460 |
<?php
|
461 |
-
|
462 |
$confirm1 = new DUP_UI_Dialog();
|
463 |
$confirm1->title = __('Reset Package Settings?', 'duplicator');
|
464 |
$confirm1->message = __('This will clear and reset all of the current package settings. Would you like to continue?', 'duplicator');
|
@@ -467,13 +504,12 @@ THICK-BOX DIALOGS: -->
|
|
467 |
|
468 |
$default_name1 = DUP_Package::getDefaultName();
|
469 |
$default_name2 = DUP_Package::getDefaultName(false);
|
470 |
-
|
471 |
?>
|
472 |
<script>
|
473 |
jQuery(document).ready(function ($)
|
474 |
{
|
475 |
-
var DUP_NAMEDEFAULT1 = '<?php echo $default_name1 ?>';
|
476 |
-
var DUP_NAMEDEFAULT2 = '<?php echo $default_name2 ?>';
|
477 |
var DUP_NAMELAST = $('#package-name').val();
|
478 |
|
479 |
Duplicator.Pack.ExportOnlyDB = function ()
|
@@ -615,12 +651,11 @@ jQuery(document).ready(function ($)
|
|
615 |
$('#dup-pack-archive-panel').show();
|
616 |
$('#export-onlydb').prop( "checked", true );
|
617 |
<?php endif; ?>
|
618 |
-
|
619 |
//Init:Toggle OptionTabs
|
620 |
Duplicator.Pack.ToggleFileFilters();
|
621 |
Duplicator.Pack.ToggleDBFilters();
|
622 |
Duplicator.Pack.ExportOnlyDB();
|
623 |
Duplicator.Pack.EnableInstallerPassword();
|
624 |
-
|
625 |
});
|
626 |
-
</script>
|
14 |
/*ARCHIVE SECTION*/
|
15 |
form#dup-form-opts div.tabs-panel{max-height:800px; padding:10px; min-height:280px}
|
16 |
form#dup-form-opts ul li.tabs{font-weight:bold}
|
17 |
+
sup.archive-ext {font-style:italic;font-size:10px; cursor: pointer; vertical-align: baseline; position: relative; top: -0.8em; font-weight: normal}
|
18 |
ul.category-tabs li {padding:4px 15px 4px 15px}
|
19 |
select#archive-format {min-width:100px; margin:1px 0 4px 0}
|
20 |
span#dup-archive-filter-file {color:#A62426; display:none}
|
21 |
span#dup-archive-filter-db {color:#A62426; display:none}
|
|
|
|
|
22 |
span#dup-archive-db-only {color:#A62426; display:none}
|
23 |
div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
|
24 |
div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
|
41 |
|
42 |
/*INSTALLER SECTION*/
|
43 |
div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
|
44 |
+
div.dup-install-hdr-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
|
45 |
+
span#dup-installer-secure-lock {color:#A62426; display:none; font-size:14px}
|
46 |
+
span#dup-installer-secure-unlock {color:#A62426; display:none; font-size:14px}
|
47 |
label.chk-labels {display:inline-block; margin-top:1px}
|
48 |
+
table.dup-install-setup {width:100%; margin-left:2px}
|
49 |
+
table.dup-install-setup tr{vertical-align: top}
|
50 |
div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:maroon}
|
51 |
div.secure-pass-area {}
|
|
|
52 |
label.secure-pass-lbl {display:inline-block; width:125px}
|
53 |
div#dup-pass-toggle {position: relative; margin:8px 0 0 0; width:243px}
|
54 |
input#secure-pass {border-radius:4px 0 0 4px; width:220px; height: 23px; margin:0}
|
56 |
|
57 |
/*TABS*/
|
58 |
ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
|
59 |
+
div.dup-install-prefill-tab-pnl {min-height:180px !important; }
|
60 |
</style>
|
61 |
+
<?php
|
62 |
+
$action_url = admin_url("admin.php?page=duplicator&tab=new2&retry={$retry_state}");
|
63 |
+
$action_nonce_url = wp_nonce_url($action_url, 'new2-package');
|
64 |
+
?>
|
65 |
+
<form id="dup-form-opts" method="post" action="<?php echo $action_nonce_url; ?>" data-parsley-validate="" autocomplete="oldpassword">
|
66 |
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
67 |
<?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
|
68 |
|
69 |
<div>
|
70 |
+
<label for="package-name" class="lbl-larger"><b> <?php esc_html_e('Name', 'duplicator') ?>:</b> </label>
|
71 |
<div class="dup-notes-add">
|
72 |
<a href="javascript:void(0)" onclick="jQuery('#dup-notes-area').toggle()">
|
73 |
+
[<?php esc_html_e('Add Notes', 'duplicator') ?>]
|
74 |
</a>
|
75 |
</div>
|
76 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php esc_attr_e('Toggle a default name', 'duplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
|
77 |
+
<input id="package-name" name="package-name" type="text" value="<?php echo esc_attr($Package->Name); ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
|
78 |
<div id="dup-notes-area">
|
79 |
+
<label class="lbl-larger"><b> <?php esc_html_e('Notes', 'duplicator') ?>:</b></label> <br/>
|
80 |
+
<textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo esc_html($Package->Notes); ?></textarea>
|
81 |
</div>
|
82 |
</div>
|
83 |
<br/>
|
86 |
STORAGE -->
|
87 |
<div class="dup-box">
|
88 |
<div class="dup-box-title">
|
89 |
+
<i class="fa fa-database"></i> <?php esc_html_e("Storage", 'duplicator'); ?>
|
90 |
<div class="dup-box-arrow"></div>
|
91 |
</div>
|
92 |
+
<div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo esc_attr($ui_css_storage); ?>">
|
93 |
<table class="widefat package-tbl">
|
94 |
<thead>
|
95 |
<tr>
|
96 |
+
<th style='width:275px'><?php esc_html_e("Name", 'duplicator'); ?></th>
|
97 |
+
<th style='width:100px'><?php esc_html_e("Type", 'duplicator'); ?></th>
|
98 |
+
<th style="white-space:nowrap"><?php esc_html_e("Location", 'duplicator'); ?></th>
|
99 |
</tr>
|
100 |
</thead>
|
101 |
<tbody>
|
102 |
<tr class="package-row">
|
103 |
+
<td><i class="fa fa-server"></i> <?php esc_html_e('Default', 'duplicator');?></td>
|
104 |
+
<td><?php esc_html_e("Local", 'duplicator'); ?></td>
|
105 |
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
106 |
</tr>
|
107 |
<tr>
|
108 |
<td colspan="4" style="padding:0 0 7px 7px">
|
109 |
<div class="dup-store-pro">
|
110 |
<span class="dup-pro-text">
|
111 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/amazon-64.png"); ?>" />
|
112 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/dropbox-64.png"); ?>" />
|
113 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/google_drive_64px.png"); ?>" />
|
114 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/onedrive-48px.png"); ?>" />
|
115 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/ftp-64.png"); ?>" />
|
116 |
+
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'OneDrive', 'FTP/SFTP'); ?>
|
117 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php esc_html_e('Duplicator Pro', 'duplicator');?></a>
|
118 |
<i class="fa fa-lightbulb-o"
|
119 |
+
data-tooltip-title="<?php esc_attr_e("Additional Storage:", 'duplicator'); ?>"
|
120 |
+
data-tooltip="<?php esc_attr_e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
121 |
+
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
122 |
</i>
|
123 |
</span>
|
124 |
</div>
|
134 |
ARCHIVE -->
|
135 |
<div class="dup-box">
|
136 |
<div class="dup-box-title">
|
137 |
+
<i class="fa fa-file-archive-o"></i> <?php esc_html_e('Archive', 'duplicator') ?>
|
138 |
<span style="font-size:13px">
|
139 |
+
<span id="dup-archive-filter-file" title="<?php esc_attr_e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> </span>
|
140 |
+
<span id="dup-archive-filter-db" title="<?php esc_attr_e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
|
141 |
+
<span id="dup-archive-db-only" title="<?php esc_attr_e('Archive Only the Database', 'duplicator') ?>"> <?php esc_html_e('Database Only', 'duplicator'); ?> </span>
|
142 |
</span>
|
143 |
<div class="dup-box-arrow"></div>
|
144 |
</div>
|
145 |
+
<div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo esc_attr($ui_css_archive); ?>">
|
146 |
<input type="hidden" name="archive-format" value="ZIP" />
|
147 |
|
148 |
<!-- NESTED TABS -->
|
149 |
<div data-dup-tabs='true'>
|
150 |
<ul>
|
151 |
+
<li><?php esc_html_e('Files', 'duplicator') ?></li>
|
152 |
+
<li><?php esc_html_e('Database', 'duplicator') ?></li>
|
153 |
</ul>
|
154 |
|
155 |
<!-- TAB1:PACKAGE -->
|
163 |
?>
|
164 |
|
165 |
<input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
|
166 |
+
<label for="export-onlydb"><?php esc_html_e('Archive Only the Database', 'duplicator') ?></label>
|
167 |
|
168 |
<div id="dup-exportdb-items-off" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'none' : 'block'; ?>">
|
169 |
<input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" :""; ?> />
|
170 |
+
<label for="filter-on" id="filter-on-label"><?php esc_html_e("Enable File Filters", 'duplicator') ?></label>
|
171 |
<i class="fa fa-question-circle"
|
172 |
+
data-tooltip-title="<?php esc_attr_e("File Filters:", 'duplicator'); ?>"
|
173 |
+
data-tooltip="<?php esc_attr_e('File filters allow you to ignore directories and file extensions. When creating a package only include the data you '
|
174 |
. 'want and need. This helps to improve the overall archive build time and keep your backups simple and clean.', 'duplicator'); ?>">
|
175 |
</i>
|
176 |
|
177 |
<div id="dup-file-filter-items">
|
178 |
+
<label for="filter-dirs" title="<?php esc_attr_e("Separate all filters by semicolon", 'duplicator'); ?>">
|
179 |
<?php
|
180 |
_e("Directories:", 'duplicator');
|
181 |
+
echo sprintf("<sup title='%s'>({$filter_dir_count})</sup>", esc_html__("Number of directories filtered", 'duplicator'));
|
182 |
?>
|
183 |
</label>
|
184 |
<div class='dup-quick-links'>
|
185 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php esc_html_e("root path", 'duplicator') ?>]</a>
|
186 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php esc_html_e("wp-uploads", 'duplicator') ?>]</a>
|
187 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::safePath(WP_CONTENT_DIR); ?>/cache')">[<?php esc_html_e("cache", 'duplicator') ?>]</a>
|
188 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php esc_html_e("(clear)", 'duplicator') ?></a>
|
189 |
</div>
|
190 |
<textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
|
191 |
|
192 |
+
<label class="no-select" title="<?php esc_attr_e("Separate all filters by semicolon", 'duplicator'); ?>"><?php esc_html_e("File extensions", 'duplicator') ?>:</label>
|
193 |
<div class='dup-quick-links'>
|
194 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php esc_html_e("media", 'duplicator') ?>]</a>
|
195 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php esc_html_e("archive", 'duplicator') ?>]</a>
|
196 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php esc_html_e("(clear)", 'duplicator') ?></a>
|
197 |
</div>
|
198 |
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
199 |
|
200 |
+
<label class="no-select" title="<?php esc_attr_e("Separate all filters by semicolon", 'duplicator'); ?>">
|
201 |
<?php
|
202 |
_e("Files:", 'duplicator');
|
203 |
+
echo sprintf("<sup title='%s'>({$filter_file_count})</sup>", esc_html__("Number of files filtered", 'duplicator'));
|
204 |
?>
|
205 |
</label>
|
206 |
<div class='dup-quick-links'>
|
207 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php esc_html_e("(file path)", 'duplicator') ?></a>
|
208 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php esc_html_e("(clear)", 'duplicator') ?></a>
|
209 |
</div>
|
210 |
<textarea name="filter-files" id="filter-files" placeholder="/full_path/exclude_file_1.ext;/full_path/exclude_file2.ext"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterFiles)) ?></textarea>
|
211 |
|
212 |
<div class="dup-tabs-opts-help">
|
213 |
+
<?php esc_html_e("The directory, file and extensions paths above will be excluded from the archive file if enabled is checked.", 'duplicator'); ?> <br/>
|
214 |
+
<?php esc_html_e("Use the full path for directories and files with semicolons to separate all paths.", 'duplicator'); ?>
|
215 |
</div>
|
216 |
</div>
|
217 |
</div>
|
223 |
echo '<i style="color:maroon">';
|
224 |
_e("This option has automatically been checked because you have opted for a <i class='fa fa-random'></i> Two-Part Install Process. Please complete the package build and continue with the ", 'duplicator');
|
225 |
printf('%s <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>.',
|
226 |
+
'',
|
227 |
+
esc_html__('Quick Start Two-Part Install Instructions', 'duplicator'));
|
228 |
echo '</i><br/><br/>';
|
229 |
}
|
230 |
|
250 |
<table>
|
251 |
<tr>
|
252 |
<td colspan="2" style="padding:0 0 10px 0">
|
253 |
+
<?php esc_html_e("Build Mode", 'duplicator') ?>: <a href="?page=duplicator-settings" target="settings"><?php echo esc_html($dbbuild_mode); ?></a>
|
254 |
</td>
|
255 |
</tr>
|
256 |
<tr>
|
257 |
<td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" :""; ?> /></td>
|
258 |
<td>
|
259 |
+
<label for="dbfilter-on"><?php esc_html_e("Enable Table Filters", 'duplicator') ?> </label>
|
260 |
<i class="fa fa-question-circle"
|
261 |
+
data-tooltip-title="<?php esc_attr_e("Enable Table Filters:", 'duplicator'); ?>"
|
262 |
+
data-tooltip="<?php esc_attr_e('Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!', 'duplicator'); ?>">
|
263 |
</i>
|
264 |
</td>
|
265 |
</tr>
|
266 |
</table>
|
267 |
<div id="dup-db-filter-items">
|
268 |
+
<a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php esc_html_e('Include All', 'duplicator'); ?> ]</a>
|
269 |
+
<a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php esc_html_e('Exclude All', 'duplicator'); ?> ]</a>
|
270 |
<div style="white-space:nowrap">
|
271 |
<?php
|
272 |
$coreTables = DUP_Util::getWPCoreTables();
|
317 |
</div>
|
318 |
|
319 |
<br/>
|
320 |
+
<?php esc_html_e("Compatibility Mode", 'duplicator') ?>
|
321 |
<i class="fa fa-question-circle"
|
322 |
+
data-tooltip-title="<?php esc_attr_e("Compatibility Mode:", 'duplicator'); ?>"
|
323 |
+
data-tooltip="<?php esc_attr_e('This is an advanced database backwards compatibility feature that should ONLY be used if having problems installing packages.'
|
324 |
. ' If the database server version is lower than the version where the package was built then these options may help generate a script that is more compliant'
|
325 |
. ' with the older database server. It is recommended to try each option separately starting with mysql40.', 'duplicator'); ?>">
|
326 |
</i>
|
327 |
<small style="font-style:italic">
|
328 |
+
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php esc_html_e('details', 'duplicator'); ?>]</a>
|
329 |
</small>
|
330 |
<br/>
|
331 |
|
341 |
<tr>
|
342 |
<td>
|
343 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' :''; ?> >
|
344 |
+
<label for="dbcompat-mysql40"><?php esc_html_e("mysql40", 'duplicator') ?></label>
|
345 |
</td>
|
346 |
<td>
|
347 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_table_options" value="no_table_options" <?php echo $is_no_table ? 'checked="true"' :''; ?>>
|
348 |
+
<label for="dbcompat-no_table_options"><?php esc_html_e("no_table_options", 'duplicator') ?></label>
|
349 |
</td>
|
350 |
<td>
|
351 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' :''; ?>>
|
352 |
+
<label for="dbcompat-no_key_options"><?php esc_html_e("no_key_options", 'duplicator') ?></label>
|
353 |
</td>
|
354 |
<td>
|
355 |
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_field_options" value="no_field_options" <?php echo $is_no_field ? 'checked="true"' :''; ?>>
|
356 |
+
<label for="dbcompat-no_field_options"><?php esc_html_e("no_field_options", 'duplicator') ?></label>
|
357 |
</td>
|
358 |
</tr>
|
359 |
</table>
|
360 |
<?php else :?>
|
361 |
+
<i><?php esc_html_e("This option is only available with mysqldump mode.", 'duplicator'); ?></i>
|
362 |
<?php endif; ?>
|
363 |
|
364 |
</div>
|
369 |
<!-- ============================
|
370 |
INSTALLER -->
|
371 |
<div class="dup-box">
|
372 |
+
<div class="dup-box-title">
|
373 |
+
<i class="fa fa-bolt"></i> <?php esc_html_e('Installer', 'duplicator') ?>
|
374 |
+
<span id="dup-installer-secure-lock" title="<?php esc_attr_e('Installer password protection is on', 'duplicator') ?>"><i class="fa fa-lock"></i> </span>
|
375 |
+
<span id="dup-installer-secure-unlock" title="<?php esc_attr_e('Installer password protection is off', 'duplicator') ?>"><i class="fa fa-unlock-alt"></i> </span>
|
376 |
+
<div class="dup-box-arrow"></div>
|
377 |
+
</div>
|
378 |
+
|
379 |
+
<div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo esc_attr($ui_css_installer); ?>">
|
380 |
+
|
381 |
+
<div class="dup-installer-panel-optional">
|
382 |
+
<b><?php esc_html_e('All values in this section are', 'duplicator'); ?> <u><?php esc_html_e('optional', 'duplicator'); ?></u></b>
|
383 |
+
<i class="fa fa-question-circle"
|
384 |
+
data-tooltip-title="<?php esc_attr_e("Setup/Prefills", 'duplicator'); ?>"
|
385 |
+
data-tooltip="<?php esc_attr_e('All values in this section are OPTIONAL! If you know ahead of time the database input fields the installer will use, then you can '
|
386 |
+
. 'optionally enter them here and they will be prefilled at install time. Otherwise you can just enter them in at install time and ignore all these '
|
387 |
+
. 'options in the Installer section.', 'duplicator'); ?>">
|
388 |
+
</i>
|
389 |
+
</div>
|
390 |
|
391 |
+
<table class="dup-install-setup" style="margin-top: -10px">
|
392 |
+
<tr>
|
393 |
+
<td colspan="2"><div class="dup-install-hdr-2"><?php esc_html_e("Setup", 'duplicator') ?></div></td>
|
394 |
+
</tr>
|
395 |
+
<tr>
|
396 |
+
<td style="width:130px;"><b><?php esc_html_e("Branding", 'duplicator') ?></b></td>
|
397 |
+
<td>
|
398 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_branding&utm_campaign=duplicator_pro" target="_blank">
|
399 |
+
<span class="dup-pro-text"><?php esc_html_e('Available with Duplicator Pro - Freelancer!', 'duplicator'); ?></span></a>
|
400 |
+
<i class="fa fa-question-circle"
|
401 |
+
data-tooltip-title="<?php esc_attr_e("Branding", 'duplicator'); ?>:"
|
402 |
+
data-tooltip="<?php esc_attr_e('Branding is a way to customize the installer look and feel. With branding you can create multiple brands of installers.', 'duplicator'); ?>"></i>
|
403 |
+
<br/><br/>
|
404 |
+
</td>
|
405 |
+
</tr>
|
406 |
+
<tr>
|
407 |
+
<td style="width:130px"><b><?php esc_html_e("Security", 'duplicator') ?></b></td>
|
408 |
+
<td>
|
409 |
+
<?php
|
410 |
+
$dup_install_secure_on = isset($Package->Installer->OptsSecureOn) ? $Package->Installer->OptsSecureOn : 0;
|
411 |
+
$dup_install_secure_pass = isset($Package->Installer->OptsSecurePass) ? DUP_Util::installerUnscramble($Package->Installer->OptsSecurePass) : '';
|
412 |
+
?>
|
413 |
+
<input type="checkbox" name="secure-on" id="secure-on" onclick="Duplicator.Pack.EnableInstallerPassword()" <?php echo ($dup_install_secure_on) ? 'checked' : ''; ?> />
|
414 |
+
<label for="secure-on"><?php esc_html_e("Enable Password Protection", 'duplicator') ?></label>
|
415 |
+
<i class="fa fa-question-circle"
|
416 |
+
data-tooltip-title="<?php esc_attr_e("Security:", 'duplicator'); ?>"
|
417 |
+
data-tooltip="<?php esc_attr_e('Enabling this option will allow for basic password protection on the installer. Before running the installer the '
|
418 |
. 'password below must be entered before proceeding with an install. This password is a general deterrent and should not be substituted for properly '
|
419 |
. 'keeping your files secure. Be sure to remove all installer files when the install process is completed.', 'duplicator'); ?>"></i>
|
420 |
|
421 |
+
<div id="dup-pass-toggle">
|
422 |
+
<input type="password" name="secure-pass" id="secure-pass" required="required" value="<?php echo esc_attr($dup_install_secure_pass); ?>" />
|
423 |
+
<button type="button" id="secure-btn" class="pass-toggle" onclick="Duplicator.Pack.ToggleInstallerPassword()" title="<?php esc_attr_e('Show/Hide Password', 'duplicator'); ?>"><i class="fa fa-eye"></i></button>
|
424 |
+
</div>
|
425 |
+
<br/>
|
426 |
+
</td>
|
427 |
+
</tr>
|
428 |
+
</table>
|
429 |
+
|
430 |
+
<table style="width:100%">
|
431 |
+
<tr>
|
432 |
+
<td colspan="2"><div class="dup-install-hdr-2"><?php esc_html_e("Prefills", 'duplicator') ?></div></td>
|
433 |
+
</tr>
|
434 |
+
</table>
|
435 |
+
|
436 |
+
<!-- ===================
|
437 |
+
BASIC/CPANEL TABS -->
|
438 |
+
<div data-dup-tabs="true">
|
439 |
+
<ul>
|
440 |
+
<li><?php esc_html_e('Basic', 'duplicator') ?></li>
|
441 |
+
<li id="dpro-cpnl-tab-lbl"><?php esc_html_e('cPanel', 'duplicator') ?></li>
|
442 |
+
</ul>
|
443 |
+
|
444 |
+
<!-- ===================
|
445 |
+
TAB1: Basic -->
|
446 |
+
<div class="dup-install-prefill-tab-pnl">
|
447 |
+
<table class="dup-install-setup">
|
448 |
+
<tr>
|
449 |
+
<td colspan="2"><div class="dup-install-hdr-2"><?php esc_html_e(" MySQL Server", 'duplicator') ?></div></td>
|
450 |
+
</tr>
|
451 |
+
<tr>
|
452 |
+
<td style="width:130px"><?php esc_html_e("Host", 'duplicator') ?></td>
|
453 |
+
<td><input type="text" name="dbhost" id="dbhost" value="<?php echo esc_attr($Package->Installer->OptsDBHost); ?>" maxlength="200" placeholder="<?php esc_attr_e('example: localhost (value is optional)', 'duplicator'); ?>"/></td>
|
454 |
+
</tr>
|
455 |
+
<tr>
|
456 |
+
<td><?php esc_html_e("Host Port", 'duplicator') ?></td>
|
457 |
+
<td><input type="text" name="dbport" id="dbport" value="<?php echo esc_attr($Package->Installer->OptsDBPort); ?>" maxlength="200" placeholder="<?php esc_attr_e('example: 3306 (value is optional)', 'duplicator'); ?>"/></td>
|
458 |
+
</tr>
|
459 |
+
<tr>
|
460 |
+
<td><?php esc_html_e("Database", 'duplicator') ?></td>
|
461 |
+
<td><input type="text" name="dbname" id="dbname" value="<?php echo esc_attr($Package->Installer->OptsDBName); ?>" maxlength="100" placeholder="<?php esc_attr_e('example: DatabaseName (value is optional)', 'duplicator'); ?>" /></td>
|
462 |
+
</tr>
|
463 |
+
<tr>
|
464 |
+
<td><?php esc_html_e("User", 'duplicator') ?></td>
|
465 |
+
<td><input type="text" name="dbuser" id="dbuser" value="<?php echo esc_attr($Package->Installer->OptsDBUser); ?>" maxlength="100" placeholder="<?php esc_attr_e('example: DatabaseUserName (value is optional)', 'duplicator'); ?>" /></td>
|
466 |
+
</tr>
|
467 |
+
</table><br />
|
468 |
+
</div>
|
469 |
+
|
470 |
+
<!-- ===================
|
471 |
+
TAB2: cPanel -->
|
472 |
+
<div class="dup-install-prefill-tab-pnl">
|
473 |
+
<div style="padding:10px 0 0 12px;">
|
474 |
+
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL."assets/img/cpanel-48.png"); ?>" style="width:16px; height:12px" />
|
475 |
+
<?php esc_html_e("Create the database and database user at install time without leaving the installer!", 'duplicator'); ?><br/>
|
476 |
+
<?php esc_html_e("This feature is only availble in ", 'duplicator'); ?>
|
477 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_cpanel&utm_campaign=duplicator_pro" target="_blank"><?php esc_html_e('Duplicator Pro!', 'duplicator');?></a><br/>
|
478 |
+
<small><i><?php esc_html_e("This feature works only with hosts that support cPanel.", 'duplicator'); ?></i></small>
|
479 |
+
</div>
|
480 |
</div>
|
481 |
|
482 |
+
</div>
|
483 |
+
|
484 |
+
|
485 |
+
</div>
|
486 |
</div><br/>
|
487 |
|
488 |
|
489 |
<div class="dup-button-footer">
|
490 |
+
<input type="button" value="<?php esc_attr_e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ConfirmReset()" />
|
491 |
+
<input type="submit" value="<?php esc_html_e("Next", 'duplicator') ?> ▶" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
|
492 |
</div>
|
493 |
|
494 |
</form>
|
496 |
<!-- ==========================================
|
497 |
THICK-BOX DIALOGS: -->
|
498 |
<?php
|
|
|
499 |
$confirm1 = new DUP_UI_Dialog();
|
500 |
$confirm1->title = __('Reset Package Settings?', 'duplicator');
|
501 |
$confirm1->message = __('This will clear and reset all of the current package settings. Would you like to continue?', 'duplicator');
|
504 |
|
505 |
$default_name1 = DUP_Package::getDefaultName();
|
506 |
$default_name2 = DUP_Package::getDefaultName(false);
|
|
|
507 |
?>
|
508 |
<script>
|
509 |
jQuery(document).ready(function ($)
|
510 |
{
|
511 |
+
var DUP_NAMEDEFAULT1 = '<?php echo esc_js($default_name1); ?>';
|
512 |
+
var DUP_NAMEDEFAULT2 = '<?php echo esc_js($default_name2); ?>';
|
513 |
var DUP_NAMELAST = $('#package-name').val();
|
514 |
|
515 |
Duplicator.Pack.ExportOnlyDB = function ()
|
651 |
$('#dup-pack-archive-panel').show();
|
652 |
$('#export-onlydb').prop( "checked", true );
|
653 |
<?php endif; ?>
|
654 |
+
|
655 |
//Init:Toggle OptionTabs
|
656 |
Duplicator.Pack.ToggleFileFilters();
|
657 |
Duplicator.Pack.ToggleDBFilters();
|
658 |
Duplicator.Pack.ExportOnlyDB();
|
659 |
Duplicator.Pack.EnableInstallerPassword();
|
|
|
660 |
});
|
661 |
+
</script>
|
views/packages/main/s2.scan1.php
CHANGED
@@ -1,364 +1,399 @@
|
|
1 |
-
<?php
|
2 |
-
//Nonce Check
|
3 |
-
if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
|
4 |
-
DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
|
5 |
-
}
|
6 |
-
|
7 |
-
global $wp_version;
|
8 |
-
wp_enqueue_script('dup-handlebars');
|
9 |
-
|
10 |
-
if (empty($_POST)) {
|
11 |
-
//F5 Refresh Check
|
12 |
-
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
13 |
-
die("<script>window.location.href = '{$redirect}'</script>");
|
14 |
-
}
|
15 |
-
|
16 |
-
$Package = new DUP_Package();
|
17 |
-
$Package->saveActive($_POST);
|
18 |
-
$Package = DUP_Package::getActive();
|
19 |
-
|
20 |
-
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
21 |
-
$mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
|
22 |
-
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
23 |
-
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
24 |
-
$zip_check = DUP_Util::getZipPath();
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
div
|
35 |
-
div
|
36 |
-
div#dup-msg-
|
37 |
-
div#dup-msg-
|
38 |
-
div
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
div.
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
div.scan-
|
47 |
-
div.scan-
|
48 |
-
div.scan-item
|
49 |
-
div.scan-item
|
50 |
-
div.scan-item
|
51 |
-
div.scan-item div.
|
52 |
-
div.scan-item div.
|
53 |
-
div.scan-item div.
|
54 |
-
div.scan-
|
55 |
-
div.scan-
|
56 |
-
div.
|
57 |
-
div.
|
58 |
-
div.
|
59 |
-
div.
|
60 |
-
|
61 |
-
|
62 |
-
div
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
div
|
67 |
-
|
68 |
-
div.
|
69 |
-
div.hb-files-style div.
|
70 |
-
div.hb-files-style div.
|
71 |
-
div.hb-files-style div.
|
72 |
-
div.hb-files-style
|
73 |
-
div.hb-files-style div.
|
74 |
-
div.hb-files-style div.
|
75 |
-
div.hb-files-style div.
|
76 |
-
div.hb-files-style
|
77 |
-
div.hb-files-style div.directory
|
78 |
-
div.hb-files-style div.directory i.
|
79 |
-
div.hb-files-style div.directory i.
|
80 |
-
div.hb-files-style div.directory
|
81 |
-
div.hb-files-style div.directory
|
82 |
-
div.hb-files-style div.
|
83 |
-
div.hb-files-style div.
|
84 |
-
div.hb-files-style div.
|
85 |
-
div.hb-files-style div.
|
86 |
-
div.hb-files-style div.
|
87 |
-
div.hb-files-style div.
|
88 |
-
|
89 |
-
div
|
90 |
-
div
|
91 |
-
div
|
92 |
-
|
93 |
-
|
94 |
-
div#
|
95 |
-
div#
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
div#
|
101 |
-
div#
|
102 |
-
|
103 |
-
|
104 |
-
div
|
105 |
-
|
106 |
-
|
107 |
-
div#
|
108 |
-
div
|
109 |
-
|
110 |
-
|
111 |
-
div#arc-details-dlg
|
112 |
-
div#arc-details-dlg
|
113 |
-
div#arc-details-dlg
|
114 |
-
div#arc-details-dlg
|
115 |
-
div#arc-details-dlg
|
116 |
-
|
117 |
-
div#arc-
|
118 |
-
|
119 |
-
div#arc-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
div.
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
<
|
167 |
-
<
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
<
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
</script>
|
1 |
+
<?php
|
2 |
+
//Nonce Check
|
3 |
+
if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
|
4 |
+
DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
|
5 |
+
}
|
6 |
+
|
7 |
+
global $wp_version;
|
8 |
+
wp_enqueue_script('dup-handlebars');
|
9 |
+
|
10 |
+
if (empty($_POST)) {
|
11 |
+
//F5 Refresh Check
|
12 |
+
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
13 |
+
die("<script>window.location.href = '{$redirect}'</script>");
|
14 |
+
}
|
15 |
+
|
16 |
+
$Package = new DUP_Package();
|
17 |
+
$Package->saveActive($_POST);
|
18 |
+
$Package = DUP_Package::getActive();
|
19 |
+
|
20 |
+
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
21 |
+
$mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
|
22 |
+
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
23 |
+
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
24 |
+
$zip_check = DUP_Util::getZipPath();
|
25 |
+
|
26 |
+
$action_url = admin_url('admin.php?page=duplicator&tab=new3');
|
27 |
+
$action_nonce_url = wp_nonce_url($action_url, 'new3-package');
|
28 |
+
?>
|
29 |
+
|
30 |
+
|
31 |
+
<style>
|
32 |
+
/*PROGRESS-BAR - RESULTS - ERROR */
|
33 |
+
form#form-duplicator {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
|
34 |
+
div.dup-progress-title {font-size:22px; padding:5px 0 20px 0; font-weight:bold}
|
35 |
+
div#dup-msg-success {padding:0 5px 5px 5px; text-align:left}
|
36 |
+
div#dup-msg-success div.details {padding:10px 15px 10px 15px; margin:5px 0 15px 0; background:#fff; border-radius:5px; border:1px solid #ddd; box-shadow:0 8px 6px -6px #999; }
|
37 |
+
div#dup-msg-success div.details-title {font-size:20px; border-bottom:1px solid #dfdfdf; padding:5px; margin:0 0 10px 0; font-weight:bold}
|
38 |
+
div#dup-msg-success-subtitle {color:#999; margin:0; font-size:11px}
|
39 |
+
div.dup-scan-filter-status {display:inline; font-size:11px; margin-right:10px; color:#630f0f;}
|
40 |
+
div#dup-msg-error {color:#A62426; padding:5px; max-width:790px;}
|
41 |
+
div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
|
42 |
+
div.dup-hdr-error-details {text-align:left; margin:20px 0}
|
43 |
+
i[data-tooltip].fa-question-circle {color:#555}
|
44 |
+
|
45 |
+
/*SCAN ITEMS: Sections */
|
46 |
+
div.scan-header { font-size:16px; padding:7px 5px 7px 7px; font-weight:bold; background-color:#E0E0E0; border-bottom:0px solid #C0C0C0 }
|
47 |
+
div.scan-header-details {float:right; margin-top:-5px}
|
48 |
+
div.scan-item {border:1px solid #E0E0E0; border-bottom:none;}
|
49 |
+
div.scan-item-first { border-top-right-radius:4px; border-top-left-radius:4px}
|
50 |
+
div.scan-item-last {border-bottom:1px solid #E0E0E0}
|
51 |
+
div.scan-item div.title {background-color:#F1F1F1; width:100%; padding:4px 0 4px 0; cursor:pointer; height:20px;}
|
52 |
+
div.scan-item div.title:hover {background-color:#ECECEC;}
|
53 |
+
div.scan-item div.text {font-weight:bold; font-size:14px; float:left; position:relative; left:10px}
|
54 |
+
div.scan-item div.badge {float:right; border-radius:4px; color:#fff; min-width:40px; text-align:center; position:relative; right:10px; font-size:12px; padding:0 3px 0 3px}
|
55 |
+
div.scan-item div.badge-pass {background:green;}
|
56 |
+
div.scan-item div.badge-warn {background:#630f0f;}
|
57 |
+
div.scan-item div.info {display:none; padding:10px; background:#fff}
|
58 |
+
div.scan-good {display:inline-block; color:green;font-weight:bold;}
|
59 |
+
div.scan-warn {display:inline-block; color:#630f0f;font-weight:bold;}
|
60 |
+
div.dup-more-details {float:right; font-size:14px}
|
61 |
+
div.dup-more-details a{color:black}
|
62 |
+
div.dup-more-details a:hover {color:#777; cursor:pointer}
|
63 |
+
div.dup-more-details:hover {color:#777; cursor:pointer}
|
64 |
+
|
65 |
+
/*FILES */
|
66 |
+
div#data-arc-size1 {display:inline-block; font-size:11px; margin-right:1px;}
|
67 |
+
i.data-size-help { font-size:12px; display:inline-block; margin:0; padding:0}
|
68 |
+
div.dup-data-size-uncompressed {font-size:10px; text-align: right; padding:0; margin:-7px 0 0 0; font-style: italic; font-weight: normal; border:0px solid red; clear:both}
|
69 |
+
div.hb-files-style div.container {border:1px solid #E0E0E0; border-radius:4px; margin:5px 0 10px 0}
|
70 |
+
div.hb-files-style div.container b {font-weight:bold}
|
71 |
+
div.hb-files-style div.container div.divider {margin-bottom:2px; font-weight:bold}
|
72 |
+
div.hb-files-style div.data {padding:8px; line-height:21px; height:175px; overflow-y:scroll; }
|
73 |
+
div.hb-files-style div.hdrs {padding:0 4px 4px 6px; border-bottom:1px solid #E0E0E0; font-weight:bold}
|
74 |
+
div.hb-files-style div.hdrs sup i.fa {font-size:11px}
|
75 |
+
div.hb-files-style div.hdrs-up-down {float:right; margin:2px 12px 0 0}
|
76 |
+
div.hb-files-style i.dup-nav-toggle:hover {cursor:pointer; color:#999}
|
77 |
+
div.hb-files-style div.directory {margin-left:12px}
|
78 |
+
div.hb-files-style div.directory i.size {font-size:11px; font-style:normal; display:inline-block; min-width:50px}
|
79 |
+
div.hb-files-style div.directory i.count {font-size:11px; font-style:normal; display:inline-block; min-width:20px}
|
80 |
+
div.hb-files-style div.directory i.empty {width:15px; display:inline-block}
|
81 |
+
div.hb-files-style div.directory i.dup-nav {cursor:pointer}
|
82 |
+
div.hb-files-style div.directory i.fa {width:8px}
|
83 |
+
div.hb-files-style div.directory i.chk-off {width:20px; color:#777; cursor: help; margin:0; font-size:1.25em}
|
84 |
+
div.hb-files-style div.directory label {font-weight:bold; cursor:pointer; vertical-align:top;display:inline-block; width:475px; white-space: nowrap; overflow:hidden; text-overflow:ellipsis;}
|
85 |
+
div.hb-files-style div.directory label:hover {color:#025d02}
|
86 |
+
div.hb-files-style div.files {padding:2px 0 0 35px; font-size:12px; display:none; line-height:18px}
|
87 |
+
div.hb-files-style div.files i.size {font-style:normal; display:inline-block; min-width:50px}
|
88 |
+
div.hb-files-style div.files label {font-weight: normal; font-size:11px; vertical-align:top;display:inline-block;width:450px; white-space: nowrap; overflow:hidden; text-overflow:ellipsis;}
|
89 |
+
div.hb-files-style div.files label:hover {color:#025d02; cursor: pointer}
|
90 |
+
div.hb-files-style div.apply-btn {text-align:right; margin: 1px 0 10px 0; width:100%}
|
91 |
+
div.hb-files-style div.apply-warn {float:left; font-size:11px; color:maroon; margin-top:-7px; font-style: italic; display:none; text-align: left}
|
92 |
+
|
93 |
+
div#size-more-details {display:none; margin:5px 0 20px 0; border:1px solid #dfdfdf; padding:8px; border-radius: 4px; background-color: #F1F1F1}
|
94 |
+
div#size-more-details ul {list-style-type:circle; padding-left:20px; margin:0}
|
95 |
+
div#size-more-details li {margin:0}
|
96 |
+
|
97 |
+
/*DATABASE*/
|
98 |
+
div#dup-scan-db-info {margin-top:5px}
|
99 |
+
div#data-db-tablelist {max-height:250px; overflow-y:scroll; border:1px solid silver; padding:8px; background: #efefef; border-radius: 4px}
|
100 |
+
div#data-db-tablelist td{padding:0 5px 3px 20px; min-width:100px}
|
101 |
+
div#data-db-size1 {display:inline-block; font-size:11px; margin-right:1px;}
|
102 |
+
|
103 |
+
/*WARNING-CONTINUE*/
|
104 |
+
div#dup-scan-warning-continue {display:none; text-align:center; padding:0 0 15px 0}
|
105 |
+
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:#630f0f}
|
106 |
+
div#dup-scan-warning-continue div.msg2 {padding:2px; line-height:13px}
|
107 |
+
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
108 |
+
div.dup-pro-support {text-align:center; font-style:italic; font-size:13px; margin-top:20px;font-weight:bold}
|
109 |
+
|
110 |
+
/*DIALOG WINDOWS*/
|
111 |
+
div#arc-details-dlg {font-size:12px}
|
112 |
+
div#arc-details-dlg h2 {margin:0; padding:0 0 5px 0; border-bottom:1px solid #dfdfdf;}
|
113 |
+
div#arc-details-dlg hr {margin:3px 0 10px 0}
|
114 |
+
div#arc-details-dlg table#db-area {margin:0; width:98%}
|
115 |
+
div#arc-details-dlg table#db-area td {padding:0;}
|
116 |
+
div#arc-details-dlg table#db-area td:first-child {font-weight:bold; white-space:nowrap; width:100px}
|
117 |
+
div#arc-details-dlg div.filter-area {height:265px; overflow-y:scroll; border:1px solid #dfdfdf; padding:8px; margin:2px 0}
|
118 |
+
div#arc-details-dlg div.file-info {padding:0 0 10px 15px; width:500px; white-space:nowrap;}
|
119 |
+
div#arc-details-dlg div.file-info i.fa-question-circle { margin-right: 5px; font-size: 11px;}
|
120 |
+
|
121 |
+
div#arc-paths-dlg textarea.path-dirs,
|
122 |
+
textarea.path-files {font-size:12px; border: 1px solid silver; padding: 10px; background: #fff; margin:5px; height:125px; width:100%; white-space:pre}
|
123 |
+
div#arc-paths-dlg div.copy-button {float:right;}
|
124 |
+
div#arc-paths-dlg div.copy-button button {font-size:12px}
|
125 |
+
|
126 |
+
/*FOOTER*/
|
127 |
+
div.dup-button-footer {text-align:center; margin:0}
|
128 |
+
button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
|
129 |
+
i.scan-warn {color:#630f0f;}
|
130 |
+
</style>
|
131 |
+
|
132 |
+
<?php
|
133 |
+
/* VALIDATE PACKAGE DATA:
|
134 |
+
* Porting to 1.3 Line
|
135 |
+
*/
|
136 |
+
if (false) :
|
137 |
+
//if (($errors = $Package->validateInputs()) !== true)
|
138 |
+
?>
|
139 |
+
|
140 |
+
<form id="form-duplicator" method="post" action="<?php echo $action_nonce_url; ?>">
|
141 |
+
<!-- ERROR MESSAGE -->
|
142 |
+
<div id="dup-msg-error" >
|
143 |
+
<div class="dup-hdr-error"><i class="fa fa-exclamation-circle"></i> <?php _e('Input fields not valid', 'duplicator'); ?></div>
|
144 |
+
<i><?php esc_html_e('Please try again!', 'duplicator'); ?></i><br/>
|
145 |
+
<div class="dup-hdr-error-details">
|
146 |
+
<b><?php esc_html_e("Error Message:", 'duplicator'); ?></b>
|
147 |
+
<div id="dup-msg-error-response-text">
|
148 |
+
<?php
|
149 |
+
foreach ($errors as $error) {
|
150 |
+
echo $error['field'].': '.$error['msg'].'<br>';
|
151 |
+
}
|
152 |
+
?>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
<input type="button" value="◀ <?php esc_html_e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1&_wpnonce=<?php echo wp_create_nonce('new1-package'); ?>')" class="button button-large" />
|
157 |
+
</form>
|
158 |
+
<?php
|
159 |
+
return;
|
160 |
+
endif;
|
161 |
+
?>
|
162 |
+
|
163 |
+
<!-- =========================================
|
164 |
+
TOOL BAR:STEPS -->
|
165 |
+
<table id="dup-toolbar">
|
166 |
+
<tr valign="top">
|
167 |
+
<td style="white-space:nowrap">
|
168 |
+
<div id="dup-wiz">
|
169 |
+
<div id="dup-wiz-steps">
|
170 |
+
<div class="completed-step"><a>1-<?php esc_html_e('Setup', 'duplicator'); ?></a></div>
|
171 |
+
<div class="active-step"><a>2-<?php esc_html_e('Scan', 'duplicator'); ?> </a></div>
|
172 |
+
<div><a>3-<?php esc_html_e('Build', 'duplicator'); ?> </a></div>
|
173 |
+
</div>
|
174 |
+
<div id="dup-wiz-title">
|
175 |
+
<?php esc_html_e('Step 2: System Scan', 'duplicator'); ?>
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
</td>
|
179 |
+
<td>
|
180 |
+
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('Packages', 'duplicator'); ?></a>
|
181 |
+
<span> <?php esc_html_e('Create New', 'duplicator'); ?></span>
|
182 |
+
</td>
|
183 |
+
</tr>
|
184 |
+
</table>
|
185 |
+
<hr class="dup-toolbar-line">
|
186 |
+
|
187 |
+
|
188 |
+
<form id="form-duplicator" method="post" action="<?php echo $action_nonce_url;?>">
|
189 |
+
<?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
|
190 |
+
|
191 |
+
<!-- PROGRESS BAR -->
|
192 |
+
<div id="dup-progress-bar-area">
|
193 |
+
<div class="dup-progress-title"><i class="fa fa-circle-o-notch fa-spin"></i> <?php _e('Scanning Site', 'duplicator'); ?></div>
|
194 |
+
<div id="dup-progress-bar"></div>
|
195 |
+
<b><?php esc_html_e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
196 |
+
<i><?php esc_html_e('Keep this window open during the scan process.', 'duplicator'); ?></i><br/>
|
197 |
+
<i><?php esc_html_e('This can take several minutes.', 'duplicator'); ?></i><br/>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<!-- ERROR MESSAGE -->
|
201 |
+
<div id="dup-msg-error" style="display:none">
|
202 |
+
<div class="dup-hdr-error"><i class="fa fa-exclamation-circle"></i> <?php _e('Scan Error', 'duplicator'); ?></div>
|
203 |
+
<i><?php esc_html_e('Please try again!', 'duplicator'); ?></i><br/>
|
204 |
+
<div class="dup-hdr-error-details">
|
205 |
+
<b><?php esc_html_e("Server Status:", 'duplicator'); ?></b>
|
206 |
+
<div id="dup-msg-error-response-status" style="display:inline-block"></div><br/>
|
207 |
+
|
208 |
+
<b><?php esc_html_e("Error Message:", 'duplicator'); ?></b>
|
209 |
+
<div id="dup-msg-error-response-text"></div>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
|
213 |
+
<!-- SUCCESS MESSAGE -->
|
214 |
+
<div id="dup-msg-success" style="display:none">
|
215 |
+
|
216 |
+
<div style="text-align:center">
|
217 |
+
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php _e('Scan Complete', 'duplicator'); ?></div>
|
218 |
+
<div id="dup-msg-success-subtitle">
|
219 |
+
<?php esc_html_e('Process Time:', 'duplicator'); ?> <span id="data-rpt-scantime"></span>
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
|
223 |
+
<div class="details">
|
224 |
+
<?php
|
225 |
+
include ('s2.scan2.php');
|
226 |
+
echo '<br/>';
|
227 |
+
include ('s2.scan3.php');
|
228 |
+
?>
|
229 |
+
</div>
|
230 |
+
|
231 |
+
<!-- WARNING CONTINUE -->
|
232 |
+
<div id="dup-scan-warning-continue">
|
233 |
+
<div class="msg1">
|
234 |
+
<label for="dup-scan-warning-continue-checkbox">
|
235 |
+
<?php esc_html_e('A notice status has been detected, are you sure you want to continue?', 'duplicator');?>
|
236 |
+
</label>
|
237 |
+
<div style="padding:8px 0">
|
238 |
+
<input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.warningContinue(this)"/>
|
239 |
+
<label for="dup-scan-warning-continue-checkbox"><?php esc_html_e('Yes. Continue with the build process!', 'duplicator');?></label>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
<div class="msg2">
|
243 |
+
<label for="dup-scan-warning-continue-checkbox">
|
244 |
+
<?php
|
245 |
+
esc_html_e("Scan checks are not required to pass, however they could cause issues on some systems.", 'duplicator');
|
246 |
+
echo '<br/>';
|
247 |
+
esc_html_e("Please review the details for each section by clicking on the detail title.", 'duplicator');
|
248 |
+
?>
|
249 |
+
</label>
|
250 |
+
</div>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div class="dup-button-footer" style="display:none">
|
254 |
+
<input type="button" value="◀ <?php esc_html_e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1&_wpnonce=<?php echo wp_create_nonce('new1-package');?>')" class="button button-large" />
|
255 |
+
<input type="button" value="<?php esc_html_e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.rescan()" class="button button-large" />
|
256 |
+
<input type="submit" value="<?php esc_html_e("Build", 'duplicator') ?> ▶" class="button button-primary button-large" id="dup-build-button" />
|
257 |
+
</div>
|
258 |
+
</div>
|
259 |
+
|
260 |
+
</form>
|
261 |
+
|
262 |
+
<script>
|
263 |
+
jQuery(document).ready(function($)
|
264 |
+
{
|
265 |
+
// Performs ajax call to get scanner retults via JSON response
|
266 |
+
Duplicator.Pack.runScanner = function()
|
267 |
+
{
|
268 |
+
var data = {action : 'duplicator_package_scan',file_notice:'<?php echo esc_js($core_file_notice); ?>',dir_notice:'<?php esc_js($core_dir_notice); ?>', nonce: '<?php echo wp_create_nonce('duplicator_package_scan'); ?>'}
|
269 |
+
$.ajax({
|
270 |
+
type: "POST",
|
271 |
+
cache: false,
|
272 |
+
url: ajaxurl,
|
273 |
+
dataType: "json",
|
274 |
+
timeout: 10000000,
|
275 |
+
data: data,
|
276 |
+
complete: function() {$('.dup-button-footer').show()},
|
277 |
+
success: function(data) {
|
278 |
+
Duplicator.Pack.loadScanData(data);
|
279 |
+
},
|
280 |
+
error: function(data) {
|
281 |
+
$('#dup-progress-bar-area').hide();
|
282 |
+
var status = data.status + ' -' + data.statusText;
|
283 |
+
$('#dup-msg-error-response-status').html(status)
|
284 |
+
$('#dup-msg-error-response-text').html(data.responseText);
|
285 |
+
$('#dup-msg-error').show(200);
|
286 |
+
console.log(data);
|
287 |
+
}
|
288 |
+
});
|
289 |
+
}
|
290 |
+
|
291 |
+
//Loads the scanner data results into the various sections of the screen
|
292 |
+
Duplicator.Pack.loadScanData = function(data)
|
293 |
+
{
|
294 |
+
$('#dup-progress-bar-area').hide();
|
295 |
+
|
296 |
+
//ERROR: Data object is corrupt or empty return error
|
297 |
+
if (data == undefined || data.RPT == undefined) {
|
298 |
+
Duplicator.Pack.intErrorView();
|
299 |
+
console.log('JSON Report Data:');
|
300 |
+
console.log(data);
|
301 |
+
return;
|
302 |
+
}
|
303 |
+
|
304 |
+
$('#data-rpt-scantime').text(data.RPT.ScanTime || 0);
|
305 |
+
Duplicator.Pack.intServerData(data);
|
306 |
+
Duplicator.Pack.initArchiveFilesData(data);
|
307 |
+
Duplicator.Pack.initArchiveDBData(data);
|
308 |
+
|
309 |
+
//Addon Sites
|
310 |
+
$('#data-arc-status-addonsites').html(Duplicator.Pack.setScanStatus(data.ARC.Status.AddonSites));
|
311 |
+
if (data.ARC.FilterInfo.Dirs.AddonSites !== undefined && data.ARC.FilterInfo.Dirs.AddonSites.length > 0) {
|
312 |
+
$("#addonsites-block").show();
|
313 |
+
}
|
314 |
+
|
315 |
+
$('#dup-msg-success').show();
|
316 |
+
|
317 |
+
//Waring Check
|
318 |
+
var warnCount = data.RPT.Warnings || 0;
|
319 |
+
if (warnCount > 0) {
|
320 |
+
$('#dup-scan-warning-continue').show();
|
321 |
+
$('#dup-build-button').prop("disabled",true).removeClass('button-primary');
|
322 |
+
if ($('#dup-scan-warning-continue-checkbox').is(':checked')) {
|
323 |
+
$('#dup-build-button').removeAttr('disabled').addClass('button-primary');
|
324 |
+
}
|
325 |
+
} else {
|
326 |
+
$('#dup-scan-warning-continue').hide();
|
327 |
+
$('#dup-build-button').prop("disabled",false).addClass('button-primary');
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
//Toggles each scan item to hide/show details
|
332 |
+
Duplicator.Pack.toggleScanItem = function(item)
|
333 |
+
{
|
334 |
+
var $info = $(item).parents('div.scan-item').children('div.info');
|
335 |
+
var $text = $(item).find('div.text i.fa');
|
336 |
+
if ($info.is(":hidden")) {
|
337 |
+
$text.addClass('fa-caret-down').removeClass('fa-caret-right');
|
338 |
+
$info.show();
|
339 |
+
} else {
|
340 |
+
$text.addClass('fa-caret-right').removeClass('fa-caret-down');
|
341 |
+
$info.hide(250);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
//Returns the scanner without a page refresh
|
346 |
+
Duplicator.Pack.rescan = function()
|
347 |
+
{
|
348 |
+
$('#dup-msg-success,#dup-msg-error,.dup-button-footer').hide();
|
349 |
+
$('#dup-progress-bar-area').show();
|
350 |
+
Duplicator.Pack.runScanner();
|
351 |
+
}
|
352 |
+
|
353 |
+
//Allows user to continue with build if warnings found
|
354 |
+
Duplicator.Pack.warningContinue = function(checkbox)
|
355 |
+
{
|
356 |
+
($(checkbox).is(':checked'))
|
357 |
+
? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
|
358 |
+
: $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
|
359 |
+
}
|
360 |
+
|
361 |
+
//Show the error message if the JSON data is corrupted
|
362 |
+
Duplicator.Pack.intErrorView = function()
|
363 |
+
{
|
364 |
+
var html_msg;
|
365 |
+
html_msg = '<?php esc_html_e("Unable to perform a full scan, please try the following actions:", 'duplicator') ?><br/><br/>';
|
366 |
+
html_msg += '<?php esc_html_e("1. Go back and create a root path directory filter to validate the site is scan-able.", 'duplicator') ?><br/>';
|
367 |
+
html_msg += '<?php esc_html_e("2. Continue to add/remove filters to isolate which path is causing issues.", 'duplicator') ?><br/>';
|
368 |
+
html_msg += '<?php esc_html_e("3. This message will go away once the correct filters are applied.", 'duplicator') ?><br/><br/>';
|
369 |
+
|
370 |
+
html_msg += '<?php esc_html_e("Common Issues:", 'duplicator') ?><ul>';
|
371 |
+
html_msg += '<li><?php esc_html_e("- On some budget hosts scanning over 30k files can lead to timeout/gateway issues. Consider scanning only your main WordPress site and avoid trying to backup other external directories.", 'duplicator') ?></li>';
|
372 |
+
html_msg += '<li><?php esc_html_e("- Symbolic link recursion can cause timeouts. Ask your server admin if any are present in the scan path. If they are add the full path as a filter and try running the scan again.", 'duplicator') ?></li>';
|
373 |
+
html_msg += '</ul>';
|
374 |
+
$('#dup-msg-error-response-status').html('Scan Path Error [<?php echo esc_js(esc_html(rtrim(DUPLICATOR_WPROOTPATH, '/'))); ?>]');
|
375 |
+
$('#dup-msg-error-response-text').html(esc_js(html_msg));
|
376 |
+
$('#dup-msg-error').show(200);
|
377 |
+
}
|
378 |
+
|
379 |
+
//Sets various can statuses
|
380 |
+
Duplicator.Pack.setScanStatus = function(status)
|
381 |
+
{
|
382 |
+
var result;
|
383 |
+
switch (status) {
|
384 |
+
case false : result = '<div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
385 |
+
case 'Warn' : result = '<div class="badge badge-warn"><?php esc_html_e("Notice", 'duplicator') ?></div>'; break;
|
386 |
+
case true : result = '<div class="scan-good"><i class="fa fa-check"></i></div>'; break;
|
387 |
+
case 'Good' : result = '<div class="badge badge-pass"><?php esc_html_e("Good", 'duplicator') ?></div>'; break;
|
388 |
+
default :
|
389 |
+
result = 'unable to read';
|
390 |
+
}
|
391 |
+
return result;
|
392 |
+
}
|
393 |
+
|
394 |
+
//PAGE INIT:
|
395 |
+
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
396 |
+
Duplicator.Pack.runScanner();
|
397 |
+
|
398 |
+
});
|
399 |
</script>
|
views/packages/main/s2.scan2.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<!-- ================================================================
|
2 |
SERVER -->
|
3 |
<div class="details-title">
|
4 |
-
<i class="fa fa-hdd-o"></i> <?php
|
5 |
-
<div class="dup-more-details" title="<?php
|
6 |
<a href="?page=duplicator-tools&tab=diagnostics" target="_blank"><i class="fa fa-microchip"></i></a>
|
7 |
</div>
|
8 |
</div>
|
@@ -23,8 +23,9 @@ PHP SETTINGS -->
|
|
23 |
|
24 |
if (!$Package->Archive->ExportOnlyDB && isset($_POST['filter-on']) && isset($_POST['filter-dirs'])) {
|
25 |
|
26 |
-
|
27 |
-
|
|
|
28 |
|
29 |
// clean possible blank spaces before and after the paths
|
30 |
for ($i = 0; $i < count($filter_dirs); $i++) {
|
@@ -37,8 +38,9 @@ PHP SETTINGS -->
|
|
37 |
if (count($core_dir_included)) $core_dir_notice = true;
|
38 |
|
39 |
|
40 |
-
|
41 |
-
|
|
|
42 |
|
43 |
// clean possible blank spaces before and after the paths
|
44 |
for ($i = 0; $i < count($filter_files); $i++) {
|
@@ -50,35 +52,35 @@ PHP SETTINGS -->
|
|
50 |
}
|
51 |
?>
|
52 |
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
53 |
-
<div class="text"><i class="fa fa-caret-right"></i> <?php
|
54 |
<div id="data-srv-php-all"></div>
|
55 |
</div>
|
56 |
<div class="info">
|
57 |
<?php
|
58 |
//WEB SERVER
|
59 |
$web_servers = implode(', ', $GLOBALS['DUPLICATOR_SERVER_LIST']);
|
60 |
-
echo '<span id="data-srv-php-websrv"></span> <b>' .
|
61 |
-
|
62 |
-
echo "<i>
|
63 |
|
64 |
//PHP VERSION
|
65 |
-
echo '<hr size="1" /><span id="data-srv-php-version"></span> <b>' .
|
66 |
-
|
67 |
|
68 |
//OPEN_BASEDIR
|
69 |
$test = ini_get("open_basedir");
|
70 |
$test = ($test) ? 'ON' : 'OFF';
|
71 |
echo '<hr size="1" /><span id="data-srv-php-openbase"></span> <b>' . __('PHP Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
72 |
-
|
73 |
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
74 |
|
75 |
//MAX_EXECUTION_TIME
|
76 |
$test = (@set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
77 |
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('PHP Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
78 |
-
|
79 |
. 'An attempt is made to override this value if the server allows it.', 'duplicator');
|
80 |
echo '<br/><br/>';
|
81 |
-
|
82 |
. 'the process. If you are on a budget host and limited on processing time, consider using the database or file filters to shrink the size of your overall package. '
|
83 |
. 'However use caution as excluding the wrong resources can cause your install to not work properly.', 'duplicator');
|
84 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
@@ -86,7 +88,7 @@ PHP SETTINGS -->
|
|
86 |
if ($zip_check != null) {
|
87 |
echo '<br/><br/>';
|
88 |
echo '<span style="font-weight:bold">';
|
89 |
-
|
90 |
echo '</span>';
|
91 |
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_max_execution_time_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
92 |
}
|
@@ -100,15 +102,14 @@ WP SETTINGS -->
|
|
100 |
|
101 |
|
102 |
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
103 |
-
<div class="text"><i class="fa fa-caret-right"></i> <?php
|
104 |
<div id="data-srv-wp-all"></div>
|
105 |
</div>
|
106 |
<div class="info">
|
107 |
<?php
|
108 |
//VERSION CHECK
|
109 |
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
110 |
-
printf(
|
111 |
-
. 'If possible please update your WordPress site to the latest version.', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
112 |
|
113 |
//CORE FILES
|
114 |
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
@@ -117,7 +118,7 @@ WP SETTINGS -->
|
|
117 |
$filter_text="";
|
118 |
if($core_dir_notice) {
|
119 |
echo '<small id="data-srv-wp-core-missing-dirs">';
|
120 |
-
|
121 |
echo "<br/>";
|
122 |
foreach($core_dir_included as $core_dir) {
|
123 |
echo ' <b><i class="fa fa-exclamation-circle scan-warn"></i> '. $core_dir . '</b><br/>';
|
@@ -128,10 +129,10 @@ WP SETTINGS -->
|
|
128 |
|
129 |
if($core_file_notice) {
|
130 |
echo '<small id="data-srv-wp-core-missing-dirs">';
|
131 |
-
|
132 |
echo "<br/>";
|
133 |
foreach($core_files_included as $core_file) {
|
134 |
-
echo ' <b><i class="fa fa-exclamation-circle scan-warn"></i> '. $core_file . '</b><br/>';
|
135 |
}
|
136 |
echo '</small><br/>';
|
137 |
$filter_text .= (strlen($filter_text) > 0) ? " and file" : "files";
|
@@ -140,16 +141,14 @@ WP SETTINGS -->
|
|
140 |
|
141 |
if(strlen($filter_text) > 0) {
|
142 |
echo '<small>';
|
143 |
-
|
144 |
-
. " to the new location for the site to function properly.");
|
145 |
echo '</small>';
|
146 |
}
|
147 |
|
148 |
|
149 |
if(!$core_dir_notice && !$core_file_notice):
|
150 |
echo '<small>';
|
151 |
-
|
152 |
-
. "This check will also look for core WordPress paths that should be included in the archive for WordPress to work correctly.");
|
153 |
echo '</small>';
|
154 |
endif;
|
155 |
|
@@ -158,21 +157,21 @@ WP SETTINGS -->
|
|
158 |
//CACHE DIR
|
159 |
$cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
|
160 |
$cache_size = DUP_Util::byteSize(DUP_Util::getDirectorySize($cache_path));
|
161 |
-
echo '<hr size="1" /><span id="data-srv-wp-cache"></span> <b>' . __('Cache Path', 'duplicator') . ":</b> '
|
162 |
-
|
163 |
. "your cache plugins clear cache feature. Use caution if manually removing files the cache folder. The cache "
|
164 |
. "size minimum threshold that triggers this warning is currently set at ", 'duplicator');
|
165 |
-
echo DUP_Util::byteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
166 |
|
167 |
//MU SITE
|
168 |
if (is_multisite()) {
|
169 |
echo '<hr size="1" /><span><div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div></span> <b>' . __('Multisite: Unsupported', 'duplicator') . "</b> <br/>";
|
170 |
-
|
171 |
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
172 |
} else {
|
173 |
echo '<hr size="1" /><span><div class="scan-good"><i class="fa fa-check"></i></div></span> <b>' . __('Multisite: N/A', 'duplicator') . "</b> <br/>";
|
174 |
-
|
175 |
-
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" .
|
176 |
}
|
177 |
?>
|
178 |
</div>
|
1 |
<!-- ================================================================
|
2 |
SERVER -->
|
3 |
<div class="details-title">
|
4 |
+
<i class="fa fa-hdd-o"></i> <?php esc_html_e("Server", 'duplicator'); ?>
|
5 |
+
<div class="dup-more-details" title="<?php esc_attr_e('Show Diagnostics', 'duplicator');?>">
|
6 |
<a href="?page=duplicator-tools&tab=diagnostics" target="_blank"><i class="fa fa-microchip"></i></a>
|
7 |
</div>
|
8 |
</div>
|
23 |
|
24 |
if (!$Package->Archive->ExportOnlyDB && isset($_POST['filter-on']) && isset($_POST['filter-dirs'])) {
|
25 |
|
26 |
+
//findout matched core directories
|
27 |
+
$post_filter_dirs = sanitize_textarea_field($_POST['filter-dirs']);
|
28 |
+
$filter_dirs = explode(";", trim($post_filter_dirs));
|
29 |
|
30 |
// clean possible blank spaces before and after the paths
|
31 |
for ($i = 0; $i < count($filter_dirs); $i++) {
|
38 |
if (count($core_dir_included)) $core_dir_notice = true;
|
39 |
|
40 |
|
41 |
+
//find out core files
|
42 |
+
$post_filter_files = sanitize_textarea_field($_POST['filter-files']);
|
43 |
+
$filter_files = explode(";", trim($post_filter_files));
|
44 |
|
45 |
// clean possible blank spaces before and after the paths
|
46 |
for ($i = 0; $i < count($filter_files); $i++) {
|
52 |
}
|
53 |
?>
|
54 |
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
55 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Setup', 'duplicator');?></div>
|
56 |
<div id="data-srv-php-all"></div>
|
57 |
</div>
|
58 |
<div class="info">
|
59 |
<?php
|
60 |
//WEB SERVER
|
61 |
$web_servers = implode(', ', $GLOBALS['DUPLICATOR_SERVER_LIST']);
|
62 |
+
echo '<span id="data-srv-php-websrv"></span> <b>' . esc_html__('Web Server', 'duplicator') . ":</b> '{$_SERVER['SERVER_SOFTWARE']}' <br/>";
|
63 |
+
esc_html_e("Supported web servers: ", 'duplicator');
|
64 |
+
echo "<i>".esc_html($web_servers)."</i>";
|
65 |
|
66 |
//PHP VERSION
|
67 |
+
echo '<hr size="1" /><span id="data-srv-php-version"></span> <b>' . esc_html__('PHP Version', 'duplicator') . "</b> <br/>";
|
68 |
+
esc_html_e('The minimum PHP version supported by Duplicator is 5.2.9. It is highly recommended to use PHP 5.3+ for improved stability. For international language support please use PHP 7.0+.', 'duplicator');
|
69 |
|
70 |
//OPEN_BASEDIR
|
71 |
$test = ini_get("open_basedir");
|
72 |
$test = ($test) ? 'ON' : 'OFF';
|
73 |
echo '<hr size="1" /><span id="data-srv-php-openbase"></span> <b>' . __('PHP Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
74 |
+
esc_html_e('Issues might occur when [open_basedir] is enabled. Work with your server admin to disable this value in the php.ini file if you’re having issues building a package.', 'duplicator');
|
75 |
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
76 |
|
77 |
//MAX_EXECUTION_TIME
|
78 |
$test = (@set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
79 |
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('PHP Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
80 |
+
esc_html_e('Timeouts may occur for larger packages when [max_execution_time] time in the php.ini is too low. A value of 0 (recommended) indicates that PHP has no time limits. '
|
81 |
. 'An attempt is made to override this value if the server allows it.', 'duplicator');
|
82 |
echo '<br/><br/>';
|
83 |
+
esc_html_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build timeout messages, then your web server could be killing '
|
84 |
. 'the process. If you are on a budget host and limited on processing time, consider using the database or file filters to shrink the size of your overall package. '
|
85 |
. 'However use caution as excluding the wrong resources can cause your install to not work properly.', 'duplicator');
|
86 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
88 |
if ($zip_check != null) {
|
89 |
echo '<br/><br/>';
|
90 |
echo '<span style="font-weight:bold">';
|
91 |
+
esc_html_e('Get faster builds with Duplicator Pro with access to shell_exec zip.', 'duplicator');
|
92 |
echo '</span>';
|
93 |
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_max_execution_time_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
94 |
}
|
102 |
|
103 |
|
104 |
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
105 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('WordPress', 'duplicator');?></div>
|
106 |
<div id="data-srv-wp-all"></div>
|
107 |
</div>
|
108 |
<div class="info">
|
109 |
<?php
|
110 |
//VERSION CHECK
|
111 |
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
112 |
+
printf(esc_html__('It is recommended to have a version of WordPress that is greater than %1$s. Older version of WordPress can lead to migration issues and are a security risk. If possible please update your WordPress site to the latest version.', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
|
|
113 |
|
114 |
//CORE FILES
|
115 |
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
118 |
$filter_text="";
|
119 |
if($core_dir_notice) {
|
120 |
echo '<small id="data-srv-wp-core-missing-dirs">';
|
121 |
+
esc_html_e("The core WordPress paths below will <u>not</u> be included in the archive. These paths are required for WordPress to function!", 'duplicator');
|
122 |
echo "<br/>";
|
123 |
foreach($core_dir_included as $core_dir) {
|
124 |
echo ' <b><i class="fa fa-exclamation-circle scan-warn"></i> '. $core_dir . '</b><br/>';
|
129 |
|
130 |
if($core_file_notice) {
|
131 |
echo '<small id="data-srv-wp-core-missing-dirs">';
|
132 |
+
esc_html_e("The core WordPress file below will <u>not</u> be included in the archive. This file is required for WordPress to function!", 'duplicator');
|
133 |
echo "<br/>";
|
134 |
foreach($core_files_included as $core_file) {
|
135 |
+
echo ' <b><i class="fa fa-exclamation-circle scan-warn"></i> '. esc_html($core_file) . '</b><br/>';
|
136 |
}
|
137 |
echo '</small><br/>';
|
138 |
$filter_text .= (strlen($filter_text) > 0) ? " and file" : "files";
|
141 |
|
142 |
if(strlen($filter_text) > 0) {
|
143 |
echo '<small>';
|
144 |
+
esc_html_e("Note: Please change the {$filter_text} filters if you wish to include the WordPress core files otherwise the data will have to be manually copied to the new location for the site to function properly.", 'duplicator');
|
|
|
145 |
echo '</small>';
|
146 |
}
|
147 |
|
148 |
|
149 |
if(!$core_dir_notice && !$core_file_notice):
|
150 |
echo '<small>';
|
151 |
+
esc_html_e("If the scanner is unable to locate the wp-config.php file in the root directory, then you will need to manually copy it to its new location. This check will also look for core WordPress paths that should be included in the archive for WordPress to work correctly.", 'duplicator');
|
|
|
152 |
echo '</small>';
|
153 |
endif;
|
154 |
|
157 |
//CACHE DIR
|
158 |
$cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
|
159 |
$cache_size = DUP_Util::byteSize(DUP_Util::getDirectorySize($cache_path));
|
160 |
+
echo '<hr size="1" /><span id="data-srv-wp-cache"></span> <b>' . __('Cache Path', 'duplicator') . ":</b> '".esc_html($cache_path)."' (".esc_html($cache_size)." <br/>";
|
161 |
+
esc_html_e("Cached data will lead to issues at install time and increases your archive size. Empty your cache directory before building the package by using "
|
162 |
. "your cache plugins clear cache feature. Use caution if manually removing files the cache folder. The cache "
|
163 |
. "size minimum threshold that triggers this warning is currently set at ", 'duplicator');
|
164 |
+
echo esc_html(DUP_Util::byteSize(DUPLICATOR_SCAN_CACHESIZE)) . '.';
|
165 |
|
166 |
//MU SITE
|
167 |
if (is_multisite()) {
|
168 |
echo '<hr size="1" /><span><div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div></span> <b>' . __('Multisite: Unsupported', 'duplicator') . "</b> <br/>";
|
169 |
+
esc_html_e('Duplicator does not officially support Multisite. However, Duplicator Pro supports duplication of a full Multisite network and also has the ability to install a Multisite subsite as a standalone site.', 'duplicator');
|
170 |
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
171 |
} else {
|
172 |
echo '<hr size="1" /><span><div class="scan-good"><i class="fa fa-check"></i></div></span> <b>' . __('Multisite: N/A', 'duplicator') . "</b> <br/>";
|
173 |
+
esc_html_e('This is not a Multisite install so duplication will proceed without issue. Duplicator does not officially support Multisite. However, Duplicator Pro supports duplication of a full Multisite network and also has the ability to install a Multisite subsite as a standalone site.', 'duplicator');
|
174 |
+
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" . esc_html__('details', 'duplicator') . "]</a></i>";
|
175 |
}
|
176 |
?>
|
177 |
</div>
|
views/packages/main/s2.scan3.php
CHANGED
@@ -1,789 +1,793 @@
|
|
1 |
-
<?php
|
2 |
-
/*IDE Helper*/
|
3 |
-
/* @var $Package DUP_Package */
|
4 |
-
function _duplicatorGetRootPath() {
|
5 |
-
$txt = __('Root Path', 'duplicator');
|
6 |
-
$root = rtrim(DUPLICATOR_WPROOTPATH, '//');
|
7 |
-
$sroot = strlen($root) > 50 ? substr($root, 0, 50) . '...' : $root;
|
8 |
-
echo "<div title='{$root}' class='divider'><i class='fa fa-folder-open'></i> {$sroot}</div>";
|
9 |
-
}
|
10 |
-
?>
|
11 |
-
|
12 |
-
<!-- ================================================================
|
13 |
-
ARCHIVE -->
|
14 |
-
<div class="details-title">
|
15 |
-
<i class="fa fa-file-archive-o"></i> <?php
|
16 |
-
<div class="dup-more-details" onclick="Duplicator.Pack.showDetailsDlg()" title="<?php _e('Show Scan Details', 'duplicator');?>"><i class="fa fa-window-maximize"></i></div>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<div class="scan-header scan-item-first">
|
20 |
-
<i class="fa fa-files-o"></i>
|
21 |
-
<?php _e("Files", 'duplicator'); ?>
|
22 |
-
|
23 |
-
<div class="scan-header-details">
|
24 |
-
<div class="dup-scan-filter-status">
|
25 |
-
<?php
|
26 |
-
if ($Package->Archive->ExportOnlyDB) {
|
27 |
-
echo '<i class="fa fa-filter"></i> ';
|
28 |
-
} elseif ($Package->Archive->FilterOn) {
|
29 |
-
echo '<i class="fa fa-filter"></i> ';
|
30 |
-
}
|
31 |
-
?>
|
32 |
-
</div>
|
33 |
-
<div id="data-arc-size1"></div>
|
34 |
-
<i class="fa fa-question-circle data-size-help"
|
35 |
-
data-tooltip-title="<?php
|
36 |
-
data-tooltip="<?php
|
37 |
-
. 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i>
|
38 |
-
|
39 |
-
<div class="dup-data-size-uncompressed"><?php _e("uncompressed"); ?></div>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
|
43 |
-
<!-- ============
|
44 |
-
TOTAL SIZE -->
|
45 |
-
<div class="scan-item">
|
46 |
-
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
47 |
-
<div class="text"><i class="fa fa-caret-right"></i> <?php
|
48 |
-
<div id="data-arc-status-size"></div>
|
49 |
-
</div>
|
50 |
-
<div class="info" id="scan-itme-file-size">
|
51 |
-
<b><?php
|
52 |
-
<b><?php
|
53 |
-
<b><?php
|
54 |
-
<?php
|
55 |
-
|
56 |
-
echo "<i> <a href='javascipt:void(0)' onclick='jQuery(\"#size-more-details\").toggle(100)'>[" . __('more details...', 'duplicator') . "]</a></i>";
|
57 |
-
?>
|
58 |
-
<div id="size-more-details">
|
59 |
-
<?php
|
60 |
-
echo "<b>" . __('Overview', 'duplicator') . ":</b><br/>";
|
61 |
-
|
62 |
-
printf(
|
63 |
-
. 'host has strict processing limits. Below are some options you can take to overcome constraints set up on this host.', 'duplicator'),
|
64 |
-
|
65 |
-
|
66 |
-
echo '<
|
67 |
-
|
68 |
-
echo
|
69 |
-
echo '<
|
70 |
-
echo
|
71 |
-
echo '
|
72 |
-
echo '
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
<
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
{{
|
103 |
-
<
|
104 |
-
|
105 |
-
<
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
<
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
<
|
137 |
-
|
138 |
-
</
|
139 |
-
<button type="button" class="button-small" onclick="Duplicator.Pack.
|
140 |
-
<i class="fa fa-
|
141 |
-
</button>
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
<div id="
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
<
|
195 |
-
<?php
|
196 |
-
</
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
<div
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
<
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
<
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
<
|
271 |
-
|
272 |
-
</
|
273 |
-
<button type="button" class="button-small" onclick="Duplicator.Pack.
|
274 |
-
<i class="fa fa-
|
275 |
-
</button>
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
<div id="
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
{{
|
302 |
-
{{
|
303 |
-
<i
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
{{
|
316 |
-
{{
|
317 |
-
|
318 |
-
{{
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
</div>
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
<div class="
|
357 |
-
|
358 |
-
</div>
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
<
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
echo '<
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
$alert1
|
420 |
-
$alert1->
|
421 |
-
|
422 |
-
$
|
423 |
-
$
|
424 |
-
$
|
425 |
-
|
426 |
-
$alert2
|
427 |
-
$alert2->
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
<
|
442 |
-
<
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
<
|
466 |
-
<
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
{{
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
{{
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
<
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
</div>
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
$('div.
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
var
|
589 |
-
|
590 |
-
(
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
? $
|
596 |
-
: $
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
$
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
var
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
}
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
$('#data-arc-
|
696 |
-
$('#data-arc-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
var
|
740 |
-
var
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
$('#data-db-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
case '
|
763 |
-
color = (val
|
764 |
-
html += '<td style="color:' + color + '">
|
765 |
-
break;
|
766 |
-
case '
|
767 |
-
color = (
|
768 |
-
html += '<td style="color:' + color + '">
|
769 |
-
break;
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*IDE Helper*/
|
3 |
+
/* @var $Package DUP_Package */
|
4 |
+
function _duplicatorGetRootPath() {
|
5 |
+
$txt = __('Root Path', 'duplicator');
|
6 |
+
$root = rtrim(DUPLICATOR_WPROOTPATH, '//');
|
7 |
+
$sroot = strlen($root) > 50 ? substr($root, 0, 50) . '...' : $root;
|
8 |
+
echo "<div title='{$root}' class='divider'><i class='fa fa-folder-open'></i> {$sroot}</div>";
|
9 |
+
}
|
10 |
+
?>
|
11 |
+
|
12 |
+
<!-- ================================================================
|
13 |
+
ARCHIVE -->
|
14 |
+
<div class="details-title">
|
15 |
+
<i class="fa fa-file-archive-o"></i> <?php esc_html_e('Archive', 'duplicator');?>
|
16 |
+
<div class="dup-more-details" onclick="Duplicator.Pack.showDetailsDlg()" title="<?php _e('Show Scan Details', 'duplicator');?>"><i class="fa fa-window-maximize"></i></div>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="scan-header scan-item-first">
|
20 |
+
<i class="fa fa-files-o"></i>
|
21 |
+
<?php _e("Files", 'duplicator'); ?>
|
22 |
+
|
23 |
+
<div class="scan-header-details">
|
24 |
+
<div class="dup-scan-filter-status">
|
25 |
+
<?php
|
26 |
+
if ($Package->Archive->ExportOnlyDB) {
|
27 |
+
echo '<i class="fa fa-filter"></i> '; esc_html_e('Database Only', 'duplicator');
|
28 |
+
} elseif ($Package->Archive->FilterOn) {
|
29 |
+
echo '<i class="fa fa-filter"></i> '; esc_html_e('Enabled', 'duplicator');
|
30 |
+
}
|
31 |
+
?>
|
32 |
+
</div>
|
33 |
+
<div id="data-arc-size1"></div>
|
34 |
+
<i class="fa fa-question-circle data-size-help"
|
35 |
+
data-tooltip-title="<?php esc_html_e('Archive Size', 'duplicator'); ?>"
|
36 |
+
data-tooltip="<?php esc_html_e('This size includes only files BEFORE compression is applied. It does not include the size of the '
|
37 |
+
. 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i>
|
38 |
+
|
39 |
+
<div class="dup-data-size-uncompressed"><?php _e("uncompressed"); ?></div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
|
43 |
+
<!-- ============
|
44 |
+
TOTAL SIZE -->
|
45 |
+
<div class="scan-item">
|
46 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
47 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Size Checks', 'duplicator');?></div>
|
48 |
+
<div id="data-arc-status-size"></div>
|
49 |
+
</div>
|
50 |
+
<div class="info" id="scan-itme-file-size">
|
51 |
+
<b><?php esc_html_e('Size', 'duplicator');?>:</b> <span id="data-arc-size2"></span> |
|
52 |
+
<b><?php esc_html_e('File Count', 'duplicator');?>:</b> <span id="data-arc-files"></span> |
|
53 |
+
<b><?php esc_html_e('Directory Count', 'duplicator');?>:</b> <span id="data-arc-dirs"></span> <br/>
|
54 |
+
<?php
|
55 |
+
esc_html_e('Compressing larger sites on some budget hosts may cause timeouts. ' , 'duplicator');
|
56 |
+
echo "<i> <a href='javascipt:void(0)' onclick='jQuery(\"#size-more-details\").toggle(100); return false;'>[" . __('more details...', 'duplicator') . "]</a></i>";
|
57 |
+
?>
|
58 |
+
<div id="size-more-details">
|
59 |
+
<?php
|
60 |
+
echo "<b>" . __('Overview', 'duplicator') . ":</b><br/>";
|
61 |
+
$dup_byte_size = '<b>' . DUP_Util::byteSize(DUPLICATOR_SCAN_SIZE_DEFAULT) . '</b>';
|
62 |
+
printf(esc_html__('This notice is triggered at [%s] and can be ignored on most hosts. If during the build process you see a "Host Build Interrupt" message then this '
|
63 |
+
. 'host has strict processing limits. Below are some options you can take to overcome constraints set up on this host.', 'duplicator'), $dup_byte_size);
|
64 |
+
echo '<br/><br/>';
|
65 |
+
echo "<b>" . esc_html__('Timeout Options', 'duplicator') . ":</b><br/>";
|
66 |
+
echo '<ul>';
|
67 |
+
echo '<li>' . esc_html__('Apply the "Quick Filters" below or click the back button to apply on previous page.', 'duplicator') . '</li>';
|
68 |
+
echo '<li>' . esc_html__('See the FAQ link to adjust this hosts timeout limits: ', 'duplicator') . " <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_s2scan3_tolimits#faq-trouble-100-q' target='_blank'>" . __('What can I try for Timeout Issues?', 'duplicator') . '</a></li>';
|
69 |
+
echo '<li>' . __('Consider trying multi-threaded support in ', 'duplicator');
|
70 |
+
echo "<a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=multithreaded_pro&utm_campaign=duplicator_pro' target='_blank'>" . __('Duplicator Pro.', 'duplicator') . "</a>";
|
71 |
+
echo '</li>';
|
72 |
+
echo '</ul>';
|
73 |
+
|
74 |
+
$hlptxt = sprintf(__('Files over %1$s are listed below. Larger files such as movies or zipped content can cause timeout issues on some budget hosts. If you are having '
|
75 |
+
. 'issues creating a package try excluding the directory paths below or go back to Step 1 and add them.', 'duplicator'),
|
76 |
+
DUP_Util::byteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
77 |
+
?>
|
78 |
+
</div>
|
79 |
+
<script id="hb-files-large" type="text/x-handlebars-template">
|
80 |
+
<div class="container">
|
81 |
+
<div class="hdrs">
|
82 |
+
<span style="font-weight:bold">
|
83 |
+
<?php esc_html_e('Quick Filters', 'duplicator'); ?>
|
84 |
+
<sup><i class="fa fa-question-circle" data-tooltip-title="<?php _e("Large Files", 'duplicator'); ?>" data-tooltip="<?php echo esc_html($hlptxt); ?>"></i></sup>
|
85 |
+
</span>
|
86 |
+
<div class='hdrs-up-down'>
|
87 |
+
<i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php esc_html_e("Hide All", 'duplicator'); ?>"></i>
|
88 |
+
<i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php esc_html_e("Show All", 'duplicator'); ?>"></i>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<div class="data">
|
92 |
+
<?php _duplicatorGetRootPath(); ?>
|
93 |
+
{{#if ARC.FilterInfo.Files.Size}}
|
94 |
+
{{#each ARC.FilterInfo.TreeSize as |directory|}}
|
95 |
+
<div class="directory">
|
96 |
+
<i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i>
|
97 |
+
{{#if directory.iscore}}
|
98 |
+
<i class="fa fa-window-close-o chk-off" title="<?php esc_html_e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i>
|
99 |
+
{{else}}
|
100 |
+
<input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="lf_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" />
|
101 |
+
{{/if}}
|
102 |
+
<label for="lf_dir_{{@index}}" title="{{directory.dir}}">
|
103 |
+
<i class="size">[{{directory.size}}]</i> /{{directory.sdir}}/
|
104 |
+
</label> <br/>
|
105 |
+
<div class="files">
|
106 |
+
{{#each directory.files as |file|}}
|
107 |
+
<input type="checkbox" name="file_paths[]" value="{{file.path}}" id="lf_file_{{directory.dir}}-{{@index}}" />
|
108 |
+
<label for="lf_file_{{directory.dir}}-{{@index}}" title="{{file.path}}">
|
109 |
+
<i class="size">[{{file.bytes}}]</i> {{file.name}}
|
110 |
+
</label> <br/>
|
111 |
+
{{/each}}
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
{{/each}}
|
115 |
+
{{else}}
|
116 |
+
<?php
|
117 |
+
if (! isset($_GET['retry'])) {
|
118 |
+
esc_html_e('No large files found during this scan.', 'duplicator');
|
119 |
+
} else {
|
120 |
+
echo "<div style='color:maroon'>";
|
121 |
+
esc_html_e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
|
122 |
+
. 'adding a file filter to non-essential files paths like wp-content/uploads. These excluded files can then '
|
123 |
+
. 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
|
124 |
+
echo "</div>";
|
125 |
+
}
|
126 |
+
?>
|
127 |
+
{{/if}}
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
|
132 |
+
<div class="apply-btn" style="margin-bottom:5px;float:right">
|
133 |
+
<div class="apply-warn">
|
134 |
+
<?php esc_html_e('*Checking a directory will exclude all items recursively from that path down.<br/>Please use caution when filtering directories.', 'duplicator'); ?>
|
135 |
+
</div>
|
136 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'large')">
|
137 |
+
<i class="fa fa-filter"></i> <?php _e('Add Filters & Rescan', 'duplicator');?>
|
138 |
+
</button>
|
139 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('large')" title="<?php esc_html_e('Copy Paths to Clipboard', 'duplicator');?>">
|
140 |
+
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
141 |
+
</button>
|
142 |
+
</div>
|
143 |
+
<div style="clear:both"></div>
|
144 |
+
|
145 |
+
|
146 |
+
</script>
|
147 |
+
<div id="hb-files-large-result" class="hb-files-style"></div>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<!-- ======================
|
152 |
+
ADDON SITES -->
|
153 |
+
<div id="addonsites-block" class="scan-item">
|
154 |
+
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
155 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Addon Sites', 'duplicator');?></div>
|
156 |
+
<div id="data-arc-status-addonsites"></div>
|
157 |
+
</div>
|
158 |
+
<div class="info">
|
159 |
+
<div style="margin-bottom:10px;">
|
160 |
+
<small>
|
161 |
+
<?php
|
162 |
+
printf(esc_html__('An "Addon Site" is a separate WordPress site(s) residing in subdirectories within this site. If you confirm these to be separate sites, '
|
163 |
+
. 'then it is recommended that you exclude them by checking the corresponding boxes below and clicking the \'Add Filters & Rescan\' button. To backup the other sites '
|
164 |
+
. 'install the plugin on the sites needing to be backed-up.'));
|
165 |
+
?>
|
166 |
+
</small>
|
167 |
+
</div>
|
168 |
+
<script id="hb-addon-sites" type="text/x-handlebars-template">
|
169 |
+
<div class="container">
|
170 |
+
<div class="hdrs">
|
171 |
+
<span style="font-weight:bold">
|
172 |
+
<?php esc_html_e('Quick Filters', 'duplicator'); ?>
|
173 |
+
</span>
|
174 |
+
</div>
|
175 |
+
<div class="data">
|
176 |
+
{{#if ARC.FilterInfo.Dirs.AddonSites.length}}
|
177 |
+
{{#each ARC.FilterInfo.Dirs.AddonSites as |path|}}
|
178 |
+
<div class="directory">
|
179 |
+
<input type="checkbox" name="dir_paths[]" value="{{path}}" id="as_dir_{{@index}}"/>
|
180 |
+
<label for="as_dir_{{@index}}" title="{{path}}">
|
181 |
+
{{path}}
|
182 |
+
</label>
|
183 |
+
</div>
|
184 |
+
{{/each}}
|
185 |
+
{{else}}
|
186 |
+
<?php esc_html_e('No addon sites found.', 'duplicator'); ?>
|
187 |
+
{{/if}}
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
<div class="apply-btn">
|
191 |
+
<div class="apply-warn">
|
192 |
+
<?php esc_html_e('*Checking a directory will exclude all items in that path recursively.'); ?>
|
193 |
+
</div>
|
194 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'addon')">
|
195 |
+
<i class="fa fa-filter"></i> <?php esc_html_e('Add Filters & Rescan');?>
|
196 |
+
</button>
|
197 |
+
</div>
|
198 |
+
</script>
|
199 |
+
<div id="hb-addon-sites-result" class="hb-files-style"></div>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
|
204 |
+
<!-- ============
|
205 |
+
FILE NAME CHECKS -->
|
206 |
+
<div class="scan-item scan-item-last">
|
207 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
208 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Name Checks', 'duplicator');?></div>
|
209 |
+
<div id="data-arc-status-names"></div>
|
210 |
+
</div>
|
211 |
+
<div class="info">
|
212 |
+
<?php
|
213 |
+
esc_html_e('Unicode and special characters such as "*?><:/\|", can be problematic on some hosts.', 'duplicator');
|
214 |
+
echo '<b>';
|
215 |
+
esc_html_e(' Only consider using this filter if the package build is failing. Select files that are not important to your site or you can migrate manually.', 'duplicator');
|
216 |
+
echo '</b>';
|
217 |
+
$txt = __('If this environment/system and the system where it will be installed are set up to support Unicode and long paths then these filters can be ignored. '
|
218 |
+
. 'If you run into issues with creating or installing a package, then is recommended to filter these paths.', 'duplicator');
|
219 |
+
?>
|
220 |
+
<script id="hb-files-utf8" type="text/x-handlebars-template">
|
221 |
+
<div class="container">
|
222 |
+
<div class="hdrs">
|
223 |
+
<span style="font-weight:bold"><?php esc_html_e('Quick Filters', 'duplicator');?></span>
|
224 |
+
<sup><i class="fa fa-question-circle" data-tooltip-title="<?php esc_html_e("Name Checks", 'duplicator'); ?>" data-tooltip="<?php echo esc_attr($txt); ?>"></i></sup>
|
225 |
+
<div class='hdrs-up-down'>
|
226 |
+
<i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php esc_html_e("Hide All", 'duplicator'); ?>"></i>
|
227 |
+
<i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php esc_html_e("Show All", 'duplicator'); ?>"></i>
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
+
<div class="data">
|
231 |
+
<?php _duplicatorGetRootPath(); ?>
|
232 |
+
{{#if ARC.FilterInfo.TreeWarning}}
|
233 |
+
{{#each ARC.FilterInfo.TreeWarning as |directory|}}
|
234 |
+
<div class="directory">
|
235 |
+
{{#if directory.count}}
|
236 |
+
<i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i>
|
237 |
+
{{else}}
|
238 |
+
<i class="empty"></i>
|
239 |
+
{{/if}}
|
240 |
+
|
241 |
+
{{#if directory.iscore}}
|
242 |
+
<i class="fa fa-window-close-o chk-off" title="<?php esc_html_e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i>
|
243 |
+
{{else}}
|
244 |
+
<input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="nc1_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" />
|
245 |
+
{{/if}}
|
246 |
+
|
247 |
+
<label for="nc1_dir_{{@index}}" title="{{directory.dir}}">
|
248 |
+
<i class="count">({{directory.count}})</i>
|
249 |
+
/{{directory.sdir}}/
|
250 |
+
</label> <br/>
|
251 |
+
<div class="files">
|
252 |
+
{{#each directory.files}}
|
253 |
+
<input type="checkbox" name="file_paths[]" value="{{path}}" id="warn_file_{{directory.dir}}-{{@index}}" />
|
254 |
+
<label for="warn_file_{{directory.dir}}-{{@index}}" title="{{path}}">
|
255 |
+
{{name}}
|
256 |
+
</label> <br/>
|
257 |
+
{{/each}}
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
{{/each}}
|
261 |
+
{{else}}
|
262 |
+
<?php esc_html_e('No file/directory name warnings found.', 'duplicator');?>
|
263 |
+
{{/if}}
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
<div class="apply-btn">
|
267 |
+
<div class="apply-warn">
|
268 |
+
<?php esc_html_e('*Checking a directory will exclude all items recursively from that path down.<br/>Please use caution when filtering directories.', 'duplicator'); ?>
|
269 |
+
</div>
|
270 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'utf8')">
|
271 |
+
<i class="fa fa-filter"></i> <?php esc_html_e('Add Filters & Rescan', 'duplicator');?>
|
272 |
+
</button>
|
273 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('utf8')" title="<?php esc_html_e('Copy Paths to Clipboard', 'duplicator');?>">
|
274 |
+
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
275 |
+
</button>
|
276 |
+
</div>
|
277 |
+
</script>
|
278 |
+
<div id="hb-files-utf8-result" class="hb-files-style"></div>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
<!-- ======================
|
282 |
+
UNREADABLE FILES -->
|
283 |
+
<div id="scan-unreadable-items" class="scan-item scan-item-last">
|
284 |
+
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
285 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Read Checks');?></div>
|
286 |
+
<div id="data-arc-status-unreadablefiles"></div>
|
287 |
+
</div>
|
288 |
+
<div class="info">
|
289 |
+
<?php
|
290 |
+
esc_html_e('PHP is unable to read the following items and they will NOT be included in the package. Please work with your host to adjust the permissions or resolve the '
|
291 |
+
. 'symbolic-link(s) shown in the lists below. If these items are not needed then this notice can be ignored.', 'duplicator');
|
292 |
+
?>
|
293 |
+
<script id="unreadable-files" type="text/x-handlebars-template">
|
294 |
+
<div class="container">
|
295 |
+
<div class="data">
|
296 |
+
<b><?php esc_html_e('Unreadable Items:');?></b> <br/>
|
297 |
+
<div class="directory">
|
298 |
+
{{#if ARC.UnreadableItems}}
|
299 |
+
{{#each ARC.UnreadableItems as |uitem|}}
|
300 |
+
<i class="fa fa-lock"></i> {{uitem}} <br/>
|
301 |
+
{{/each}}
|
302 |
+
{{else}}
|
303 |
+
<i>
|
304 |
+
<?php
|
305 |
+
esc_html_e('No unreadable items found.', 'duplicator');
|
306 |
+
echo '<br>';
|
307 |
+
?>
|
308 |
+
</i>
|
309 |
+
{{/if}}
|
310 |
+
</div>
|
311 |
+
|
312 |
+
<b><?php esc_html_e('Recursive Links:');?></b> <br/>
|
313 |
+
<div class="directory">
|
314 |
+
{{#if ARC.RecursiveLinks}}
|
315 |
+
{{#each ARC.RecursiveLinks as |link|}}
|
316 |
+
<i class="fa fa-lock"></i> {{link}} <br/>
|
317 |
+
{{/each}}
|
318 |
+
{{else}}
|
319 |
+
<i>
|
320 |
+
<?php
|
321 |
+
esc_html_e('No recursive sym-links found.', 'duplicator');
|
322 |
+
echo '<br>';
|
323 |
+
?></i>
|
324 |
+
{{/if}}
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
</div>
|
328 |
+
</script>
|
329 |
+
<div id="unreadable-files-result" class="hb-files-style"></div>
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
|
333 |
+
|
334 |
+
|
335 |
+
<!-- ============
|
336 |
+
DATABASE -->
|
337 |
+
<div id="dup-scan-db">
|
338 |
+
<div class="scan-header">
|
339 |
+
<i class="fa fa-table"></i>
|
340 |
+
<?php esc_html_e("Database", 'duplicator'); ?>
|
341 |
+
<div class="scan-header-details">
|
342 |
+
<div class="dup-scan-filter-status">
|
343 |
+
<?php
|
344 |
+
if ($Package->Database->FilterOn) {
|
345 |
+
echo '<i class="fa fa-filter"></i> ';
|
346 |
+
esc_html_e('Enabled', 'duplicator');
|
347 |
+
}
|
348 |
+
?>
|
349 |
+
</div>
|
350 |
+
<div id="data-db-size1"></div>
|
351 |
+
<i class="fa fa-question-circle data-size-help"
|
352 |
+
data-tooltip-title="<?php esc_attr_e("Database Size:", 'duplicator'); ?>"
|
353 |
+
data-tooltip="<?php esc_attr_e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. '
|
354 |
+
. 'The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
|
355 |
+
|
356 |
+
<div class="dup-data-size-uncompressed"><?php esc_html_e("uncompressed"); ?></div>
|
357 |
+
|
358 |
+
</div>
|
359 |
+
</div>
|
360 |
+
|
361 |
+
<div class="scan-item scan-item-last">
|
362 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
363 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Overview', 'duplicator');?></div>
|
364 |
+
<div id="data-db-status-size"></div>
|
365 |
+
</div>
|
366 |
+
<div class="info">
|
367 |
+
<?php echo '<b>' . esc_html__('TOTAL SIZE', 'duplicator') . ' ⇛ </b>'; ?>
|
368 |
+
<b><?php esc_html_e('Size', 'duplicator');?>:</b> <span id="data-db-size2"></span> |
|
369 |
+
<b><?php esc_html_e('Tables', 'duplicator');?>:</b> <span id="data-db-tablecount"></span> |
|
370 |
+
<b><?php esc_html_e('Records', 'duplicator');?>:</b> <span id="data-db-rows"></span><br/>
|
371 |
+
<?php
|
372 |
+
$dup_scan_tbl_total_trigger_size = '[' . DUP_Util::byteSize(DUPLICATOR_SCAN_DB_ALL_SIZE) . ' OR ' . number_format(DUPLICATOR_SCAN_DB_ALL_ROWS) . ']';
|
373 |
+
printf(__('Total size and row counts are approximate values. The thresholds that trigger notices are %1$s records total for the entire database. Larger databases '
|
374 |
+
. 'take more time to process. On some budget hosts that have cpu/memory/timeout limits this may cause issues.', 'duplicator'), $dup_scan_tbl_total_trigger_size);
|
375 |
+
echo '<br/><br/><hr size="1" />';
|
376 |
+
|
377 |
+
//TABLE DETAILS
|
378 |
+
echo '<b>' . __('TABLE DETAILS:', 'duplicator') . '</b><br/>';
|
379 |
+
$dup_scan_tbl_trigger_size = DUP_Util::byteSize(DUPLICATOR_SCAN_DB_TBL_SIZE) . ', ' . number_format(DUPLICATOR_SCAN_DB_TBL_ROWS);
|
380 |
+
printf(esc_html__('The notices for tables are %1$s records or names with upper-case characters. Individual tables will not trigger '
|
381 |
+
. 'a notice message, but can help narrow down issues if they occur later on.', 'duplicator'), $dup_scan_tbl_trigger_size);
|
382 |
+
|
383 |
+
echo '<div id="dup-scan-db-info"><div id="data-db-tablelist"></div></div>';
|
384 |
+
|
385 |
+
//RECOMMENDATIONS
|
386 |
+
echo '<br/><hr size="1" />';
|
387 |
+
echo '<b>' . esc_html__('RECOMMENDATIONS:', 'duplicator') . '</b><br/>';
|
388 |
+
|
389 |
+
echo '<div style="padding:5px">';
|
390 |
+
$lnk = '<a href="maint/repair.php" target="_blank">' . __('repair and optimization', 'duplicator') . '</a>';
|
391 |
+
printf(esc_html__('1. Run a %1$s on the table to improve the overall size and performance.', 'duplicator'), $lnk);
|
392 |
+
echo '<br/><br/>';
|
393 |
+
esc_html_e('2. Remove post revisions and stale data from tables. Tables such as logs, statistical or other non-critical data should be cleared.', 'duplicator');
|
394 |
+
echo '<br/><br/>';
|
395 |
+
$lnk = '<a href="?page=duplicator-settings&tab=package" target="_blank">' . __('Enable mysqldump', 'duplicator') . '</a>';
|
396 |
+
printf(esc_html__('3. %1$s if this host supports the option.', 'duplicator'), $lnk);
|
397 |
+
echo '<br/><br/>';
|
398 |
+
$lnk = '<a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_lower_case_table_names" target="_blank">' . __('lower_case_table_names', 'duplicator') . '</a>';
|
399 |
+
printf(esc_html__('4. For table name case sensitivity issues either rename the table with lower case characters or be prepared to work with the %1$s system variable setting.', 'duplicator'), $lnk);
|
400 |
+
echo '</div>';
|
401 |
+
|
402 |
+
?>
|
403 |
+
</div>
|
404 |
+
</div>
|
405 |
+
<?php
|
406 |
+
echo '<div class="dup-pro-support"> ';
|
407 |
+
esc_html_e('Migrate large, multi-gig sites with', 'duplicator');
|
408 |
+
echo ' <i><a href="'.esc_url('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_size_warn_multigig&utm_campaign=duplicator_pro').'" target="_blank">' . esc_html__('Duplicator Pro', 'duplicator') . '!</a></i>';
|
409 |
+
echo '</div>';
|
410 |
+
?>
|
411 |
+
</div>
|
412 |
+
<br/><br/>
|
413 |
+
|
414 |
+
|
415 |
+
<!-- ==========================================
|
416 |
+
DIALOGS:
|
417 |
+
========================================== -->
|
418 |
+
<?php
|
419 |
+
$alert1 = new DUP_UI_Dialog();
|
420 |
+
$alert1->height = 600;
|
421 |
+
$alert1->width = 600;
|
422 |
+
$alert1->title = __('Scan Details', 'duplicator');
|
423 |
+
$alert1->message = "<div id='arc-details-dlg'></div>";
|
424 |
+
$alert1->initAlert();
|
425 |
+
|
426 |
+
$alert2 = new DUP_UI_Dialog();
|
427 |
+
$alert2->height = 435;
|
428 |
+
$alert2->width = 650;
|
429 |
+
$alert2->title = __('Copy Quick Filter Paths', 'duplicator');
|
430 |
+
$alert2->message = "<div id='arc-paths-dlg'></div>";
|
431 |
+
$alert2->initAlert();
|
432 |
+
?>
|
433 |
+
|
434 |
+
<!-- =======================
|
435 |
+
DIALOG: Scan Results -->
|
436 |
+
<div id="dup-archive-details" style="display:none">
|
437 |
+
|
438 |
+
<!-- PACKAGE -->
|
439 |
+
<h2><i class="fa fa-archive"></i> <?php esc_html_e('Package', 'duplicator');?></h2>
|
440 |
+
<b><?php esc_html_e('Name', 'duplicator');?>:</b> <?php echo esc_html($Package->Name); ?><br/>
|
441 |
+
<b><?php esc_html_e('Notes', 'duplicator');?>:</b> <?php echo esc_html($Package->Notes); ?>
|
442 |
+
<br/><br/>
|
443 |
+
|
444 |
+
<!-- DATABASE -->
|
445 |
+
<h2><i class="fa fa-table"></i> <?php _e('Database', 'duplicator');?></h2>
|
446 |
+
<table id="db-area">
|
447 |
+
<tr><td><b><?php esc_html_e('Name:', 'duplicator');?></b></td><td><?php echo DB_NAME; ?> </td></tr>
|
448 |
+
<tr><td><b><?php esc_html_e('Host:', 'duplicator');?></b></td><td><?php echo DB_HOST; ?> </td></tr>
|
449 |
+
<tr>
|
450 |
+
<td style="vertical-align: top"><b><?php esc_html_e('Build Mode:', 'duplicator');?></b></td>
|
451 |
+
<td style="line-height:18px">
|
452 |
+
<a href="?page=duplicator-settings" target="_blank"><?php echo esc_html($dbbuild_mode);?></a>
|
453 |
+
<?php if ($mysqlcompat_on) :?>
|
454 |
+
<br/>
|
455 |
+
<small style="font-style:italic; color:maroon">
|
456 |
+
<i class="fa fa-exclamation-circle"></i> <?php esc_html_e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
457 |
+
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
458 |
+
</small>
|
459 |
+
<?php endif;?>
|
460 |
+
</td>
|
461 |
+
</tr>
|
462 |
+
</table><br/>
|
463 |
+
|
464 |
+
<!-- FILE FILTERS -->
|
465 |
+
<h2 style="border: none">
|
466 |
+
<i class="fa fa-filter"></i> <?php esc_html_e('File Filters', 'duplicator');?>:
|
467 |
+
<small><?php echo ($Package->Archive->FilterOn) ? __('Enabled', 'duplicator') : esc_html__('Disabled', 'duplicator') ;?></small>
|
468 |
+
</h2>
|
469 |
+
<div class="filter-area">
|
470 |
+
<b><i class="fa fa-folder-open"></i> <?php echo esc_html(rtrim(DUPLICATOR_WPROOTPATH, "//"));?></b>
|
471 |
+
|
472 |
+
<script id="hb-filter-file-list" type="text/x-handlebars-template">
|
473 |
+
<div class="file-info">
|
474 |
+
<b>[<?php esc_html_e('Directories', 'duplicator'); ?>]</b>
|
475 |
+
<div class="file-info">
|
476 |
+
{{#if ARC.FilterInfo.Dirs.Instance}}
|
477 |
+
{{#each ARC.FilterInfo.Dirs.Instance as |dir|}}
|
478 |
+
{{stripWPRoot dir}}/<br/>
|
479 |
+
{{/each}}
|
480 |
+
{{else}}
|
481 |
+
<?php _e('No custom directory filters set.', 'duplicator');?>
|
482 |
+
{{/if}}
|
483 |
+
</div>
|
484 |
+
|
485 |
+
<b>[<?php esc_html_e('Extensions', 'duplicator');?>]</b><br/>
|
486 |
+
<div class="file-info">
|
487 |
+
<?php
|
488 |
+
if (strlen( $Package->Archive->FilterExts)) {
|
489 |
+
echo esc_html($Package->Archive->FilterExts);
|
490 |
+
} else {
|
491 |
+
esc_html_e('No file extension filters have been set.', 'duplicator');
|
492 |
+
}
|
493 |
+
?>
|
494 |
+
</div>
|
495 |
+
|
496 |
+
<b>[<?php esc_html_e('Files', 'duplicator'); ?>]</b>
|
497 |
+
<div class="file-info">
|
498 |
+
{{#if ARC.FilterInfo.Files.Instance}}
|
499 |
+
{{#each ARC.FilterInfo.Files.Instance as |file|}}
|
500 |
+
{{stripWPRoot file}}<br/>
|
501 |
+
{{/each}}
|
502 |
+
{{else}}
|
503 |
+
<?php esc_html_e('No custom file filters set.', 'duplicator');?>
|
504 |
+
{{/if}}
|
505 |
+
</div>
|
506 |
+
|
507 |
+
<b>[<?php esc_html_e('Auto Filters', 'duplicator'); ?>]</b>
|
508 |
+
<div class="file-info">
|
509 |
+
{{#each ARC.FilterInfo.Dirs.Core as |dir|}}
|
510 |
+
{{stripWPRoot dir}}/<br/>
|
511 |
+
{{/each}}
|
512 |
+
</div>
|
513 |
+
|
514 |
+
</div>
|
515 |
+
</script>
|
516 |
+
<div class="hb-filter-file-list-result"></div>
|
517 |
+
|
518 |
+
|
519 |
+
</div>
|
520 |
+
|
521 |
+
<small>
|
522 |
+
<?php esc_html_e('Path filters will be skipped during the archive process when enabled.', 'duplicator'); ?>
|
523 |
+
<a href="<?php echo wp_nonce_url(DUPLICATOR_SITE_URL.'/wp-admin/admin-ajax.php?action=duplicator_package_scan', 'duplicator_package_scan', 'nonce'); ?>" target="dup_report"><?php esc_html_e('[view json result report]', 'duplicator');?></a>
|
524 |
+
<br/>
|
525 |
+
<?php esc_html_e('Auto filters are applied to prevent archiving other backup sets.', 'duplicator'); ?>
|
526 |
+
</small><br/>
|
527 |
+
</div>
|
528 |
+
|
529 |
+
<!-- =======================
|
530 |
+
DIALOG: PATHS COPY & PASTE -->
|
531 |
+
<div id="dup-archive-paths" style="display:none">
|
532 |
+
|
533 |
+
<b><i class="fa fa-folder"></i> <?php esc_html_e('Directories', 'duplicator');?></b>
|
534 |
+
<div class="copy-button">
|
535 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-dirs')">
|
536 |
+
<i class="fa fa-clipboard"></i> <?php esc_html_e('Click to Copy', 'duplicator');?>
|
537 |
+
</button>
|
538 |
+
</div>
|
539 |
+
<textarea class="path-dirs"></textarea>
|
540 |
+
<br/><br/>
|
541 |
+
|
542 |
+
<b><i class="fa fa-files-o"></i> <?php esc_html_e('Files', 'duplicator');?></b>
|
543 |
+
<div class="copy-button">
|
544 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-files')">
|
545 |
+
<i class="fa fa-clipboard"></i> <?php esc_html_e('Click to Copy', 'duplicator');?>
|
546 |
+
</button>
|
547 |
+
</div>
|
548 |
+
<textarea class="path-files"></textarea>
|
549 |
+
<br/>
|
550 |
+
<small><?php esc_html_e('Copy the paths above and apply them as needed on Step 1 > Archive > Files section.', 'duplicator');?></small>
|
551 |
+
</div>
|
552 |
+
|
553 |
+
|
554 |
+
|
555 |
+
<script>
|
556 |
+
jQuery(document).ready(function($)
|
557 |
+
{
|
558 |
+
|
559 |
+
Handlebars.registerHelper('stripWPRoot', function(path) {
|
560 |
+
return path.replace('<?php echo esc_js(rtrim(DUPLICATOR_WPROOTPATH, "//")); ?>', '');
|
561 |
+
});
|
562 |
+
|
563 |
+
|
564 |
+
//Uncheck file names if directory is checked
|
565 |
+
Duplicator.Pack.filesOff = function (dir)
|
566 |
+
{
|
567 |
+
var $checks = $(dir).parent('div.directory').find('div.files input[type="checkbox"]');
|
568 |
+
$(dir).is(':checked')
|
569 |
+
? $.each($checks, function() {$(this).attr({disabled : true, checked : false, title : '<?php echo esc_js(__('Directory applied filter set.', 'duplicator'));?>'});})
|
570 |
+
: $.each($checks, function() {$(this).removeAttr('disabled checked title');});
|
571 |
+
$('div.apply-warn').show(300);
|
572 |
+
}
|
573 |
+
|
574 |
+
//Opens a dialog to show scan details
|
575 |
+
Duplicator.Pack.showDetailsDlg = function ()
|
576 |
+
{
|
577 |
+
$('#arc-details-dlg').html($('#dup-archive-details').html());
|
578 |
+
<?php $alert1->showAlert(); ?>
|
579 |
+
Duplicator.UI.loadQtip();
|
580 |
+
return;
|
581 |
+
}
|
582 |
+
|
583 |
+
//Opens a dialog to show scan details
|
584 |
+
Duplicator.Pack.showPathsDlg = function (type)
|
585 |
+
{
|
586 |
+
var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result'
|
587 |
+
var dirFilters = [];
|
588 |
+
var fileFilters = [];
|
589 |
+
$(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());});
|
590 |
+
$(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());});
|
591 |
+
|
592 |
+
var $dirs = $('#dup-archive-paths textarea.path-dirs');
|
593 |
+
var $files = $('#dup-archive-paths textarea.path-files');
|
594 |
+
(dirFilters.length > 0)
|
595 |
+
? $dirs.text(dirFilters.join(";\n"))
|
596 |
+
: $dirs.text("<?php echo esc_js(__('No directories have been selected!', 'duplicator')); ?>");
|
597 |
+
|
598 |
+
(fileFilters.length > 0)
|
599 |
+
? $files.text(fileFilters.join(";\n"))
|
600 |
+
: $files.text("<?php echo esc_js(__('No files have been selected!', 'duplicator'));?>");
|
601 |
+
|
602 |
+
$('#arc-paths-dlg').html($('#dup-archive-paths').html());
|
603 |
+
<?php $alert2->showAlert(); ?>
|
604 |
+
|
605 |
+
return;
|
606 |
+
}
|
607 |
+
|
608 |
+
//Toggles a directory path to show files
|
609 |
+
Duplicator.Pack.toggleDirPath = function(item)
|
610 |
+
{
|
611 |
+
var $dir = $(item).parents('div.directory');
|
612 |
+
var $files = $dir.find('div.files');
|
613 |
+
var $arrow = $dir.find('i.dup-nav');
|
614 |
+
if ($files.is(":hidden")) {
|
615 |
+
$arrow.addClass('fa-caret-down').removeClass('fa-caret-right');
|
616 |
+
$files.show();
|
617 |
+
} else {
|
618 |
+
$arrow.addClass('fa-caret-right').removeClass('fa-caret-down');
|
619 |
+
$files.hide(250);
|
620 |
+
}
|
621 |
+
}
|
622 |
+
|
623 |
+
//Toggles a directory path to show files
|
624 |
+
Duplicator.Pack.toggleAllDirPath = function(item, toggle)
|
625 |
+
{
|
626 |
+
var $dirs = $(item).parents('div.container').find('div.data div.directory');
|
627 |
+
(toggle == 'hide')
|
628 |
+
? $.each($dirs, function() {$(this).find('div.files').show(); $(this).find('i.dup-nav').trigger('click');})
|
629 |
+
: $.each($dirs, function() {$(this).find('div.files').hide(); $(this).find('i.dup-nav').trigger('click');});
|
630 |
+
}
|
631 |
+
|
632 |
+
Duplicator.Pack.copyText = function(btn, query)
|
633 |
+
{
|
634 |
+
$(query).select();
|
635 |
+
try {
|
636 |
+
document.execCommand('copy');
|
637 |
+
$(btn).css({color: '#fff', backgroundColor: 'green'});
|
638 |
+
$(btn).text("<?php echo esc_js(__('Copied to Clipboard!', 'duplicator')); ?>");
|
639 |
+
} catch(err) {
|
640 |
+
alert("<?php echo esc_js(__('Manual copy of selected text required on this browser.', 'duplicator')); ?>");
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
Duplicator.Pack.applyFilters = function(btn, type)
|
645 |
+
{
|
646 |
+
var $btn = $(btn);
|
647 |
+
$btn.html('<i class="fa fa-circle-o-notch fa-spin"></i> <?php echo esc_js(__('Initializing Please Wait...', 'duplicator')); ?>');
|
648 |
+
$btn.attr('disabled', 'true');
|
649 |
+
|
650 |
+
//var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result'
|
651 |
+
var id = '';
|
652 |
+
switch(type){
|
653 |
+
case 'large':
|
654 |
+
id = '#hb-files-large-result';
|
655 |
+
break;
|
656 |
+
case 'utf8':
|
657 |
+
id = '#hb-files-utf8-result';
|
658 |
+
break;
|
659 |
+
case 'addon':
|
660 |
+
id = '#hb-addon-sites-result';
|
661 |
+
break;
|
662 |
+
}
|
663 |
+
var dirFilters = [];
|
664 |
+
var fileFilters = [];
|
665 |
+
$(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());});
|
666 |
+
$(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());});
|
667 |
+
|
668 |
+
var data = {
|
669 |
+
action: 'DUP_CTRL_Package_addQuickFilters',
|
670 |
+
nonce: '<?php echo wp_create_nonce('DUP_CTRL_Package_addQuickFilters'); ?>',
|
671 |
+
dir_paths : dirFilters.join(";"),
|
672 |
+
file_paths : fileFilters.join(";"),
|
673 |
+
};
|
674 |
+
|
675 |
+
$.ajax({
|
676 |
+
type: "POST",
|
677 |
+
cache: false,
|
678 |
+
url: ajaxurl,
|
679 |
+
dataType: "json",
|
680 |
+
timeout: 100000,
|
681 |
+
data: data,
|
682 |
+
complete: function() { },
|
683 |
+
success: function() {Duplicator.Pack.rescan();},
|
684 |
+
error: function(data) {
|
685 |
+
console.log(data);
|
686 |
+
alert("<?php echo esc_js(__('Error applying filters. Please go back to Step 1 to add filter manually!', 'duplicator'));?>");
|
687 |
+
}
|
688 |
+
});
|
689 |
+
}
|
690 |
+
|
691 |
+
Duplicator.Pack.initArchiveFilesData = function(data)
|
692 |
+
{
|
693 |
+
//TOTAL SIZE
|
694 |
+
//var sizeChecks = data.ARC.Status.Size == 'Warn' || data.ARC.Status.Big == 'Warn' ? 'Warn' : 'Good';
|
695 |
+
$('#data-arc-status-size').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Size));
|
696 |
+
$('#data-arc-status-names').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Names));
|
697 |
+
$('#data-arc-status-unreadablefiles').html(Duplicator.Pack.setScanStatus(data.ARC.Status.UnreadableItems));
|
698 |
+
$('#data-arc-size1').text(data.ARC.Size || errMsg);
|
699 |
+
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
700 |
+
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
701 |
+
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
702 |
+
|
703 |
+
//LARGE FILES
|
704 |
+
var template = $('#hb-files-large').html();
|
705 |
+
var templateScript = Handlebars.compile(template);
|
706 |
+
var html = templateScript(data);
|
707 |
+
$('#hb-files-large-result').html(html);
|
708 |
+
|
709 |
+
//ADDON SITES
|
710 |
+
var template = $('#hb-addon-sites').html();
|
711 |
+
var templateScript = Handlebars.compile(template);
|
712 |
+
var html = templateScript(data);
|
713 |
+
$('#hb-addon-sites-result').html(html);
|
714 |
+
|
715 |
+
//NAME CHECKS
|
716 |
+
var template = $('#hb-files-utf8').html();
|
717 |
+
var templateScript = Handlebars.compile(template);
|
718 |
+
var html = templateScript(data);
|
719 |
+
$('#hb-files-utf8-result').html(html);
|
720 |
+
|
721 |
+
//NAME CHECKS
|
722 |
+
var template = $('#unreadable-files').html();
|
723 |
+
var templateScript = Handlebars.compile(template);
|
724 |
+
var html = templateScript(data);
|
725 |
+
$('#unreadable-files-result').html(html);
|
726 |
+
|
727 |
+
//SCANNER DETAILS: Dirs
|
728 |
+
var template = $('#hb-filter-file-list').html();
|
729 |
+
var templateScript = Handlebars.compile(template);
|
730 |
+
var html = templateScript(data);
|
731 |
+
$('div.hb-filter-file-list-result').html(html);
|
732 |
+
|
733 |
+
Duplicator.UI.loadQtip();
|
734 |
+
}
|
735 |
+
|
736 |
+
|
737 |
+
Duplicator.Pack.initArchiveDBData = function(data)
|
738 |
+
{
|
739 |
+
var errMsg = "unable to read";
|
740 |
+
var color;
|
741 |
+
var html = "";
|
742 |
+
var DB_TotalSize = 'Good';
|
743 |
+
var DB_TableRowMax = <?php echo DUPLICATOR_SCAN_DB_TBL_ROWS; ?>;
|
744 |
+
var DB_TableSizeMax = <?php echo DUPLICATOR_SCAN_DB_TBL_SIZE; ?>;
|
745 |
+
if (data.DB.Status.Success)
|
746 |
+
{
|
747 |
+
DB_TotalSize = data.DB.Status.DB_Rows == 'Warn' || data.DB.Status.DB_Size == 'Warn' ? 'Warn' : 'Good';
|
748 |
+
$('#data-db-status-size').html(Duplicator.Pack.setScanStatus(DB_TotalSize));
|
749 |
+
$('#data-db-size1').text(data.DB.Size || errMsg);
|
750 |
+
$('#data-db-size2').text(data.DB.Size || errMsg);
|
751 |
+
$('#data-db-rows').text(data.DB.Rows || errMsg);
|
752 |
+
$('#data-db-tablecount').text(data.DB.TableCount || errMsg);
|
753 |
+
//Table Details
|
754 |
+
if (data.DB.TableList == undefined || data.DB.TableList.length == 0) {
|
755 |
+
html = '<?php echo esc_js(__("Unable to report on any tables", 'duplicator')); ?>';
|
756 |
+
} else {
|
757 |
+
$.each(data.DB.TableList, function(i) {
|
758 |
+
html += '<b>' + i + '</b><br/>';
|
759 |
+
html += '<table><tr>';
|
760 |
+
$.each(data.DB.TableList[i], function(key,val) {
|
761 |
+
switch(key) {
|
762 |
+
case 'Case':
|
763 |
+
color = (val == 1) ? 'red' : 'black';
|
764 |
+
html += '<td style="color:' + color + '">Uppercase: ' + val + '</td>';
|
765 |
+
break;
|
766 |
+
case 'Rows':
|
767 |
+
color = (val > DB_TableRowMax) ? 'red' : 'black';
|
768 |
+
html += '<td style="color:' + color + '">Rows: ' + val + '</td>';
|
769 |
+
break;
|
770 |
+
case 'USize':
|
771 |
+
color = (parseInt(val) > DB_TableSizeMax) ? 'red' : 'black';
|
772 |
+
html += '<td style="color:' + color + '">Size: ' + data.DB.TableList[i]['Size'] + '</td>';
|
773 |
+
break;
|
774 |
+
}
|
775 |
+
});
|
776 |
+
html += '</tr></table>';
|
777 |
+
});
|
778 |
+
}
|
779 |
+
$('#data-db-tablelist').append(html);
|
780 |
+
} else {
|
781 |
+
html = '<?php echo esc_js(__("Unable to report on database stats", 'duplicator')); ?>';
|
782 |
+
$('#dup-scan-db').html(html);
|
783 |
+
}
|
784 |
+
}
|
785 |
+
|
786 |
+
<?php
|
787 |
+
if (isset($_GET['retry']) && $_GET['retry'] == '1' ) {
|
788 |
+
echo "$('#scan-itme-file-size').show(300)";
|
789 |
+
}
|
790 |
+
?>
|
791 |
+
|
792 |
+
});
|
793 |
+
</script>
|
views/packages/main/s3.build.php
CHANGED
@@ -9,12 +9,12 @@
|
|
9 |
|
10 |
//Help support Duplicator
|
11 |
$atext0 = "<a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>";
|
12 |
-
$atext0 .=
|
13 |
|
14 |
//Get even more power & features with Duplicator Pro
|
15 |
-
$atext1 =
|
16 |
$atext1 .= " <a target='_blank' href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_build_more_power&utm_campaign=duplicator_pro'>";
|
17 |
-
$atext1 .=
|
18 |
|
19 |
$rand_txt = array();
|
20 |
$rand_txt[0] = $atext0;
|
@@ -71,19 +71,23 @@ TOOL BAR: STEPS -->
|
|
71 |
<td style="white-space: nowrap">
|
72 |
<div id="dup-wiz">
|
73 |
<div id="dup-wiz-steps">
|
74 |
-
<div class="completed-step"><a>1-<?php
|
75 |
-
<div class="completed-step"><a>2-<?php
|
76 |
-
<div class="active-step"><a>3-<?php
|
77 |
</div>
|
78 |
<div id="dup-wiz-title">
|
79 |
-
<?php
|
80 |
</div>
|
81 |
</div>
|
82 |
</td>
|
83 |
<td style="padding-bottom:4px">
|
84 |
-
<div id="dup-create-area-nolink"><?php
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
87 |
</td>
|
88 |
</tr>
|
89 |
</table>
|
@@ -95,46 +99,46 @@ TOOL BAR: STEPS -->
|
|
95 |
|
96 |
<!-- PROGRESS BAR -->
|
97 |
<div id="dup-progress-bar-area">
|
98 |
-
<div class="dup-progress-title"><i class="fa fa-cog fa-spin"></i> <?php
|
99 |
<div id="dup-progress-bar"></div>
|
100 |
-
<b><?php
|
101 |
-
<i><?php
|
102 |
-
<i><?php
|
103 |
</div>
|
104 |
|
105 |
<div id="dup-progress-area" class="dup-panel" style="display:none">
|
106 |
-
<div class="dup-panel-title"><b style="font-size:22px"><?php
|
107 |
<div class="dup-panel-panel">
|
108 |
|
109 |
<!-- =========================
|
110 |
SUCCESS MESSAGE -->
|
111 |
<div id="dup-msg-success" style="display:none">
|
112 |
<div class="hdr-pack-complete">
|
113 |
-
<i class="fa fa-check-square-o fa-lg"></i> <?php
|
114 |
</div>
|
115 |
|
116 |
<div class="dup-msg-success-stats">
|
117 |
-
<!--b><?php
|
118 |
-
<b><?php
|
119 |
</div><br/>
|
120 |
|
121 |
<!-- DOWNLOAD FILES -->
|
122 |
<fieldset class="download-area">
|
123 |
<legend>
|
124 |
-
<?php
|
125 |
</legend>
|
126 |
-
<button id="dup-btn-installer" class="button button-primary button-large" title="<?php
|
127 |
-
<i class="fa fa-bolt"></i> <?php
|
128 |
</button>
|
129 |
-
<button id="dup-btn-archive" class="button button-primary button-large" title="<?php
|
130 |
-
<i class="fa fa-file-archive-o"></i> <?php
|
131 |
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
132 |
</button>
|
133 |
<div class="one-click-download">
|
134 |
-
<a href="javascript:void(0)" id="dup-link-download-both" title="<?php
|
135 |
<sup><i class="fa fa-question-circle" style='font-size:11px'
|
136 |
-
data-tooltip-title="<?php
|
137 |
-
data-tooltip="<?php
|
138 |
. 'On some browsers you may have to disable pop-up warnings on this domain for this to work correctly.', 'duplicator'); ?>">
|
139 |
</i></sup>
|
140 |
</div>
|
@@ -142,7 +146,7 @@ TOOL BAR: STEPS -->
|
|
142 |
|
143 |
<div class="dup-howto-exe">
|
144 |
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank">
|
145 |
-
<?php
|
146 |
</a>
|
147 |
</div>
|
148 |
|
@@ -154,33 +158,33 @@ TOOL BAR: STEPS -->
|
|
154 |
<!-- =========================
|
155 |
ERROR MESSAGE -->
|
156 |
<div id="dup-msg-error" style="display:none; color:#000">
|
157 |
-
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php
|
158 |
-
<b><?php
|
159 |
-
<i><?php
|
160 |
<br/><br/><br/>
|
161 |
|
162 |
<!-- OPTION 1: TRY AGAIN -->
|
163 |
<div class="dup-box">
|
164 |
<div class="dup-box-title">
|
165 |
-
<i class="fa fa-reply"></i> <?php
|
166 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
167 |
</div>
|
168 |
<div class="dup-box-panel" id="dup-pack-build-try1" style="display:none">
|
169 |
-
<b class="opt-title"><?php
|
170 |
|
171 |
-
<?php
|
172 |
-
. 'set up by the hosting provider. If this is the case its recommended to retry the build. <i>If the problem persists then consider the other options below.</i>', 'duplicator'); ?><br/><br/>
|
173 |
|
174 |
<div style="text-align: center; margin: 10px">
|
175 |
-
<input type="button" class="button-large button-primary" value="<?php
|
176 |
</div>
|
177 |
|
178 |
<div style="color:#777; padding: 15px 5px 5px 5px">
|
179 |
-
<b> <?php
|
180 |
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
. "if the archive file is growing in size or check the main packages screen to see if the package completed. If it is not then your server "
|
185 |
. "has strict timeout constraints.", 'duplicator')
|
186 |
);
|
@@ -192,35 +196,35 @@ TOOL BAR: STEPS -->
|
|
192 |
<!-- OPTION 2: Two-Part Install -->
|
193 |
<div class="dup-box no-top">
|
194 |
<div class="dup-box-title">
|
195 |
-
<i class="fa fa-random"></i> <?php
|
196 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
197 |
</div>
|
198 |
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
199 |
-
<b class="opt-title"><?php
|
200 |
|
201 |
-
<?php
|
202 |
-
|
203 |
|
204 |
-
<b><?php
|
205 |
-
<?php
|
206 |
<ol>
|
207 |
-
<li><?php
|
208 |
-
<li><?php
|
209 |
<li>
|
210 |
-
<?php
|
211 |
<?php
|
212 |
printf('%s "<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>".',
|
213 |
-
|
214 |
-
|
215 |
?>
|
216 |
</li>
|
217 |
</ol> <br/>
|
218 |
|
219 |
<div style="text-align: center; margin: 10px">
|
220 |
<input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()">
|
221 |
-
<label for="dup-two-part-check"><?php
|
222 |
-
<button id="dup-two-part-btn" type="button" class="button-large button-primary" disabled="true" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2'">
|
223 |
-
<i class="fa fa-random"></i> <?php
|
224 |
</button>
|
225 |
</div><br/>
|
226 |
</div>
|
@@ -229,60 +233,60 @@ TOOL BAR: STEPS -->
|
|
229 |
<!-- OPTION 3: DIAGNOSE SERVER -->
|
230 |
<div class="dup-box no-top">
|
231 |
<div class="dup-box-title">
|
232 |
-
<i class="fa fa-cog"></i> <?php
|
233 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
234 |
</div>
|
235 |
<div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
|
236 |
-
<b class="opt-title"><?php
|
237 |
-
<?php
|
238 |
. 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
|
239 |
|
240 |
<div style="text-align: center; margin: 10px; font-size:16px; font-weight: bold">
|
241 |
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q" target="_blank">
|
242 |
-
[<?php
|
243 |
</a>
|
244 |
</div>
|
245 |
|
246 |
-
<b><?php
|
247 |
<div class="dup-msg-error-area">
|
248 |
<div id="dup-msg-error-response-time">
|
249 |
-
<span class="label"><?php
|
250 |
<span class="data"></span>
|
251 |
</div>
|
252 |
<div id="dup-msg-error-response-php">
|
253 |
-
<span class="label"><?php
|
254 |
<span class="data sub-data">
|
255 |
-
<span class="label"><?php
|
256 |
<?php
|
257 |
$try_value = @ini_get('max_execution_time');
|
258 |
$try_update = set_time_limit(0);
|
259 |
echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
|
260 |
?>
|
261 |
<i class="fa fa-question-circle data-size-help"
|
262 |
-
data-tooltip-title="<?php
|
263 |
-
data-tooltip="<?php
|
264 |
</span><br/>
|
265 |
|
266 |
<span class="data sub-data">
|
267 |
-
<span class="label"><?php
|
268 |
<?php
|
269 |
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
|
270 |
echo "{$try_update}";
|
271 |
?>
|
272 |
<i class="fa fa-question-circle data-size-help"
|
273 |
-
data-tooltip-title="<?php
|
274 |
-
data-tooltip="<?php
|
275 |
. 'If the value is [fixed] then PHP will not be allowed to run longer than the default. <br/><br/> If this value is larger than the [Allowed Runtime] above then '
|
276 |
. 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
|
277 |
</span>
|
278 |
</div>
|
279 |
|
280 |
<div id="dup-msg-error-response-status">
|
281 |
-
<span class="label"><?php
|
282 |
<span class="data"></span>
|
283 |
</div>
|
284 |
<div id="dup-msg-error-response-text">
|
285 |
-
<span class="label"><?php
|
286 |
<span class="data"></span>
|
287 |
</div>
|
288 |
</div>
|
@@ -291,7 +295,7 @@ TOOL BAR: STEPS -->
|
|
291 |
<div id="dup-logs">
|
292 |
<br/>
|
293 |
<i class="fa fa-list-alt"></i>
|
294 |
-
<a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php
|
295 |
<br/><br/>
|
296 |
</div>
|
297 |
</div>
|
@@ -301,31 +305,31 @@ TOOL BAR: STEPS -->
|
|
301 |
<!-- OPTION 4: Try DupArchive Engine -->
|
302 |
<div class="dup-box no-top">
|
303 |
<div class="dup-box-title">
|
304 |
-
<i class="fa fa-share-alt"></i> <?php
|
305 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
306 |
</div>
|
307 |
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
308 |
-
<b class="opt-title"><?php
|
309 |
|
310 |
-
<?php
|
311 |
. 'Many budget hosting providers have very strict timeouts, CPU/IO constraints that they configure into their servers. With DupArchive the format is '
|
312 |
. 'designed to help get around these server constraints so that users can build larger packages. The DupArchive engine is currently only available in '
|
313 |
. 'Duplicator 1.3 and above. This version is currently in Beta and after we have had a good amount of community support we will make it publicly available.', 'duplicator'); ?><br/><br/>
|
314 |
|
315 |
-
<b><?php
|
316 |
-
<?php
|
317 |
<ol>
|
318 |
-
<li><?php
|
319 |
-
<li><?php
|
320 |
-
<li><?php
|
321 |
-
<li><?php
|
322 |
</ol> <br/>
|
323 |
|
324 |
<div style="text-align: center; margin: 10px">
|
325 |
<input type="checkbox" id="dup-duparchive-check" onclick="Duplicator.Pack.ToggleDupArchive()">
|
326 |
-
<label for="dup-duparchive-check"><?php
|
327 |
<button id="dup-duparchive-btn" type="button" class="button-large button-primary" disabled="true" onclick="Duplicator.Pack.OpenBetaLink()">
|
328 |
-
<i class="fa fa-share-alt"></i> <?php
|
329 |
</button>
|
330 |
</div><br/>
|
331 |
</div>
|
9 |
|
10 |
//Help support Duplicator
|
11 |
$atext0 = "<a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>";
|
12 |
+
$atext0 .= esc_html__('Help review the plugin', 'duplicator') . '!</a>';
|
13 |
|
14 |
//Get even more power & features with Duplicator Pro
|
15 |
+
$atext1 = esc_html__('Want more power? Try', 'duplicator');
|
16 |
$atext1 .= " <a target='_blank' href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_build_more_power&utm_campaign=duplicator_pro'>";
|
17 |
+
$atext1 .= esc_html__('Duplicator Pro', 'duplicator') . '!</a>';
|
18 |
|
19 |
$rand_txt = array();
|
20 |
$rand_txt[0] = $atext0;
|
71 |
<td style="white-space: nowrap">
|
72 |
<div id="dup-wiz">
|
73 |
<div id="dup-wiz-steps">
|
74 |
+
<div class="completed-step"><a>1-<?php esc_html_e('Setup', 'duplicator'); ?></a></div>
|
75 |
+
<div class="completed-step"><a>2-<?php esc_html_e('Scan', 'duplicator'); ?> </a></div>
|
76 |
+
<div class="active-step"><a>3-<?php esc_html_e('Build', 'duplicator'); ?> </a></div>
|
77 |
</div>
|
78 |
<div id="dup-wiz-title">
|
79 |
+
<?php esc_html_e('Step 3: Build Package', 'duplicator'); ?>
|
80 |
</div>
|
81 |
</div>
|
82 |
</td>
|
83 |
<td style="padding-bottom:4px">
|
84 |
+
<div id="dup-create-area-nolink"><?php esc_html_e("Create New", 'duplicator'); ?></div>
|
85 |
+
<?php
|
86 |
+
$new_package_url = admin_url('admin.php?page=duplicator&tab=new1');
|
87 |
+
$new_package_nonce_url = wp_nonce_url($new_package_url, 'new1-package');
|
88 |
+
?>
|
89 |
+
<div id="dup-create-area-link"><a href="<?php echo $new_package_nonce_url;?>" class="add-new-h2"><?php esc_html_e("Create New", 'duplicator'); ?></a></div>
|
90 |
+
<div style="float:right;margin: 0px 5px;"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php esc_html_e("Packages", 'duplicator'); ?></a></div>
|
91 |
</td>
|
92 |
</tr>
|
93 |
</table>
|
99 |
|
100 |
<!-- PROGRESS BAR -->
|
101 |
<div id="dup-progress-bar-area">
|
102 |
+
<div class="dup-progress-title"><i class="fa fa-cog fa-spin"></i> <?php esc_html_e('Building Package', 'duplicator'); ?></div>
|
103 |
<div id="dup-progress-bar"></div>
|
104 |
+
<b><?php esc_html_e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
105 |
+
<i><?php esc_html_e('Keep this window open during the build process.', 'duplicator'); ?></i><br/>
|
106 |
+
<i><?php esc_html_e('This may take several minutes.', 'duplicator'); ?></i><br/>
|
107 |
</div>
|
108 |
|
109 |
<div id="dup-progress-area" class="dup-panel" style="display:none">
|
110 |
+
<div class="dup-panel-title"><b style="font-size:22px"><?php esc_html_e('Build Status', 'duplicator'); ?></b></div>
|
111 |
<div class="dup-panel-panel">
|
112 |
|
113 |
<!-- =========================
|
114 |
SUCCESS MESSAGE -->
|
115 |
<div id="dup-msg-success" style="display:none">
|
116 |
<div class="hdr-pack-complete">
|
117 |
+
<i class="fa fa-check-square-o fa-lg"></i> <?php esc_html_e('Package Completed', 'duplicator'); ?>
|
118 |
</div>
|
119 |
|
120 |
<div class="dup-msg-success-stats">
|
121 |
+
<!--b><?php esc_html_e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/-->
|
122 |
+
<b><?php esc_html_e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
123 |
</div><br/>
|
124 |
|
125 |
<!-- DOWNLOAD FILES -->
|
126 |
<fieldset class="download-area">
|
127 |
<legend>
|
128 |
+
<?php esc_html_e("Download Files", 'duplicator') ?> <i class="fa fa-download"></i>
|
129 |
</legend>
|
130 |
+
<button id="dup-btn-installer" class="button button-primary button-large" title="<?php esc_html_e("Click to download installer file", 'duplicator') ?>">
|
131 |
+
<i class="fa fa-bolt"></i> <?php esc_html_e("Installer", 'duplicator') ?>
|
132 |
</button>
|
133 |
+
<button id="dup-btn-archive" class="button button-primary button-large" title="<?php esc_html_e("Click to download archive file", 'duplicator') ?>">
|
134 |
+
<i class="fa fa-file-archive-o"></i> <?php esc_html_e("Archive", 'duplicator') ?>
|
135 |
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
136 |
</button>
|
137 |
<div class="one-click-download">
|
138 |
+
<a href="javascript:void(0)" id="dup-link-download-both" title="<?php esc_html_e("Click to download both files", 'duplicator') ?>"><i class="fa fa-bolt"></i><i class="fa fa-file-archive-o"></i><?php esc_html_e("One-Click Download", 'duplicator') ?></a>
|
139 |
<sup><i class="fa fa-question-circle" style='font-size:11px'
|
140 |
+
data-tooltip-title="<?php esc_html_e("One Click:", 'duplicator'); ?>"
|
141 |
+
data-tooltip="<?php esc_html_e('Clicking this link will open both the installer and archive download prompts at the same time. '
|
142 |
. 'On some browsers you may have to disable pop-up warnings on this domain for this to work correctly.', 'duplicator'); ?>">
|
143 |
</i></sup>
|
144 |
</div>
|
146 |
|
147 |
<div class="dup-howto-exe">
|
148 |
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank">
|
149 |
+
<?php esc_html_e('How do I install this Package?', 'duplicator'); ?>
|
150 |
</a>
|
151 |
</div>
|
152 |
|
158 |
<!-- =========================
|
159 |
ERROR MESSAGE -->
|
160 |
<div id="dup-msg-error" style="display:none; color:#000">
|
161 |
+
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php esc_html_e('Host Build Interrupt', 'duplicator'); ?></div>
|
162 |
+
<b><?php esc_html_e('This server cannot complete the build due to setup constraints.', 'duplicator'); ?></b><br/>
|
163 |
+
<i><?php esc_html_e("To help get you past this hosts limitation consider these three options:", 'duplicator'); ?></i>
|
164 |
<br/><br/><br/>
|
165 |
|
166 |
<!-- OPTION 1: TRY AGAIN -->
|
167 |
<div class="dup-box">
|
168 |
<div class="dup-box-title">
|
169 |
+
<i class="fa fa-reply"></i> <?php esc_html_e('Try Again', 'duplicator'); ?>
|
170 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
171 |
</div>
|
172 |
<div class="dup-box-panel" id="dup-pack-build-try1" style="display:none">
|
173 |
+
<b class="opt-title"><?php esc_html_e('OPTION 1:', 'duplicator'); ?></b><br/>
|
174 |
|
175 |
+
<?php echo wp_kses('The first pass for reading files on some budget hosts is slow and may conflict with strict timeout settings '
|
176 |
+
. 'set up by the hosting provider. If this is the case its recommended to retry the build. <i>If the problem persists then consider the other options below.</i>', 'duplicator', array('i' => array())); ?><br/><br/>
|
177 |
|
178 |
<div style="text-align: center; margin: 10px">
|
179 |
+
<input type="button" class="button-large button-primary" value="<?php esc_html_e('Retry Package Build', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1&_wpnonce=<?php echo wp_create_nonce('new1-package'); ?>" />
|
180 |
</div>
|
181 |
|
182 |
<div style="color:#777; padding: 15px 5px 5px 5px">
|
183 |
+
<b> <?php esc_html_e('Notice', 'duplicator'); ?></b><br/>
|
184 |
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
185 |
+
esc_html__('Build Folder:'),
|
186 |
+
esc_html(DUPLICATOR_SSDIR_PATH_TMP),
|
187 |
+
esc_html__("On some servers the build will continue to run in the background. To validate if a build is still running; open the 'tmp' folder above and see "
|
188 |
. "if the archive file is growing in size or check the main packages screen to see if the package completed. If it is not then your server "
|
189 |
. "has strict timeout constraints.", 'duplicator')
|
190 |
);
|
196 |
<!-- OPTION 2: Two-Part Install -->
|
197 |
<div class="dup-box no-top">
|
198 |
<div class="dup-box-title">
|
199 |
+
<i class="fa fa-random"></i> <?php esc_html_e('Two-Part Install', 'duplicator'); ?>
|
200 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
201 |
</div>
|
202 |
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
203 |
+
<b class="opt-title"><?php esc_html_e('OPTION 2:', 'duplicator'); ?></b><br/>
|
204 |
|
205 |
+
<?php esc_html_e("A two-part install minimizes server load and can avoid I/O and CPU issues encountered on some budget hosts. With this procedure you simply build a 'database-only' archive, manually move the website files, and then run the installer to complete the process.", 'duplicator'); ?>
|
206 |
+
<br/><br/>
|
207 |
|
208 |
+
<b><?php echo wp_kses('<i class="fa fa-file-text-o"></i> Overview', 'duplicator', array('i' => array())); ?></b><br/>
|
209 |
+
<?php esc_html_e('Please follow these steps:', 'duplicator'); ?><br/>
|
210 |
<ol>
|
211 |
+
<li><?php esc_html_e('Click the button below to go back to Step 1.', 'duplicator'); ?></li>
|
212 |
+
<li><?php esc_html_e('On Step 1 the "Archive Only the Database" checkbox will be auto checked.', 'duplicator'); ?></li>
|
213 |
<li>
|
214 |
+
<?php esc_html_e('Complete the package build and follow the ', 'duplicator'); ?>
|
215 |
<?php
|
216 |
printf('%s "<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>".',
|
217 |
+
'',
|
218 |
+
esc_html__('Quick Start Two-Part Install Instructions', 'duplicator'));
|
219 |
?>
|
220 |
</li>
|
221 |
</ol> <br/>
|
222 |
|
223 |
<div style="text-align: center; margin: 10px">
|
224 |
<input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()">
|
225 |
+
<label for="dup-two-part-check"><?php esc_html_e('Yes. I have read the above overview and would like to continue!', 'duplicator'); ?></label><br/><br/>
|
226 |
+
<button id="dup-two-part-btn" type="button" class="button-large button-primary" disabled="true" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2&_wpnonce=<?php echo wp_create_nonce('new1-package'); ?>'">
|
227 |
+
<i class="fa fa-random"></i> <?php esc_html_e('Start Two-Part Install Process', 'duplicator'); ?>
|
228 |
</button>
|
229 |
</div><br/>
|
230 |
</div>
|
233 |
<!-- OPTION 3: DIAGNOSE SERVER -->
|
234 |
<div class="dup-box no-top">
|
235 |
<div class="dup-box-title">
|
236 |
+
<i class="fa fa-cog"></i> <?php esc_html_e('Configure Server', 'duplicator'); ?>
|
237 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
238 |
</div>
|
239 |
<div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
|
240 |
+
<b class="opt-title"><?php esc_html_e('OPTION 3:', 'duplicator'); ?></b><br/>
|
241 |
+
<?php esc_html_e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
|
242 |
. 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
|
243 |
|
244 |
<div style="text-align: center; margin: 10px; font-size:16px; font-weight: bold">
|
245 |
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q" target="_blank">
|
246 |
+
[<?php esc_html_e('Diagnose Server Setup', 'duplicator'); ?>]
|
247 |
</a>
|
248 |
</div>
|
249 |
|
250 |
+
<b><?php esc_html_e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
|
251 |
<div class="dup-msg-error-area">
|
252 |
<div id="dup-msg-error-response-time">
|
253 |
+
<span class="label"><?php esc_html_e("Allowed Runtime:", 'duplicator'); ?></span>
|
254 |
<span class="data"></span>
|
255 |
</div>
|
256 |
<div id="dup-msg-error-response-php">
|
257 |
+
<span class="label"><?php esc_html_e("PHP Max Execution", 'duplicator'); ?></span><br/>
|
258 |
<span class="data sub-data">
|
259 |
+
<span class="label"><?php esc_html_e("Time", 'duplicator'); ?>:</span>
|
260 |
<?php
|
261 |
$try_value = @ini_get('max_execution_time');
|
262 |
$try_update = set_time_limit(0);
|
263 |
echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
|
264 |
?>
|
265 |
<i class="fa fa-question-circle data-size-help"
|
266 |
+
data-tooltip-title="<?php esc_html_e("PHP Max Execution Time", 'duplicator'); ?>"
|
267 |
+
data-tooltip="<?php esc_html_e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i>
|
268 |
</span><br/>
|
269 |
|
270 |
<span class="data sub-data">
|
271 |
+
<span class="label"><?php esc_html_e("Mode", 'duplicator'); ?>:</span>
|
272 |
<?php
|
273 |
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
|
274 |
echo "{$try_update}";
|
275 |
?>
|
276 |
<i class="fa fa-question-circle data-size-help"
|
277 |
+
data-tooltip-title="<?php esc_html_e("PHP Max Execution Mode", 'duplicator'); ?>"
|
278 |
+
data-tooltip="<?php esc_html_e('If the value is [dynamic] then its possible for PHP to run longer than the default. '
|
279 |
. 'If the value is [fixed] then PHP will not be allowed to run longer than the default. <br/><br/> If this value is larger than the [Allowed Runtime] above then '
|
280 |
. 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
|
281 |
</span>
|
282 |
</div>
|
283 |
|
284 |
<div id="dup-msg-error-response-status">
|
285 |
+
<span class="label"><?php esc_html_e("Server Status:", 'duplicator'); ?></span>
|
286 |
<span class="data"></span>
|
287 |
</div>
|
288 |
<div id="dup-msg-error-response-text">
|
289 |
+
<span class="label"><?php esc_html_e("Error Message:", 'duplicator'); ?></span><br/>
|
290 |
<span class="data"></span>
|
291 |
</div>
|
292 |
</div>
|
295 |
<div id="dup-logs">
|
296 |
<br/>
|
297 |
<i class="fa fa-list-alt"></i>
|
298 |
+
<a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php esc_html_e('Read Package Log File', 'duplicator');?></a>
|
299 |
<br/><br/>
|
300 |
</div>
|
301 |
</div>
|
305 |
<!-- OPTION 4: Try DupArchive Engine -->
|
306 |
<div class="dup-box no-top">
|
307 |
<div class="dup-box-title">
|
308 |
+
<i class="fa fa-share-alt"></i> <?php esc_html_e('Try Duplicator 1.3', 'duplicator'); ?>
|
309 |
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
310 |
</div>
|
311 |
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
312 |
+
<b class="opt-title"><?php esc_html_e('OPTION 4:', 'duplicator'); ?></b><br/>
|
313 |
|
314 |
+
<?php esc_html_e('Duplicator 1.3 now has a new engine format named DupArchive. This format is specific to Duplicator and is designed around performance and scalability. '
|
315 |
. 'Many budget hosting providers have very strict timeouts, CPU/IO constraints that they configure into their servers. With DupArchive the format is '
|
316 |
. 'designed to help get around these server constraints so that users can build larger packages. The DupArchive engine is currently only available in '
|
317 |
. 'Duplicator 1.3 and above. This version is currently in Beta and after we have had a good amount of community support we will make it publicly available.', 'duplicator'); ?><br/><br/>
|
318 |
|
319 |
+
<b><?php esc_html_e('<i class="fa fa-file-text-o"></i> Overview', 'duplicator'); ?></b><br/>
|
320 |
+
<?php esc_html_e('Please follow these steps:', 'duplicator'); ?><br/>
|
321 |
<ol>
|
322 |
+
<li><?php esc_html_e('Uninstall this version of Duplicator.', 'duplicator'); ?></li>
|
323 |
+
<li><?php esc_html_e('Install Duplicator 1.3 (Beta) via the link below.', 'duplicator'); ?></li>
|
324 |
+
<li><?php esc_html_e('After plugin install go to Duplicator > Settings > Packages Tab > Archive Engine > Enable DupArchive', 'duplicator'); ?></li>
|
325 |
+
<li><?php esc_html_e('Try and build a new package again using the new engine format and let us know how it goes.', 'duplicator'); ?></li>
|
326 |
</ol> <br/>
|
327 |
|
328 |
<div style="text-align: center; margin: 10px">
|
329 |
<input type="checkbox" id="dup-duparchive-check" onclick="Duplicator.Pack.ToggleDupArchive()">
|
330 |
+
<label for="dup-duparchive-check"><?php esc_html_e('Yes. I have read the above overview and would like to try the new DupArchive engine!', 'duplicator'); ?></label><br/><br/>
|
331 |
<button id="dup-duparchive-btn" type="button" class="button-large button-primary" disabled="true" onclick="Duplicator.Pack.OpenBetaLink()">
|
332 |
+
<i class="fa fa-share-alt"></i> <?php esc_html_e('Download Duplicator 1.3 (Beta)', 'duplicator'); ?>
|
333 |
</button>
|
334 |
</div><br/>
|
335 |
</div>
|
views/packages/screen.php
CHANGED
@@ -44,13 +44,13 @@ class DUP_Package_Screen extends DUP_UI_Screen
|
|
44 |
$guide = '#guide-packs';
|
45 |
$faq = '#faq-package';
|
46 |
$content .= "<b>References:</b><br/>"
|
47 |
-
. "<a href='https://snapcreek.com/duplicator/docs/guide/
|
48 |
-
. "<a href='https://snapcreek.com/duplicator/docs/faqs-tech/
|
49 |
-
. "<a href='https://snapcreek.com/duplicator/docs/quick-start/' target='_sc-guide'>Quick Start</a>";
|
50 |
|
51 |
$this->screen->add_help_tab( array(
|
52 |
'id' => 'dup_help_package_overview',
|
53 |
-
'title' =>
|
54 |
'content' => "<p>{$content}</p>"
|
55 |
)
|
56 |
);
|
44 |
$guide = '#guide-packs';
|
45 |
$faq = '#faq-package';
|
46 |
$content .= "<b>References:</b><br/>"
|
47 |
+
. "<a href='".esc_url('https://snapcreek.com/duplicator/docs/guide/'.$guide)."' target='_sc-guide'>User Guide</a> | "
|
48 |
+
. "<a href='".esc_url('https://snapcreek.com/duplicator/docs/faqs-tech/'.$faq)."' target='_sc-guide'>FAQs</a> | "
|
49 |
+
. "<a href='".esc_url('https://snapcreek.com/duplicator/docs/quick-start/')."' target='_sc-guide'>Quick Start</a>";
|
50 |
|
51 |
$this->screen->add_help_tab( array(
|
52 |
'id' => 'dup_help_package_overview',
|
53 |
+
'title' => esc_html__('Overview','duplicator'),
|
54 |
'content' => "<p>{$content}</p>"
|
55 |
)
|
56 |
);
|
views/settings/about-info.php
CHANGED
@@ -45,7 +45,7 @@
|
|
45 |
</td>
|
46 |
<td valign="top" style="padding-top:10px; font-size:18px; line-height: 24px">
|
47 |
<?php
|
48 |
-
|
49 |
. "migration process of moving a WordPress site. Please help us continue development by giving this plugin a 5 star.", 'duplicator');
|
50 |
?>
|
51 |
</td>
|
@@ -57,7 +57,7 @@
|
|
57 |
<table class="dup-support-hlp-hdrs">
|
58 |
<tr >
|
59 |
<td style="height:30px; text-align: center;">
|
60 |
-
<span style="display: inline-block; margin-top: 5px"><?php
|
61 |
</td>
|
62 |
</tr>
|
63 |
</table>
|
@@ -66,7 +66,7 @@
|
|
66 |
<td valign="top">
|
67 |
<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><img id="dup-img-5stars" src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/5star.png" /></a>
|
68 |
<div style=" font-size: 16px; font-weight: bold">
|
69 |
-
<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php
|
70 |
</div>
|
71 |
</td>
|
72 |
</tr>
|
@@ -78,23 +78,23 @@
|
|
78 |
<table class="dup-support-hlp-hdrs">
|
79 |
<tr>
|
80 |
<td style="height:30px; text-align: center;">
|
81 |
-
<span style="display: inline-block; margin-top: 5px"><?php
|
82 |
</td>
|
83 |
</tr>
|
84 |
</table>
|
85 |
<div class="dup-support-hlp-txt">
|
86 |
<div class="social-images">
|
87 |
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
88 |
-
<div class="social-item"><i class="fa fa-facebook-square fa-lg"></i> <?php
|
89 |
</a>
|
90 |
<a href="https://twitter.com/home?status=Checkout%20the%20WordPress%20Duplicator%20plugin!%20%0Ahttps%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
91 |
-
<div class="social-item"><i class="fa fa-twitter-square fa-lg"></i> <?php
|
92 |
</a>
|
93 |
<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//snapcreek.com/duplicator/duplicator-free/&title=WordPress%20Duplicator%20Plugin&summary=&source=" target="_blank">
|
94 |
-
<div class="social-item"><i class="fa fa-linkedin-square fa-lg"></i> <?php
|
95 |
</a>
|
96 |
<a href="https://plus.google.com/share?url=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
97 |
-
<div class="social-item"><i class="fa fa-google-plus-square fa-lg"></i> <?php
|
98 |
</a>
|
99 |
</div>
|
100 |
</div>
|
@@ -107,7 +107,7 @@
|
|
107 |
<table class="dup-support-hlp-hdrs">
|
108 |
<tr>
|
109 |
<td style="height:30px; text-align: center;">
|
110 |
-
<span style="display: inline-block; margin-top: 5px"><?php
|
111 |
</td>
|
112 |
</tr>
|
113 |
</table>
|
@@ -117,7 +117,7 @@
|
|
117 |
<!-- Begin MailChimp Signup Form -->
|
118 |
<div class="email-form">
|
119 |
<div style="font-size:18px; width: 525px; padding: 5px 0 15px 0; text-align: center; font-style: italic; margin: auto">
|
120 |
-
<?php
|
121 |
</div>
|
122 |
|
123 |
|
45 |
</td>
|
46 |
<td valign="top" style="padding-top:10px; font-size:18px; line-height: 24px">
|
47 |
<?php
|
48 |
+
esc_html_e("Duplicator can streamline your workflow and quickly clone/migrate a WordPress site. The plugin helps admins, designers and developers speed up the "
|
49 |
. "migration process of moving a WordPress site. Please help us continue development by giving this plugin a 5 star.", 'duplicator');
|
50 |
?>
|
51 |
</td>
|
57 |
<table class="dup-support-hlp-hdrs">
|
58 |
<tr >
|
59 |
<td style="height:30px; text-align: center;">
|
60 |
+
<span style="display: inline-block; margin-top: 5px"><?php esc_html_e('Rate Duplicator', 'duplicator') ?></span>
|
61 |
</td>
|
62 |
</tr>
|
63 |
</table>
|
66 |
<td valign="top">
|
67 |
<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><img id="dup-img-5stars" src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/5star.png" /></a>
|
68 |
<div style=" font-size: 16px; font-weight: bold">
|
69 |
+
<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php esc_html_e('Support us with a 5 star review!', 'duplicator') ?></a>
|
70 |
</div>
|
71 |
</td>
|
72 |
</tr>
|
78 |
<table class="dup-support-hlp-hdrs">
|
79 |
<tr>
|
80 |
<td style="height:30px; text-align: center;">
|
81 |
+
<span style="display: inline-block; margin-top: 5px"><?php esc_html_e('Spread the Word', 'duplicator') ?></span>
|
82 |
</td>
|
83 |
</tr>
|
84 |
</table>
|
85 |
<div class="dup-support-hlp-txt">
|
86 |
<div class="social-images">
|
87 |
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
88 |
+
<div class="social-item"><i class="fa fa-facebook-square fa-lg"></i> <?php esc_html_e('Facebook', 'duplicator') ?></div>
|
89 |
</a>
|
90 |
<a href="https://twitter.com/home?status=Checkout%20the%20WordPress%20Duplicator%20plugin!%20%0Ahttps%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
91 |
+
<div class="social-item"><i class="fa fa-twitter-square fa-lg"></i> <?php esc_html_e('Twitter', 'duplicator') ?></div>
|
92 |
</a>
|
93 |
<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//snapcreek.com/duplicator/duplicator-free/&title=WordPress%20Duplicator%20Plugin&summary=&source=" target="_blank">
|
94 |
+
<div class="social-item"><i class="fa fa-linkedin-square fa-lg"></i> <?php esc_html_e('LinkedIn', 'duplicator') ?></div>
|
95 |
</a>
|
96 |
<a href="https://plus.google.com/share?url=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
97 |
+
<div class="social-item"><i class="fa fa-google-plus-square fa-lg"></i> <?php esc_html_e('Google+', 'duplicator') ?></div>
|
98 |
</a>
|
99 |
</div>
|
100 |
</div>
|
107 |
<table class="dup-support-hlp-hdrs">
|
108 |
<tr>
|
109 |
<td style="height:30px; text-align: center;">
|
110 |
+
<span style="display: inline-block; margin-top: 5px"><?php esc_html_e('Stay in the Loop', 'duplicator') ?></span>
|
111 |
</td>
|
112 |
</tr>
|
113 |
</table>
|
117 |
<!-- Begin MailChimp Signup Form -->
|
118 |
<div class="email-form">
|
119 |
<div style="font-size:18px; width: 525px; padding: 5px 0 15px 0; text-align: center; font-style: italic; margin: auto">
|
120 |
+
<?php esc_html_e('Subscribe to the Duplicator newsletter and stay on top of great ideas, tutorials, and better ways to improve your workflows', 'duplicator') ?>...
|
121 |
</div>
|
122 |
|
123 |
|
views/settings/controller.php
CHANGED
@@ -7,7 +7,7 @@ global $wpdb;
|
|
7 |
//COMMON HEADER DISPLAY
|
8 |
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
9 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
10 |
-
$current_tab = isset($_REQUEST['tab']) ?
|
11 |
?>
|
12 |
|
13 |
<style>
|
@@ -19,12 +19,12 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'general';
|
|
19 |
<?php duplicator_header(__("Settings", 'duplicator')) ?>
|
20 |
|
21 |
<h2 class="nav-tab-wrapper">
|
22 |
-
<a href="?page=duplicator-settings&tab=general" class="nav-tab <?php echo ($current_tab == 'general') ? 'nav-tab-active' : '' ?>"> <?php
|
23 |
-
<a href="?page=duplicator-settings&tab=package" class="nav-tab <?php echo ($current_tab == 'package') ? 'nav-tab-active' : '' ?>"> <?php
|
24 |
-
<a href="?page=duplicator-settings&tab=schedule" class="nav-tab <?php echo ($current_tab == 'schedule') ? 'nav-tab-active' : '' ?>"> <?php
|
25 |
-
<a href="?page=duplicator-settings&tab=storage" class="nav-tab <?php echo ($current_tab == 'storage') ? 'nav-tab-active' : '' ?>"> <?php
|
26 |
-
<a href="?page=duplicator-settings&tab=license" class="nav-tab <?php echo ($current_tab == 'license') ? 'nav-tab-active' : '' ?>"> <?php
|
27 |
-
<a href="?page=duplicator-settings&tab=about" class="nav-tab <?php echo ($current_tab == 'about') ? 'nav-tab-active' : '' ?>"> <?php
|
28 |
</h2>
|
29 |
|
30 |
<?php
|
7 |
//COMMON HEADER DISPLAY
|
8 |
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
9 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
10 |
+
$current_tab = isset($_REQUEST['tab']) ? sanitize_text_field($_REQUEST['tab']) : 'general';
|
11 |
?>
|
12 |
|
13 |
<style>
|
19 |
<?php duplicator_header(__("Settings", 'duplicator')) ?>
|
20 |
|
21 |
<h2 class="nav-tab-wrapper">
|
22 |
+
<a href="?page=duplicator-settings&tab=general" class="nav-tab <?php echo ($current_tab == 'general') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('General', 'duplicator'); ?></a>
|
23 |
+
<a href="?page=duplicator-settings&tab=package" class="nav-tab <?php echo ($current_tab == 'package') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Packages', 'duplicator'); ?></a>
|
24 |
+
<a href="?page=duplicator-settings&tab=schedule" class="nav-tab <?php echo ($current_tab == 'schedule') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Schedules', 'duplicator'); ?></a>
|
25 |
+
<a href="?page=duplicator-settings&tab=storage" class="nav-tab <?php echo ($current_tab == 'storage') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Storage', 'duplicator'); ?></a>
|
26 |
+
<a href="?page=duplicator-settings&tab=license" class="nav-tab <?php echo ($current_tab == 'license') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('License', 'duplicator'); ?></a>
|
27 |
+
<a href="?page=duplicator-settings&tab=about" class="nav-tab <?php echo ($current_tab == 'about') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('About', 'duplicator'); ?></a>
|
28 |
</h2>
|
29 |
|
30 |
<?php
|
views/settings/general.php
CHANGED
@@ -50,55 +50,55 @@ $package_debug = DUP_Settings::Get('package_debug');
|
|
50 |
<input type="hidden" name="page" value="duplicator-settings">
|
51 |
|
52 |
<?php if ($action_updated) : ?>
|
53 |
-
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
54 |
<?php endif; ?>
|
55 |
|
56 |
|
57 |
-
<h3 class="title"><?php
|
58 |
<hr size="1" />
|
59 |
<table class="form-table">
|
60 |
<tr valign="top">
|
61 |
-
<th scope="row"><label><?php
|
62 |
<td><?php echo DUPLICATOR_VERSION ?></td>
|
63 |
</tr>
|
64 |
<tr valign="top">
|
65 |
-
<th scope="row"><label><?php
|
66 |
<td>
|
67 |
<input type="checkbox" name="uninstall_settings" id="uninstall_settings" <?php echo ($uninstall_settings) ? 'checked="checked"' : ''; ?> />
|
68 |
-
<label for="uninstall_settings"><?php
|
69 |
|
70 |
<input type="checkbox" name="uninstall_files" id="uninstall_files" <?php echo ($uninstall_files) ? 'checked="checked"' : ''; ?> />
|
71 |
-
<label for="uninstall_files"><?php
|
72 |
|
73 |
</td>
|
74 |
</tr>
|
75 |
<tr valign="top">
|
76 |
-
<th scope="row"><label><?php
|
77 |
<td>
|
78 |
-
<?php
|
79 |
<?php echo DUP_Util::safePath(DUPLICATOR_SSDIR_PATH); ?><br/><br/>
|
80 |
<input type="checkbox" name="storage_htaccess_off" id="storage_htaccess_off" <?php echo ($storage_htaccess_off) ? 'checked="checked"' : ''; ?> />
|
81 |
-
<label for="storage_htaccess_off"><?php
|
82 |
<p class="description">
|
83 |
-
<?php
|
84 |
</p>
|
85 |
</td>
|
86 |
</tr>
|
87 |
<tr>
|
88 |
-
<th scope="row"><label><?php
|
89 |
<td>
|
90 |
<input type="checkbox" name="wpfront_integrate" id="wpfront_integrate" <?php echo ($wpfront_integrate) ? 'checked="checked"' : ''; ?> <?php echo $wpfront_ready ? '' : 'disabled'; ?> />
|
91 |
-
<label for="wpfront_integrate"><?php
|
92 |
<p class="description">
|
93 |
<?php printf('%s <a href="https://wordpress.org/plugins/wpfront-user-role-editor/" target="_blank">%s</a> %s'
|
94 |
. ' <a href="https://wpfront.com/user-role-editor-pro/?ref=3" target="_blank">%s</a> %s '
|
95 |
. ' <a href="https://wpfront.com/integrations/duplicator-integration/" target="_blank">%s</a>',
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
);
|
103 |
?>
|
104 |
</p>
|
@@ -107,22 +107,22 @@ $package_debug = DUP_Settings::Get('package_debug');
|
|
107 |
</table>
|
108 |
|
109 |
|
110 |
-
<h3 class="title"><?php
|
111 |
<hr size="1" />
|
112 |
<table class="form-table">
|
113 |
<tr>
|
114 |
-
<th scope="row"><label><?php
|
115 |
<td>
|
116 |
<input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
|
117 |
-
<label for="package_debug"><?php
|
118 |
-
<p class="description"><?php
|
119 |
</td>
|
120 |
</tr>
|
121 |
</table><br/>
|
122 |
|
123 |
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
124 |
<br/>
|
125 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php
|
126 |
</p>
|
127 |
|
128 |
</form>
|
50 |
<input type="hidden" name="page" value="duplicator-settings">
|
51 |
|
52 |
<?php if ($action_updated) : ?>
|
53 |
+
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo esc_html($action_response); ?></p></div>
|
54 |
<?php endif; ?>
|
55 |
|
56 |
|
57 |
+
<h3 class="title"><?php esc_html_e("Plugin", 'duplicator') ?> </h3>
|
58 |
<hr size="1" />
|
59 |
<table class="form-table">
|
60 |
<tr valign="top">
|
61 |
+
<th scope="row"><label><?php esc_html_e("Version", 'duplicator'); ?></label></th>
|
62 |
<td><?php echo DUPLICATOR_VERSION ?></td>
|
63 |
</tr>
|
64 |
<tr valign="top">
|
65 |
+
<th scope="row"><label><?php esc_html_e("Uninstall", 'duplicator'); ?></label></th>
|
66 |
<td>
|
67 |
<input type="checkbox" name="uninstall_settings" id="uninstall_settings" <?php echo ($uninstall_settings) ? 'checked="checked"' : ''; ?> />
|
68 |
+
<label for="uninstall_settings"><?php esc_html_e("Delete Plugin Settings", 'duplicator') ?> </label><br/>
|
69 |
|
70 |
<input type="checkbox" name="uninstall_files" id="uninstall_files" <?php echo ($uninstall_files) ? 'checked="checked"' : ''; ?> />
|
71 |
+
<label for="uninstall_files"><?php esc_html_e("Delete Entire Storage Directory", 'duplicator') ?></label><br/>
|
72 |
|
73 |
</td>
|
74 |
</tr>
|
75 |
<tr valign="top">
|
76 |
+
<th scope="row"><label><?php esc_html_e("Storage", 'duplicator'); ?></label></th>
|
77 |
<td>
|
78 |
+
<?php esc_html_e("Full Path", 'duplicator'); ?>:
|
79 |
<?php echo DUP_Util::safePath(DUPLICATOR_SSDIR_PATH); ?><br/><br/>
|
80 |
<input type="checkbox" name="storage_htaccess_off" id="storage_htaccess_off" <?php echo ($storage_htaccess_off) ? 'checked="checked"' : ''; ?> />
|
81 |
+
<label for="storage_htaccess_off"><?php esc_html_e("Disable .htaccess File In Storage Directory", 'duplicator') ?> </label>
|
82 |
<p class="description">
|
83 |
+
<?php esc_html_e("Disable if issues occur when downloading installer/archive files.", 'duplicator'); ?>
|
84 |
</p>
|
85 |
</td>
|
86 |
</tr>
|
87 |
<tr>
|
88 |
+
<th scope="row"><label><?php esc_html_e("Custom Roles", 'duplicator'); ?></label></th>
|
89 |
<td>
|
90 |
<input type="checkbox" name="wpfront_integrate" id="wpfront_integrate" <?php echo ($wpfront_integrate) ? 'checked="checked"' : ''; ?> <?php echo $wpfront_ready ? '' : 'disabled'; ?> />
|
91 |
+
<label for="wpfront_integrate"><?php esc_html_e("Enable User Role Editor Plugin Integration", 'duplicator'); ?></label>
|
92 |
<p class="description">
|
93 |
<?php printf('%s <a href="https://wordpress.org/plugins/wpfront-user-role-editor/" target="_blank">%s</a> %s'
|
94 |
. ' <a href="https://wpfront.com/user-role-editor-pro/?ref=3" target="_blank">%s</a> %s '
|
95 |
. ' <a href="https://wpfront.com/integrations/duplicator-integration/" target="_blank">%s</a>',
|
96 |
+
esc_html__('The User Role Editor Plugin', 'duplicator'),
|
97 |
+
esc_html__('Free', 'duplicator'),
|
98 |
+
esc_html__('or', 'duplicator'),
|
99 |
+
esc_html__('Professional', 'duplicator'),
|
100 |
+
esc_html__('must be installed to use', 'duplicator'),
|
101 |
+
esc_html__('this feature.', 'duplicator')
|
102 |
);
|
103 |
?>
|
104 |
</p>
|
107 |
</table>
|
108 |
|
109 |
|
110 |
+
<h3 class="title"><?php esc_html_e("Debug", 'duplicator') ?> </h3>
|
111 |
<hr size="1" />
|
112 |
<table class="form-table">
|
113 |
<tr>
|
114 |
+
<th scope="row"><label><?php esc_html_e("Debugging", 'duplicator'); ?></label></th>
|
115 |
<td>
|
116 |
<input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
|
117 |
+
<label for="package_debug"><?php esc_html_e("Enable debug options throughout user interface", 'duplicator'); ?></label>
|
118 |
+
<p class="description"><?php esc_html_e("Refresh page after saving to show/hide Debug menu", 'duplicator'); ?></p>
|
119 |
</td>
|
120 |
</tr>
|
121 |
</table><br/>
|
122 |
|
123 |
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
124 |
<br/>
|
125 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e("Save General Settings", 'duplicator') ?>" style="display: inline-block;" />
|
126 |
</p>
|
127 |
|
128 |
</form>
|
views/settings/license.php
CHANGED
@@ -1,41 +1,39 @@
|
|
1 |
-
|
2 |
-
<h3 class="title"><?php
|
3 |
-
<hr size="1" />
|
4 |
-
<table class="form-table">
|
5 |
-
<tr valign="top">
|
6 |
-
<th scope="row"><?php
|
7 |
-
<td><?php echo sprintf(__('%1$sManage Licenses%2$s'), '<a target="_blank" href="https://snapcreek.com/dashboard?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=settings_license_manage_licenses">', '</a>'); ?></td>
|
8 |
-
</tr>
|
9 |
-
<tr valign="top">
|
10 |
-
<th scope="row"><?php
|
11 |
-
<td class="dpro-license-type">
|
12 |
-
<?php
|
13 |
-
<div style="padding: 10px">
|
14 |
-
<i class="fa fa-check-square-o"></i> <?php
|
15 |
-
<i class="fa fa-square-o"></i> <a href="admin.php?page=duplicator-gopro"><?php
|
16 |
-
</div>
|
17 |
-
</td>
|
18 |
-
</tr>
|
19 |
-
<tr valign="top">
|
20 |
-
<th scope="row"><label><?php
|
21 |
-
<td>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
echo
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
1 |
+
|
2 |
+
<h3 class="title"><?php esc_html_e("Activation"); ?> </h3>
|
3 |
+
<hr size="1" />
|
4 |
+
<table class="form-table">
|
5 |
+
<tr valign="top">
|
6 |
+
<th scope="row"><?php esc_html_e("Manage") ?></th>
|
7 |
+
<td><?php echo sprintf(__('%1$sManage Licenses%2$s'), '<a target="_blank" href="https://snapcreek.com/dashboard?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=settings_license_manage_licenses">', '</a>'); ?></td>
|
8 |
+
</tr>
|
9 |
+
<tr valign="top">
|
10 |
+
<th scope="row"><?php esc_html_e("Type") ?></th>
|
11 |
+
<td class="dpro-license-type">
|
12 |
+
<?php esc_html_e('Duplicator Free'); ?>
|
13 |
+
<div style="padding: 10px">
|
14 |
+
<i class="fa fa-check-square-o"></i> <?php esc_html_e('Basic Features'); ?> <br/>
|
15 |
+
<i class="fa fa-square-o"></i> <a href="admin.php?page=duplicator-gopro"><?php esc_html_e('Pro Features'); ?></a><br>
|
16 |
+
</div>
|
17 |
+
</td>
|
18 |
+
</tr>
|
19 |
+
<tr valign="top">
|
20 |
+
<th scope="row"><label><?php esc_html_e("License Key"); ?></label></th>
|
21 |
+
<td>
|
22 |
+
<p class="description" style="max-width:700px">
|
23 |
+
<?php
|
24 |
+
esc_html_e("The free version of Duplicator does not require a license key. ");
|
25 |
+
echo '<br/><br/>';
|
26 |
+
echo esc_html__("Professional Users: Please note that if you have already purchased the Professional version it is a separate plugin that "
|
27 |
+
. "you download and install. You can download the Professional version from the email sent after your purchase or click on the 'Manage Licenses' "
|
28 |
+
. "link above to download the plugin from your snapcreek.com dashboard. If you would like to purchase the professional version you can ");
|
29 |
+
echo '<a href="https://snapcreek.com/duplicator?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=settings_license_get_copy_here" target="_blank">'
|
30 |
+
. esc_html__("get a copy here", 'duplicator') . '</a>!';
|
31 |
+
?>
|
32 |
+
</p>
|
33 |
+
<br/><br/>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
</table>
|
37 |
+
|
38 |
+
|
39 |
+
|
|
|
|
views/settings/packages.php
CHANGED
@@ -55,32 +55,32 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
55 |
<input type="hidden" name="page" value="duplicator-settings">
|
56 |
|
57 |
<?php if ($action_updated) : ?>
|
58 |
-
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
59 |
<?php endif; ?>
|
60 |
|
61 |
-
<h3 class="title"><?php
|
62 |
<hr size="1" />
|
63 |
<table class="form-table">
|
64 |
<tr>
|
65 |
-
<th scope="row"><label><?php
|
66 |
<td>
|
67 |
<select name="package_ui_created" id="package_ui_created">
|
68 |
<!-- YEAR -->
|
69 |
-
<optgroup label="<?php
|
70 |
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
71 |
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
72 |
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
73 |
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
74 |
</optgroup>
|
75 |
<!-- MONTH -->
|
76 |
-
<optgroup label="<?php
|
77 |
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
78 |
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
79 |
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
80 |
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
81 |
</optgroup>
|
82 |
<!-- DAY -->
|
83 |
-
<optgroup label="<?php
|
84 |
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
85 |
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
86 |
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
@@ -88,38 +88,38 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
88 |
</optgroup>
|
89 |
</select>
|
90 |
<p class="description">
|
91 |
-
<?php
|
92 |
-
<small><?php
|
93 |
</p>
|
94 |
</td>
|
95 |
</tr>
|
96 |
</table>
|
97 |
|
98 |
-
<h3 class="title"><?php
|
99 |
<hr size="1" />
|
100 |
<table class="form-table">
|
101 |
<tr>
|
102 |
-
<th scope="row"><label><?php
|
103 |
<td>
|
104 |
<?php if (!DUP_Util::hasShellExec()) : ?>
|
105 |
<input type="radio" disabled="true" />
|
106 |
-
<label><?php
|
107 |
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
108 |
<?php
|
109 |
-
|
110 |
-
|
111 |
?>
|
112 |
<br/>
|
113 |
<small>
|
114 |
<i style="cursor: pointer"
|
115 |
-
data-tooltip-title="<?php
|
116 |
-
data-tooltip="<?php
|
117 |
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
118 |
<?php
|
119 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
?>
|
124 |
</i>
|
125 |
</small>
|
@@ -127,42 +127,48 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
127 |
</p>
|
128 |
<?php else : ?>
|
129 |
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
130 |
-
<label for="package_mysqldump"><?php
|
131 |
|
132 |
<div style="margin:5px 0px 0px 25px">
|
133 |
<?php if ($mysqlDumpFound) : ?>
|
134 |
<div class="dup-feature-found">
|
135 |
<i class="fa fa-check-circle"></i>
|
136 |
-
<?php
|
137 |
-
<i><?php echo $mysqlDumpPath ?></i>
|
138 |
</div><br/>
|
139 |
<?php else : ?>
|
140 |
<div class="dup-feature-notfound">
|
141 |
<i class="fa fa-exclamation-triangle"></i>
|
142 |
<?php
|
143 |
-
|
144 |
. 'If the problem persist contact your host or server administrator. ', 'duplicator');
|
145 |
|
146 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
?>
|
151 |
</div><br/>
|
152 |
|
153 |
<?php endif; ?>
|
154 |
|
155 |
<i class="fa fa-question-circle"
|
156 |
-
data-tooltip-title="<?php
|
157 |
-
data-tooltip="<?php
|
158 |
-
<label><?php
|
159 |
-
<input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo esc_attr($package_mysqldump_path); ?>" placeholder="<?php
|
160 |
<div class="dup-feature-notfound">
|
161 |
<?php
|
162 |
if (!$mysqlDumpFound && strlen($mysqldump_exe_file)) {
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
167 |
?>
|
168 |
</div>
|
@@ -178,18 +184,18 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
178 |
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
179 |
<?php endif; ?>
|
180 |
|
181 |
-
<label for="package_phpdump"><?php
|
182 |
|
183 |
<div style="margin:5px 0px 0px 25px">
|
184 |
<i class="fa fa-question-circle"
|
185 |
-
data-tooltip-title="<?php
|
186 |
-
data-tooltip="<?php
|
187 |
-
<label for="package_phpdump_qrylimit"><?php
|
188 |
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
189 |
<?php
|
190 |
foreach($phpdump_chunkopts as $value) {
|
191 |
$selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
192 |
-
echo "<option {$selected} value='
|
193 |
}
|
194 |
?>
|
195 |
</select>
|
@@ -197,13 +203,13 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
197 |
</td>
|
198 |
</tr>
|
199 |
<tr>
|
200 |
-
<th scope="row"><label><?php
|
201 |
<td>
|
202 |
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
203 |
-
<label for="package_zip_flush"><?php
|
204 |
-
<i style="font-size:12px">(<?php
|
205 |
<p class="description">
|
206 |
-
<?php
|
207 |
</p>
|
208 |
</td>
|
209 |
</tr>
|
@@ -212,7 +218,7 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
212 |
|
213 |
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
214 |
<br/>
|
215 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php
|
216 |
</p>
|
217 |
|
218 |
</form>
|
@@ -220,6 +226,6 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
220 |
<script>
|
221 |
jQuery(document).ready(function($)
|
222 |
{
|
223 |
-
$('#package_ui_created').val(<?php echo $package_ui_created ?> );
|
224 |
});
|
225 |
</script>
|
55 |
<input type="hidden" name="page" value="duplicator-settings">
|
56 |
|
57 |
<?php if ($action_updated) : ?>
|
58 |
+
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo esc_html($action_response); ?></p></div>
|
59 |
<?php endif; ?>
|
60 |
|
61 |
+
<h3 class="title"><?php esc_html_e("Visual", 'duplicator') ?> </h3>
|
62 |
<hr size="1" />
|
63 |
<table class="form-table">
|
64 |
<tr>
|
65 |
+
<th scope="row"><label><?php esc_html_e("Created Format", 'duplicator'); ?></label></th>
|
66 |
<td>
|
67 |
<select name="package_ui_created" id="package_ui_created">
|
68 |
<!-- YEAR -->
|
69 |
+
<optgroup label="<?php esc_html_e("By Year", 'duplicator'); ?>">
|
70 |
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
71 |
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
72 |
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
73 |
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
74 |
</optgroup>
|
75 |
<!-- MONTH -->
|
76 |
+
<optgroup label="<?php esc_html_e("By Month", 'duplicator'); ?>">
|
77 |
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
78 |
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
79 |
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
80 |
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
81 |
</optgroup>
|
82 |
<!-- DAY -->
|
83 |
+
<optgroup label="<?php esc_html_e("By Day", 'duplicator'); ?>">
|
84 |
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
85 |
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
86 |
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
88 |
</optgroup>
|
89 |
</select>
|
90 |
<p class="description">
|
91 |
+
<?php esc_html_e("The UTC date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?> <br/>
|
92 |
+
<small><?php esc_html_e("To use WordPress timezone formats consider an upgrade to Duplicator Pro.", 'duplicator'); ?></small>
|
93 |
</p>
|
94 |
</td>
|
95 |
</tr>
|
96 |
</table>
|
97 |
|
98 |
+
<h3 class="title"><?php esc_html_e("Processing", 'duplicator') ?> </h3>
|
99 |
<hr size="1" />
|
100 |
<table class="form-table">
|
101 |
<tr>
|
102 |
+
<th scope="row"><label><?php esc_html_e("SQL Script", 'duplicator'); ?></label></th>
|
103 |
<td>
|
104 |
<?php if (!DUP_Util::hasShellExec()) : ?>
|
105 |
<input type="radio" disabled="true" />
|
106 |
+
<label><?php esc_html_e("Mysqldump", 'duplicator'); ?></label>
|
107 |
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
108 |
<?php
|
109 |
+
esc_html_e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
|
110 |
+
esc_html_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
111 |
?>
|
112 |
<br/>
|
113 |
<small>
|
114 |
<i style="cursor: pointer"
|
115 |
+
data-tooltip-title="<?php esc_html_e("Host Recommendation:", 'duplicator'); ?>"
|
116 |
+
data-tooltip="<?php esc_html_e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
117 |
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
118 |
<?php
|
119 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
120 |
+
esc_html__("Please visit our recommended", 'duplicator'),
|
121 |
+
esc_html__("host list", 'duplicator'),
|
122 |
+
esc_html__("for reliable access to mysqldump", 'duplicator'));
|
123 |
?>
|
124 |
</i>
|
125 |
</small>
|
127 |
</p>
|
128 |
<?php else : ?>
|
129 |
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
130 |
+
<label for="package_mysqldump"><?php esc_html_e("Mysqldump", 'duplicator'); ?></label><br/>
|
131 |
|
132 |
<div style="margin:5px 0px 0px 25px">
|
133 |
<?php if ($mysqlDumpFound) : ?>
|
134 |
<div class="dup-feature-found">
|
135 |
<i class="fa fa-check-circle"></i>
|
136 |
+
<?php esc_html_e("Successfully Found:", 'duplicator'); ?>
|
137 |
+
<i><?php echo esc_html($mysqlDumpPath); ?></i>
|
138 |
</div><br/>
|
139 |
<?php else : ?>
|
140 |
<div class="dup-feature-notfound">
|
141 |
<i class="fa fa-exclamation-triangle"></i>
|
142 |
<?php
|
143 |
+
esc_html_e('Mysqldump was not found at its default location or the custom path provided below. Please enter a custom path to a valid location where mysqldump can run. '
|
144 |
. 'If the problem persist contact your host or server administrator. ', 'duplicator');
|
145 |
|
146 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
147 |
+
esc_html__("See the", 'duplicator'),
|
148 |
+
esc_html__("host list", 'duplicator'),
|
149 |
+
esc_html__("for reliable access to mysqldump.", 'duplicator'));
|
150 |
?>
|
151 |
</div><br/>
|
152 |
|
153 |
<?php endif; ?>
|
154 |
|
155 |
<i class="fa fa-question-circle"
|
156 |
+
data-tooltip-title="<?php esc_attr_e("mysqldump path:", 'duplicator'); ?>"
|
157 |
+
data-tooltip="<?php esc_attr_e('An optional path to the mysqldump program. Add a custom path if the path to mysqldump is not properly detected or needs to be changed.', 'duplicator'); ?>"></i>
|
158 |
+
<label><?php esc_html_e("Custom Path:", 'duplicator'); ?></label><br/>
|
159 |
+
<input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo esc_attr($package_mysqldump_path); ?>" placeholder="<?php esc_attr_e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
|
160 |
<div class="dup-feature-notfound">
|
161 |
<?php
|
162 |
if (!$mysqlDumpFound && strlen($mysqldump_exe_file)) {
|
163 |
+
?>
|
164 |
+
<i class="fa fa-exclamation-triangle"></i> '
|
165 |
+
<?php
|
166 |
+
esc_html_e('The custom path provided is not recognized as a valid mysqldump file:', 'duplicator');
|
167 |
+
?>
|
168 |
+
<br/>
|
169 |
+
<?php
|
170 |
+
$mysqldump_path = $package_mysqldump_path;
|
171 |
+
echo "'".esc_html($mysqldump_path)."'";
|
172 |
}
|
173 |
?>
|
174 |
</div>
|
184 |
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
185 |
<?php endif; ?>
|
186 |
|
187 |
+
<label for="package_phpdump"><?php esc_html_e("PHP Code", 'duplicator'); ?></label>
|
188 |
|
189 |
<div style="margin:5px 0px 0px 25px">
|
190 |
<i class="fa fa-question-circle"
|
191 |
+
data-tooltip-title="<?php esc_html_e("PHP Query Limit Size", 'duplicator'); ?>"
|
192 |
+
data-tooltip="<?php esc_html_e('A higher limit size will speed up the database build time, however it will use more memory. If your host has memory caps start off low.', 'duplicator'); ?>"></i>
|
193 |
+
<label for="package_phpdump_qrylimit"><?php esc_html_e("Query Limit Size", 'duplicator'); ?></label>
|
194 |
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
195 |
<?php
|
196 |
foreach($phpdump_chunkopts as $value) {
|
197 |
$selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
198 |
+
echo "<option {$selected} value='".esc_attr($value)."'>" . number_format($value) . '</option>';
|
199 |
}
|
200 |
?>
|
201 |
</select>
|
203 |
</td>
|
204 |
</tr>
|
205 |
<tr>
|
206 |
+
<th scope="row"><label><?php esc_html_e("Archive Flush", 'duplicator'); ?></label></th>
|
207 |
<td>
|
208 |
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
209 |
+
<label for="package_zip_flush"><?php esc_html_e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
210 |
+
<i style="font-size:12px">(<?php esc_html_e("enable only for large archives", 'duplicator'); ?>)</i>
|
211 |
<p class="description">
|
212 |
+
<?php esc_html_e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
|
213 |
</p>
|
214 |
</td>
|
215 |
</tr>
|
218 |
|
219 |
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
220 |
<br/>
|
221 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php esc_attr_e("Save Package Settings", 'duplicator') ?>" style="display: inline-block;" />
|
222 |
</p>
|
223 |
|
224 |
</form>
|
226 |
<script>
|
227 |
jQuery(document).ready(function($)
|
228 |
{
|
229 |
+
$('#package_ui_created').val(<?php echo esc_js($package_ui_created); ?> );
|
230 |
});
|
231 |
</script>
|
views/settings/schedule.php
CHANGED
@@ -10,14 +10,14 @@
|
|
10 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
<?php
|
12 |
echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
|
13 |
-
|
14 |
echo '<br/>';
|
15 |
-
|
16 |
?>
|
17 |
</div>
|
18 |
<p style="text-align:center">
|
19 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
-
<?php
|
21 |
</a>
|
22 |
</p>
|
23 |
</div>
|
10 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
<?php
|
12 |
echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
|
13 |
+
esc_html_e('Create robust schedules that automatically create packages while you sleep.', 'duplicator');
|
14 |
echo '<br/>';
|
15 |
+
esc_html_e('Simply choose your storage location and when you want it to run.', 'duplicator');
|
16 |
?>
|
17 |
</div>
|
18 |
<p style="text-align:center">
|
19 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
+
<?php esc_html_e('Learn More', 'duplicator') ?>
|
21 |
</a>
|
22 |
</p>
|
23 |
</div>
|
views/settings/storage.php
CHANGED
@@ -10,27 +10,30 @@
|
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
-
<?php
|
|
|
14 |
</h2>
|
15 |
|
16 |
<div style='text-align: left; margin:auto; width:200px'>
|
17 |
<ul>
|
18 |
-
<li><i class="fa fa-amazon"></i> <?php
|
19 |
-
<li><i class="fa fa-dropbox"></i> <?php
|
20 |
-
<li><i class="fa fa-google"></i> <?php
|
21 |
-
<li><i class="fa fa-upload"></i> <?php
|
22 |
-
<li><i class="fa fa-cloud"></i> <?php
|
23 |
-
<li><i class="fa fa-folder-open-o"></i> <?php
|
24 |
</ul>
|
25 |
</div>
|
26 |
<?php
|
27 |
-
|
|
|
|
|
28 |
?>
|
29 |
</div><br/>
|
30 |
|
31 |
<p style="text-align:center">
|
32 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_storage&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
33 |
-
<?php
|
34 |
</a>
|
35 |
</p>
|
36 |
</div>
|
10 |
<div class="area">
|
11 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
<h2>
|
13 |
+
<?php esc_html_e('Store your packages in multiple locations with', 'duplicator') ?><br/>
|
14 |
+
<?php esc_html_e('Duplicator Pro', 'duplicator') ?>
|
15 |
</h2>
|
16 |
|
17 |
<div style='text-align: left; margin:auto; width:200px'>
|
18 |
<ul>
|
19 |
+
<li><i class="fa fa-amazon"></i> <?php esc_html_e('Amazon S3', 'duplicator'); ?></li>
|
20 |
+
<li><i class="fa fa-dropbox"></i> <?php esc_html_e(' Dropbox', 'duplicator'); ?></li>
|
21 |
+
<li><i class="fa fa-google"></i> <?php esc_html_e('Google Drive', 'duplicator'); ?></li>
|
22 |
+
<li><i class="fa fa-upload"></i> <?php esc_html_e('FTP & SFTP', 'duplicator'); ?></li>
|
23 |
+
<li><i class="fa fa-cloud"></i> <?php esc_html_e('OneDrive', 'duplicator'); ?></li>
|
24 |
+
<li><i class="fa fa-folder-open-o"></i> <?php esc_html_e('Custom Directory', 'duplicator'); ?></li>
|
25 |
</ul>
|
26 |
</div>
|
27 |
<?php
|
28 |
+
esc_html_e('Set up a one-time storage location and automatically', 'duplicator');
|
29 |
+
echo '<br/>';
|
30 |
+
esc_html_e('push the package to your destination.', 'duplicator');
|
31 |
?>
|
32 |
</div><br/>
|
33 |
|
34 |
<p style="text-align:center">
|
35 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_storage&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
36 |
+
<?php esc_html_e('Learn More', 'duplicator') ?>
|
37 |
</a>
|
38 |
</p>
|
39 |
</div>
|
views/tools/controller.php
CHANGED
@@ -8,7 +8,7 @@ global $wpdb;
|
|
8 |
//COMMON HEADER DISPLAY
|
9 |
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
10 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
11 |
-
$current_tab = isset($_REQUEST['tab']) ?
|
12 |
?>
|
13 |
|
14 |
<style>
|
@@ -18,8 +18,32 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'diagnosti
|
|
18 |
<?php
|
19 |
|
20 |
$installer_files = DUP_Server::getInstallerFiles();
|
21 |
-
$package_name = (isset($_GET['package'])) ?
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
$txt_found = __('File Found: Unable to remove', 'duplicator');
|
25 |
$txt_removed = __('File Removed', 'duplicator');
|
@@ -53,10 +77,10 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
53 |
$action_response = __('Build cache removed.', 'duplicator');
|
54 |
break;
|
55 |
}
|
56 |
-
|
57 |
if ($_GET['action'] != 'display') : ?>
|
58 |
<div id="message" class="notice notice-success is-dismissible">
|
59 |
-
<p><b><?php echo $action_response; ?></b></p>
|
60 |
<?php if ( $_GET['action'] == 'installer') : ?>
|
61 |
<?php
|
62 |
$html = "";
|
@@ -69,10 +93,12 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
69 |
if (false !== stripos($file, '[hash]')) {
|
70 |
$glob_files = glob($path);
|
71 |
if (!empty($glob_files)) {
|
|
|
72 |
$file_path = $glob_files[0];
|
73 |
}
|
74 |
} elseif (file_exists($path)) {
|
75 |
-
$
|
|
|
76 |
}
|
77 |
|
78 |
if (!empty($file_path)) {
|
@@ -94,9 +120,9 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
94 |
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
95 |
if ($path_parts == "zip" && !is_dir($package_path)) {
|
96 |
$html .= (@unlink($package_path))
|
97 |
-
? "<div class='success'><i class='fa fa-check'></i>
|
98 |
-
: "<div class='failed'><i class='fa fa-exclamation-triangle'></i>
|
99 |
-
}
|
100 |
}
|
101 |
|
102 |
echo $html;
|
@@ -108,13 +134,13 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
108 |
}
|
109 |
?>
|
110 |
<div style="font-style: italic; max-width:1000px; padding-top:15px">
|
111 |
-
<b><?php
|
112 |
-
<?php
|
113 |
. ' or FTP. Please remove all installer files to avoid any security issues on this site. For more details please visit '
|
114 |
. 'the FAQ link <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-295-q" target="_blank">Which files need to be removed after an install?</a>', 'duplicator')?>
|
115 |
<br/><br/>
|
116 |
</div>
|
117 |
-
|
118 |
<?php endif; ?>
|
119 |
</div>
|
120 |
<?php endif;
|
@@ -150,8 +176,8 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
150 |
}
|
151 |
|
152 |
if (! DUP_Server::hasInstallerFiles()) {
|
153 |
-
echo "<div class='notice notice-success cleanup-notice'><p><b class='title'><i class='fa fa-check-circle'></i>
|
154 |
-
. "<div class='notice-safemode'>
|
155 |
}
|
156 |
|
157 |
delete_option("duplicator_exe_safe_mode");
|
@@ -160,12 +186,12 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
160 |
?>
|
161 |
|
162 |
<div class="wrap">
|
163 |
-
|
164 |
<?php duplicator_header(__("Tools", 'duplicator')) ?>
|
165 |
|
166 |
-
<h2 class="nav-tab-wrapper">
|
167 |
-
<a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php
|
168 |
-
<a href="?page=duplicator-tools&tab=templates" class="nav-tab <?php echo ($current_tab == 'templates') ? 'nav-tab-active' : '' ?>"> <?php
|
169 |
</h2>
|
170 |
|
171 |
<?php
|
8 |
//COMMON HEADER DISPLAY
|
9 |
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
10 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
11 |
+
$current_tab = isset($_REQUEST['tab']) ? sanitize_text_field($_REQUEST['tab']) : 'diagnostics';
|
12 |
?>
|
13 |
|
14 |
<style>
|
18 |
<?php
|
19 |
|
20 |
$installer_files = DUP_Server::getInstallerFiles();
|
21 |
+
$package_name = (isset($_GET['package'])) ? sanitize_text_field($_GET['package']) : '';
|
22 |
+
|
23 |
+
if (empty($package_name)) {
|
24 |
+
$installer_file_path = DUPLICATOR_WPROOTPATH . 'installer.php';
|
25 |
+
if (file_exists($installer_file_path)) {
|
26 |
+
$installer_file_data = file_get_contents($installer_file_path);
|
27 |
+
$start_pos = strpos($installer_file_data, '$GLOBALS[\'FW_PACKAGE_NAME\'] = \'');
|
28 |
+
|
29 |
+
if (false !== $start_pos) {
|
30 |
+
$end_pos = stripos($installer_file_data, "';", $start_pos);
|
31 |
+
$substr_start_pos = $start_pos + 32;
|
32 |
+
$substr_len = ($end_pos - $start_pos - 32);
|
33 |
+
|
34 |
+
$temp_archive_file = substr($installer_file_data, $substr_start_pos, $substr_len);
|
35 |
+
|
36 |
+
if (!empty($temp_archive_file)) {
|
37 |
+
$temp_archive_file_path = DUPLICATOR_WPROOTPATH . $temp_archive_file;
|
38 |
+
if (file_exists($temp_archive_file_path)) {
|
39 |
+
$package_name = $temp_archive_file;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
$package_path = (isset($package_name)) ? DUPLICATOR_WPROOTPATH . $package_name : '';
|
47 |
|
48 |
$txt_found = __('File Found: Unable to remove', 'duplicator');
|
49 |
$txt_removed = __('File Removed', 'duplicator');
|
77 |
$action_response = __('Build cache removed.', 'duplicator');
|
78 |
break;
|
79 |
}
|
80 |
+
|
81 |
if ($_GET['action'] != 'display') : ?>
|
82 |
<div id="message" class="notice notice-success is-dismissible">
|
83 |
+
<p><b><?php echo esc_html($action_response); ?></b></p>
|
84 |
<?php if ( $_GET['action'] == 'installer') : ?>
|
85 |
<?php
|
86 |
$html = "";
|
93 |
if (false !== stripos($file, '[hash]')) {
|
94 |
$glob_files = glob($path);
|
95 |
if (!empty($glob_files)) {
|
96 |
+
$installer_file_found = true;
|
97 |
$file_path = $glob_files[0];
|
98 |
}
|
99 |
} elseif (file_exists($path)) {
|
100 |
+
$installer_file_found = true;
|
101 |
+
$file_path = $path;
|
102 |
}
|
103 |
|
104 |
if (!empty($file_path)) {
|
120 |
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
121 |
if ($path_parts == "zip" && !is_dir($package_path)) {
|
122 |
$html .= (@unlink($package_path))
|
123 |
+
? "<div class='success'><i class='fa fa-check'></i> ".esc_html($txt_removed)." - ".esc_html($package_path)."</div>"
|
124 |
+
: "<div class='failed'><i class='fa fa-exclamation-triangle'></i> ".esc_html($txt_found)." - ".esc_html($package_path)."</div>";
|
125 |
+
}
|
126 |
}
|
127 |
|
128 |
echo $html;
|
134 |
}
|
135 |
?>
|
136 |
<div style="font-style: italic; max-width:1000px; padding-top:15px">
|
137 |
+
<b><?php esc_html_e('Security Notes', 'duplicator')?>:</b>
|
138 |
+
<?php _e('If the installer files do not successfully get removed with this action, then they WILL need to be removed manually through your hosts control panel '
|
139 |
. ' or FTP. Please remove all installer files to avoid any security issues on this site. For more details please visit '
|
140 |
. 'the FAQ link <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-295-q" target="_blank">Which files need to be removed after an install?</a>', 'duplicator')?>
|
141 |
<br/><br/>
|
142 |
</div>
|
143 |
+
|
144 |
<?php endif; ?>
|
145 |
</div>
|
146 |
<?php endif;
|
176 |
}
|
177 |
|
178 |
if (! DUP_Server::hasInstallerFiles()) {
|
179 |
+
echo "<div class='notice notice-success cleanup-notice'><p><b class='title'><i class='fa fa-check-circle'></i> ".esc_html($safe_title)."</b> "
|
180 |
+
. "<div class='notice-safemode'>".esc_html($safe_msg)."</p></div></div>";
|
181 |
}
|
182 |
|
183 |
delete_option("duplicator_exe_safe_mode");
|
186 |
?>
|
187 |
|
188 |
<div class="wrap">
|
189 |
+
|
190 |
<?php duplicator_header(__("Tools", 'duplicator')) ?>
|
191 |
|
192 |
+
<h2 class="nav-tab-wrapper">
|
193 |
+
<a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Diagnostics', 'duplicator'); ?></a>
|
194 |
+
<a href="?page=duplicator-tools&tab=templates" class="nav-tab <?php echo ($current_tab == 'templates') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Templates', 'duplicator'); ?></a>
|
195 |
</h2>
|
196 |
|
197 |
<?php
|
views/tools/diagnostics/inc.data.php
CHANGED
@@ -12,7 +12,7 @@ OPTIONS DATA -->
|
|
12 |
<?php _e("Stored Data", 'duplicator'); ?>
|
13 |
<div class="dup-box-arrow"></div>
|
14 |
</div>
|
15 |
-
<div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
|
16 |
<div style="padding-left:10px">
|
17 |
<h3 class="title"><?php _e('Data Cleanup', 'duplicator') ?></h3>
|
18 |
<table class="dup-reset-opts">
|
@@ -32,6 +32,7 @@ OPTIONS DATA -->
|
|
32 |
. "be left on production systems for security reasons. Below are the files that should be removed.", 'duplicator');
|
33 |
echo "<br/><br/>";
|
34 |
$installer_files = array_keys($installer_files);
|
|
|
35 |
array_push($installer_files, '[HASH]_archive.zip');
|
36 |
echo '<i>' . implode('<br/>', $installer_files) . '</i>';
|
37 |
echo "<br/><br/>";
|
@@ -65,11 +66,11 @@ OPTIONS DATA -->
|
|
65 |
<td>
|
66 |
<?php
|
67 |
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
68 |
-
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.ConfirmDeleteOption(this)'>
|
69 |
-
: $row->option_name;
|
70 |
?>
|
71 |
</td>
|
72 |
-
<td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
|
73 |
</tr>
|
74 |
<?php } ?>
|
75 |
</tbody>
|
@@ -103,7 +104,7 @@ jQuery(document).ready(function($)
|
|
103 |
Duplicator.Settings.ConfirmDeleteOption = function (anchor)
|
104 |
{
|
105 |
var key = $(anchor).text();
|
106 |
-
var msg_id = '<?php echo $confirm1->getMessageID() ?>';
|
107 |
var msg = '<?php _e('Delete the option value', 'duplicator');?>' + ' [' + key + '] ?';
|
108 |
jQuery('#dup-settings-form-action').val(key);
|
109 |
jQuery('#' + msg_id).html(msg)
|
@@ -123,7 +124,7 @@ jQuery(document).ready(function($)
|
|
123 |
|
124 |
Duplicator.Tools.ClearBuildCache = function ()
|
125 |
{
|
126 |
-
window.location = '?page=duplicator-tools&tab=diagnostics&action=tmp-cache&_wpnonce
|
127 |
}
|
128 |
});
|
129 |
|
@@ -131,8 +132,8 @@ jQuery(document).ready(function($)
|
|
131 |
Duplicator.Tools.deleteInstallerFiles = function()
|
132 |
{
|
133 |
<?php
|
134 |
-
$url = "?page=duplicator-tools&tab=diagnostics&action=installer&_wpnonce={$nonce}&package=
|
135 |
-
echo "window.location = '
|
136 |
?>
|
137 |
}
|
138 |
</script>
|
12 |
<?php _e("Stored Data", 'duplicator'); ?>
|
13 |
<div class="dup-box-arrow"></div>
|
14 |
</div>
|
15 |
+
<div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo esc_attr($ui_css_opts_panel); ?>">
|
16 |
<div style="padding-left:10px">
|
17 |
<h3 class="title"><?php _e('Data Cleanup', 'duplicator') ?></h3>
|
18 |
<table class="dup-reset-opts">
|
32 |
. "be left on production systems for security reasons. Below are the files that should be removed.", 'duplicator');
|
33 |
echo "<br/><br/>";
|
34 |
$installer_files = array_keys($installer_files);
|
35 |
+
$installer_files = array_map('esc_html', $installer_files);
|
36 |
array_push($installer_files, '[HASH]_archive.zip');
|
37 |
echo '<i>' . implode('<br/>', $installer_files) . '</i>';
|
38 |
echo "<br/><br/>";
|
66 |
<td>
|
67 |
<?php
|
68 |
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
69 |
+
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.ConfirmDeleteOption(this)'>".esc_js($row->option_name)."</a>"
|
70 |
+
: esc_textarea($row->option_name);
|
71 |
?>
|
72 |
</td>
|
73 |
+
<td><textarea class="dup-opts-read" readonly="readonly"><?php echo esc_textarea($row->option_value); ?></textarea></td>
|
74 |
</tr>
|
75 |
<?php } ?>
|
76 |
</tbody>
|
104 |
Duplicator.Settings.ConfirmDeleteOption = function (anchor)
|
105 |
{
|
106 |
var key = $(anchor).text();
|
107 |
+
var msg_id = '<?php echo esc_js($confirm1->getMessageID()); ?>';
|
108 |
var msg = '<?php _e('Delete the option value', 'duplicator');?>' + ' [' + key + '] ?';
|
109 |
jQuery('#dup-settings-form-action').val(key);
|
110 |
jQuery('#' + msg_id).html(msg)
|
124 |
|
125 |
Duplicator.Tools.ClearBuildCache = function ()
|
126 |
{
|
127 |
+
window.location = "<?php echo esc_js(esc_url('?page=duplicator-tools&tab=diagnostics&action=tmp-cache&_wpnonce='.$nonce));?>";
|
128 |
}
|
129 |
});
|
130 |
|
132 |
Duplicator.Tools.deleteInstallerFiles = function()
|
133 |
{
|
134 |
<?php
|
135 |
+
$url = "?page=duplicator-tools&tab=diagnostics&action=installer&_wpnonce={$nonce}&package=".esc_js($package_name);
|
136 |
+
echo "window.location = '".$url."';";
|
137 |
?>
|
138 |
}
|
139 |
</script>
|
views/tools/diagnostics/inc.phpinfo.php
CHANGED
@@ -16,7 +16,7 @@ PHP INFORMATION -->
|
|
16 |
<div class="dup-box">
|
17 |
<div class="dup-box-title">
|
18 |
<i class="fa fa-info-circle"></i>
|
19 |
-
<?php
|
20 |
<div class="dup-box-arrow"></div>
|
21 |
</div>
|
22 |
<div class="dup-box-panel" style="display:none">
|
16 |
<div class="dup-box">
|
17 |
<div class="dup-box-title">
|
18 |
<i class="fa fa-info-circle"></i>
|
19 |
+
<?php esc_html_e("PHP Information", 'duplicator'); ?>
|
20 |
<div class="dup-box-arrow"></div>
|
21 |
</div>
|
22 |
<div class="dup-box-panel" style="display:none">
|
views/tools/diagnostics/inc.settings.php
CHANGED
@@ -19,119 +19,122 @@ SERVER SETTINGS -->
|
|
19 |
<div class="dup-box">
|
20 |
<div class="dup-box-title">
|
21 |
<i class="fa fa-tachometer"></i>
|
22 |
-
<?php
|
23 |
<div class="dup-box-arrow"></div>
|
24 |
</div>
|
25 |
-
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel
|
26 |
<table class="widefat" cellspacing="0">
|
27 |
<tr>
|
28 |
-
<td class='dup-settings-diag-header' colspan="2"><?php
|
29 |
</tr>
|
30 |
<tr>
|
31 |
-
<td><?php
|
32 |
-
<td><?php echo DUPLICATOR_VERSION ?></td>
|
33 |
</tr>
|
34 |
<tr>
|
35 |
-
<td><?php
|
36 |
-
<td><?php echo PHP_OS ?></td>
|
37 |
</tr>
|
38 |
<tr>
|
39 |
-
<td><?php
|
40 |
-
<td><?php echo
|
41 |
</tr>
|
42 |
<tr>
|
43 |
-
<td><?php
|
44 |
-
<td><?php echo date("Y-m-d H:i:s"); ?></td>
|
45 |
</tr>
|
46 |
<tr>
|
47 |
-
<td><?php
|
48 |
-
<td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
|
49 |
</tr>
|
50 |
<tr>
|
51 |
-
<td><?php
|
52 |
<td><?php echo DUP_Util::runAPC() ? 'Yes' : 'No' ?></td>
|
53 |
</tr>
|
54 |
<tr>
|
55 |
-
<td><?php
|
56 |
-
<td><?php echo DUPLICATOR_WPROOTPATH ?></td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
-
<td><?php
|
60 |
-
<td><?php echo ABSPATH ?></td>
|
61 |
</tr>
|
62 |
<tr>
|
63 |
-
<td><?php
|
64 |
-
<td><?php echo DUP_Util::safePath(WP_PLUGIN_DIR) ?></td>
|
65 |
</tr>
|
66 |
<tr>
|
67 |
-
<td><?php
|
68 |
<td><?php echo php_ini_loaded_file() ;?></td>
|
69 |
</tr>
|
70 |
<tr>
|
71 |
-
<td><?php
|
72 |
-
<td><?php echo $_SERVER['SERVER_ADDR'];?></td>
|
73 |
</tr>
|
74 |
<tr>
|
75 |
-
<td><?php
|
76 |
-
<td><?php echo $client_ip_address;?></td>
|
77 |
</tr>
|
78 |
<tr>
|
79 |
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
|
80 |
</tr>
|
81 |
<tr>
|
82 |
-
<td><?php
|
83 |
-
<td><?php echo $wp_version ?></td>
|
84 |
</tr>
|
85 |
<tr>
|
86 |
-
<td><?php
|
87 |
-
<td><?php
|
88 |
</tr>
|
89 |
<tr>
|
90 |
-
<td><?php
|
91 |
-
<td><?php
|
92 |
</tr>
|
93 |
<tr>
|
94 |
-
<td><?php
|
95 |
-
<td><?php echo WP_MEMORY_LIMIT ?> (<?php
|
96 |
</tr>
|
97 |
<tr>
|
98 |
<td class='dup-settings-diag-header' colspan="2">PHP</td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
-
<td><?php
|
102 |
-
<td><?php echo phpversion() ?></td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
<td>SAPI</td>
|
106 |
-
<td><?php echo PHP_SAPI ?></td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
-
<td><?php
|
110 |
-
<td><?php
|
|
|
|
|
|
|
111 |
</tr>
|
112 |
<tr>
|
113 |
-
<td><?php
|
114 |
<td><?php echo DUP_Util::getProcessOwner(); ?></td>
|
115 |
</tr>
|
116 |
<tr>
|
117 |
-
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php
|
118 |
<td>
|
119 |
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
|
120 |
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
|
121 |
-
?
|
122 |
?>
|
123 |
</td>
|
124 |
</tr>
|
125 |
<tr>
|
126 |
-
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php
|
127 |
<td><?php echo @ini_get('memory_limit') ?></td>
|
128 |
</tr>
|
129 |
<tr>
|
130 |
-
<td><?php
|
131 |
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
|
132 |
</tr>
|
133 |
<tr>
|
134 |
-
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php
|
135 |
<td>
|
136 |
<?php
|
137 |
echo @ini_get('max_execution_time');
|
@@ -140,63 +143,63 @@ SERVER SETTINGS -->
|
|
140 |
echo " (default) - {$try_update}";
|
141 |
?>
|
142 |
<i class="fa fa-question-circle data-size-help"
|
143 |
-
data-tooltip-title="<?php
|
144 |
-
data-tooltip="<?php
|
145 |
. 'If the value is fixed then PHP will not be allowed to run longer than the default.', 'duplicator'); ?>"></i>
|
146 |
</td>
|
147 |
</tr>
|
148 |
<tr>
|
149 |
-
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php
|
150 |
-
<td><?php echo (DUP_Util::hasShellExec()) ?
|
151 |
</tr>
|
152 |
<tr>
|
153 |
-
<td><?php
|
154 |
-
<td><?php echo (DUP_Util::getZipPath() != null) ?
|
155 |
</tr>
|
156 |
<tr>
|
157 |
-
<td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php
|
158 |
-
<td><?php echo extension_loaded('suhosin') ?
|
159 |
</tr>
|
160 |
<tr>
|
161 |
-
<td><?php
|
162 |
-
<td><?php echo $error_log_path; ?></td>
|
163 |
</tr>
|
164 |
<tr>
|
165 |
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
166 |
</tr>
|
167 |
<tr>
|
168 |
-
<td><?php
|
169 |
<td><?php echo DUP_DB::getVersion() ?></td>
|
170 |
</tr>
|
171 |
<tr>
|
172 |
-
<td><?php
|
173 |
-
<td><?php echo DUP_DB::getVariable('version_comment') ?></td>
|
174 |
</tr>
|
175 |
<tr>
|
176 |
-
<td><?php
|
177 |
-
<td><?php echo DB_CHARSET ?></td>
|
178 |
</tr>
|
179 |
<tr>
|
180 |
-
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php
|
181 |
-
<td><?php echo $dbvar_maxtime ?></td>
|
182 |
</tr>
|
183 |
<tr>
|
184 |
-
<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php
|
185 |
-
<td><?php echo $dbvar_maxpacks ?></td>
|
186 |
</tr>
|
187 |
<tr>
|
188 |
-
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php
|
189 |
-
<td><?php echo $mysqlDumpSupport ?></td>
|
190 |
</tr>
|
191 |
<tr>
|
192 |
-
<td class='dup-settings-diag-header' colspan="2"><?php
|
193 |
</tr>
|
194 |
<tr valign="top">
|
195 |
-
<td><?php
|
196 |
-
<td><?php echo $perc;?>% -- <?php echo DUP_Util::byteSize($space_free);?> from <?php echo DUP_Util::byteSize($space);?><br/>
|
197 |
<small>
|
198 |
-
<?php
|
199 |
-
<?php
|
200 |
</small>
|
201 |
</td>
|
202 |
</tr>
|
19 |
<div class="dup-box">
|
20 |
<div class="dup-box-title">
|
21 |
<i class="fa fa-tachometer"></i>
|
22 |
+
<?php esc_html_e("Server Settings", 'duplicator') ?>
|
23 |
<div class="dup-box-arrow"></div>
|
24 |
</div>
|
25 |
+
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo esc_attr($ui_css_srv_panel);?>">
|
26 |
<table class="widefat" cellspacing="0">
|
27 |
<tr>
|
28 |
+
<td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("General", 'duplicator'); ?></td>
|
29 |
</tr>
|
30 |
<tr>
|
31 |
+
<td><?php esc_html_e("Duplicator Version", 'duplicator'); ?></td>
|
32 |
+
<td><?php echo esc_html(DUPLICATOR_VERSION); ?></td>
|
33 |
</tr>
|
34 |
<tr>
|
35 |
+
<td><?php esc_html_e("Operating System", 'duplicator'); ?></td>
|
36 |
+
<td><?php echo esc_html(PHP_OS); ?></td>
|
37 |
</tr>
|
38 |
<tr>
|
39 |
+
<td><?php esc_html_e("Timezone", 'duplicator'); ?></td>
|
40 |
+
<td><?php echo esc_html(date_default_timezone_get()) ; ?> <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
|
41 |
</tr>
|
42 |
<tr>
|
43 |
+
<td><?php esc_html_e("Server Time", 'duplicator'); ?></td>
|
44 |
+
<td><?php echo esc_html(date("Y-m-d H:i:s")); ?></td>
|
45 |
</tr>
|
46 |
<tr>
|
47 |
+
<td><?php esc_html_e("Web Server", 'duplicator'); ?></td>
|
48 |
+
<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
|
49 |
</tr>
|
50 |
<tr>
|
51 |
+
<td><?php esc_html_e("APC Enabled", 'duplicator'); ?></td>
|
52 |
<td><?php echo DUP_Util::runAPC() ? 'Yes' : 'No' ?></td>
|
53 |
</tr>
|
54 |
<tr>
|
55 |
+
<td><?php esc_html_e("Root Path", 'duplicator'); ?></td>
|
56 |
+
<td><?php echo esc_html(DUPLICATOR_WPROOTPATH); ?></td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
+
<td><?php esc_html_e("ABSPATH", 'duplicator'); ?></td>
|
60 |
+
<td><?php echo esc_html(ABSPATH); ?></td>
|
61 |
</tr>
|
62 |
<tr>
|
63 |
+
<td><?php esc_html_e("Plugins Path", 'duplicator'); ?></td>
|
64 |
+
<td><?php echo esc_html(DUP_Util::safePath(WP_PLUGIN_DIR)); ?></td>
|
65 |
</tr>
|
66 |
<tr>
|
67 |
+
<td><?php esc_html_e("Loaded PHP INI", 'duplicator'); ?></td>
|
68 |
<td><?php echo php_ini_loaded_file() ;?></td>
|
69 |
</tr>
|
70 |
<tr>
|
71 |
+
<td><?php esc_html_e("Server IP", 'duplicator'); ?></td>
|
72 |
+
<td><?php echo esc_html($_SERVER['SERVER_ADDR']);?></td>
|
73 |
</tr>
|
74 |
<tr>
|
75 |
+
<td><?php esc_html_e("Client IP", 'duplicator'); ?></td>
|
76 |
+
<td><?php echo esc_html($client_ip_address);?></td>
|
77 |
</tr>
|
78 |
<tr>
|
79 |
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
|
80 |
</tr>
|
81 |
<tr>
|
82 |
+
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
|
83 |
+
<td><?php echo esc_html($wp_version); ?></td>
|
84 |
</tr>
|
85 |
<tr>
|
86 |
+
<td><?php esc_html_e("Language", 'duplicator'); ?></td>
|
87 |
+
<td><?php bloginfo('language') ?></td>
|
88 |
</tr>
|
89 |
<tr>
|
90 |
+
<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
|
91 |
+
<td><?php bloginfo('charset') ?></td>
|
92 |
</tr>
|
93 |
<tr>
|
94 |
+
<td><?php esc_html_e("Memory Limit ", 'duplicator'); ?></td>
|
95 |
+
<td><?php echo WP_MEMORY_LIMIT ?> (<?php esc_html_e("Max", 'duplicator'); echo ' ' . esc_html(WP_MAX_MEMORY_LIMIT); ?>)</td>
|
96 |
</tr>
|
97 |
<tr>
|
98 |
<td class='dup-settings-diag-header' colspan="2">PHP</td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
+
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
|
102 |
+
<td><?php echo esc_html(phpversion()); ?></td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
<td>SAPI</td>
|
106 |
+
<td><?php echo esc_html(PHP_SAPI); ?></td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
+
<td><?php esc_html_e("User", 'duplicator'); ?></td>
|
110 |
+
<td><?php
|
111 |
+
$currentUser = DUP_Util::getCurrentUser();
|
112 |
+
echo esc_html($currentUser);
|
113 |
+
?></td>
|
114 |
</tr>
|
115 |
<tr>
|
116 |
+
<td><?php esc_html_e("Process", 'duplicator'); ?></td>
|
117 |
<td><?php echo DUP_Util::getProcessOwner(); ?></td>
|
118 |
</tr>
|
119 |
<tr>
|
120 |
+
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php esc_html_e("Safe Mode", 'duplicator'); ?></a></td>
|
121 |
<td>
|
122 |
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
|
123 |
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
|
124 |
+
? esc_html__('On', 'duplicator') : esc_html__('Off', 'duplicator');
|
125 |
?>
|
126 |
</td>
|
127 |
</tr>
|
128 |
<tr>
|
129 |
+
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php esc_html_e("Memory Limit", 'duplicator'); ?></a></td>
|
130 |
<td><?php echo @ini_get('memory_limit') ?></td>
|
131 |
</tr>
|
132 |
<tr>
|
133 |
+
<td><?php esc_html_e("Memory In Use", 'duplicator'); ?></td>
|
134 |
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
|
135 |
</tr>
|
136 |
<tr>
|
137 |
+
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php esc_html_e("Max Execution Time", 'duplicator'); ?></a></td>
|
138 |
<td>
|
139 |
<?php
|
140 |
echo @ini_get('max_execution_time');
|
143 |
echo " (default) - {$try_update}";
|
144 |
?>
|
145 |
<i class="fa fa-question-circle data-size-help"
|
146 |
+
data-tooltip-title="<?php esc_html_e("Max Execution Time", 'duplicator'); ?>"
|
147 |
+
data-tooltip="<?php esc_html_e('If the value shows dynamic then this means its possible for PHP to run longer than the default. '
|
148 |
. 'If the value is fixed then PHP will not be allowed to run longer than the default.', 'duplicator'); ?>"></i>
|
149 |
</td>
|
150 |
</tr>
|
151 |
<tr>
|
152 |
+
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php esc_html_e("Shell Exec", 'duplicator'); ?></a></td>
|
153 |
+
<td><?php echo (DUP_Util::hasShellExec()) ? esc_html_e("Is Supported", 'duplicator') : esc_html_e("Not Supported", 'duplicator'); ?></td>
|
154 |
</tr>
|
155 |
<tr>
|
156 |
+
<td><?php esc_html_e("Shell Exec Zip", 'duplicator'); ?></td>
|
157 |
+
<td><?php echo (DUP_Util::getZipPath() != null) ? esc_html_e("Is Supported", 'duplicator') : esc_html_e("Not Supported", 'duplicator'); ?></td>
|
158 |
</tr>
|
159 |
<tr>
|
160 |
+
<td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php esc_html_e("Suhosin Extension", 'duplicator'); ?></a></td>
|
161 |
+
<td><?php echo extension_loaded('suhosin') ? esc_html_e("Enabled", 'duplicator') : esc_html_e("Disabled", 'duplicator'); ?></td>
|
162 |
</tr>
|
163 |
<tr>
|
164 |
+
<td><?php esc_html_e("Error Log File ", 'duplicator'); ?></td>
|
165 |
+
<td><?php echo esc_html($error_log_path); ?></td>
|
166 |
</tr>
|
167 |
<tr>
|
168 |
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
169 |
</tr>
|
170 |
<tr>
|
171 |
+
<td><?php esc_html_e("Version", 'duplicator'); ?></td>
|
172 |
<td><?php echo DUP_DB::getVersion() ?></td>
|
173 |
</tr>
|
174 |
<tr>
|
175 |
+
<td><?php esc_html_e("Comments", 'duplicator'); ?></td>
|
176 |
+
<td><?php echo esc_html(DUP_DB::getVariable('version_comment')); ?></td>
|
177 |
</tr>
|
178 |
<tr>
|
179 |
+
<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
|
180 |
+
<td><?php echo esc_html(DB_CHARSET); ?></td>
|
181 |
</tr>
|
182 |
<tr>
|
183 |
+
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php esc_html_e("Wait Timeout", 'duplicator'); ?></a></td>
|
184 |
+
<td><?php echo esc_html($dbvar_maxtime); ?></td>
|
185 |
</tr>
|
186 |
<tr>
|
187 |
+
<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php esc_html_e("Max Allowed Packets", 'duplicator'); ?></a></td>
|
188 |
+
<td><?php echo esc_html($dbvar_maxpacks); ?></td>
|
189 |
</tr>
|
190 |
<tr>
|
191 |
+
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php esc_html_e("msyqldump Path", 'duplicator'); ?></a></td>
|
192 |
+
<td><?php echo esc_html($mysqlDumpSupport); ?></td>
|
193 |
</tr>
|
194 |
<tr>
|
195 |
+
<td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("Server Disk", 'duplicator'); ?></td>
|
196 |
</tr>
|
197 |
<tr valign="top">
|
198 |
+
<td><?php esc_html_e('Free space', 'hyper-cache'); ?></td>
|
199 |
+
<td><?php echo esc_html($perc);?>% -- <?php echo esc_html(DUP_Util::byteSize($space_free));?> from <?php echo esc_html(DUP_Util::byteSize($space));?><br/>
|
200 |
<small>
|
201 |
+
<?php esc_html_e("Note: This value is the physical servers hard-drive allocation.", 'duplicator'); ?> <br/>
|
202 |
+
<?php esc_html_e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'duplicator'); ?>
|
203 |
</small>
|
204 |
</td>
|
205 |
</tr>
|
views/tools/diagnostics/inc.validator.php
CHANGED
@@ -23,22 +23,22 @@ SCAN VALIDATOR -->
|
|
23 |
<div class="dup-box">
|
24 |
<div class="dup-box-title">
|
25 |
<i class="fa fa-check-square-o"></i>
|
26 |
-
<?php
|
27 |
<div class="dup-box-arrow"></div>
|
28 |
</div>
|
29 |
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
|
30 |
<?php
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
. "The paths below to your file filters to allow the scanner to finish.", "duplicator");
|
36 |
?>
|
37 |
<br/><br/>
|
38 |
|
39 |
|
40 |
<button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.ConfirmScanValidator()">
|
41 |
-
<?php
|
42 |
</button>
|
43 |
|
44 |
<script id="hb-template" type="text/x-handlebars-template">
|
@@ -72,7 +72,7 @@ SCAN VALIDATOR -->
|
|
72 |
{{/each}}
|
73 |
{{else}}
|
74 |
<i>No Sym-links found</i> <br/>
|
75 |
-
<small> <?php
|
76 |
{{/if}}
|
77 |
<br/>
|
78 |
|
@@ -118,7 +118,7 @@ jQuery(document).ready(function($)
|
|
118 |
tb_remove();
|
119 |
var data = {action : 'DUP_CTRL_Tools_runScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
|
120 |
|
121 |
-
$('#hb-result').html('<?php
|
122 |
$('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
123 |
|
124 |
$.ajax({
|
@@ -139,7 +139,7 @@ jQuery(document).ready(function($)
|
|
139 |
var templateScript = Handlebars.compile(template);
|
140 |
var html = templateScript(data);
|
141 |
$('#hb-result').html(html);
|
142 |
-
$('#scan-run-btn').html('<?php
|
143 |
}
|
144 |
});
|
145 |
</script>
|
23 |
<div class="dup-box">
|
24 |
<div class="dup-box-title">
|
25 |
<i class="fa fa-check-square-o"></i>
|
26 |
+
<?php esc_html_e("Scan Validator", 'duplicator'); ?>
|
27 |
<div class="dup-box-arrow"></div>
|
28 |
</div>
|
29 |
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
|
30 |
<?php
|
31 |
+
esc_html_e("This utility will help to find unreadable files and sys-links in your environment that can lead to issues during the scan process. ", "duplicator");
|
32 |
+
esc_html_e("The utility will also shows how many files and directories you have in your system. This process may take several minutes to run. ", "duplicator");
|
33 |
+
esc_html_e("If there is a recursive loop on your system then the process has a built in check to stop after a large set of files and directories have been scanned. ", "duplicator");
|
34 |
+
esc_html_e("A message will show indicated that that a scan depth has been reached. If you have issues with the package scanner (step 2) during the build process then try to add "
|
35 |
. "The paths below to your file filters to allow the scanner to finish.", "duplicator");
|
36 |
?>
|
37 |
<br/><br/>
|
38 |
|
39 |
|
40 |
<button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.ConfirmScanValidator()">
|
41 |
+
<?php esc_html_e("Run Scan Integrity Validation", "duplicator"); ?>
|
42 |
</button>
|
43 |
|
44 |
<script id="hb-template" type="text/x-handlebars-template">
|
72 |
{{/each}}
|
73 |
{{else}}
|
74 |
<i>No Sym-links found</i> <br/>
|
75 |
+
<small> <?php esc_html_e("Note: Symlinks are not discoverable on Windows OS with PHP", "duplicator"); ?></small> <br/>
|
76 |
{{/if}}
|
77 |
<br/>
|
78 |
|
118 |
tb_remove();
|
119 |
var data = {action : 'DUP_CTRL_Tools_runScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
|
120 |
|
121 |
+
$('#hb-result').html('<?php esc_html_e("Scanning Environment... This may take a few minutes.", "duplicator"); ?>');
|
122 |
$('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
123 |
|
124 |
$.ajax({
|
139 |
var templateScript = Handlebars.compile(template);
|
140 |
var html = templateScript(data);
|
141 |
$('#hb-result').html(html);
|
142 |
+
$('#scan-run-btn').html('<?php echo esc_js(__("Run Scan Integrity Validation", "duplicator")); ?>');
|
143 |
}
|
144 |
});
|
145 |
</script>
|
views/tools/diagnostics/information.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
4 |
|
5 |
<?php if (! empty($action_response)) : ?>
|
6 |
-
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
7 |
<?php endif; ?>
|
8 |
|
9 |
<style>
|
3 |
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
4 |
|
5 |
<?php if (! empty($action_response)) : ?>
|
6 |
+
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo esc_html($action_response); ?></p></div>
|
7 |
<?php endif; ?>
|
8 |
|
9 |
<style>
|
views/tools/diagnostics/logging.php
CHANGED
@@ -41,7 +41,7 @@ $logfound = (strlen($logname) > 0) ? true :false;
|
|
41 |
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
|
42 |
td#dup-log-panel-left div.opts {float:right;}
|
43 |
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
44 |
-
|
45 |
|
46 |
/* OPTIONS */
|
47 |
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
|
@@ -88,9 +88,15 @@ jQuery(document).ready(function($)
|
|
88 |
}
|
89 |
|
90 |
Duplicator.Tools.WinResize = function() {
|
91 |
-
var height = $(window).height() -
|
92 |
$("#dup-log-content").css({height: height + 'px'});
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
var duration = 10;
|
96 |
var count = duration;
|
@@ -113,6 +119,8 @@ jQuery(document).ready(function($)
|
|
113 |
function startTimer() {
|
114 |
timerInterval = setInterval(timer, 1000);
|
115 |
}
|
|
|
|
|
116 |
|
117 |
//INIT Events
|
118 |
$(window).resize(Duplicator.Tools.WinResize);
|
@@ -123,6 +131,7 @@ jQuery(document).ready(function($)
|
|
123 |
|
124 |
//INIT
|
125 |
Duplicator.Tools.WinResize();
|
|
|
126 |
<?php if ($refresh) : ?>
|
127 |
//Scroll to Bottom
|
128 |
$("#dup-log-content").load(function () {
|
@@ -143,12 +152,12 @@ jQuery(document).ready(function($)
|
|
143 |
|
144 |
<?php if (! $logfound) : ?>
|
145 |
<div style="padding:20px">
|
146 |
-
<h2><?php
|
147 |
-
<?php
|
148 |
-
<?php
|
149 |
-
- <?php
|
150 |
-
- <?php
|
151 |
-
- <?php
|
152 |
</div>
|
153 |
<?php else: ?>
|
154 |
<table id="dup-log-panels">
|
@@ -157,8 +166,8 @@ jQuery(document).ready(function($)
|
|
157 |
<div class="name">
|
158 |
<i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> |
|
159 |
<i style="cursor: pointer"
|
160 |
-
data-tooltip-title="<?php
|
161 |
-
data-tooltip="<?php
|
162 |
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
163 |
<?php
|
164 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
@@ -168,24 +177,24 @@ jQuery(document).ready(function($)
|
|
168 |
?>
|
169 |
</i>
|
170 |
</div>
|
171 |
-
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php
|
172 |
<br style="clear:both" />
|
173 |
-
|
174 |
</td>
|
175 |
<td id="dup-log-panel-right">
|
176 |
-
<h2><?php
|
177 |
<div class="dup-opts-items">
|
178 |
-
<input type="button" class="button button-small" id="dup-refresh" value="<?php
|
179 |
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
|
180 |
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
|
181 |
-
<?php
|
182 |
[<div id="dup-refresh-count"></div>]
|
183 |
</label>
|
184 |
</div>
|
185 |
|
186 |
<div class="dup-log-hdr">
|
187 |
-
<?php
|
188 |
-
<small><?php
|
189 |
</div>
|
190 |
|
191 |
<div class="dup-log-file-list">
|
@@ -194,11 +203,11 @@ jQuery(document).ready(function($)
|
|
194 |
$active = basename($logurl);
|
195 |
foreach ($logs as $log) {
|
196 |
$time = date('m/d/y h:i:s', filemtime($log));
|
197 |
-
$name =
|
198 |
-
$url = '?page=duplicator-tools&tab=diagnostics§ion=log&logname=' . $name;
|
199 |
echo ($active == $name)
|
200 |
-
? "<span class='dup-log' title='
|
201 |
-
: "<a href='javascript:void(0)' title='
|
202 |
if ($count > 20) break;
|
203 |
}
|
204 |
?>
|
41 |
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
|
42 |
td#dup-log-panel-left div.opts {float:right;}
|
43 |
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
44 |
+
#dup-log-content {padding:5px; background: #fff; min-height:500px; width:99%; border:1px solid silver; overflow:scroll}
|
45 |
|
46 |
/* OPTIONS */
|
47 |
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
|
88 |
}
|
89 |
|
90 |
Duplicator.Tools.WinResize = function() {
|
91 |
+
var height = $(window).height() - 225;
|
92 |
$("#dup-log-content").css({height: height + 'px'});
|
93 |
}
|
94 |
+
|
95 |
+
Duplicator.Tools.readLogfile = function() {
|
96 |
+
$.get('<?php echo esc_url($logurl); ?>', function(data) {
|
97 |
+
$('#dup-log-content').text(data);
|
98 |
+
}, 'text');
|
99 |
+
};
|
100 |
|
101 |
var duration = 10;
|
102 |
var count = duration;
|
119 |
function startTimer() {
|
120 |
timerInterval = setInterval(timer, 1000);
|
121 |
}
|
122 |
+
|
123 |
+
|
124 |
|
125 |
//INIT Events
|
126 |
$(window).resize(Duplicator.Tools.WinResize);
|
131 |
|
132 |
//INIT
|
133 |
Duplicator.Tools.WinResize();
|
134 |
+
Duplicator.Tools.readLogfile();
|
135 |
<?php if ($refresh) : ?>
|
136 |
//Scroll to Bottom
|
137 |
$("#dup-log-content").load(function () {
|
152 |
|
153 |
<?php if (! $logfound) : ?>
|
154 |
<div style="padding:20px">
|
155 |
+
<h2><?php esc_html_e("Log file not found or unreadable", 'duplicator') ?>.</h2>
|
156 |
+
<?php esc_html_e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
|
157 |
+
<?php esc_html_e("Reasons for log file not showing", 'duplicator') ?>: <br/>
|
158 |
+
- <?php esc_html_e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
|
159 |
+
- <?php esc_html_e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
|
160 |
+
- <?php esc_html_e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
|
161 |
</div>
|
162 |
<?php else: ?>
|
163 |
<table id="dup-log-panels">
|
166 |
<div class="name">
|
167 |
<i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> |
|
168 |
<i style="cursor: pointer"
|
169 |
+
data-tooltip-title="<?php esc_attr_e("Host Recommendation:", 'duplicator'); ?>"
|
170 |
+
data-tooltip="<?php esc_attr_e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
171 |
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
172 |
<?php
|
173 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
177 |
?>
|
178 |
</i>
|
179 |
</div>
|
180 |
+
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php esc_html_e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> </div>
|
181 |
<br style="clear:both" />
|
182 |
+
<pre id="dup-log-content"></pre>
|
183 |
</td>
|
184 |
<td id="dup-log-panel-right">
|
185 |
+
<h2><?php esc_html_e("Options", 'duplicator') ?> </h2>
|
186 |
<div class="dup-opts-items">
|
187 |
+
<input type="button" class="button button-small" id="dup-refresh" value="<?php esc_attr_e("Refresh", 'duplicator') ?>" />
|
188 |
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
|
189 |
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
|
190 |
+
<?php esc_html_e("Auto Refresh", 'duplicator') ?>
|
191 |
[<div id="dup-refresh-count"></div>]
|
192 |
</label>
|
193 |
</div>
|
194 |
|
195 |
<div class="dup-log-hdr">
|
196 |
+
<?php esc_html_e("Package Logs", 'duplicator') ?>
|
197 |
+
<small><?php esc_html_e("Top 20", 'duplicator') ?></small>
|
198 |
</div>
|
199 |
|
200 |
<div class="dup-log-file-list">
|
203 |
$active = basename($logurl);
|
204 |
foreach ($logs as $log) {
|
205 |
$time = date('m/d/y h:i:s', filemtime($log));
|
206 |
+
$name = basename($log);
|
207 |
+
$url = '?page=duplicator-tools&tab=diagnostics§ion=log&logname=' . esc_js($name);
|
208 |
echo ($active == $name)
|
209 |
+
? "<span class='dup-log' title='".esc_attr($name)."'>".esc_attr($time)."-".esc_html($name)."</span>"
|
210 |
+
: "<a href='javascript:void(0)' title='".esc_html($name)."' onclick='Duplicator.Tools.GetLog(\"".esc_js($url)."\")'>".esc_html($time)."-".esc_html($name)."</a>";
|
211 |
if ($count > 20) break;
|
212 |
}
|
213 |
?>
|
views/tools/diagnostics/main.php
CHANGED
@@ -19,8 +19,9 @@
|
|
19 |
|
20 |
//POST BACK
|
21 |
if (isset($_POST['action'])) {
|
22 |
-
$
|
23 |
-
|
|
|
24 |
{
|
25 |
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
|
26 |
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
|
@@ -60,15 +61,15 @@ $tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
|
|
60 |
|
61 |
switch ($section) {
|
62 |
case 'info':
|
63 |
-
echo "<div class='lite-sub-tabs'><b>
|
64 |
include(dirname(__FILE__) . '/information.php');
|
65 |
break;
|
66 |
case 'log':
|
67 |
-
echo "<div class='lite-sub-tabs'><a href='
|
68 |
include(dirname(__FILE__) . '/logging.php');
|
69 |
break;
|
70 |
case 'support':
|
71 |
-
echo "<div class='lite-sub-tabs'><a href='
|
72 |
include(dirname(__FILE__) . '/support.php');
|
73 |
|
74 |
break;
|
19 |
|
20 |
//POST BACK
|
21 |
if (isset($_POST['action'])) {
|
22 |
+
$action = sanitize_text_field($_POST['action']);
|
23 |
+
$action_result = DUP_Settings::DeleteWPOption($action);
|
24 |
+
switch ($action)
|
25 |
{
|
26 |
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
|
27 |
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
|
61 |
|
62 |
switch ($section) {
|
63 |
case 'info':
|
64 |
+
echo "<div class='lite-sub-tabs'><b>".esc_html($txt_diagnostic)."</b> | <a href='".esc_url($tools_url.'§ion=log')."'>".esc_html($txt_log)."</a> | <a href='".esc_url($tools_url.'§ion=support')."'>".esc_html($txt_support)."</a></div>";
|
65 |
include(dirname(__FILE__) . '/information.php');
|
66 |
break;
|
67 |
case 'log':
|
68 |
+
echo "<div class='lite-sub-tabs'><a href='".esc_url($tools_url.'§ion=info')."'>".esc_html($txt_diagnostic)."</a> | <b>".esc_html($txt_log)."</b> | <a href='".esc_url($tools_url.'§ion=support')."'>".esc_html($txt_support)."</a></div>";
|
69 |
include(dirname(__FILE__) . '/logging.php');
|
70 |
break;
|
71 |
case 'support':
|
72 |
+
echo "<div class='lite-sub-tabs'><a href='".esc_url($tools_url.'§ion=info')."'>".esc_html($txt_diagnostic)."</a> | <a href='".esc_url($tools_url.'§ion=log')."'>".esc_html($txt_log)."</a> | <b>".esc_html($txt_support)."</b> </div>";
|
73 |
include(dirname(__FILE__) . '/support.php');
|
74 |
|
75 |
break;
|
views/tools/diagnostics/support.php
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
<?php
|
29 |
-
|
30 |
?>
|
31 |
</td>
|
32 |
</tr>
|
@@ -37,16 +37,16 @@
|
|
37 |
<div class="dup-support-hlp-area">
|
38 |
<div class="dup-support-hlp-hdrs">
|
39 |
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
-
<div><?php
|
41 |
</div>
|
42 |
<div class="dup-support-hlp-txt">
|
43 |
-
<?php
|
44 |
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
-
<option> <?php
|
46 |
-
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php
|
47 |
-
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php
|
48 |
-
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php
|
49 |
-
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php
|
50 |
</select>
|
51 |
</div>
|
52 |
</div>
|
@@ -55,14 +55,14 @@
|
|
55 |
<div class="dup-support-hlp-area">
|
56 |
<div class="dup-support-hlp-hdrs">
|
57 |
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
-
<div><?php
|
59 |
</div>
|
60 |
<div class="dup-support-hlp-txt">
|
61 |
-
<?php
|
62 |
<br/>
|
63 |
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
-
<?php
|
66 |
</button> <br/>
|
67 |
</div>
|
68 |
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
@@ -76,13 +76,13 @@
|
|
76 |
|
77 |
<div class="dup-support-hlp-hdrs">
|
78 |
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
-
<div><?php
|
80 |
</div>
|
81 |
<div class="dup-support-hlp-txt">
|
82 |
-
<?php
|
83 |
<br/><br/>
|
84 |
<div class="dup-support-txts-links">
|
85 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
@@ -92,13 +92,13 @@
|
|
92 |
|
93 |
<div class="dup-support-hlp-hdrs">
|
94 |
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
-
<div><?php
|
96 |
</div>
|
97 |
<div class="dup-support-hlp-txt">
|
98 |
-
<?php
|
99 |
<br/><br/>
|
100 |
<div class="dup-support-txts-links">
|
101 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php
|
102 |
</div>
|
103 |
</div>
|
104 |
</div>
|
26 |
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
<?php
|
29 |
+
esc_html_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server ecosystem some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources for additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
?>
|
31 |
</td>
|
32 |
</tr>
|
37 |
<div class="dup-support-hlp-area">
|
38 |
<div class="dup-support-hlp-hdrs">
|
39 |
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
+
<div><?php esc_html_e('Knowledgebase', 'duplicator') ?></div>
|
41 |
</div>
|
42 |
<div class="dup-support-hlp-txt">
|
43 |
+
<?php esc_html_e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
+
<option> <?php esc_html_e('Choose A Section', 'duplicator') ?> </option>
|
46 |
+
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php esc_html_e('Quick Start', 'duplicator') ?></option>
|
47 |
+
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php esc_html_e('User Guide', 'duplicator') ?></option>
|
48 |
+
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php esc_html_e('FAQs', 'duplicator') ?></option>
|
49 |
+
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php esc_html_e('Change Log', 'duplicator') ?></option>
|
50 |
</select>
|
51 |
</div>
|
52 |
</div>
|
55 |
<div class="dup-support-hlp-area">
|
56 |
<div class="dup-support-hlp-hdrs">
|
57 |
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
+
<div><?php esc_html_e('Online Support', 'duplicator') ?></div>
|
59 |
</div>
|
60 |
<div class="dup-support-hlp-txt">
|
61 |
+
<?php esc_html_e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
<br/>
|
63 |
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
+
<?php esc_html_e('Get Support!', 'duplicator') ?>
|
66 |
</button> <br/>
|
67 |
</div>
|
68 |
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
76 |
|
77 |
<div class="dup-support-hlp-hdrs">
|
78 |
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
+
<div><?php esc_html_e('Approved Hosting', 'duplicator') ?></div>
|
80 |
</div>
|
81 |
<div class="dup-support-hlp-txt">
|
82 |
+
<?php esc_html_e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
<br/><br/>
|
84 |
<div class="dup-support-txts-links">
|
85 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php esc_html_e('Trusted Providers!', 'duplicator') ?></button>
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
92 |
|
93 |
<div class="dup-support-hlp-hdrs">
|
94 |
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
+
<div><?php esc_html_e('Alternatives', 'duplicator') ?></div>
|
96 |
</div>
|
97 |
<div class="dup-support-hlp-txt">
|
98 |
+
<?php esc_html_e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
<br/><br/>
|
100 |
<div class="dup-support-txts-links">
|
101 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php esc_html_e('Pro Solutions!', 'duplicator') ?></button>
|
102 |
</div>
|
103 |
</div>
|
104 |
</div>
|
views/tools/templates.php
CHANGED
@@ -9,15 +9,15 @@
|
|
9 |
<div class="area">
|
10 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
<?php
|
12 |
-
echo '<h2><i class="fa fa-clone"></i> ' .
|
13 |
-
|
14 |
echo '<br/>';
|
15 |
-
|
16 |
?>
|
17 |
</div>
|
18 |
<p style="text-align:center">
|
19 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_tools_templates&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
-
<?php
|
21 |
</a>
|
22 |
</p>
|
23 |
</div>
|
9 |
<div class="area">
|
10 |
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
<?php
|
12 |
+
echo '<h2><i class="fa fa-clone"></i> ' . esc_html__('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
|
13 |
+
esc_html_e('Templates allow you to customize what you want to include in your site and store it as a re-usable profile.', 'duplicator');
|
14 |
echo '<br/>';
|
15 |
+
esc_html_e('Save time and create a template that can be applied to a schedule or a custom package setup.', 'duplicator');
|
16 |
?>
|
17 |
</div>
|
18 |
<p style="text-align:center">
|
19 |
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_tools_templates&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
+
<?php esc_html_e('Learn More', 'duplicator') ?>
|
21 |
</a>
|
22 |
</p>
|
23 |
</div>
|