Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.2.10 |
Comparing to | |
See all releases |
Code changes from version 1.2.8 to 1.2.10
- assets/js/handlebars.min.js +4 -4
- assets/js/javascript.php +70 -20
- classes/class.server.php +8 -10
- classes/package/class.pack.archive.filters.php +4 -0
- classes/package/class.pack.archive.php +319 -28
- classes/package/class.pack.archive.zip.php +7 -4
- classes/package/class.pack.database.php +1 -1
- classes/package/class.pack.php +24 -57
- classes/utilities/class.u.json.php +153 -0
- classes/utilities/class.u.php +60 -3
- classes/utilities/class.u.scancheck.php +40 -2
- ctrls/ctrl.package.php +73 -6
- debug/tst.packages.php +17 -0
- define.php +3 -3
- duplicator.php +6 -5
- installer/build/assets/inc.css.php +4 -4
- installer/build/classes/class.logging.php +1 -1
- installer/build/classes/config/class.conf.srv.php +5 -1
- installer/build/classes/config/class.conf.wp.php +45 -23
- installer/build/ctrls/ctrl.step1.php +14 -2
- installer/build/ctrls/ctrl.step2.php +1 -0
- installer/build/ctrls/ctrl.step3.php +11 -1
- installer/build/view.help.php +1 -1
- installer/build/view.step1.php +10 -1
- installer/build/view.step2.php +1 -0
- installer/build/view.step3.php +2 -0
- installer/build/view.step4.php +51 -50
- readme.txt +1 -1
- views/help/about.php +1 -1
- views/help/gopro.php +1 -6
- views/packages/details/controller.php +1 -1
- views/packages/details/detail.php +32 -44
- views/packages/main/controller.php +3 -3
- views/packages/main/new2.scan.php +0 -761
- views/packages/main/packages.php +2 -2
- views/packages/main/{new1.setup.php → s1.setup1.php} +39 -15
- views/packages/main/{new1.inc.form.php → s1.setup2.php} +21 -15
- views/packages/main/s2.scan1.php +345 -0
- views/packages/main/s2.scan2.php +115 -0
- views/packages/main/s2.scan3.php +657 -0
- views/packages/main/{new3.build.php → s3.build.php} +31 -19
- views/settings/packages.php +5 -4
- views/tools/diagnostics/inc.settings.php +12 -1
- views/tools/diagnostics/inc.validator.php +37 -13
- views/tools/logging.php +1 -1
assets/js/handlebars.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**!
|
2 |
|
3 |
@license
|
4 |
-
handlebars v4.0.
|
5 |
|
6 |
Copyright (C) 2011-2016 by Yehuda Katz
|
7 |
|
@@ -24,6 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24 |
THE SOFTWARE.
|
25 |
|
26 |
*/
|
27 |
-
!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(24),i=e(h),j=c(25),k=c(30),l=c(31),m=e(l),n=c(28),o=e(n),p=c(23),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(21),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(22),p=e(o),q=c(23),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(18),k=c(20),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0;c&&(g=c.start.line,h=c.start.column,a+=" - "+g+":"+h);for(var i=Error.prototype.constructor.call(this,a),j=0;j<f.length;j++)this[f[j]]=i[f[j]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,e?Object.defineProperty(this,"column",{value:h}):this.column=h)}catch(k){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){g["default"](a),i["default"](a),k["default"](a),m["default"](a),o["default"](a),q["default"](a),s["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d;var f=c(11),g=e(f),h=c(12),i=e(h),j=c(13),k=e(j),l=c(14),m=e(l),n=c(15),o=e(n),p=c(16),q=e(p),r=c(17),s=e(r)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;h<l;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b){return a&&a[b]})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("with",function(a,b){d.isFunction(a)&&(a=a.call(this));var c=b.fn;if(d.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=d.createFrame(b.data),e.contextPath=d.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:e,blockParams:d.blockParams([a],[e&&e.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(19),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(b<c){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;h<i&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!=f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!=g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){if(a)a.call||c.name||(c.name=a,a=c.partials[a]);else if("@partial-block"===c.name){for(var d=c.data;d["partial-block"]===i;)d=d._parent;a=d["partial-block"],d["partial-block"]=i}else a=c.partials[c.name];return a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(26),h=e(g),i=c(27),j=e(i),k=c(29),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],
|
28 |
-
60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(28),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;h<i;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var j=c(6),k=i(j),l=c(5),m=c(24),n=i(m),o=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(32),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",
|
29 |
-
f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;e<g;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
|
1 |
/**!
|
2 |
|
3 |
@license
|
4 |
+
handlebars v4.0.10
|
5 |
|
6 |
Copyright (C) 2011-2016 by Yehuda Katz
|
7 |
|
24 |
THE SOFTWARE.
|
25 |
|
26 |
*/
|
27 |
+
!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(35),i=e(h),j=c(36),k=c(41),l=c(42),m=e(l),n=c(39),o=e(n),p=c(34),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(21),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(22),p=e(o),q=c(34),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(18),k=c(20),l=e(k),m="4.0.10";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0;c&&(g=c.start.line,h=c.start.column,a+=" - "+g+":"+h);for(var i=Error.prototype.constructor.call(this,a),j=0;j<f.length;j++)this[f[j]]=i[f[j]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,e?Object.defineProperty(this,"column",{value:h,enumerable:!0}):this.column=h)}catch(k){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){g["default"](a),i["default"](a),k["default"](a),m["default"](a),o["default"](a),q["default"](a),s["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d;var f=c(11),g=e(f),h=c(12),i=e(h),j=c(13),k=e(j),l=c(14),m=e(l),n=c(15),o=e(n),p=c(16),q=e(p),r=c(17),s=e(r)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;h<l;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b){return a&&a[b]})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("with",function(a,b){d.isFunction(a)&&(a=a.call(this));var c=b.fn;if(d.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=d.createFrame(b.data),e.contextPath=d.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:e,blockParams:d.blockParams([a],[e&&e.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(19),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=s.COMPILER_REVISION;if(b!==c){if(b<c){var d=s.REVISION_CHANGES[c],e=s.REVISION_CHANGES[b];throw new r["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new r["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=p.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;h<i&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new r["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!=f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new r["default"]("No environment passed to template");if(!a||!a.main)throw new r["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new r["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:p.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=p.extend({},b,a)),c},nullContext:l({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new r["default"]("must pass block params");if(a.useDepths&&!g)throw new r["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=s.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=s.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=p.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new r["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?s.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),p.extend(b,g)}return b}var l=c(23)["default"],m=c(3)["default"],n=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var o=c(5),p=m(o),q=c(6),r=n(q),s=c(4)},function(a,b,c){a.exports={"default":c(24),__esModule:!0}},function(a,b,c){c(25),a.exports=c(30).Object.seal},function(a,b,c){var d=c(26);c(27)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){var d=c(28),e=c(30),f=c(33);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(29),e=c(30),f=c(31),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(32);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(37),h=e(g),i=c(38),j=e(i),k=c(40),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";b.__esModule=!0;var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],
|
28 |
+
85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(39),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;h<i;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=l.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var j=c(6),k=i(j),l=c(5),m=c(35),n=i(m),o=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(this.options.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(43),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){
|
29 |
+
var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;e<g;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
|
assets/js/javascript.php
CHANGED
@@ -44,11 +44,11 @@ Duplicator.ReloadWindow = function(data)
|
|
44 |
};
|
45 |
|
46 |
//Basic Util Methods here:
|
47 |
-
Duplicator.OpenLogWindow = function(
|
48 |
{
|
49 |
-
var
|
50 |
-
if (
|
51 |
-
window.open('?page=duplicator-tools', '
|
52 |
} else {
|
53 |
window.open('<?php echo DUPLICATOR_SSDIR_URL; ?>' + '/' + log)
|
54 |
}
|
@@ -166,23 +166,73 @@ jQuery(document).ready(function($)
|
|
166 |
? $arrow.html('<i class="fa fa-caret-up"></i>')
|
167 |
: $arrow.html('<i class="fa fa-caret-down"></i>');
|
168 |
});
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
-
},
|
178 |
-
style: {
|
179 |
-
classes: 'qtip-light qtip-rounded qtip-shadow',
|
180 |
-
width: 500
|
181 |
-
},
|
182 |
-
position: {
|
183 |
-
my: 'top left',
|
184 |
-
at: 'bottom center'
|
185 |
}
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
});
|
188 |
</script>
|
44 |
};
|
45 |
|
46 |
//Basic Util Methods here:
|
47 |
+
Duplicator.OpenLogWindow = function(target)
|
48 |
{
|
49 |
+
var target = "log-win" || null;
|
50 |
+
if (target != null) {
|
51 |
+
window.open('?page=duplicator-tools', 'log-win');
|
52 |
} else {
|
53 |
window.open('<?php echo DUPLICATOR_SSDIR_URL; ?>' + '/' + log)
|
54 |
}
|
166 |
? $arrow.html('<i class="fa fa-caret-up"></i>')
|
167 |
: $arrow.html('<i class="fa fa-caret-down"></i>');
|
168 |
});
|
169 |
+
|
170 |
+
|
171 |
+
Duplicator.UI.loadQtip = function()
|
172 |
+
{
|
173 |
+
//Look for tooltip data
|
174 |
+
$('i[data-tooltip!=""]').qtip({
|
175 |
+
content: {
|
176 |
+
attr: 'data-tooltip',
|
177 |
+
title: {
|
178 |
+
text: function() { return $(this).attr('data-tooltip-title'); }
|
179 |
+
}
|
180 |
+
},
|
181 |
+
style: {
|
182 |
+
classes: 'qtip-light qtip-rounded qtip-shadow',
|
183 |
+
width: 500
|
184 |
+
},
|
185 |
+
position: {
|
186 |
+
my: 'top left',
|
187 |
+
at: 'bottom center'
|
188 |
+
}
|
189 |
+
});
|
190 |
+
}
|
191 |
+
|
192 |
+
Duplicator.UI.loadQtip();
|
193 |
+
|
194 |
+
|
195 |
+
//HANDLEBARS HELPERS
|
196 |
+
if (typeof(Handlebars) != "undefined"){
|
197 |
+
|
198 |
+
function _handleBarscheckCondition(v1, operator, v2) {
|
199 |
+
switch(operator) {
|
200 |
+
case '==':
|
201 |
+
return (v1 == v2);
|
202 |
+
case '===':
|
203 |
+
return (v1 === v2);
|
204 |
+
case '!==':
|
205 |
+
return (v1 !== v2);
|
206 |
+
case '<':
|
207 |
+
return (v1 < v2);
|
208 |
+
case '<=':
|
209 |
+
return (v1 <= v2);
|
210 |
+
case '>':
|
211 |
+
return (v1 > v2);
|
212 |
+
case '>=':
|
213 |
+
return (v1 >= v2);
|
214 |
+
case '&&':
|
215 |
+
return (v1 && v2);
|
216 |
+
case '||':
|
217 |
+
return (v1 || v2);
|
218 |
+
case 'obj||':
|
219 |
+
v1 = typeof(v1) == 'object' ? v1.length : v1;
|
220 |
+
v2 = typeof(v2) == 'object' ? v2.length : v2;
|
221 |
+
return (v1 !=0 || v2 != 0);
|
222 |
+
default:
|
223 |
+
return false;
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
226 |
+
|
227 |
+
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
228 |
+
return _handleBarscheckCondition(v1, operator, v2)
|
229 |
+
? options.fn(this)
|
230 |
+
: options.inverse(this);
|
231 |
+
});
|
232 |
+
|
233 |
+
Handlebars.registerHelper('if_eq', function(a, b, opts) { return (a == b) ? opts.fn(this) : opts.inverse(this);});
|
234 |
+
Handlebars.registerHelper('if_neq', function(a, b, opts) { return (a != b) ? opts.fn(this) : opts.inverse(this);});
|
235 |
+
}
|
236 |
+
|
237 |
});
|
238 |
</script>
|
classes/class.server.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Used to get various pieces of information about the server
|
4 |
*
|
5 |
* Standard: PSR-2
|
6 |
* @link http://www.php-fig.org/psr/psr-2
|
@@ -79,31 +79,29 @@ class DUP_Server
|
|
79 |
{
|
80 |
$checks = array();
|
81 |
|
82 |
-
//
|
83 |
-
|
|
|
84 |
foreach ($GLOBALS['DUPLICATOR_SERVER_LIST'] as $value) {
|
85 |
if (stristr($_SERVER['SERVER_SOFTWARE'], $value)) {
|
86 |
-
$
|
87 |
break;
|
88 |
}
|
89 |
}
|
90 |
-
$checks['SRV']['WEB']['model'] = $web_test1;
|
91 |
-
$checks['SRV']['WEB']['ALL'] = ($web_test1) ? 'Good' : 'Warn';
|
92 |
|
93 |
-
//PHP SETTINGS
|
94 |
$php_test1 = ini_get("open_basedir");
|
95 |
$php_test1 = empty($php_test1) ? true : false;
|
96 |
$php_test2 = ini_get("max_execution_time");
|
97 |
$php_test2 = ($php_test2 > DUPLICATOR_SCAN_TIMEOUT) || (strcmp($php_test2, 'Off') == 0 || $php_test2 == 0) ? true : false;
|
98 |
$php_test3 = function_exists('mysqli_connect');
|
99 |
$php_test4 = DUP_Util::$on_php_53_plus ? true : false;
|
100 |
-
|
|
|
101 |
$checks['SRV']['PHP']['openbase'] = $php_test1;
|
102 |
$checks['SRV']['PHP']['maxtime'] = $php_test2;
|
103 |
$checks['SRV']['PHP']['mysqli'] = $php_test3;
|
104 |
$checks['SRV']['PHP']['version'] = $php_test4;
|
105 |
-
$checks['SRV']['PHP']['ALL'] = ($php_test1 && $php_test2 && $php_test3 && $php_test4) ? 'Good' : 'Warn';
|
106 |
-
|
107 |
|
108 |
//WORDPRESS SETTINGS
|
109 |
global $wp_version;
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Used to get various pieces of information about the server environment
|
4 |
*
|
5 |
* Standard: PSR-2
|
6 |
* @link http://www.php-fig.org/psr/psr-2
|
79 |
{
|
80 |
$checks = array();
|
81 |
|
82 |
+
//PHP/SYSTEM SETTINGS
|
83 |
+
//Web Server
|
84 |
+
$php_test0 = false;
|
85 |
foreach ($GLOBALS['DUPLICATOR_SERVER_LIST'] as $value) {
|
86 |
if (stristr($_SERVER['SERVER_SOFTWARE'], $value)) {
|
87 |
+
$php_test0 = true;
|
88 |
break;
|
89 |
}
|
90 |
}
|
|
|
|
|
91 |
|
|
|
92 |
$php_test1 = ini_get("open_basedir");
|
93 |
$php_test1 = empty($php_test1) ? true : false;
|
94 |
$php_test2 = ini_get("max_execution_time");
|
95 |
$php_test2 = ($php_test2 > DUPLICATOR_SCAN_TIMEOUT) || (strcmp($php_test2, 'Off') == 0 || $php_test2 == 0) ? true : false;
|
96 |
$php_test3 = function_exists('mysqli_connect');
|
97 |
$php_test4 = DUP_Util::$on_php_53_plus ? true : false;
|
98 |
+
|
99 |
+
$checks['SRV']['PHP']['websrv'] = $php_test0;
|
100 |
$checks['SRV']['PHP']['openbase'] = $php_test1;
|
101 |
$checks['SRV']['PHP']['maxtime'] = $php_test2;
|
102 |
$checks['SRV']['PHP']['mysqli'] = $php_test3;
|
103 |
$checks['SRV']['PHP']['version'] = $php_test4;
|
104 |
+
$checks['SRV']['PHP']['ALL'] = ($php_test0 && $php_test1 && $php_test2 && $php_test3 && $php_test4) ? 'Good' : 'Warn';
|
|
|
105 |
|
106 |
//WORDPRESS SETTINGS
|
107 |
global $wp_version;
|
classes/package/class.pack.archive.filters.php
CHANGED
@@ -66,6 +66,8 @@ class DUP_Archive_Filter_Info
|
|
66 |
public $UDirCount = 0;
|
67 |
public $UFileCount = 0;
|
68 |
public $UExtCount = 0;
|
|
|
|
|
69 |
|
70 |
/**
|
71 |
* Init this object
|
@@ -75,6 +77,8 @@ class DUP_Archive_Filter_Info
|
|
75 |
$this->Dirs = new DUP_Archive_Filter_Scope_Directory();
|
76 |
$this->Files = new DUP_Archive_Filter_Scope_File();
|
77 |
$this->Exts = new DUP_Archive_Filter_Scope_Base();
|
|
|
|
|
78 |
}
|
79 |
}
|
80 |
|
66 |
public $UDirCount = 0;
|
67 |
public $UFileCount = 0;
|
68 |
public $UExtCount = 0;
|
69 |
+
public $TreeSize;
|
70 |
+
public $TreeWarning;
|
71 |
|
72 |
/**
|
73 |
* Init this object
|
77 |
$this->Dirs = new DUP_Archive_Filter_Scope_Directory();
|
78 |
$this->Files = new DUP_Archive_Filter_Scope_File();
|
79 |
$this->Exts = new DUP_Archive_Filter_Scope_Base();
|
80 |
+
$this->TreeSize = array();
|
81 |
+
$this->TreeWarning = array();
|
82 |
}
|
83 |
}
|
84 |
|
classes/package/class.pack.archive.php
CHANGED
@@ -22,9 +22,11 @@ class DUP_Archive
|
|
22 |
{
|
23 |
//PUBLIC
|
24 |
public $FilterDirs;
|
|
|
25 |
public $FilterExts;
|
26 |
-
public $FilterDirsAll
|
27 |
-
|
|
|
28 |
public $FilterOn;
|
29 |
public $ExportOnlyDB;
|
30 |
public $File;
|
@@ -36,6 +38,8 @@ class DUP_Archive
|
|
36 |
public $FilterInfo;
|
37 |
//PROTECTED
|
38 |
protected $Package;
|
|
|
|
|
39 |
|
40 |
|
41 |
/**
|
@@ -47,6 +51,15 @@ class DUP_Archive
|
|
47 |
$this->FilterOn = false;
|
48 |
$this->ExportOnlyDB = false;
|
49 |
$this->FilterInfo = new DUP_Archive_Filter_Info();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -91,10 +104,9 @@ class DUP_Archive
|
|
91 |
*
|
92 |
* @return obj Returns a DUP_Archive object
|
93 |
*/
|
94 |
-
public function
|
95 |
{
|
96 |
$this->createFilterInfo();
|
97 |
-
|
98 |
$rootPath = DUP_Util::safePath(rtrim(DUPLICATOR_WPROOTPATH, '//'));
|
99 |
$rootPath = (trim($rootPath) == '') ? '/' : $rootPath;
|
100 |
|
@@ -106,13 +118,105 @@ class DUP_Archive
|
|
106 |
$this->getFileLists($rootPath);
|
107 |
$this->setDirFilters();
|
108 |
$this->setFileFilters();
|
|
|
109 |
}
|
110 |
|
111 |
$this->FilterDirsAll = array_merge($this->FilterDirsAll, $this->FilterInfo->Dirs->Unreadable);
|
112 |
$this->FilterFilesAll = array_merge($this->FilterFilesAll, $this->FilterInfo->Files->Unreadable);
|
|
|
|
|
113 |
return $this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
/**
|
@@ -126,15 +230,62 @@ class DUP_Archive
|
|
126 |
//Add the items generated at create time
|
127 |
if ($this->FilterOn) {
|
128 |
$this->FilterInfo->Dirs->Instance = array_map('DUP_Util::safePath', explode(";", $this->FilterDirs, -1));
|
|
|
129 |
$this->FilterInfo->Exts->Instance = explode(";", $this->FilterExts, -1);
|
130 |
}
|
131 |
|
132 |
//FILTER: CORE ITMES
|
133 |
//Filters Duplicator free packages & All pro local directories
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
/**
|
@@ -147,6 +298,9 @@ class DUP_Archive
|
|
147 |
$this->FilterInfo->Dirs->Warning = array();
|
148 |
$this->FilterInfo->Dirs->Unreadable = array();
|
149 |
|
|
|
|
|
|
|
150 |
//Filter directories invalid test checks for:
|
151 |
// - characters over 250
|
152 |
// - invlaid characters
|
@@ -154,27 +308,40 @@ class DUP_Archive
|
|
154 |
// - directories ending with period (Windows incompatable)
|
155 |
foreach ($this->Dirs as $key => $val) {
|
156 |
$name = basename($val);
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
//Locate invalid directories and warn
|
159 |
-
$invalid_test = strlen($val) >
|
160 |
|| preg_match('/(\/|\*|\?|\>|\<|\:|\\|\|)/', $name)
|
161 |
|| trim($name) == ''
|
162 |
|| (strrpos($name, '.') == strlen($name) - 1 && substr($name, -1) == '.')
|
163 |
|| preg_match('/[^\x20-\x7f]/', $name);
|
164 |
|
165 |
if ($invalid_test) {
|
|
|
166 |
$this->FilterInfo->Dirs->Warning[] = DUP_Encoding::toUTF8($val);
|
167 |
}
|
168 |
|
169 |
-
//@todo: CJL addEmptyDir works with unreadable dirs, this check maybe unnessary
|
170 |
-
//@todo: CJL Move unset logic out of loop
|
171 |
-
//Dir is not readble remove and flag
|
172 |
-
if (! is_readable($this->Dirs[$key])) {
|
173 |
-
unset($this->Dirs[$key]);
|
174 |
-
$unreadable_dir = DUP_Encoding::toUTF8($val);
|
175 |
-
$this->FilterInfo->Dirs->Unreadable[] = $unreadable_dir;
|
176 |
-
}
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
@@ -186,17 +353,19 @@ class DUP_Archive
|
|
186 |
{
|
187 |
//Init for each call to prevent concatination from stored entity objects
|
188 |
$this->Size = 0;
|
189 |
-
|
190 |
$this->FilterInfo->Files->Warning = array();
|
191 |
$this->FilterInfo->Files->Unreadable = array();
|
192 |
|
|
|
|
|
|
|
193 |
foreach ($this->Files as $key => $filePath) {
|
194 |
|
195 |
$fileName = basename($filePath);
|
196 |
|
197 |
-
//@todo: CJL Move unset logic out of loop
|
198 |
if (! is_readable($filePath)) {
|
199 |
-
|
200 |
$this->FilterInfo->Files->Unreadable[] = $filePath;
|
201 |
continue;
|
202 |
}
|
@@ -207,19 +376,44 @@ class DUP_Archive
|
|
207 |
|| preg_match('/[^\x20-\x7f]/', $fileName);
|
208 |
|
209 |
if ($invalid_test) {
|
|
|
210 |
$filePath = DUP_Encoding::toUTF8($filePath);
|
211 |
-
$
|
212 |
-
|
|
|
|
|
|
|
213 |
|
|
|
214 |
|
215 |
$fileSize = @filesize($filePath);
|
216 |
$fileSize = empty($fileSize) ? 0 : $fileSize;
|
217 |
$this->Size += $fileSize;
|
218 |
|
219 |
if ($fileSize > DUPLICATOR_SCAN_WARNFILESIZE) {
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
}
|
222 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
}
|
224 |
|
225 |
/**
|
@@ -254,11 +448,13 @@ class DUP_Archive
|
|
254 |
if (is_dir($fullPath)) {
|
255 |
|
256 |
$add = true;
|
257 |
-
//
|
258 |
-
foreach ($this->
|
|
|
259 |
$trimmedFilterDir = rtrim($val, '/');
|
260 |
if ($fullPath == $trimmedFilterDir || strpos($fullPath, $trimmedFilterDir . '/') !== false) {
|
261 |
$add = false;
|
|
|
262 |
break;
|
263 |
}
|
264 |
}
|
@@ -268,8 +464,8 @@ class DUP_Archive
|
|
268 |
$this->Dirs[] = $fullPath;
|
269 |
}
|
270 |
} else {
|
271 |
-
|
272 |
-
|
273 |
$this->Files[] = $fullPath;
|
274 |
}
|
275 |
}
|
@@ -279,5 +475,100 @@ class DUP_Archive
|
|
279 |
return $this->Dirs;
|
280 |
}
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
|
283 |
-
}
|
22 |
{
|
23 |
//PUBLIC
|
24 |
public $FilterDirs;
|
25 |
+
public $FilterFiles;
|
26 |
public $FilterExts;
|
27 |
+
public $FilterDirsAll = array();
|
28 |
+
public $FilterFilesAll = array();
|
29 |
+
public $FilterExtsAll = array();
|
30 |
public $FilterOn;
|
31 |
public $ExportOnlyDB;
|
32 |
public $File;
|
38 |
public $FilterInfo;
|
39 |
//PROTECTED
|
40 |
protected $Package;
|
41 |
+
private $tmpFilterDirsAll = array();
|
42 |
+
private $wpCorePaths = array();
|
43 |
|
44 |
|
45 |
/**
|
51 |
$this->FilterOn = false;
|
52 |
$this->ExportOnlyDB = false;
|
53 |
$this->FilterInfo = new DUP_Archive_Filter_Info();
|
54 |
+
|
55 |
+
$rootPath = DUP_Util::safePath(rtrim(DUPLICATOR_WPROOTPATH, '//'));
|
56 |
+
|
57 |
+
$this->wpCorePaths[] = "{$rootPath}/wp-admin";
|
58 |
+
$this->wpCorePaths[] = WP_CONTENT_DIR . "/uploads";
|
59 |
+
$this->wpCorePaths[] = WP_CONTENT_DIR . "/languages";
|
60 |
+
$this->wpCorePaths[] = WP_PLUGIN_DIR;
|
61 |
+
$this->wpCorePaths[] = get_theme_root();
|
62 |
+
$this->wpCorePaths[] = "{$rootPath}/wp-includes";
|
63 |
}
|
64 |
|
65 |
/**
|
104 |
*
|
105 |
* @return obj Returns a DUP_Archive object
|
106 |
*/
|
107 |
+
public function getScannerData()
|
108 |
{
|
109 |
$this->createFilterInfo();
|
|
|
110 |
$rootPath = DUP_Util::safePath(rtrim(DUPLICATOR_WPROOTPATH, '//'));
|
111 |
$rootPath = (trim($rootPath) == '') ? '/' : $rootPath;
|
112 |
|
118 |
$this->getFileLists($rootPath);
|
119 |
$this->setDirFilters();
|
120 |
$this->setFileFilters();
|
121 |
+
$this->setTreeFilters();
|
122 |
}
|
123 |
|
124 |
$this->FilterDirsAll = array_merge($this->FilterDirsAll, $this->FilterInfo->Dirs->Unreadable);
|
125 |
$this->FilterFilesAll = array_merge($this->FilterFilesAll, $this->FilterInfo->Files->Unreadable);
|
126 |
+
sort($this->FilterDirsAll);
|
127 |
+
|
128 |
return $this;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Save any property of this class through reflection
|
133 |
+
*
|
134 |
+
* @param $property A valid public property in this class
|
135 |
+
* @param $value The value for the new dynamic property
|
136 |
+
*
|
137 |
+
* @return bool Returns true if the value has changed.
|
138 |
+
*/
|
139 |
+
public function saveActiveItem($package, $property, $value)
|
140 |
+
{
|
141 |
+
$package = DUP_Package::getActive();
|
142 |
+
$reflectionClass = new ReflectionClass($package->Archive);
|
143 |
+
$reflectionClass->getProperty($property)->setValue($package->Archive, $value);
|
144 |
+
return update_option(DUP_Package::OPT_ACTIVE, $package);
|
145 |
+
}
|
146 |
|
147 |
+
/**
|
148 |
+
* Properly creates the directory filter list that is used for filtering directories
|
149 |
+
*
|
150 |
+
* @param string $dirs A semi-colon list of dir paths
|
151 |
+
* /path1_/path/;/path1_/path2/;
|
152 |
+
*
|
153 |
+
* @returns string A cleaned up list of directory filters
|
154 |
+
*/
|
155 |
+
public function parseDirectoryFilter($dirs = "")
|
156 |
+
{
|
157 |
+
$dirs = str_replace(array("\n", "\t", "\r"), '', $dirs);
|
158 |
+
$filters = "";
|
159 |
+
$dir_array = array_unique(explode(";", $dirs));
|
160 |
+
$clean_array = array();
|
161 |
+
foreach ($dir_array as $val) {
|
162 |
+
if (strlen($val) >= 2) {
|
163 |
+
$clean_array[] = DUP_Util::safePath(trim(rtrim($val, "/\\"))) ;
|
164 |
+
}
|
165 |
+
}
|
166 |
|
167 |
+
if (count($clean_array)) {
|
168 |
+
$clean_array = array_unique($clean_array);
|
169 |
+
sort($clean_array);
|
170 |
+
$filters = implode(';', $clean_array) . ';';
|
171 |
+
}
|
172 |
+
return $filters ;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Properly creates the file filter list that is used for filtering files
|
177 |
+
*
|
178 |
+
* @param string $dirs A semi-colon list of dir paths
|
179 |
+
* /path1_/path/file1.ext;/path1_/path2/file2.ext;
|
180 |
+
*
|
181 |
+
* @returns string A cleaned up list of file filters
|
182 |
+
*/
|
183 |
+
public function parseFileFilter($files = "")
|
184 |
+
{
|
185 |
+
$files = str_replace(array("\n", "\t", "\r"), '', $files);
|
186 |
+
$filters = "";
|
187 |
+
$file_array = array_unique(explode(";", $files));
|
188 |
+
$clean_array = array();
|
189 |
+
foreach ($file_array as $val) {
|
190 |
+
if (strlen($val) >= 2) {
|
191 |
+
$clean_array[] = DUP_Util::safePath(trim(rtrim($val, "/\\"))) ;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
if (count($clean_array)) {
|
196 |
+
$clean_array = array_unique($clean_array);
|
197 |
+
sort($clean_array);
|
198 |
+
$filters = implode(';', $clean_array) . ';';
|
199 |
+
}
|
200 |
+
return $filters ;
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Properly creates the extension filter list that is used for filtering extensions
|
205 |
+
*
|
206 |
+
* @param string $dirs A semi-colon list of dir paths
|
207 |
+
* .jpg;.zip;.gif;
|
208 |
+
*
|
209 |
+
* @returns string A cleaned up list of extension filters
|
210 |
+
*/
|
211 |
+
public function parseExtensionFilter($extensions = "")
|
212 |
+
{
|
213 |
+
$filter_exts = "";
|
214 |
+
if (strlen($extensions) >= 1 && $extensions != ";") {
|
215 |
+
$filter_exts = str_replace(array(' ', '.'), '', $extensions);
|
216 |
+
$filter_exts = str_replace(",", ";", $filter_exts);
|
217 |
+
$filter_exts = DUP_Util::appendOnce($extensions, ";");
|
218 |
+
}
|
219 |
+
return $filter_exts;
|
220 |
}
|
221 |
|
222 |
/**
|
230 |
//Add the items generated at create time
|
231 |
if ($this->FilterOn) {
|
232 |
$this->FilterInfo->Dirs->Instance = array_map('DUP_Util::safePath', explode(";", $this->FilterDirs, -1));
|
233 |
+
$this->FilterInfo->Files->Instance = array_map('DUP_Util::safePath', explode(";", $this->FilterFiles, -1));
|
234 |
$this->FilterInfo->Exts->Instance = explode(";", $this->FilterExts, -1);
|
235 |
}
|
236 |
|
237 |
//FILTER: CORE ITMES
|
238 |
//Filters Duplicator free packages & All pro local directories
|
239 |
+
$wp_root = rtrim(DUPLICATOR_WPROOTPATH, '/');
|
240 |
+
$upload_dir = wp_upload_dir();
|
241 |
+
$upload_dir = isset($upload_dir['basedir']) ? basename($upload_dir['basedir']) : 'uploads';
|
242 |
+
$wp_content = str_replace("\\", "/", WP_CONTENT_DIR);
|
243 |
+
$wp_content_upload = "{$wp_content}/{$upload_dir}";
|
244 |
+
$this->FilterInfo->Dirs->Core = array(
|
245 |
+
//WP-ROOT
|
246 |
+
$wp_root . '/wp-snapshots',
|
247 |
+
|
248 |
+
//WP-CONTENT
|
249 |
+
$wp_content . '/backups-dup-pro',
|
250 |
+
$wp_content . '/ai1wm-backups',
|
251 |
+
$wp_content . '/backupwordpress',
|
252 |
+
$wp_content . '/content/cache',
|
253 |
+
$wp_content . '/contents/cache',
|
254 |
+
$wp_content . '/infinitewp/backups',
|
255 |
+
$wp_content . '/managewp/backups',
|
256 |
+
$wp_content . '/old-cache',
|
257 |
+
$wp_content . '/plugins/all-in-one-wp-migration/storage',
|
258 |
+
$wp_content . '/updraft',
|
259 |
+
$wp_content . '/wishlist-backup',
|
260 |
+
$wp_content . '/wfcache',
|
261 |
+
|
262 |
+
//WP-CONTENT-UPLOADS
|
263 |
+
$wp_content_upload . '/aiowps_backups',
|
264 |
+
$wp_content_upload . '/backupbuddy_temp',
|
265 |
+
$wp_content_upload . '/backupbuddy_backups',
|
266 |
+
$wp_content_upload . '/ithemes-security/backups',
|
267 |
+
$wp_content_upload . '/mainwp/backup',
|
268 |
+
$wp_content_upload . '/pb_backupbuddy',
|
269 |
+
$wp_content_upload . '/snapshots',
|
270 |
+
$wp_content_upload . '/sucuri',
|
271 |
+
$wp_content_upload . '/wp-clone',
|
272 |
+
$wp_content_upload . '/wp_all_backup',
|
273 |
+
$wp_content_upload . '/wpbackitup_backups'
|
274 |
+
);
|
275 |
+
|
276 |
+
$this->FilterDirsAll = array_merge($this->FilterInfo->Dirs->Instance, $this->FilterInfo->Dirs->Core);
|
277 |
+
$this->FilterExtsAll = array_merge($this->FilterInfo->Exts->Instance, $this->FilterInfo->Exts->Core);
|
278 |
+
$this->FilterFilesAll = array_merge($this->FilterInfo->Files->Instance);
|
279 |
+
$this->tmpFilterDirsAll = $this->FilterDirsAll;
|
280 |
+
|
281 |
+
//PHP 5 on windows decode patch
|
282 |
+
if (! DUP_Util::$PHP7_plus && DUP_Util::isWindows()) {
|
283 |
+
foreach ($this->tmpFilterDirsAll as $key => $value) {
|
284 |
+
if ( preg_match('/[^\x20-\x7f]/', $value)) {
|
285 |
+
$this->tmpFilterDirsAll[$key] = utf8_decode($value);
|
286 |
+
}
|
287 |
+
}
|
288 |
+
}
|
289 |
}
|
290 |
|
291 |
/**
|
298 |
$this->FilterInfo->Dirs->Warning = array();
|
299 |
$this->FilterInfo->Dirs->Unreadable = array();
|
300 |
|
301 |
+
$utf8_key_list = array();
|
302 |
+
$unset_key_list = array();
|
303 |
+
|
304 |
//Filter directories invalid test checks for:
|
305 |
// - characters over 250
|
306 |
// - invlaid characters
|
308 |
// - directories ending with period (Windows incompatable)
|
309 |
foreach ($this->Dirs as $key => $val) {
|
310 |
$name = basename($val);
|
311 |
+
|
312 |
+
//Dir is not readble remove flag for removal
|
313 |
+
if (! is_readable($this->Dirs[$key])) {
|
314 |
+
$unset_key_list[] = $key;
|
315 |
+
$this->FilterInfo->Dirs->Unreadable[] = DUP_Encoding::toUTF8($val);
|
316 |
+
}
|
317 |
|
318 |
//Locate invalid directories and warn
|
319 |
+
$invalid_test = strlen($val) > 244
|
320 |
|| preg_match('/(\/|\*|\?|\>|\<|\:|\\|\|)/', $name)
|
321 |
|| trim($name) == ''
|
322 |
|| (strrpos($name, '.') == strlen($name) - 1 && substr($name, -1) == '.')
|
323 |
|| preg_match('/[^\x20-\x7f]/', $name);
|
324 |
|
325 |
if ($invalid_test) {
|
326 |
+
$utf8_key_list[] = $key;
|
327 |
$this->FilterInfo->Dirs->Warning[] = DUP_Encoding::toUTF8($val);
|
328 |
}
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
}
|
331 |
+
|
332 |
+
//Try to repair utf8 paths
|
333 |
+
foreach ($utf8_key_list as $key) {
|
334 |
+
$this->Dirs[$key] = DUP_Encoding::toUTF8($this->Dirs[$key]);
|
335 |
+
}
|
336 |
+
|
337 |
+
//Remove unreadable items outside of main loop for performance
|
338 |
+
if (count($unset_key_list)) {
|
339 |
+
foreach ($unset_key_list as $key) {
|
340 |
+
unset($this->Dirs[$key]);
|
341 |
+
}
|
342 |
+
$this->Dirs = array_values($this->Dirs);
|
343 |
+
}
|
344 |
+
|
345 |
}
|
346 |
|
347 |
/**
|
353 |
{
|
354 |
//Init for each call to prevent concatination from stored entity objects
|
355 |
$this->Size = 0;
|
356 |
+
$this->FilterInfo->Files->Size = array();
|
357 |
$this->FilterInfo->Files->Warning = array();
|
358 |
$this->FilterInfo->Files->Unreadable = array();
|
359 |
|
360 |
+
$utf8_key_list = array();
|
361 |
+
$unset_key_list = array();
|
362 |
+
|
363 |
foreach ($this->Files as $key => $filePath) {
|
364 |
|
365 |
$fileName = basename($filePath);
|
366 |
|
|
|
367 |
if (! is_readable($filePath)) {
|
368 |
+
$unset_key_list[] = $key;
|
369 |
$this->FilterInfo->Files->Unreadable[] = $filePath;
|
370 |
continue;
|
371 |
}
|
376 |
|| preg_match('/[^\x20-\x7f]/', $fileName);
|
377 |
|
378 |
if ($invalid_test) {
|
379 |
+
$utf8_key_list[] = $key;
|
380 |
$filePath = DUP_Encoding::toUTF8($filePath);
|
381 |
+
$fileName = basename($filePath);
|
382 |
+
$this->FilterInfo->Files->Warning[] = array(
|
383 |
+
'name' => $fileName,
|
384 |
+
'dir' => pathinfo($filePath, PATHINFO_DIRNAME),
|
385 |
+
'path' => $filePath);
|
386 |
|
387 |
+
}
|
388 |
|
389 |
$fileSize = @filesize($filePath);
|
390 |
$fileSize = empty($fileSize) ? 0 : $fileSize;
|
391 |
$this->Size += $fileSize;
|
392 |
|
393 |
if ($fileSize > DUPLICATOR_SCAN_WARNFILESIZE) {
|
394 |
+
$ext = pathinfo($filePath, PATHINFO_EXTENSION);
|
395 |
+
$this->FilterInfo->Files->Size[] = array(
|
396 |
+
'ubytes' => $fileSize,
|
397 |
+
'bytes' => DUP_Util::byteSize($fileSize, 0),
|
398 |
+
'name' => $fileName,
|
399 |
+
'dir' => pathinfo($filePath, PATHINFO_DIRNAME),
|
400 |
+
'path' => $filePath);
|
401 |
}
|
402 |
}
|
403 |
+
|
404 |
+
//Try to repair utf8 paths
|
405 |
+
foreach ($utf8_key_list as $key) {
|
406 |
+
$this->Files[$key] = DUP_Encoding::toUTF8($this->Files[$key]);
|
407 |
+
}
|
408 |
+
|
409 |
+
//Remove unreadable items outside of main loop for performance
|
410 |
+
if (count($unset_key_list)) {
|
411 |
+
foreach ($unset_key_list as $key) {
|
412 |
+
unset($this->Files[$key]);
|
413 |
+
}
|
414 |
+
$this->Files = array_values($this->Files);
|
415 |
+
}
|
416 |
+
|
417 |
}
|
418 |
|
419 |
/**
|
448 |
if (is_dir($fullPath)) {
|
449 |
|
450 |
$add = true;
|
451 |
+
//Directory filters
|
452 |
+
foreach ($this->tmpFilterDirsAll as $key => $val) {
|
453 |
+
|
454 |
$trimmedFilterDir = rtrim($val, '/');
|
455 |
if ($fullPath == $trimmedFilterDir || strpos($fullPath, $trimmedFilterDir . '/') !== false) {
|
456 |
$add = false;
|
457 |
+
unset($this->tmpFilterDirsAll[$key]);
|
458 |
break;
|
459 |
}
|
460 |
}
|
464 |
$this->Dirs[] = $fullPath;
|
465 |
}
|
466 |
} else {
|
467 |
+
if ( ! (in_array(pathinfo($file, PATHINFO_EXTENSION), $this->FilterExtsAll)
|
468 |
+
|| in_array($fullPath, $this->FilterFilesAll))) {
|
469 |
$this->Files[] = $fullPath;
|
470 |
}
|
471 |
}
|
475 |
return $this->Dirs;
|
476 |
}
|
477 |
|
478 |
+
/**
|
479 |
+
* Builds a tree for both file size warnings and name check warnings
|
480 |
+
* The trees are used to apply filters from the scan screen
|
481 |
+
*
|
482 |
+
* @return null
|
483 |
+
*/
|
484 |
+
private function setTreeFilters()
|
485 |
+
{
|
486 |
+
//-------------------------
|
487 |
+
//SIZE TREE
|
488 |
+
//BUILD: File Size tree
|
489 |
+
$dir_group = DUP_Util::array_group_by($this->FilterInfo->Files->Size, "dir" );
|
490 |
+
ksort($dir_group);
|
491 |
+
foreach ($dir_group as $dir => $files) {
|
492 |
+
$sum = 0;
|
493 |
+
foreach ($files as $key => $value) {
|
494 |
+
$sum += $value['ubytes'];
|
495 |
+
}
|
496 |
+
|
497 |
+
//Locate core paths, wp-admin, wp-includes, etc.
|
498 |
+
$iscore = 0;
|
499 |
+
foreach ($this->wpCorePaths as $core_dir) {
|
500 |
+
if (strpos(DUP_Util::safePath($dir), DUP_Util::safePath($core_dir)) !== false) {
|
501 |
+
$iscore = 1;
|
502 |
+
break;
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
$this->FilterInfo->TreeSize[] = array(
|
507 |
+
'size' => DUP_Util::byteSize($sum, 0),
|
508 |
+
'dir' => $dir,
|
509 |
+
'sdir' => str_replace(DUPLICATOR_WPROOTPATH, '', $dir),
|
510 |
+
'iscore' => $iscore,
|
511 |
+
'files' => $files
|
512 |
+
);
|
513 |
+
}
|
514 |
+
|
515 |
+
//-------------------------
|
516 |
+
//NAME TREE
|
517 |
+
//BUILD: Warning tree for file names
|
518 |
+
$dir_group = DUP_Util::array_group_by($this->FilterInfo->Files->Warning, "dir" );
|
519 |
+
ksort($dir_group);
|
520 |
+
foreach ($dir_group as $dir => $files) {
|
521 |
+
|
522 |
+
//Locate core paths, wp-admin, wp-includes, etc.
|
523 |
+
$iscore = 0;
|
524 |
+
foreach ($this->wpCorePaths as $core_dir) {
|
525 |
+
if (strpos($dir, $core_dir) !== false) {
|
526 |
+
$iscore = 1;
|
527 |
+
break;
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
$this->FilterInfo->TreeWarning[] = array(
|
532 |
+
'dir' => $dir,
|
533 |
+
'sdir' => str_replace(DUPLICATOR_WPROOTPATH, '', $dir),
|
534 |
+
'iscore' => $iscore,
|
535 |
+
'count' => count($files),
|
536 |
+
'files' => $files);
|
537 |
+
}
|
538 |
+
|
539 |
+
//BUILD: Warning tree for dir names
|
540 |
+
foreach ($this->FilterInfo->Dirs->Warning as $dir) {
|
541 |
+
$add_dir = true;
|
542 |
+
foreach ($this->FilterInfo->TreeWarning as $key => $value) {
|
543 |
+
if ($value['dir'] == $dir) {
|
544 |
+
$add_dir = false;
|
545 |
+
break;
|
546 |
+
}
|
547 |
+
}
|
548 |
+
if ($add_dir) {
|
549 |
+
|
550 |
+
//Locate core paths, wp-admin, wp-includes, etc.
|
551 |
+
$iscore = 0;
|
552 |
+
foreach ($this->wpCorePaths as $core_dir) {
|
553 |
+
if (strpos(DUP_Util::safePath($dir), DUP_Util::safePath($core_dir)) !== false) {
|
554 |
+
$iscore = 1;
|
555 |
+
break;
|
556 |
+
}
|
557 |
+
}
|
558 |
+
|
559 |
+
$this->FilterInfo->TreeWarning[] = array(
|
560 |
+
'dir' => $dir,
|
561 |
+
'sdir' => str_replace(DUPLICATOR_WPROOTPATH, '', $dir),
|
562 |
+
'iscore' => $iscore,
|
563 |
+
'count' => 0);
|
564 |
+
}
|
565 |
+
}
|
566 |
+
|
567 |
+
function _sortDir($a, $b){
|
568 |
+
return strcmp($a["dir"], $b["dir"]);
|
569 |
+
}
|
570 |
+
usort($this->FilterInfo->TreeWarning, "_sortDir");
|
571 |
+
}
|
572 |
+
|
573 |
|
574 |
+
}
|
classes/package/class.pack.archive.zip.php
CHANGED
@@ -34,10 +34,12 @@ class DUP_Zip extends DUP_Archive
|
|
34 |
self::$zipArchive = new ZipArchive();
|
35 |
self::$networkFlush = empty($package_zip_flush) ? false : $package_zip_flush;
|
36 |
|
37 |
-
$filterDirs = empty($archive->FilterDirs)
|
38 |
-
$filterExts = empty($archive->FilterExts)
|
|
|
39 |
$filterOn = ($archive->FilterOn) ? 'ON' : 'OFF';
|
40 |
-
$filterDirsFormat
|
|
|
41 |
$lastDirSuccess = self::$compressDir;
|
42 |
|
43 |
//LOAD SCAN REPORT
|
@@ -54,7 +56,8 @@ class DUP_Zip extends DUP_Archive
|
|
54 |
DUP_Log::Info("ARCHIVE DIR: ".self::$compressDir);
|
55 |
DUP_Log::Info("ARCHIVE FILE: ".basename(self::$zipPath));
|
56 |
DUP_Log::Info("FILTERS: *{$filterOn}*");
|
57 |
-
DUP_Log::Info("DIRS
|
|
|
58 |
DUP_Log::Info("EXTS: {$filterExts}");
|
59 |
|
60 |
DUP_Log::Info("----------------------------------------");
|
34 |
self::$zipArchive = new ZipArchive();
|
35 |
self::$networkFlush = empty($package_zip_flush) ? false : $package_zip_flush;
|
36 |
|
37 |
+
$filterDirs = empty($archive->FilterDirs) ? 'not set' : $archive->FilterDirs;
|
38 |
+
$filterExts = empty($archive->FilterExts) ? 'not set' : $archive->FilterExts;
|
39 |
+
$filterFiles = empty($archive->FilterFiles) ? 'not set' : $archive->FilterFiles;
|
40 |
$filterOn = ($archive->FilterOn) ? 'ON' : 'OFF';
|
41 |
+
$filterDirsFormat = rtrim(str_replace(';', "\n\t", $filterDirs));
|
42 |
+
$filterFilesFormat = rtrim(str_replace(';', "\n\t", $filterFiles));
|
43 |
$lastDirSuccess = self::$compressDir;
|
44 |
|
45 |
//LOAD SCAN REPORT
|
56 |
DUP_Log::Info("ARCHIVE DIR: ".self::$compressDir);
|
57 |
DUP_Log::Info("ARCHIVE FILE: ".basename(self::$zipPath));
|
58 |
DUP_Log::Info("FILTERS: *{$filterOn}*");
|
59 |
+
DUP_Log::Info("DIRS:\n\t{$filterDirsFormat}");
|
60 |
+
DUP_Log::Info("FILES:\n\t{$filterFilesFormat}");
|
61 |
DUP_Log::Info("EXTS: {$filterExts}");
|
62 |
|
63 |
DUP_Log::Info("----------------------------------------");
|
classes/package/class.pack.database.php
CHANGED
@@ -109,7 +109,7 @@ class DUP_Database
|
|
109 |
*
|
110 |
* @return array Returns an array full of meta-data about the database
|
111 |
*/
|
112 |
-
public function
|
113 |
{
|
114 |
global $wpdb;
|
115 |
|
109 |
*
|
110 |
* @return array Returns an array full of meta-data about the database
|
111 |
*/
|
112 |
+
public function getScannerData()
|
113 |
{
|
114 |
global $wpdb;
|
115 |
|
classes/package/class.pack.php
CHANGED
@@ -104,7 +104,7 @@ class DUP_Package
|
|
104 |
$report['SRV'] = $srv['SRV'];
|
105 |
|
106 |
//FILES
|
107 |
-
$this->Archive->
|
108 |
$dirCount = count($this->Archive->Dirs);
|
109 |
$fileCount = count($this->Archive->Files);
|
110 |
$fullCount = $dirCount + $fileCount;
|
@@ -113,20 +113,19 @@ class DUP_Package
|
|
113 |
$report['ARC']['DirCount'] = number_format($dirCount);
|
114 |
$report['ARC']['FileCount'] = number_format($fileCount);
|
115 |
$report['ARC']['FullCount'] = number_format($fullCount);
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
$report['ARC']['FilterInfo']
|
120 |
-
|
121 |
-
$report['ARC']['Status']['Size'] = ($this->Archive->Size > DUPLICATOR_SCAN_SITE) ? 'Warn' : 'Good';
|
122 |
$report['ARC']['Status']['Names'] = (count($this->Archive->FilterInfo->Files->Warning) + count($this->Archive->FilterInfo->Dirs->Warning)) ? 'Warn' : 'Good';
|
123 |
$report['ARC']['Status']['Big'] = count($this->Archive->FilterInfo->Files->Size) ? 'Warn' : 'Good';
|
124 |
-
|
125 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
126 |
$report['ARC']['Files'] = $this->Archive->Files;
|
127 |
|
|
|
128 |
//DATABASE
|
129 |
-
$db
|
130 |
$report['DB'] = $db;
|
131 |
|
132 |
$warnings = array($report['SRV']['WEB']['ALL'],
|
@@ -151,6 +150,8 @@ class DUP_Package
|
|
151 |
$report['RPT']['Success'] = $warn_counts['Good'];
|
152 |
$report['RPT']['ScanTime'] = DUP_Util::elapsedTime(DUP_Util::getMicrotime(), $timerStart);
|
153 |
$fp = fopen(DUPLICATOR_SSDIR_PATH_TMP."/{$this->ScanFile}", 'w');
|
|
|
|
|
154 |
fwrite($fp, json_encode($report));
|
155 |
fclose($fp);
|
156 |
|
@@ -164,7 +165,6 @@ class DUP_Package
|
|
164 |
*/
|
165 |
public function runBuild()
|
166 |
{
|
167 |
-
|
168 |
global $wp_version;
|
169 |
global $wpdb;
|
170 |
global $current_user;
|
@@ -232,7 +232,6 @@ class DUP_Package
|
|
232 |
$this->Archive->build($this);
|
233 |
$this->Installer->build($this);
|
234 |
|
235 |
-
|
236 |
//INTEGRITY CHECKS
|
237 |
DUP_Log::Info("\n********************************************************************************");
|
238 |
DUP_Log::Info("INTEGRITY CHECKS:");
|
@@ -300,14 +299,15 @@ class DUP_Package
|
|
300 |
$name = substr(sanitize_file_name($name), 0, 40);
|
301 |
$name = str_replace($name_chars, '', $name);
|
302 |
|
303 |
-
$filter_dirs
|
304 |
-
|
305 |
-
$
|
306 |
-
$
|
307 |
-
$
|
308 |
-
$dbversion
|
309 |
-
$
|
310 |
-
$dbcomments
|
|
|
311 |
|
312 |
//PACKAGE
|
313 |
$this->Created = date("Y-m-d H:i:s");
|
@@ -327,6 +327,7 @@ class DUP_Package
|
|
327 |
$this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
|
328 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
329 |
$this->Archive->FilterDirs = esc_html($filter_dirs);
|
|
|
330 |
$this->Archive->FilterExts = str_replace(array('.', ' '), "", esc_html($filter_exts));
|
331 |
//INSTALLER
|
332 |
$this->Installer->OptsDBHost = esc_html($post['dbhost']);
|
@@ -365,6 +366,8 @@ class DUP_Package
|
|
365 |
update_option(self::OPT_ACTIVE, $package);
|
366 |
}
|
367 |
|
|
|
|
|
368 |
/**
|
369 |
* Sets the status to log the state of the build
|
370 |
*
|
@@ -590,44 +593,8 @@ class DUP_Package
|
|
590 |
}
|
591 |
}
|
592 |
|
593 |
-
/**
|
594 |
-
* Properly creates the directory filter list that is used for filtering directories
|
595 |
-
*
|
596 |
-
* @param string $dirs A semi-colon list of dir paths
|
597 |
-
* /path1_/path/;/path1_/path2/;
|
598 |
-
*
|
599 |
-
* @returns string A cleaned up list of directory filters
|
600 |
-
*/
|
601 |
-
private function parseDirectoryFilter($dirs = "")
|
602 |
-
{
|
603 |
-
$dirs = str_replace(array("\n", "\t", "\r"), '', $dirs);
|
604 |
-
$filter_dirs = "";
|
605 |
-
$dir_array = array_unique(explode(";", $dirs));
|
606 |
-
foreach ($dir_array as $val) {
|
607 |
-
if (strlen($val) >= 2) {
|
608 |
-
$filter_dirs .= DUP_Util::safePath(trim(rtrim($val, "/\\"))).";";
|
609 |
-
}
|
610 |
-
}
|
611 |
-
return $filter_dirs;
|
612 |
-
}
|
613 |
|
614 |
-
|
615 |
-
|
616 |
-
*
|
617 |
-
* @param string $dirs A semi-colon list of dir paths
|
618 |
-
* .jpg;.zip;.gif;
|
619 |
-
*
|
620 |
-
* @returns string A cleaned up list of extension filters
|
621 |
-
*/
|
622 |
-
private function parseExtensionFilter($extensions = "")
|
623 |
-
{
|
624 |
-
$filter_exts = "";
|
625 |
-
if (strlen($extensions) >= 1 && $extensions != ";") {
|
626 |
-
$filter_exts = str_replace(array(' ', '.'), '', $extensions);
|
627 |
-
$filter_exts = str_replace(",", ";", $filter_exts);
|
628 |
-
$filter_exts = DUP_Util::appendOnce($extensions, ";");
|
629 |
-
}
|
630 |
-
return $filter_exts;
|
631 |
-
}
|
632 |
}
|
633 |
?>
|
104 |
$report['SRV'] = $srv['SRV'];
|
105 |
|
106 |
//FILES
|
107 |
+
$this->Archive->getScannerData();
|
108 |
$dirCount = count($this->Archive->Dirs);
|
109 |
$fileCount = count($this->Archive->Files);
|
110 |
$fullCount = $dirCount + $fileCount;
|
113 |
$report['ARC']['DirCount'] = number_format($dirCount);
|
114 |
$report['ARC']['FileCount'] = number_format($fileCount);
|
115 |
$report['ARC']['FullCount'] = number_format($fullCount);
|
116 |
+
$report['ARC']['FilterDirsAll'] = $this->Archive->FilterDirsAll;
|
117 |
+
$report['ARC']['FilterFilesAll'] = $this->Archive->FilterFilesAll;
|
118 |
+
$report['ARC']['FilterExtsAll'] = $this->Archive->FilterExtsAll;
|
119 |
+
$report['ARC']['FilterInfo'] = $this->Archive->FilterInfo;
|
120 |
+
$report['ARC']['Status']['Size'] = ($this->Archive->Size > DUPLICATOR_SCAN_SIZE_DEFAULT) ? 'Warn' : 'Good';
|
|
|
121 |
$report['ARC']['Status']['Names'] = (count($this->Archive->FilterInfo->Files->Warning) + count($this->Archive->FilterInfo->Dirs->Warning)) ? 'Warn' : 'Good';
|
122 |
$report['ARC']['Status']['Big'] = count($this->Archive->FilterInfo->Files->Size) ? 'Warn' : 'Good';
|
|
|
123 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
124 |
$report['ARC']['Files'] = $this->Archive->Files;
|
125 |
|
126 |
+
|
127 |
//DATABASE
|
128 |
+
$db = $this->Database->getScannerData();
|
129 |
$report['DB'] = $db;
|
130 |
|
131 |
$warnings = array($report['SRV']['WEB']['ALL'],
|
150 |
$report['RPT']['Success'] = $warn_counts['Good'];
|
151 |
$report['RPT']['ScanTime'] = DUP_Util::elapsedTime(DUP_Util::getMicrotime(), $timerStart);
|
152 |
$fp = fopen(DUPLICATOR_SSDIR_PATH_TMP."/{$this->ScanFile}", 'w');
|
153 |
+
|
154 |
+
|
155 |
fwrite($fp, json_encode($report));
|
156 |
fclose($fp);
|
157 |
|
165 |
*/
|
166 |
public function runBuild()
|
167 |
{
|
|
|
168 |
global $wp_version;
|
169 |
global $wpdb;
|
170 |
global $current_user;
|
232 |
$this->Archive->build($this);
|
233 |
$this->Installer->build($this);
|
234 |
|
|
|
235 |
//INTEGRITY CHECKS
|
236 |
DUP_Log::Info("\n********************************************************************************");
|
237 |
DUP_Log::Info("INTEGRITY CHECKS:");
|
299 |
$name = substr(sanitize_file_name($name), 0, 40);
|
300 |
$name = str_replace($name_chars, '', $name);
|
301 |
|
302 |
+
$filter_dirs = isset($post['filter-dirs']) ? $this->Archive->parseDirectoryFilter($post['filter-dirs']) : '';
|
303 |
+
$filter_files = isset($post['filter-files']) ? $this->Archive->parseFileFilter($post['filter-files']) : '';
|
304 |
+
$filter_exts = isset($post['filter-exts']) ? $this->Archive->parseExtensionFilter($post['filter-exts']) : '';
|
305 |
+
$tablelist = isset($post['dbtables']) ? implode(',', $post['dbtables']) : '';
|
306 |
+
$compatlist = isset($post['dbcompat']) ? implode(',', $post['dbcompat']) : '';
|
307 |
+
$dbversion = DUP_DB::getVersion();
|
308 |
+
$dbversion = is_null($dbversion) ? '- unknown -' : $dbversion;
|
309 |
+
$dbcomments = DUP_DB::getVariable('version_comment');
|
310 |
+
$dbcomments = is_null($dbcomments) ? '- unknown -' : $dbcomments;
|
311 |
|
312 |
//PACKAGE
|
313 |
$this->Created = date("Y-m-d H:i:s");
|
327 |
$this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
|
328 |
$this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
|
329 |
$this->Archive->FilterDirs = esc_html($filter_dirs);
|
330 |
+
$this->Archive->FilterFiles = esc_html($filter_files);
|
331 |
$this->Archive->FilterExts = str_replace(array('.', ' '), "", esc_html($filter_exts));
|
332 |
//INSTALLER
|
333 |
$this->Installer->OptsDBHost = esc_html($post['dbhost']);
|
366 |
update_option(self::OPT_ACTIVE, $package);
|
367 |
}
|
368 |
|
369 |
+
|
370 |
+
|
371 |
/**
|
372 |
* Sets the status to log the state of the build
|
373 |
*
|
593 |
}
|
594 |
}
|
595 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
+
|
598 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
}
|
600 |
?>
|
classes/utilities/class.u.json.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DUP_JSON
|
4 |
+
{
|
5 |
+
protected static $_messages = array(
|
6 |
+
JSON_ERROR_NONE => 'No error has occurred',
|
7 |
+
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded',
|
8 |
+
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
|
9 |
+
JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded',
|
10 |
+
JSON_ERROR_SYNTAX => 'Syntax error',
|
11 |
+
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters. To resolve see https://snapcreek.com/duplicator/docs/faqs-tech/#faq-package-170-q'
|
12 |
+
);
|
13 |
+
|
14 |
+
public static function customEncode($value, $iteration = 1)
|
15 |
+
{
|
16 |
+
if (DUP_Util::$on_php_53_plus) {
|
17 |
+
|
18 |
+
$encoded = json_encode($value);
|
19 |
+
|
20 |
+
switch (json_last_error()) {
|
21 |
+
case JSON_ERROR_NONE:
|
22 |
+
return $encoded;
|
23 |
+
case JSON_ERROR_DEPTH:
|
24 |
+
throw new RuntimeException('Maximum stack depth exceeded');
|
25 |
+
case JSON_ERROR_STATE_MISMATCH:
|
26 |
+
throw new RuntimeException('Underflow or the modes mismatch');
|
27 |
+
case JSON_ERROR_CTRL_CHAR:
|
28 |
+
throw new RuntimeException('Unexpected control character found');
|
29 |
+
case JSON_ERROR_SYNTAX:
|
30 |
+
throw new RuntimeException('Syntax error, malformed JSON');
|
31 |
+
case JSON_ERROR_UTF8:
|
32 |
+
if ($iteration == 1) {
|
33 |
+
$clean = self::makeUTF8($value);
|
34 |
+
return self::customEncode($clean, $iteration + 1);
|
35 |
+
} else {
|
36 |
+
throw new RuntimeException('UTF-8 error loop');
|
37 |
+
}
|
38 |
+
default:
|
39 |
+
throw new RuntimeException('Unknown error');
|
40 |
+
}
|
41 |
+
} else {
|
42 |
+
return self::oldCustomEncode($value);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
public static function encode($value, $options = 0)
|
47 |
+
{
|
48 |
+
$result = json_encode($value, $options);
|
49 |
+
|
50 |
+
if ($result !== FALSE) {
|
51 |
+
return $result;
|
52 |
+
}
|
53 |
+
|
54 |
+
if (function_exists('json_last_error')) {
|
55 |
+
$message = self::$_messages[json_last_error()];
|
56 |
+
} else {
|
57 |
+
$message = __('One or more filenames isn\'t compatible with JSON encoding');
|
58 |
+
}
|
59 |
+
|
60 |
+
throw new RuntimeException($message);
|
61 |
+
}
|
62 |
+
|
63 |
+
public static function safeEncode($value)
|
64 |
+
{
|
65 |
+
$jsonString = json_encode($value);
|
66 |
+
|
67 |
+
if (($jsonString === false) || trim($jsonString) == '') {
|
68 |
+
$jsonString = self::customEncode($value);
|
69 |
+
|
70 |
+
if (($jsonString === false) || trim($jsonString) == '') {
|
71 |
+
throw new Exception('Unable to generate JSON from object');
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return $jsonString;
|
76 |
+
}
|
77 |
+
|
78 |
+
public static function decode($json, $assoc = false)
|
79 |
+
{
|
80 |
+
$result = json_decode($json, $assoc);
|
81 |
+
|
82 |
+
if ($result) {
|
83 |
+
return $result;
|
84 |
+
}
|
85 |
+
|
86 |
+
if (function_exists('json_last_error')) {
|
87 |
+
throw new RuntimeException(self::$_messages[json_last_error()]);
|
88 |
+
} else {
|
89 |
+
throw new RuntimeException("DUP_JSON decode error");
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
private static function makeUTF8($mixed)
|
95 |
+
{
|
96 |
+
if (is_array($mixed)) {
|
97 |
+
foreach ($mixed as $key => $value) {
|
98 |
+
$mixed[$key] = self::makeUTF8($value);
|
99 |
+
}
|
100 |
+
} else if (is_string($mixed)) {
|
101 |
+
return utf8_encode($mixed);
|
102 |
+
}
|
103 |
+
return $mixed;
|
104 |
+
}
|
105 |
+
|
106 |
+
private static function escapeString($str)
|
107 |
+
{
|
108 |
+
return addcslashes($str, "\v\t\n\r\f\"\\/");
|
109 |
+
}
|
110 |
+
|
111 |
+
private static function oldCustomEncode($in)
|
112 |
+
{
|
113 |
+
$out = "";
|
114 |
+
|
115 |
+
if (is_object($in)) {
|
116 |
+
$arr[$key] = "\"".self::escapeString($key)."\":\"{$val}\"";
|
117 |
+
$in = get_object_vars($in);
|
118 |
+
}
|
119 |
+
|
120 |
+
if (is_array($in)) {
|
121 |
+
$obj = false;
|
122 |
+
$arr = array();
|
123 |
+
|
124 |
+
foreach ($in AS $key => $val) {
|
125 |
+
if (!is_numeric($key)) {
|
126 |
+
$obj = true;
|
127 |
+
}
|
128 |
+
$arr[$key] = self::oldCustomEncode($val);
|
129 |
+
}
|
130 |
+
|
131 |
+
if ($obj) {
|
132 |
+
foreach ($arr AS $key => $val) {
|
133 |
+
$arr[$key] = "\"".self::escapeString($key)."\":{$val}";
|
134 |
+
}
|
135 |
+
$val = implode(',', $arr);
|
136 |
+
$out .= "{{$val}}";
|
137 |
+
} else {
|
138 |
+
$val = implode(',', $arr);
|
139 |
+
$out .= "[{$val}]";
|
140 |
+
}
|
141 |
+
} elseif (is_bool($in)) {
|
142 |
+
$out .= $in ? 'true' : 'false';
|
143 |
+
} elseif (is_null($in)) {
|
144 |
+
$out .= 'null';
|
145 |
+
} elseif (is_string($in)) {
|
146 |
+
$out .= "\"".self::escapeString($in)."\"";
|
147 |
+
} else {
|
148 |
+
$out .= $in;
|
149 |
+
}
|
150 |
+
|
151 |
+
return "{$out}";
|
152 |
+
}
|
153 |
+
}
|
classes/utilities/class.u.php
CHANGED
@@ -35,6 +35,11 @@ class DUP_Util
|
|
35 |
*/
|
36 |
public static $on_php_54_plus;
|
37 |
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* Inited on load (see end of file)
|
40 |
*/
|
@@ -43,9 +48,60 @@ class DUP_Util
|
|
43 |
self::$on_php_529_plus = version_compare(PHP_VERSION, '5.2.9') >= 0;
|
44 |
self::$on_php_53_plus = version_compare(PHP_VERSION, '5.3.0') >= 0;
|
45 |
self::$on_php_54_plus = version_compare(PHP_VERSION, '5.4.0') >= 0;
|
|
|
46 |
}
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
* PHP_SAPI for fcgi requires a data flush of at least 256
|
50 |
* bytes every 40 seconds or else it forces a script hault
|
51 |
*
|
@@ -55,6 +111,7 @@ class DUP_Util
|
|
55 |
{
|
56 |
echo(str_repeat(' ', 300));
|
57 |
@flush();
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -142,14 +199,14 @@ class DUP_Util
|
|
142 |
*
|
143 |
* @return string The size of bytes readable such as 100KB, 20MB, 1GB etc.
|
144 |
*/
|
145 |
-
public static function byteSize($size)
|
146 |
{
|
147 |
try {
|
148 |
$units = array('B', 'KB', 'MB', 'GB', 'TB');
|
149 |
for ($i = 0; $size >= 1024 && $i < 4; $i++) {
|
150 |
$size /= 1024;
|
151 |
}
|
152 |
-
return round($size,
|
153 |
} catch (Exception $e) {
|
154 |
return "n/a";
|
155 |
}
|
35 |
*/
|
36 |
public static $on_php_54_plus;
|
37 |
|
38 |
+
/**
|
39 |
+
* Is PHP 7 or better running
|
40 |
+
*/
|
41 |
+
public static $PHP7_plus;
|
42 |
+
|
43 |
/**
|
44 |
* Inited on load (see end of file)
|
45 |
*/
|
48 |
self::$on_php_529_plus = version_compare(PHP_VERSION, '5.2.9') >= 0;
|
49 |
self::$on_php_53_plus = version_compare(PHP_VERSION, '5.3.0') >= 0;
|
50 |
self::$on_php_54_plus = version_compare(PHP_VERSION, '5.4.0') >= 0;
|
51 |
+
self::$PHP7_plus = version_compare(PHP_VERSION, '7.0.0', '>=');
|
52 |
}
|
53 |
|
54 |
+
/**
|
55 |
+
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
|
56 |
+
*
|
57 |
+
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
|
58 |
+
* This variant allows $key to be closures.
|
59 |
+
*
|
60 |
+
* @param array $array The array to have grouping performed on.
|
61 |
+
* @param mixed $key,... The key to group or split by. Can be a _string_, an _integer_, a _float_, or a _callable_.
|
62 |
+
* - If the key is a callback, it must return a valid key from the array.
|
63 |
+
* - If the key is _NULL_, the iterated element is skipped.
|
64 |
+
* - string|int callback ( mixed $item )
|
65 |
+
*
|
66 |
+
* @return array|null Returns a multidimensional array or `null` if `$key` is invalid.
|
67 |
+
*/
|
68 |
+
public static function array_group_by(array $array, $key)
|
69 |
+
{
|
70 |
+
if (!is_string($key) && !is_int($key) && !is_float($key) && !is_callable($key) ) {
|
71 |
+
trigger_error('array_group_by(): The key should be a string, an integer, or a callback', E_USER_ERROR);
|
72 |
+
return null;
|
73 |
+
}
|
74 |
+
$func = (!is_string($key) && is_callable($key) ? $key : null);
|
75 |
+
$_key = $key;
|
76 |
+
// Load the new array, splitting by the target key
|
77 |
+
$grouped = array();
|
78 |
+
foreach ($array as $value) {
|
79 |
+
$key = null;
|
80 |
+
if (is_callable($func)) {
|
81 |
+
$key = call_user_func($func, $value);
|
82 |
+
} elseif (is_object($value) && isset($value->{$_key})) {
|
83 |
+
$key = $value->{$_key};
|
84 |
+
} elseif (isset($value[$_key])) {
|
85 |
+
$key = $value[$_key];
|
86 |
+
}
|
87 |
+
if ($key === null) {
|
88 |
+
continue;
|
89 |
+
}
|
90 |
+
$grouped[$key][] = $value;
|
91 |
+
}
|
92 |
+
// Recursively build a nested grouping if more parameters are supplied
|
93 |
+
// Each grouped array value is grouped according to the next sequential key
|
94 |
+
if (func_num_args() > 2) {
|
95 |
+
$args = func_get_args();
|
96 |
+
foreach ($grouped as $key => $value) {
|
97 |
+
$params = array_merge(array( $value ), array_slice($args, 2, func_num_args()));
|
98 |
+
$grouped[$key] = call_user_func_array('DUP_Util::array_group_by', $params);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
return $grouped;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
* PHP_SAPI for fcgi requires a data flush of at least 256
|
106 |
* bytes every 40 seconds or else it forces a script hault
|
107 |
*
|
111 |
{
|
112 |
echo(str_repeat(' ', 300));
|
113 |
@flush();
|
114 |
+
@ob_flush();
|
115 |
}
|
116 |
|
117 |
/**
|
199 |
*
|
200 |
* @return string The size of bytes readable such as 100KB, 20MB, 1GB etc.
|
201 |
*/
|
202 |
+
public static function byteSize($size, $roundBy = 2)
|
203 |
{
|
204 |
try {
|
205 |
$units = array('B', 'KB', 'MB', 'GB', 'TB');
|
206 |
for ($i = 0; $size >= 1024 && $i < 4; $i++) {
|
207 |
$size /= 1024;
|
208 |
}
|
209 |
+
return round($size, $roundBy).$units[$i];
|
210 |
} catch (Exception $e) {
|
211 |
return "n/a";
|
212 |
}
|
classes/utilities/class.u.scancheck.php
CHANGED
@@ -54,6 +54,16 @@ class DUP_ScanCheck
|
|
54 |
*/
|
55 |
public $unreadable = array();
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* If the maxFiles or maxDirs limit is reached then true
|
59 |
*/
|
@@ -101,7 +111,21 @@ class DUP_ScanCheck
|
|
101 |
} else if ($this->isLink($path)) {
|
102 |
$results[] = $path;
|
103 |
$this->symLinks[] = $path;
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
$this->fileCount++;
|
106 |
}
|
107 |
//Dirs
|
@@ -116,7 +140,21 @@ class DUP_ScanCheck
|
|
116 |
} else if ($this->isLink($path)) {
|
117 |
$results[] = $path;
|
118 |
$this->symLinks[] = $path;
|
119 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
$this->dirCount++;
|
121 |
}
|
122 |
}
|
54 |
*/
|
55 |
public $unreadable = array();
|
56 |
|
57 |
+
/**
|
58 |
+
* Stores a list of dirs with utf8 settings
|
59 |
+
*/
|
60 |
+
public $nameTestDirs = array();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Stores a list of files with utf8 settings
|
64 |
+
*/
|
65 |
+
public $nameTestFiles = array();
|
66 |
+
|
67 |
/**
|
68 |
* If the maxFiles or maxDirs limit is reached then true
|
69 |
*/
|
111 |
} else if ($this->isLink($path)) {
|
112 |
$results[] = $path;
|
113 |
$this->symLinks[] = $path;
|
114 |
+
} else {
|
115 |
+
$name = basename($path);
|
116 |
+
$invalid_test = preg_match('/(\/|\*|\?|\>|\<|\:|\\|\|)/', $name)
|
117 |
+
|| trim($name) == ''
|
118 |
+
|| (strrpos($name, '.') == strlen($name) - 1 && substr($name, -1) == '.')
|
119 |
+
|| preg_match('/[^\x20-\x7f]/', $name);
|
120 |
+
|
121 |
+
if ($invalid_test) {
|
122 |
+
if (! DUP_Util::$PHP7_plus && DUP_Util::isWindows()) {
|
123 |
+
$this->nameTestFiles[] = utf8_decode($path);
|
124 |
+
} else {
|
125 |
+
$this->nameTestFiles[] = $path;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
129 |
$this->fileCount++;
|
130 |
}
|
131 |
//Dirs
|
140 |
} else if ($this->isLink($path)) {
|
141 |
$results[] = $path;
|
142 |
$this->symLinks[] = $path;
|
143 |
+
} else {
|
144 |
+
|
145 |
+
$invalid_test = strlen($path) > 244
|
146 |
+
|| trim($path) == ''
|
147 |
+
|| preg_match('/[^\x20-\x7f]/', $path);
|
148 |
+
|
149 |
+
if ($invalid_test) {
|
150 |
+
if (! DUP_Util::$PHP7_plus && DUP_Util::isWindows()) {
|
151 |
+
$this->nameTestDirs[] = utf8_decode($path);
|
152 |
+
} else {
|
153 |
+
$this->nameTestDirs[] = $path;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
$this->dirCount++;
|
159 |
}
|
160 |
}
|
ctrls/ctrl.package.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* DUPLICATOR_PACKAGE_SCAN
|
5 |
* Returns a json scan report object which contains data about the system
|
@@ -17,11 +22,11 @@ function duplicator_package_scan() {
|
|
17 |
error_reporting(E_ERROR);
|
18 |
DUP_Util::initSnapshotDirectory();
|
19 |
|
20 |
-
$
|
21 |
-
$report = $
|
22 |
|
23 |
-
$
|
24 |
-
$json_response =
|
25 |
|
26 |
DUP_Package::tempFileCleanup();
|
27 |
error_reporting($errLevel);
|
@@ -140,5 +145,67 @@ function duplicator_package_delete() {
|
|
140 |
die(json_encode($json));
|
141 |
}
|
142 |
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php');
|
4 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
|
5 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.json.php');
|
6 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/package/class.pack.php');
|
7 |
+
|
8 |
/**
|
9 |
* DUPLICATOR_PACKAGE_SCAN
|
10 |
* Returns a json scan report object which contains data about the system
|
22 |
error_reporting(E_ERROR);
|
23 |
DUP_Util::initSnapshotDirectory();
|
24 |
|
25 |
+
$package = DUP_Package::getActive();
|
26 |
+
$report = $package->runScanner();
|
27 |
|
28 |
+
$package->saveActiveItem('ScanFile', $package->ScanFile);
|
29 |
+
$json_response = DUP_JSON::safeEncode($report);
|
30 |
|
31 |
DUP_Package::tempFileCleanup();
|
32 |
error_reporting($errLevel);
|
145 |
die(json_encode($json));
|
146 |
}
|
147 |
|
148 |
+
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Controller for Tools
|
152 |
+
* @package Dupicator\ctrls
|
153 |
+
*/
|
154 |
+
class DUP_CTRL_Package extends DUP_CTRL_Base
|
155 |
+
{
|
156 |
+
/**
|
157 |
+
* Init this instance of the object
|
158 |
+
*/
|
159 |
+
function __construct()
|
160 |
+
{
|
161 |
+
add_action('wp_ajax_DUP_CTRL_Package_addQuickFilters', array($this, 'addQuickFilters'));
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Removed all reserved installer files names
|
167 |
+
*
|
168 |
+
* @param string $_POST['dir_paths'] A semi-colon seperated list of dir paths
|
169 |
+
*
|
170 |
+
* @return string Returns all of the active directory filters as a ";" seperated string
|
171 |
+
*/
|
172 |
+
public function addQuickFilters($post)
|
173 |
+
{
|
174 |
+
$post = $this->postParamMerge($post);
|
175 |
+
check_ajax_referer($post['action'], 'nonce');
|
176 |
+
$result = new DUP_CTRL_Result($this);
|
177 |
+
|
178 |
+
try {
|
179 |
+
//CONTROLLER LOGIC
|
180 |
+
$package = DUP_Package::getActive();
|
181 |
+
|
182 |
+
//DIRS
|
183 |
+
$dir_filters = $package->Archive->FilterDirs.';' . $post['dir_paths'];
|
184 |
+
$dir_filters = $package->Archive->parseDirectoryFilter($dir_filters);
|
185 |
+
$changed = $package->Archive->saveActiveItem($package, 'FilterDirs', $dir_filters);
|
186 |
+
|
187 |
+
//FILES
|
188 |
+
$file_filters = $package->Archive->FilterFiles.';' . $post['file_paths'];
|
189 |
+
$file_filters = $package->Archive->parseFileFilter($file_filters);
|
190 |
+
$changed = $package->Archive->saveActiveItem($package, 'FilterFiles', $file_filters);
|
191 |
+
|
192 |
+
|
193 |
+
$changed = $package->Archive->saveActiveItem($package, 'FilterOn', 1);
|
194 |
+
|
195 |
+
//Result
|
196 |
+
$package = DUP_Package::getActive();
|
197 |
+
$payload['dirs-in'] = $post['dir_paths'];
|
198 |
+
$payload['dir-out'] = $package->Archive->FilterDirs;
|
199 |
+
$payload['files-in'] = $post['file_paths'];
|
200 |
+
$payload['files-out'] = $package->Archive->FilterFiles;
|
201 |
+
|
202 |
+
//RETURN RESULT
|
203 |
+
$test = ($changed) ? DUP_CTRL_Status::SUCCESS : DUP_CTRL_Status::FAILED;
|
204 |
+
$result->process($payload, $test);
|
205 |
+
|
206 |
+
} catch (Exception $exc) {
|
207 |
+
$result->processError($exc);
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
debug/tst.packages.php
CHANGED
@@ -12,3 +12,20 @@
|
|
12 |
</div>
|
13 |
</form>
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
</div>
|
13 |
</form>
|
14 |
|
15 |
+
<form>
|
16 |
+
<?php
|
17 |
+
$CTRL['Title'] = 'DUP_CTRL_Package_addQuickFilters';
|
18 |
+
$CTRL['Action'] = 'DUP_CTRL_Package_addQuickFilters';
|
19 |
+
$CTRL['Test'] = true;
|
20 |
+
DUP_DEBUG_TestSetup($CTRL);
|
21 |
+
?>
|
22 |
+
<div class="params">
|
23 |
+
<textarea style="width:200px; height: 50px" name="dir_paths">D:/path1/;
|
24 |
+
D:/path2/path/;
|
25 |
+
</textarea>
|
26 |
+
<textarea style="width:200px; height: 50px" name="file_paths">D:/path1/test.txt;
|
27 |
+
D:/path2/path/test2.txt;
|
28 |
+
</textarea>
|
29 |
+
</div>
|
30 |
+
</form>
|
31 |
+
|
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', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
@@ -36,9 +36,9 @@ if (function_exists('plugin_dir_url'))
|
|
36 |
define('DUPLICATOR_DB_MAX_TIME', 5000);
|
37 |
define('DUPLICATOR_DB_EOF_MARKER', 'DUPLICATOR_MYSQLDUMP_EOF');
|
38 |
//SCANNER CONSTRAINTS
|
39 |
-
define('
|
40 |
define('DUPLICATOR_SCAN_WARNFILESIZE', 3145728); //3MB
|
41 |
-
define('DUPLICATOR_SCAN_CACHESIZE',
|
42 |
define('DUPLICATOR_SCAN_DB_ALL_ROWS', 1000000); //1 rows million per DB
|
43 |
define('DUPLICATOR_SCAN_DB_ALL_SIZE', 52428800); //50MB DB
|
44 |
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url'))
|
4 |
{
|
5 |
+
define('DUPLICATOR_VERSION', '1.2.10');
|
6 |
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
36 |
define('DUPLICATOR_DB_MAX_TIME', 5000);
|
37 |
define('DUPLICATOR_DB_EOF_MARKER', 'DUPLICATOR_MYSQLDUMP_EOF');
|
38 |
//SCANNER CONSTRAINTS
|
39 |
+
define('DUPLICATOR_SCAN_SIZE_DEFAULT', 157286400); //150MB
|
40 |
define('DUPLICATOR_SCAN_WARNFILESIZE', 3145728); //3MB
|
41 |
+
define('DUPLICATOR_SCAN_CACHESIZE', 1048576); //1MB
|
42 |
define('DUPLICATOR_SCAN_DB_ALL_ROWS', 1000000); //1 rows million per DB
|
43 |
define('DUPLICATOR_SCAN_DB_ALL_SIZE', 52428800); //50MB DB
|
44 |
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
duplicator.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/** ===============================================================================
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
-
Description:
|
6 |
-
Version: 1.2.
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
@@ -132,8 +132,9 @@ if (is_admin() == true)
|
|
132 |
add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
|
133 |
add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
|
134 |
add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
|
135 |
-
$GLOBALS['CTRLS_DUP_CTRL_UI']
|
136 |
-
$GLOBALS['CTRLS_DUP_CTRL_Tools']
|
|
|
137 |
|
138 |
/**
|
139 |
* User role editor integration
|
@@ -162,7 +163,7 @@ if (is_admin() == true)
|
|
162 |
wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
|
163 |
wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
|
164 |
/* JS */
|
165 |
-
wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.
|
166 |
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
167 |
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
168 |
}
|
2 |
/** ===============================================================================
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
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.10
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
132 |
add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
|
133 |
add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
|
134 |
add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
|
135 |
+
$GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
|
136 |
+
$GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
|
137 |
+
$GLOBALS['CTRLS_DUP_CTRL_Package'] = new DUP_CTRL_Package();
|
138 |
|
139 |
/**
|
140 |
* User role editor integration
|
163 |
wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
|
164 |
wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
|
165 |
/* JS */
|
166 |
+
wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
|
167 |
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
168 |
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
169 |
}
|
installer/build/assets/inc.css.php
CHANGED
@@ -166,16 +166,16 @@
|
|
166 |
table.s4-report-results th, table.s4-report-errs th {background-color:#efefef; padding:0px; font-size:13px; padding:0px}
|
167 |
table.s4-report-results td, table.s4-report-errs td {padding:0px; white-space:nowrap; border:1px solid #dfdfdf; text-align:center; font-size:12px}
|
168 |
table.s4-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
|
169 |
-
div.s4-err-title {
|
170 |
|
171 |
div.s4-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
|
172 |
div.s4-err-msg div.content{padding:5px; font-size:11px; line-height:17px; max-height:125px; overflow-y:scroll; border:1px solid silver; margin:3px; }
|
173 |
-
div.s4-err-msg div.info-error{padding:7px; background-color:#
|
174 |
-
div.s4-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:
|
175 |
table.s4-final-step {width:100%;}
|
176 |
table.s4-final-step td {padding:5px 15px 5px 5px}
|
177 |
table.s4-final-step td:first-child {white-space:nowrap;}
|
178 |
-
div.s4-go-back {border-
|
179 |
a.s4-final-btns {display: block; width:135; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
|
180 |
color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
|
181 |
}
|
166 |
table.s4-report-results th, table.s4-report-errs th {background-color:#efefef; padding:0px; font-size:13px; padding:0px}
|
167 |
table.s4-report-results td, table.s4-report-errs td {padding:0px; white-space:nowrap; border:1px solid #dfdfdf; text-align:center; font-size:12px}
|
168 |
table.s4-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
|
169 |
+
div.s4-err-title {background-color:#dfdfdf; font-weight: bold; margin:-3px 0 15px 0; padding:5px; border-radius:3px; font-size:13px}
|
170 |
|
171 |
div.s4-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
|
172 |
div.s4-err-msg div.content{padding:5px; font-size:11px; line-height:17px; max-height:125px; overflow-y:scroll; border:1px solid silver; margin:3px; }
|
173 |
+
div.s4-err-msg div.info-error{padding:7px; background-color:#f9c9c9; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px }
|
174 |
+
div.s4-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px;}
|
175 |
table.s4-final-step {width:100%;}
|
176 |
table.s4-final-step td {padding:5px 15px 5px 5px}
|
177 |
table.s4-final-step td:first-child {white-space:nowrap;}
|
178 |
+
div.s4-go-back {border-top:1px solid #dfdfdf; margin:auto; font-style:italic; font-size:10px; color:#333}
|
179 |
a.s4-final-btns {display: block; width:135; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
|
180 |
color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
|
181 |
}
|
installer/build/classes/class.logging.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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 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/> Workarounds
|
7 |
define('ERR_ZIPMANUAL', 'When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and database.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 database.sql files are present.');
|
8 |
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</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.');
|
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 database.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 database.sql files are present.');
|
8 |
define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</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.');
|
installer/build/classes/config/class.conf.srv.php
CHANGED
@@ -32,7 +32,10 @@ class DUPX_ServerConfig
|
|
32 |
//IIS
|
33 |
@copy('web.config', "web.config.{$timeStamp}.orig");
|
34 |
@unlink('web.config');
|
35 |
-
|
|
|
|
|
|
|
36 |
|
37 |
//.user.ini - For WordFence
|
38 |
@copy('.user.ini', ".user.ini.{$timeStamp}.orig");
|
@@ -65,6 +68,7 @@ class DUPX_ServerConfig
|
|
65 |
$update_msg = "# This file was updated by Duplicator on {$timestamp}. See .htaccess.orig for the original .htaccess file.\n";
|
66 |
$update_msg .= "# Please note that other plugins and resources write to this file. If the time-stamp above is different\n";
|
67 |
$update_msg .= "# than the current time-stamp on the file system then another resource has updated this file.\n";
|
|
|
68 |
|
69 |
$empty_htaccess = false;
|
70 |
$query_result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name = 'permalink_structure' ");
|
32 |
//IIS
|
33 |
@copy('web.config', "web.config.{$timeStamp}.orig");
|
34 |
@unlink('web.config');
|
35 |
+
$xml_contents = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
36 |
+
$xml_contents .= "<!-- Reset by Duplicator Installer. Original can be found in web.config.{$timeStamp}.orig -->\n";
|
37 |
+
$xml_contents .= "<configuration></configuration>\n";
|
38 |
+
@file_put_contents('web.config', $xml_contents);
|
39 |
|
40 |
//.user.ini - For WordFence
|
41 |
@copy('.user.ini', ".user.ini.{$timeStamp}.orig");
|
68 |
$update_msg = "# This file was updated by Duplicator on {$timestamp}. See .htaccess.orig for the original .htaccess file.\n";
|
69 |
$update_msg .= "# Please note that other plugins and resources write to this file. If the time-stamp above is different\n";
|
70 |
$update_msg .= "# than the current time-stamp on the file system then another resource has updated this file.\n";
|
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 `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name = 'permalink_structure' ");
|
installer/build/classes/config/class.conf.wp.php
CHANGED
@@ -100,34 +100,56 @@ class DUPX_WPConfig
|
|
100 |
$wpconfig_path = "{$root_path}/wp-config.php";
|
101 |
$config_file = @file_get_contents($wpconfig_path, true);
|
102 |
|
103 |
-
$
|
104 |
-
|
105 |
-
|
106 |
-
$
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
$
|
113 |
-
"'WP_SITEURL', '{$_POST['url_new']}');",
|
114 |
-
"'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');",
|
115 |
-
"'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
-
//
|
121 |
-
if (
|
122 |
-
$
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
array_push($
|
|
|
131 |
}
|
132 |
|
133 |
$config_file = preg_replace($patterns, $replace, $config_file);
|
100 |
$wpconfig_path = "{$root_path}/wp-config.php";
|
101 |
$config_file = @file_get_contents($wpconfig_path, true);
|
102 |
|
103 |
+
$patterns = array(
|
104 |
+
"/('|\")WP_HOME.*?\)\s*;/",
|
105 |
+
"/('|\")WP_SITEURL.*?\)\s*;/");
|
106 |
+
$replace = array(
|
107 |
+
"'WP_HOME', '{$_POST['url_new']}');",
|
108 |
+
"'WP_SITEURL', '{$_POST['url_new']}');");
|
109 |
+
|
110 |
+
//Not sure how well tokenParser works on all servers so only using for
|
111 |
+
//not critical constants at this point.
|
112 |
+
$defines = self::tokenParser($wpconfig_path);
|
|
|
|
|
|
|
113 |
|
114 |
+
//WP_CONTENT_DIR
|
115 |
+
if (isset($defines['WP_CONTENT_DIR'])) {
|
116 |
+
$val = str_replace($_POST['path_old'], $_POST['path_new'], DUPX_U::setSafePath($defines['WP_CONTENT_DIR']), $count);
|
117 |
+
if ($count > 0) {
|
118 |
+
array_push($patterns, "/('|\")WP_CONTENT_DIR.*?\)\s*;/");
|
119 |
+
array_push($replace, "'WP_CONTENT_DIR', '{$val}');");
|
120 |
+
}
|
121 |
+
}
|
122 |
|
123 |
+
//WP_CONTENT_URL
|
124 |
+
if (isset($defines['WP_CONTENT_URL'])) {
|
125 |
+
$val = str_replace($_POST['url_old'], $_POST['url_new'], $defines['WP_CONTENT_URL'], $count);
|
126 |
+
if ($count > 0) {
|
127 |
+
array_push($patterns, "/('|\")WP_CONTENT_URL.*?\)\s*;/");
|
128 |
+
array_push($replace, "'WP_CONTENT_URL', '{$val}');");
|
129 |
+
}
|
130 |
+
}
|
131 |
|
132 |
+
//WP_TEMP_DIR
|
133 |
+
if (isset($defines['WP_TEMP_DIR'])) {
|
134 |
+
$val = str_replace($_POST['path_old'], $_POST['path_new'], DUPX_U::setSafePath($defines['WP_TEMP_DIR']) , $count);
|
135 |
+
if ($count > 0) {
|
136 |
+
array_push($patterns, "/('|\")WP_TEMP_DIR.*?\)\s*;/");
|
137 |
+
array_push($replace, "'WP_TEMP_DIR', '{$val}');");
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
//DOMAIN_CURRENT_SITE
|
142 |
+
if (isset($defines['DOMAIN_CURRENT_SITE'])) {
|
143 |
+
$mu_newDomainHost = parse_url($_POST['url_new'], PHP_URL_HOST);
|
144 |
+
array_push($patterns, "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/");
|
145 |
+
array_push($replace, "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');");
|
146 |
}
|
147 |
|
148 |
+
//PATH_CURRENT_SITE
|
149 |
+
if (isset($defines['PATH_CURRENT_SITE'])) {
|
150 |
+
$mu_newUrlPath = parse_url($_POST['url_new'], PHP_URL_PATH);
|
151 |
+
array_push($patterns, "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
|
152 |
+
array_push($replace, "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
|
153 |
}
|
154 |
|
155 |
$config_file = preg_replace($patterns, $replace, $config_file);
|
installer/build/ctrls/ctrl.step1.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
5 |
$_POST['archive_engine'] = isset($_POST['archive_engine']) ? $_POST['archive_engine'] : 'manual';
|
6 |
$_POST['archive_filetime'] = (isset($_POST['archive_filetime'])) ? $_POST['archive_filetime'] : 'current';
|
|
|
7 |
|
8 |
//LOGGING
|
9 |
$POST_LOG = $_POST;
|
@@ -127,8 +128,19 @@ if ($_POST['archive_engine'] == 'manual') {
|
|
127 |
}
|
128 |
}
|
129 |
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
//FINAL RESULTS
|
134 |
$ajax1_end = DUPX_U::getMicrotime();
|
4 |
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
5 |
$_POST['archive_engine'] = isset($_POST['archive_engine']) ? $_POST['archive_engine'] : 'manual';
|
6 |
$_POST['archive_filetime'] = (isset($_POST['archive_filetime'])) ? $_POST['archive_filetime'] : 'current';
|
7 |
+
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
8 |
|
9 |
//LOGGING
|
10 |
$POST_LOG = $_POST;
|
128 |
}
|
129 |
}
|
130 |
|
131 |
+
//===============================
|
132 |
+
//RESET SERVER CONFIG FILES
|
133 |
+
//===============================
|
134 |
+
if ($_POST['retain_config']) {
|
135 |
+
DUPX_Log::info("\nNOTICE: Manual update of permalinks required see: Admin > Settings > Permalinks > Click Save Changes");
|
136 |
+
DUPX_Log::info("Retaining the original htaccess, user.ini or web.config files may cause issues with the setup of this site.");
|
137 |
+
DUPX_Log::info("If you run into issues during or after the install process please uncheck the 'Config Files' checkbox labeled:");
|
138 |
+
DUPX_Log::info("'Retain original .htaccess, .user.ini and web.config' from Step 1 and re-run the installer. Backups of the");
|
139 |
+
DUPX_Log::info("orginal config files will be made and can be merged per required directive.");
|
140 |
+
} else {
|
141 |
+
DUPX_ServerConfig::reset();
|
142 |
+
}
|
143 |
+
|
144 |
|
145 |
//FINAL RESULTS
|
146 |
$ajax1_end = DUPX_U::getMicrotime();
|
installer/build/ctrls/ctrl.step2.php
CHANGED
@@ -7,6 +7,7 @@ $_POST['ssl_login'] = (isset($_POST['ssl_login'])) ? true : false;
|
|
7 |
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
8 |
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
9 |
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
|
|
10 |
|
11 |
//LOGGING
|
12 |
$POST_LOG = $_POST;
|
7 |
$_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
|
8 |
$_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
|
9 |
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
|
10 |
+
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
11 |
|
12 |
//LOGGING
|
13 |
$POST_LOG = $_POST;
|
installer/build/ctrls/ctrl.step3.php
CHANGED
@@ -32,6 +32,7 @@ $_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '
|
|
32 |
$_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
|
33 |
$_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
|
34 |
$_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
|
|
|
35 |
|
36 |
//LOGGING
|
37 |
$POST_LOG = $_POST;
|
@@ -190,8 +191,17 @@ DUPX_Log::info("====================================\n");
|
|
190 |
DUPX_WPConfig::updateStandard();
|
191 |
$config_file = DUPX_WPConfig::updateExtended();
|
192 |
DUPX_Log::info("UPDATED WP-CONFIG: {$root_path}/wp-config.php' (if present)");
|
193 |
-
DUPX_ServerConfig::setup($dbh);
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
|
197 |
//===============================================
|
32 |
$_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
|
33 |
$_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
|
34 |
$_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
|
35 |
+
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
36 |
|
37 |
//LOGGING
|
38 |
$POST_LOG = $_POST;
|
191 |
DUPX_WPConfig::updateStandard();
|
192 |
$config_file = DUPX_WPConfig::updateExtended();
|
193 |
DUPX_Log::info("UPDATED WP-CONFIG: {$root_path}/wp-config.php' (if present)");
|
|
|
194 |
|
195 |
+
//Web Server Config Updates
|
196 |
+
if (!isset($_POST['url_new']) || $_POST['retain_config']) {
|
197 |
+
DUPX_Log::info("\nNOTICE: Manual update of permalinks required see: Admin > Settings > Permalinks > Click Save Changes");
|
198 |
+
DUPX_Log::info("Retaining the original htaccess, user.ini or web.config files may cause issues with the setup of this site.");
|
199 |
+
DUPX_Log::info("If you run into issues during or after the install process please uncheck the 'Config Files' checkbox labeled:");
|
200 |
+
DUPX_Log::info("'Retain original .htaccess, .user.ini and web.config' from Step 1 and re-run the installer. Backups of the");
|
201 |
+
DUPX_Log::info("orginal config files will be made and can be merged per required directive.");
|
202 |
+
} else {
|
203 |
+
DUPX_ServerConfig::setup($dbh);
|
204 |
+
}
|
205 |
|
206 |
|
207 |
//===============================================
|
installer/build/view.help.php
CHANGED
@@ -89,7 +89,7 @@ STEP 1
|
|
89 |
</td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
-
<td>Config Files
|
93 |
<td>
|
94 |
Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were setup with your packaged site.
|
95 |
When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
|
89 |
</td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
+
<td>Config Files</td>
|
93 |
<td>
|
94 |
Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were setup with your packaged site.
|
95 |
When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
|
installer/build/view.step1.php
CHANGED
@@ -438,6 +438,13 @@ OPTIONS
|
|
438 |
</table>
|
439 |
|
440 |
<table class="dupx-opts dupx-advopts">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
<tr>
|
442 |
<td>File Times:</td>
|
443 |
<td>
|
@@ -509,7 +516,7 @@ NOTICES
|
|
509 |
Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
|
510 |
<br/><br/>
|
511 |
|
512 |
-
<b>After Install:</b> When you are done with the installation you must remove
|
513 |
<ul>
|
514 |
<li>installer.php</li>
|
515 |
<li>installer-data.sql</li>
|
@@ -588,6 +595,7 @@ Auto Posts to view.step2.php
|
|
588 |
<input type="hidden" name="action_step" value="2" />
|
589 |
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
590 |
<input type="hidden" name="logging" id="ajax-logging" />
|
|
|
591 |
<input type="hidden" name="json" id="ajax-json" />
|
592 |
<textarea id='ajax-json-debug' name='json_debug_view'></textarea>
|
593 |
<input type='submit' value='manual submit'>
|
@@ -649,6 +657,7 @@ Auto Posts to view.step2.php
|
|
649 |
$("#ajax-json-debug").val(dataJSON);
|
650 |
if (typeof(data) != 'undefined' && data.pass == 1) {
|
651 |
$("#ajax-logging").val($("input:radio[name=logging]:checked").val());
|
|
|
652 |
$("#ajax-json").val(escape(dataJSON));
|
653 |
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
654 |
setTimeout(function() {$('#s1-result-form').submit();}, 500);
|
438 |
</table>
|
439 |
|
440 |
<table class="dupx-opts dupx-advopts">
|
441 |
+
<tr>
|
442 |
+
<td>Config Files:</td>
|
443 |
+
<td>
|
444 |
+
<input type="checkbox" name="retain_config" id="retain_config" value="1" />
|
445 |
+
<label for="retain_config" style="font-weight: normal">Retain original .htaccess, .user.ini and web.config</label>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
<tr>
|
449 |
<td>File Times:</td>
|
450 |
<td>
|
516 |
Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
|
517 |
<br/><br/>
|
518 |
|
519 |
+
<b>After Install:</b> When you are done with the installation you must remove the these files/directories:
|
520 |
<ul>
|
521 |
<li>installer.php</li>
|
522 |
<li>installer-data.sql</li>
|
595 |
<input type="hidden" name="action_step" value="2" />
|
596 |
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
597 |
<input type="hidden" name="logging" id="ajax-logging" />
|
598 |
+
<input type="hidden" name="retain_config" id="ajax-retain-config" />
|
599 |
<input type="hidden" name="json" id="ajax-json" />
|
600 |
<textarea id='ajax-json-debug' name='json_debug_view'></textarea>
|
601 |
<input type='submit' value='manual submit'>
|
657 |
$("#ajax-json-debug").val(dataJSON);
|
658 |
if (typeof(data) != 'undefined' && data.pass == 1) {
|
659 |
$("#ajax-logging").val($("input:radio[name=logging]:checked").val());
|
660 |
+
$("#ajax-retain-config").val($("#retain_config").is(":checked") ? 1 : 0);
|
661 |
$("#ajax-json").val(escape(dataJSON));
|
662 |
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
663 |
setTimeout(function() {$('#s1-result-form').submit();}, 500);
|
installer/build/view.step2.php
CHANGED
@@ -175,6 +175,7 @@ Auto Posts to view.step3.php
|
|
175 |
<input type="hidden" name="action_step" value="3" />
|
176 |
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
177 |
<input type="hidden" name="logging" id="ajax-logging" />
|
|
|
178 |
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
179 |
<input type="hidden" name="dbport" id="ajax-dbport" />
|
180 |
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
175 |
<input type="hidden" name="action_step" value="3" />
|
176 |
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
177 |
<input type="hidden" name="logging" id="ajax-logging" />
|
178 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
179 |
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
180 |
<input type="hidden" name="dbport" id="ajax-dbport" />
|
181 |
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
installer/build/view.step3.php
CHANGED
@@ -18,6 +18,7 @@ VIEW: STEP 3- INPUT -->
|
|
18 |
<input type="hidden" name="action_ajax" value="3" />
|
19 |
<input type="hidden" name="action_step" value="3" />
|
20 |
<input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
|
|
|
21 |
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
22 |
<input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
|
23 |
<input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
|
@@ -190,6 +191,7 @@ VIEW: STEP 3 - AJAX RESULT
|
|
190 |
<div class="dupx-debug">
|
191 |
<input type="hidden" name="action_step" value="4" />
|
192 |
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
|
|
193 |
<input type="hidden" name="url_new" id="ajax-url_new" />
|
194 |
<input type="hidden" name="json" id="ajax-json" />
|
195 |
<br/>
|
18 |
<input type="hidden" name="action_ajax" value="3" />
|
19 |
<input type="hidden" name="action_step" value="3" />
|
20 |
<input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
|
21 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
22 |
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
23 |
<input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
|
24 |
<input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
|
191 |
<div class="dupx-debug">
|
192 |
<input type="hidden" name="action_step" value="4" />
|
193 |
<input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
|
194 |
+
<input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
|
195 |
<input type="hidden" name="url_new" id="ajax-url_new" />
|
196 |
<input type="hidden" name="json" id="ajax-json" />
|
197 |
<br/>
|
installer/build/view.step4.php
CHANGED
@@ -1,24 +1,18 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
$_POST['
|
4 |
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
5 |
$admin_redirect = rtrim($_POST['url_new'], "/") . "/wp-admin/admin.php?page=duplicator-tools&tab=cleanup&package={$_POST['archive_name']}";
|
6 |
$admin_redirect = urlencode($admin_redirect);
|
7 |
-
$
|
|
|
|
|
|
|
8 |
?>
|
9 |
|
10 |
<script>
|
11 |
/** Posts to page to remove install files */
|
12 |
-
DUPX.
|
13 |
-
{
|
14 |
-
var msg = "You will now be redirected to the cleanup page.\nSelect 'Delete Reserved Files' to remove installer files.";
|
15 |
-
if (confirm(msg)) {
|
16 |
-
var nurl = '<?php echo rtrim($_POST['url_new'], "/"); ?>/wp-admin/admin.php?page=duplicator-tools&tab=cleanup';
|
17 |
-
window.open(nurl, "_blank");
|
18 |
-
}
|
19 |
-
};
|
20 |
-
DUPX.getAdminLogin = function()
|
21 |
-
{
|
22 |
window.open('<?php echo $admin_login; ?>', 'wp-admin');
|
23 |
};
|
24 |
</script>
|
@@ -27,7 +21,7 @@
|
|
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
|
31 |
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
32 |
|
33 |
<div class="hdr-main">
|
@@ -39,24 +33,22 @@ VIEW: STEP 4 - INPUT -->
|
|
39 |
</div>
|
40 |
|
41 |
<table class="s4-final-step">
|
42 |
-
<!--tr>
|
43 |
-
<td><a class="s4-final-btns" href='<?php echo rtrim($_POST['url_new'], "/") . '?now=' . $GLOBALS['NOW_DATE']; ?>' target='_blank'>Test Site</a></td>
|
44 |
-
<td><i>Validate all pages, links images and plugins</i></td>
|
45 |
-
</tr>
|
46 |
-
<tr>
|
47 |
-
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.removeInstallerFiles('<?php echo $_POST['archive_name'] ?>')">Security Cleanup</a></td>
|
48 |
-
<td><i>Validate installer files are removed (requires login)</i></td>
|
49 |
-
</tr-->
|
50 |
<tr>
|
51 |
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.getAdminLogin()">Site Login</a></td>
|
52 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
53 |
</tr>
|
54 |
<tr>
|
55 |
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
|
56 |
<td>
|
|
|
57 |
<i id="dup-step3-install-report-count">
|
58 |
-
<span data-bind="with: status.step2">Install
|
59 |
-
<span data-bind="with: status.step3">
|
60 |
<span data-bind="with: status.step3" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
|
61 |
</i>
|
62 |
</td>
|
@@ -64,15 +56,21 @@ VIEW: STEP 4 - INPUT -->
|
|
64 |
</table><br/>
|
65 |
|
66 |
<div class="s4-go-back">
|
67 |
-
|
68 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</div>
|
70 |
|
71 |
<!-- ========================
|
72 |
INSTALL REPORT -->
|
73 |
<div id="dup-step3-install-report" style='display:none'>
|
74 |
<table class='s4-report-results' style="width:100%">
|
75 |
-
<tr><th colspan="4">Database
|
76 |
<tr style="font-weight:bold">
|
77 |
<td style="width:150px"></td>
|
78 |
<td>Tables</td>
|
@@ -98,15 +96,16 @@ VIEW: STEP 4 - INPUT -->
|
|
98 |
<td><span data-bind="text: updt_cells"></span></td>
|
99 |
</tr>
|
100 |
</table>
|
|
|
101 |
|
102 |
<table class='s4-report-errs' style="width:100%; border-top:none">
|
103 |
-
<tr><th colspan="4">Report
|
104 |
<tr>
|
105 |
<td data-bind="with: status.step2">
|
106 |
-
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step 2: Install
|
107 |
</td>
|
108 |
<td data-bind="with: status.step3">
|
109 |
-
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step 3:
|
110 |
</td>
|
111 |
<td data-bind="with: status.step3">
|
112 |
<a href="#dup-step3-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
|
@@ -115,34 +114,34 @@ VIEW: STEP 4 - INPUT -->
|
|
115 |
<tr><td colspan="4"></td></tr>
|
116 |
</table>
|
117 |
|
118 |
-
|
119 |
<div id="dup-step3-errs-create" class="s4-err-msg">
|
120 |
-
<div class="s4-err-title">STEP
|
121 |
-
<b data-bind="with: status.step2">
|
122 |
<div class="info-error">
|
123 |
-
Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="
|
124 |
-
|
125 |
-
|
126 |
-
<b><u>COMMON FIXES INCLUDE:</u></b>
|
127 |
-
<br/><br/>
|
128 |
-
|
129 |
-
<b>Unknown collation:</b><br/>
|
130 |
-
The MySQL Version is too old see: <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
|
131 |
<br/><br/>
|
132 |
|
133 |
-
<b>
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
</div>
|
139 |
</div>
|
140 |
|
141 |
-
|
142 |
<div id="dup-step3-errs-upd" class="s4-err-msg">
|
143 |
-
<div class="s4-err-title">STEP
|
144 |
<!-- MYSQL QUERY ERRORS -->
|
145 |
-
<b data-bind="with: status.step3">
|
146 |
<div class="info-error">
|
147 |
Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
|
148 |
it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
|
@@ -151,6 +150,7 @@ VIEW: STEP 4 - INPUT -->
|
|
151 |
<div data-bind="foreach: status.step3.errsql"><div data-bind="text: $data"></div></div>
|
152 |
<div data-bind="visible: status.step3.errsql.length == 0">No MySQL query errors found</div>
|
153 |
</div>
|
|
|
154 |
|
155 |
<!-- TABLE KEY ERRORS -->
|
156 |
<b data-bind="with: status.step3">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
|
@@ -169,6 +169,7 @@ VIEW: STEP 4 - INPUT -->
|
|
169 |
<div data-bind="foreach: status.step3.errkey"><div data-bind="text: $data"></div></div>
|
170 |
<div data-bind="visible: status.step3.errkey.length == 0">No missing primary key errors</div>
|
171 |
</div>
|
|
|
172 |
|
173 |
<!-- SERIALIZE ERRORS -->
|
174 |
<b data-bind="with: status.step3">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
|
@@ -180,6 +181,7 @@ VIEW: STEP 4 - INPUT -->
|
|
180 |
<div data-bind="foreach: status.step3.errser"><div data-bind="text: $data"></div></div>
|
181 |
<div data-bind="visible: status.step3.errser.length == 0">No serialization errors found</div>
|
182 |
</div>
|
|
|
183 |
|
184 |
</div>
|
185 |
|
@@ -242,4 +244,3 @@ VIEW: STEP 4 - INPUT -->
|
|
242 |
};
|
243 |
ko.applyBindings(new MyViewModel());
|
244 |
</script>
|
245 |
-
|
1 |
<?php
|
2 |
+
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : '';
|
3 |
+
$_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
|
4 |
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
5 |
$admin_redirect = rtrim($_POST['url_new'], "/") . "/wp-admin/admin.php?page=duplicator-tools&tab=cleanup&package={$_POST['archive_name']}";
|
6 |
$admin_redirect = urlencode($admin_redirect);
|
7 |
+
$admin_url_qry = (strpos($admin_base, '?') === false) ? '?' : '&';
|
8 |
+
$admin_login = rtrim($_POST['url_new'], '/') . "/{$admin_base}{$admin_url_qry}redirect_to={$admin_redirect}";
|
9 |
+
$url_new_rtrim = rtrim($_POST['url_new'], '/');
|
10 |
+
|
11 |
?>
|
12 |
|
13 |
<script>
|
14 |
/** Posts to page to remove install files */
|
15 |
+
DUPX.getAdminLogin = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
window.open('<?php echo $admin_login; ?>', 'wp-admin');
|
17 |
};
|
18 |
</script>
|
21 |
<!-- =========================================
|
22 |
VIEW: STEP 4 - INPUT -->
|
23 |
<form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
|
24 |
+
<input type="hidden" name="url_new" id="url_new" value="<?php echo $url_new_rtrim; ?>" />
|
25 |
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
26 |
|
27 |
<div class="hdr-main">
|
33 |
</div>
|
34 |
|
35 |
<table class="s4-final-step">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
<tr>
|
37 |
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.getAdminLogin()">Site Login</a></td>
|
38 |
+
<td>
|
39 |
+
<i>Login to the administrator section to finalize the setup</i>
|
40 |
+
<?php if ($_POST['retain_config']) :?>
|
41 |
+
<br/> <i>Update of Permalinks required see: Admin > Settings > Permalinks > Save</i>
|
42 |
+
<?php endif;?>
|
43 |
+
</td>
|
44 |
</tr>
|
45 |
<tr>
|
46 |
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
|
47 |
<td>
|
48 |
+
<i>Optionally, review the migration report.</i><br/>
|
49 |
<i id="dup-step3-install-report-count">
|
50 |
+
<span data-bind="with: status.step2">Install Notices: (<span data-bind="text: query_errs"></span>)</span>
|
51 |
+
<span data-bind="with: status.step3">Update Notices: (<span data-bind="text: err_all"></span>)</span>
|
52 |
<span data-bind="with: status.step3" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
|
53 |
</i>
|
54 |
</td>
|
56 |
</table><br/>
|
57 |
|
58 |
<div class="s4-go-back">
|
59 |
+
Additional Notes:
|
60 |
+
<ul style="margin-top: 1px">
|
61 |
+
<li>
|
62 |
+
Review the <a href='<?php echo $url_new_rtrim; ?>' target='_blank'>front-end</a> or
|
63 |
+
re-run installer at <a href="javascript:history.go(-3)">step 1</a>
|
64 |
+
</li>
|
65 |
+
<li>The .htaccess file was reset. Resave plugins that write to this file.</li>
|
66 |
+
</ul>
|
67 |
</div>
|
68 |
|
69 |
<!-- ========================
|
70 |
INSTALL REPORT -->
|
71 |
<div id="dup-step3-install-report" style='display:none'>
|
72 |
<table class='s4-report-results' style="width:100%">
|
73 |
+
<tr><th colspan="4">Database Report</th></tr>
|
74 |
<tr style="font-weight:bold">
|
75 |
<td style="width:150px"></td>
|
76 |
<td>Tables</td>
|
96 |
<td><span data-bind="text: updt_cells"></span></td>
|
97 |
</tr>
|
98 |
</table>
|
99 |
+
<br/>
|
100 |
|
101 |
<table class='s4-report-errs' style="width:100%; border-top:none">
|
102 |
+
<tr><th colspan="4">Report Notices</th></tr>
|
103 |
<tr>
|
104 |
<td data-bind="with: status.step2">
|
105 |
+
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step 2: Install Notices (<span data-bind="text: query_errs"></span>)</a><br/>
|
106 |
</td>
|
107 |
<td data-bind="with: status.step3">
|
108 |
+
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step 3: Update Notices (<span data-bind="text: err_all"></span>)</a>
|
109 |
</td>
|
110 |
<td data-bind="with: status.step3">
|
111 |
<a href="#dup-step3-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
|
114 |
<tr><td colspan="4"></td></tr>
|
115 |
</table>
|
116 |
|
|
|
117 |
<div id="dup-step3-errs-create" class="s4-err-msg">
|
118 |
+
<div class="s4-err-title">STEP 2 - INSTALL NOTICES:</div>
|
119 |
+
<b data-bind="with: status.step2">ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
|
120 |
<div class="info-error">
|
121 |
+
Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="dpro-installer">install-log.txt</a> file and
|
122 |
+
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.
|
123 |
+
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.
|
|
|
|
|
|
|
|
|
|
|
124 |
<br/><br/>
|
125 |
|
126 |
+
<b>COMMON FIXES:</b>
|
127 |
+
<ul>
|
128 |
+
<li>
|
129 |
+
<b>Unknown collation:</b> See Online FAQ:
|
130 |
+
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-090-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
|
131 |
+
</li>
|
132 |
+
<li>
|
133 |
+
<b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
|
134 |
+
setting for larger payloads.
|
135 |
+
</li>
|
136 |
+
</ul>
|
137 |
|
138 |
</div>
|
139 |
</div>
|
140 |
|
|
|
141 |
<div id="dup-step3-errs-upd" class="s4-err-msg">
|
142 |
+
<div class="s4-err-title">STEP 3 - UPDATE NOTICES:</div>
|
143 |
<!-- MYSQL QUERY ERRORS -->
|
144 |
+
<b data-bind="with: status.step3">ERRORS (<span data-bind="text: errsql_sum"></span>) </b><br/>
|
145 |
<div class="info-error">
|
146 |
Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
|
147 |
it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
|
150 |
<div data-bind="foreach: status.step3.errsql"><div data-bind="text: $data"></div></div>
|
151 |
<div data-bind="visible: status.step3.errsql.length == 0">No MySQL query errors found</div>
|
152 |
</div>
|
153 |
+
<br/>
|
154 |
|
155 |
<!-- TABLE KEY ERRORS -->
|
156 |
<b data-bind="with: status.step3">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
|
169 |
<div data-bind="foreach: status.step3.errkey"><div data-bind="text: $data"></div></div>
|
170 |
<div data-bind="visible: status.step3.errkey.length == 0">No missing primary key errors</div>
|
171 |
</div>
|
172 |
+
<br/>
|
173 |
|
174 |
<!-- SERIALIZE ERRORS -->
|
175 |
<b data-bind="with: status.step3">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
|
181 |
<div data-bind="foreach: status.step3.errser"><div data-bind="text: $data"></div></div>
|
182 |
<div data-bind="visible: status.step3.errser.length == 0">No serialization errors found</div>
|
183 |
</div>
|
184 |
+
<br/>
|
185 |
|
186 |
</div>
|
187 |
|
244 |
};
|
245 |
ko.applyBindings(new MyViewModel());
|
246 |
</script>
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
|
|
4 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
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 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.2.10
|
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/about.php
CHANGED
@@ -57,7 +57,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
57 |
</td>
|
58 |
<td valign="top" style="padding-top:10px; font-size:14px">
|
59 |
<?php
|
60 |
-
_e("Duplicator helps you
|
61 |
?>
|
62 |
</td>
|
63 |
</tr>
|
57 |
</td>
|
58 |
<td valign="top" style="padding-top:10px; font-size:14px">
|
59 |
<?php
|
60 |
+
_e("Duplicator helps you streamline your workflow and quickly clone a WordPress site. The plugin was made to help you speed up the migration process of moving a WordPress site. Please help us continue development by giving this plugin a 5 star.", 'duplicator');
|
61 |
?>
|
62 |
</td>
|
63 |
</tr>
|
views/help/gopro.php
CHANGED
@@ -49,7 +49,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
49 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
50 |
</tr>
|
51 |
<tr>
|
52 |
-
<td class="feature-column"><?php _e('
|
53 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
54 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
55 |
</tr>
|
@@ -124,11 +124,6 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
124 |
<td class="check-column"></td>
|
125 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
126 |
</tr>
|
127 |
-
<tr>
|
128 |
-
<td class="feature-column"><?php _e('File Filters', 'duplicator') ?></td>
|
129 |
-
<td class="check-column"></td>
|
130 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
131 |
-
</tr>
|
132 |
<tr>
|
133 |
<td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
|
134 |
<td class="check-column"></td>
|
49 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
50 |
</tr>
|
51 |
<tr>
|
52 |
+
<td class="feature-column"><?php _e('File Filters', 'duplicator') ?></td>
|
53 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
54 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
55 |
</tr>
|
124 |
<td class="check-column"></td>
|
125 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
126 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
127 |
<tr>
|
128 |
<td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
|
129 |
<td class="check-column"></td>
|
views/packages/details/controller.php
CHANGED
@@ -44,7 +44,7 @@ $err_link_ticket = '<a target="_blank" href="https://snapcreek.com/duplicator/do
|
|
44 |
<?php _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 _e('
|
48 |
|
49 |
<?php
|
50 |
switch ($current_tab) {
|
44 |
<?php _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 _e('Packages', 'duplicator'); ?></a></div>
|
48 |
|
49 |
<?php
|
50 |
switch ($current_tab) {
|
views/packages/details/detail.php
CHANGED
@@ -25,8 +25,8 @@ $dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
|
25 |
table.dup-dtl-data-tbl {width:100%}
|
26 |
table.dup-dtl-data-tbl tr {vertical-align: top}
|
27 |
table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
|
28 |
-
table.dup-dtl-data-tbl td {padding:0
|
29 |
-
table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:
|
30 |
table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
|
31 |
table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
|
32 |
div.dup-box-panel-hdr {font-size:14px; display:block; border-bottom: 1px dotted #efefef; margin:5px 0 5px 0; font-weight: bold; padding: 0 0 5px 0}
|
@@ -43,6 +43,8 @@ $dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
|
43 |
div#dup-name-info, div#dup-version-info {display: none; font-size:11px; line-height:20px; margin:4px 0 0 0}
|
44 |
div#dup-downloads-area {padding: 5px 0 5px 0; }
|
45 |
div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
|
|
|
|
|
46 |
</style>
|
47 |
|
48 |
<?php if ($package_id == 0) :?>
|
@@ -158,10 +160,6 @@ DIALOG: QUICK PATH -->
|
|
158 |
|
159 |
<!-- ===============================
|
160 |
STORAGE -->
|
161 |
-
<?php
|
162 |
-
$css_file_filter_on = $package->Archive->FilterOn == 1 ? '' : 'sub-item-disabled';
|
163 |
-
$css_db_filter_on = $package->Database->FilterOn == 1 ? '' : 'sub-item-disabled';
|
164 |
-
?>
|
165 |
<div class="dup-box">
|
166 |
<div class="dup-box-title">
|
167 |
<i class="fa fa-database"></i> <?php _e('Storage', 'duplicator') ?>
|
@@ -208,7 +206,6 @@ STORAGE -->
|
|
208 |
<!-- ===============================
|
209 |
ARCHIVE -->
|
210 |
<?php
|
211 |
-
$css_file_filter_on = $package->Archive->FilterOn == 1 ? '' : 'sub-item-disabled';
|
212 |
$css_db_filter_on = $package->Database->FilterOn == 1 ? '' : 'sub-item-disabled';
|
213 |
?>
|
214 |
<div class="dup-box">
|
@@ -229,48 +226,41 @@ ARCHIVE -->
|
|
229 |
<?php if ($package->Archive->ExportOnlyDB) : ?>
|
230 |
<tr>
|
231 |
<td><?php _e('Database Mode', 'duplicator') ?>: </td>
|
232 |
-
<td>
|
233 |
-
<?php
|
234 |
-
_e('Archive Database Only Enabled', 'duplicator')
|
235 |
-
?>
|
236 |
-
</td>
|
237 |
</tr>
|
238 |
<?php else : ?>
|
239 |
<tr>
|
240 |
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
241 |
-
<td><?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?></td>
|
242 |
-
</tr>
|
243 |
-
<tr class="sub-item <?php echo $css_file_filter_on ?>">
|
244 |
-
<td><?php _e('Directories', 'duplicator') ?>: </td>
|
245 |
<td>
|
246 |
-
<?php
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
|
|
|
|
257 |
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
258 |
? $package->Archive->FilterExts
|
259 |
: __('- no filters -', 'duplicator');
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
data-tooltip="<?php _e('File filters allows you to select individual files and add them to an exclusion list that will filter them from the package.', 'duplicator'); ?>">
|
273 |
-
</i>
|
274 |
</td>
|
275 |
</tr>
|
276 |
<?php endif; ?>
|
@@ -353,7 +343,7 @@ INSTALLER -->
|
|
353 |
|
354 |
|
355 |
<script>
|
356 |
-
jQuery(document).ready(function
|
357 |
{
|
358 |
|
359 |
/* Shows the 'Download Links' dialog
|
@@ -378,7 +368,6 @@ jQuery(document).ready(function ($)
|
|
378 |
//LOAD: 'Download Links' Dialog and other misc setup
|
379 |
Duplicator.Pack.GetLinksText = function() {$('#dup-dlg-quick-path-data').select();};
|
380 |
|
381 |
-
/* METHOD: */
|
382 |
Duplicator.Pack.OpenAll = function () {
|
383 |
$("div.dup-box").each(function() {
|
384 |
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
@@ -387,7 +376,6 @@ jQuery(document).ready(function ($)
|
|
387 |
});
|
388 |
};
|
389 |
|
390 |
-
/* METHOD: */
|
391 |
Duplicator.Pack.CloseAll = function () {
|
392 |
$("div.dup-box").each(function() {
|
393 |
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
25 |
table.dup-dtl-data-tbl {width:100%}
|
26 |
table.dup-dtl-data-tbl tr {vertical-align: top}
|
27 |
table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
|
28 |
+
table.dup-dtl-data-tbl td {padding:0 5px 0 0; padding-top:10px !important;}
|
29 |
+
table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:130px}
|
30 |
table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
|
31 |
table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
|
32 |
div.dup-box-panel-hdr {font-size:14px; display:block; border-bottom: 1px dotted #efefef; margin:5px 0 5px 0; font-weight: bold; padding: 0 0 5px 0}
|
43 |
div#dup-name-info, div#dup-version-info {display: none; font-size:11px; line-height:20px; margin:4px 0 0 0}
|
44 |
div#dup-downloads-area {padding: 5px 0 5px 0; }
|
45 |
div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
|
46 |
+
div.sub-section {padding:7px 0 0 0}
|
47 |
+
textarea.file-info {width:100%; height:100px; font-size:12px }
|
48 |
</style>
|
49 |
|
50 |
<?php if ($package_id == 0) :?>
|
160 |
|
161 |
<!-- ===============================
|
162 |
STORAGE -->
|
|
|
|
|
|
|
|
|
163 |
<div class="dup-box">
|
164 |
<div class="dup-box-title">
|
165 |
<i class="fa fa-database"></i> <?php _e('Storage', 'duplicator') ?>
|
206 |
<!-- ===============================
|
207 |
ARCHIVE -->
|
208 |
<?php
|
|
|
209 |
$css_db_filter_on = $package->Database->FilterOn == 1 ? '' : 'sub-item-disabled';
|
210 |
?>
|
211 |
<div class="dup-box">
|
226 |
<?php if ($package->Archive->ExportOnlyDB) : ?>
|
227 |
<tr>
|
228 |
<td><?php _e('Database Mode', 'duplicator') ?>: </td>
|
229 |
+
<td><?php _e('Archive Database Only Enabled', 'duplicator') ?></td>
|
|
|
|
|
|
|
|
|
230 |
</tr>
|
231 |
<?php else : ?>
|
232 |
<tr>
|
233 |
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
|
|
|
|
|
|
|
|
234 |
<td>
|
235 |
+
<?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?>
|
236 |
+
<div class="sub-section">
|
237 |
+
<b><?php _e('Directories', 'duplicator') ?>:</b> <br/>
|
238 |
+
<?php
|
239 |
+
$txt = strlen($package->Archive->FilterDirs)
|
240 |
+
? str_replace(';', ";\n", $package->Archive->FilterDirs)
|
241 |
+
: __('- no filters -', 'duplicator');
|
242 |
+
?>
|
243 |
+
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
244 |
+
</div>
|
245 |
+
|
246 |
+
<div class="sub-section">
|
247 |
+
<b><?php _e('Extensions', 'duplicator') ?>: </b><br/>
|
248 |
+
<?php
|
249 |
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
250 |
? $package->Archive->FilterExts
|
251 |
: __('- no filters -', 'duplicator');
|
252 |
+
?>
|
253 |
+
</div>
|
254 |
+
|
255 |
+
<div class="sub-section">
|
256 |
+
<b><?php _e('Files', 'duplicator') ?>:</b><br/>
|
257 |
+
<?php
|
258 |
+
$txt = strlen($package->Archive->FilterFiles)
|
259 |
+
? str_replace(';', ";\n", $package->Archive->FilterFiles)
|
260 |
+
: __('- no filters -', 'duplicator');
|
261 |
+
?>
|
262 |
+
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
263 |
+
</div>
|
|
|
|
|
264 |
</td>
|
265 |
</tr>
|
266 |
<?php endif; ?>
|
343 |
|
344 |
|
345 |
<script>
|
346 |
+
jQuery(document).ready(function($)
|
347 |
{
|
348 |
|
349 |
/* Shows the 'Download Links' dialog
|
368 |
//LOAD: 'Download Links' Dialog and other misc setup
|
369 |
Duplicator.Pack.GetLinksText = function() {$('#dup-dlg-quick-path-data').select();};
|
370 |
|
|
|
371 |
Duplicator.Pack.OpenAll = function () {
|
372 |
$("div.dup-box").each(function() {
|
373 |
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
376 |
});
|
377 |
};
|
378 |
|
|
|
379 |
Duplicator.Pack.CloseAll = function () {
|
380 |
$("div.dup-box").each(function() {
|
381 |
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
views/packages/main/controller.php
CHANGED
@@ -34,15 +34,15 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
|
|
34 |
break;
|
35 |
case 'new1':
|
36 |
duplicator_header(__("Packages » New", 'duplicator'));
|
37 |
-
include('
|
38 |
break;
|
39 |
case 'new2':
|
40 |
duplicator_header(__("Packages » New", 'duplicator'));
|
41 |
-
include('
|
42 |
break;
|
43 |
case 'new3':
|
44 |
duplicator_header(__("Packages » New", 'duplicator'));
|
45 |
-
include('
|
46 |
break;
|
47 |
}
|
48 |
?>
|
34 |
break;
|
35 |
case 'new1':
|
36 |
duplicator_header(__("Packages » New", 'duplicator'));
|
37 |
+
include('s1.setup1.php');
|
38 |
break;
|
39 |
case 'new2':
|
40 |
duplicator_header(__("Packages » New", 'duplicator'));
|
41 |
+
include('s2.scan1.php');
|
42 |
break;
|
43 |
case 'new3':
|
44 |
duplicator_header(__("Packages » New", 'duplicator'));
|
45 |
+
include('s3.build.php');
|
46 |
break;
|
47 |
}
|
48 |
?>
|
views/packages/main/new2.scan.php
DELETED
@@ -1,761 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(empty($_POST))
|
4 |
-
{
|
5 |
-
//F5 Refresh Check
|
6 |
-
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
7 |
-
echo "<script>window.location.href = '{$redirect}'</script>";
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
global $wp_version;
|
12 |
-
$Package = new DUP_Package();
|
13 |
-
|
14 |
-
if(isset($_POST['package-hash']))
|
15 |
-
{
|
16 |
-
// If someone is trying to pass the hasn into us that is illegal so stop it immediately.
|
17 |
-
die('Unauthorized');
|
18 |
-
}
|
19 |
-
|
20 |
-
$Package->saveActive($_POST);
|
21 |
-
$Package = DUP_Package::getActive();
|
22 |
-
|
23 |
-
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
24 |
-
$mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
|
25 |
-
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
26 |
-
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump (fast)' : 'PHP (slow)';
|
27 |
-
|
28 |
-
$zip_check = DUP_Util::getZipPath();
|
29 |
-
?>
|
30 |
-
|
31 |
-
<style>
|
32 |
-
/* ============----------
|
33 |
-
PROGRESS ARES-CHECKS */
|
34 |
-
div#dup-progress-area {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
|
35 |
-
div.dup-progress-title {font-size:22px; padding:5px 0 20px 0; font-weight: bold}
|
36 |
-
div#dup-msg-success {padding:5px; text-align: left}
|
37 |
-
div#dup-msg-success-subtitle {font-style: italic; margin:7px 0px}
|
38 |
-
div#dup-msg-error {color:#A62426; padding:5px; max-width: 790px;}
|
39 |
-
div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
|
40 |
-
div.dup-hdr-error-details {text-align: left; margin:20px 0}
|
41 |
-
|
42 |
-
div.dup-panel {margin-bottom: 25px}
|
43 |
-
div.dup-scan-filter-status {display:inline; float: right; font-size:11px; margin-right:10px; color:#AF0000; font-style: italic}
|
44 |
-
/* SERVER-CHECKS */
|
45 |
-
div.dup-scan-title {display:inline-block; padding:1px; font-weight: bold;}
|
46 |
-
div.dup-scan-title a {display:inline-block; min-width:200px; padding:3px; }
|
47 |
-
div.dup-scan-title a:focus {outline: 1px solid #fff; box-shadow: none}
|
48 |
-
div.dup-scan-title div {display:inline-block; }
|
49 |
-
div.dup-scan-info {display:none; padding:5px 20px 10px 10px}
|
50 |
-
div.dup-scan-good {display:inline-block; color:green;font-weight: bold;}
|
51 |
-
div.dup-scan-warn {display:inline-block; color:#AF0000;font-weight: bold;}
|
52 |
-
span.dup-toggle {float:left; margin:0 2px 2px 0; }
|
53 |
-
/*DATABASE*/
|
54 |
-
table#dup-scan-db-details {line-height: 14px; margin:15px 0px 0px 5px; width:98%}
|
55 |
-
table#dup-scan-db-details td {padding:0px;}
|
56 |
-
table#dup-scan-db-details td:first-child {font-weight: bold; white-space: nowrap; width:90px}
|
57 |
-
div#dup-scan-db-info {margin:0px 0px 0px 10px}
|
58 |
-
div#data-db-tablelist {max-height: 300px; overflow-y: scroll; border: 1px dashed silver; padding: 5px; margin-top:5px}
|
59 |
-
div#data-db-tablelist div{padding:0px 0px 0px 15px;}
|
60 |
-
div#data-db-tablelist span{display:inline-block; min-width: 75px}
|
61 |
-
div#data-db-size1 {display: inline-block; float:right; font-size:11px; margin-right:5px; font-style: italic}
|
62 |
-
/*FILES */
|
63 |
-
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right:5px; font-style: italic}
|
64 |
-
i.data-size-help { float:right; margin-right:5px; display: block; font-size: 11px}
|
65 |
-
div#data-arc-names-data, div#data-arc-big-data {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
66 |
-
|
67 |
-
div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
|
68 |
-
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:maroon}
|
69 |
-
div#dup-scan-warning-continue div.msg2 {padding:2px; line-height: 13px}
|
70 |
-
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
71 |
-
|
72 |
-
/*Footer*/
|
73 |
-
div.dup-button-footer {text-align:center; margin:0}
|
74 |
-
button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
|
75 |
-
</style>
|
76 |
-
|
77 |
-
<!-- =========================================
|
78 |
-
TOOL BAR: STEPS -->
|
79 |
-
<table id="dup-toolbar">
|
80 |
-
<tr valign="top">
|
81 |
-
<td style="white-space: nowrap">
|
82 |
-
<div id="dup-wiz">
|
83 |
-
<div id="dup-wiz-steps">
|
84 |
-
<div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
|
85 |
-
<div class="active-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
|
86 |
-
<div><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
|
87 |
-
</div>
|
88 |
-
<div id="dup-wiz-title">
|
89 |
-
<?php _e('Step 2: System Scan', 'duplicator'); ?>
|
90 |
-
</div>
|
91 |
-
</div>
|
92 |
-
</td>
|
93 |
-
<td>
|
94 |
-
<a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('All Packages', 'duplicator'); ?></a>
|
95 |
-
<span> <?php _e('Create New', 'duplicator'); ?></span>
|
96 |
-
</td>
|
97 |
-
</tr>
|
98 |
-
</table>
|
99 |
-
<hr class="dup-toolbar-line">
|
100 |
-
|
101 |
-
|
102 |
-
<form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
|
103 |
-
<div id="dup-progress-area">
|
104 |
-
<!-- PROGRESS BAR -->
|
105 |
-
<div id="dup-progress-bar-area">
|
106 |
-
<div class="dup-progress-title"><i class="fa fa-circle-o-notch fa-spin"></i> <?php _e('Scanning Site', 'duplicator'); ?></div>
|
107 |
-
<div id="dup-progress-bar"></div>
|
108 |
-
<b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
109 |
-
<i><?php _e('Keep this window open during the scan process.', 'duplicator'); ?></i><br/>
|
110 |
-
<i><?php _e('This can take several minutes.', 'duplicator'); ?></i><br/>
|
111 |
-
</div>
|
112 |
-
|
113 |
-
<!-- SUCCESS MESSAGE -->
|
114 |
-
<div id="dup-msg-success" style="display:none">
|
115 |
-
<div style="text-align:center">
|
116 |
-
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php _e('Scan Complete', 'duplicator'); ?></div>
|
117 |
-
<div id="dup-msg-success-subtitle">
|
118 |
-
<?php _e('Process Time:', 'duplicator'); ?> <span id="data-rpt-scantime"></span>
|
119 |
-
</div>
|
120 |
-
</div><br/>
|
121 |
-
|
122 |
-
<!-- ================================================================
|
123 |
-
META-BOX: SERVER
|
124 |
-
================================================================ -->
|
125 |
-
<div class="dup-panel">
|
126 |
-
<div class="dup-panel-title">
|
127 |
-
<i class="fa fa-hdd-o"></i> <?php _e("Server", 'duplicator'); ?>
|
128 |
-
<div style="float:right; margin:-1px 10px 0px 0px">
|
129 |
-
<small><a href="?page=duplicator-tools&tab=diagnostics" target="_blank"><?php _e('Diagnostics', 'duplicator');?></a></small>
|
130 |
-
</div>
|
131 |
-
|
132 |
-
</div>
|
133 |
-
<div class="dup-panel-panel">
|
134 |
-
<!-- ============
|
135 |
-
WEB SERVER -->
|
136 |
-
<div>
|
137 |
-
<div class='dup-scan-title'>
|
138 |
-
<a><?php _e('Web Server', 'duplicator');?></a> <div id="data-srv-web-all"></div>
|
139 |
-
</div>
|
140 |
-
<div class='dup-scan-info dup-info-box'>
|
141 |
-
<?php
|
142 |
-
$web_servers = implode(', ', $GLOBALS['DUPLICATOR_SERVER_LIST']);
|
143 |
-
echo '<span id="data-srv-web-model"></span> <b>' . __('Web Server', 'duplicator') . ":</b> '{$_SERVER['SERVER_SOFTWARE']}'";
|
144 |
-
echo '<small>';
|
145 |
-
_e("Supported web servers:", 'duplicator');
|
146 |
-
echo "{$web_servers}";
|
147 |
-
echo '</small>';
|
148 |
-
?>
|
149 |
-
</div>
|
150 |
-
</div>
|
151 |
-
<!-- ============
|
152 |
-
PHP SETTINGS -->
|
153 |
-
<div>
|
154 |
-
<div class='dup-scan-title'>
|
155 |
-
<a><?php _e('PHP Setup', 'duplicator');?></a> <div id="data-srv-php-all"></div>
|
156 |
-
</div>
|
157 |
-
<div class='dup-scan-info dup-info-box'>
|
158 |
-
<?php
|
159 |
-
|
160 |
-
//PHP VERSION
|
161 |
-
echo '<span id="data-srv-php-version"></span> <b>' . __('PHP Version', 'duplicator') . "</b> <br/>";
|
162 |
-
echo '<small>';
|
163 |
-
_e('The minium PHP version supported by Duplicator is 5.2.9, however it is highly recommended to use PHP 5.3 or higher for improved stability.', 'duplicator');
|
164 |
-
echo " <i><a href='http://php.net/ChangeLog-5.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
165 |
-
echo '</small>';
|
166 |
-
|
167 |
-
//OPEN_BASEDIR
|
168 |
-
$test = ini_get("open_basedir");
|
169 |
-
echo '<hr size="1" /><span id="data-srv-php-openbase"></span> <b>' . __('Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
170 |
-
echo '<small>';
|
171 |
-
_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');
|
172 |
-
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
173 |
-
echo '</small>';
|
174 |
-
|
175 |
-
//MYSQLI
|
176 |
-
echo '<hr size="1" /><span id="data-srv-php-mysqli"></span> <b>' . __('MySQLi', 'duplicator') . "</b> <br/>";
|
177 |
-
echo '<small>';
|
178 |
-
_e('Creating the package does not require the mysqli module. However the installer.php file requires that the PHP module mysqli be installed on the server it is deployed on.', 'duplicator');
|
179 |
-
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
180 |
-
echo '</small>';
|
181 |
-
|
182 |
-
//MAX_EXECUTION_TIME
|
183 |
-
$test = (@set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
184 |
-
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
185 |
-
echo '<small>';
|
186 |
-
printf(__('Issues might occur for larger packages when the [max_execution_time] value in the php.ini is too low. The minimum recommended timeout is "%1$s" seconds or higher. An attempt is made to override this value if the server allows it. A value of 0 (recommended) indicates that PHP has no time limits.', 'duplicator'), DUPLICATOR_SCAN_TIMEOUT);
|
187 |
-
echo '<br/><br/>';
|
188 |
-
_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 interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.', 'duplicator');
|
189 |
-
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
190 |
-
|
191 |
-
if ($zip_check != null) {
|
192 |
-
echo '<br/><br/>';
|
193 |
-
echo '<span style="font-weight:bold">';
|
194 |
-
_e('Get faster builds with Duplicator Pro with access to shell_exec zip.', 'duplicator');
|
195 |
-
echo '</span>';
|
196 |
-
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>";
|
197 |
-
}
|
198 |
-
|
199 |
-
echo '</small>';
|
200 |
-
|
201 |
-
|
202 |
-
?>
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
<!-- ============
|
206 |
-
WORDPRESS SETTINGS -->
|
207 |
-
<div>
|
208 |
-
<div class='dup-scan-title'>
|
209 |
-
<a><?php _e('WordPress', 'duplicator');?></a> <div id="data-srv-wp-all"></div>
|
210 |
-
</div>
|
211 |
-
<div class='dup-scan-info dup-info-box'>
|
212 |
-
<?php
|
213 |
-
//VERSION CHECK
|
214 |
-
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
215 |
-
echo '<small>';
|
216 |
-
printf(__('It is recommended to have a version of WordPress that is greater than %1$s', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
217 |
-
echo '</small>';
|
218 |
-
|
219 |
-
//CORE FILES
|
220 |
-
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
221 |
-
echo '<small>';
|
222 |
-
_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.", 'duplicator');
|
223 |
-
echo '</small>';
|
224 |
-
|
225 |
-
//CACHE DIR
|
226 |
-
$cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
|
227 |
-
$cache_size = DUP_Util::byteSize(DUP_Util::getDirectorySize($cache_path));
|
228 |
-
echo '<hr size="1" /><span id="data-srv-wp-cache"></span> <b>' . __('Cache Path', 'duplicator') . ":</b> '{$cache_path}' ({$cache_size}) <br/>";
|
229 |
-
echo '<small>';
|
230 |
-
_e("Cached data will lead to issues at install time and increases your archive size. It is recommended to empty your cache directory at build time. Use caution when removing data from the cache directory. If you have a cache plugin review the documentation for how to empty it; simply removing files might cause errors on your site. The cache size minimum threshold is currently set at ", 'duplicator');
|
231 |
-
echo DUP_Util::byteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
232 |
-
echo '</small>';
|
233 |
-
|
234 |
-
//MU SITE
|
235 |
-
if (is_multisite())
|
236 |
-
{
|
237 |
-
echo '<hr size="1" /><span><div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i></div></span> <b>' . __('Multisite: Unsupported', 'duplicator') . "</b> <br/>";
|
238 |
-
echo '<small>';
|
239 |
-
_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');
|
240 |
-
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>";
|
241 |
-
echo '</small>';
|
242 |
-
}
|
243 |
-
else
|
244 |
-
{
|
245 |
-
echo '<hr size="1" /><span><div class="dup-scan-good"><i class="fa fa-check"></i></div></span> <b>' . __('Multisite: N/A', 'duplicator') . "</b> <br/>";
|
246 |
-
echo '<small>';
|
247 |
-
_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');
|
248 |
-
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>";
|
249 |
-
echo '</small>';
|
250 |
-
}
|
251 |
-
|
252 |
-
?>
|
253 |
-
</div>
|
254 |
-
</div>
|
255 |
-
</div><!-- end .dup-panel -->
|
256 |
-
</div><!-- end .dup-panel-panel -->
|
257 |
-
|
258 |
-
<h2 style="font-size:18px; font-weight:bold; margin:-10px 0 5px 10px"><i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator');?> </h2>
|
259 |
-
|
260 |
-
<!-- ================================================================
|
261 |
-
FILES
|
262 |
-
================================================================ -->
|
263 |
-
<div class="dup-panel">
|
264 |
-
<div class="dup-panel-title">
|
265 |
-
<i class="fa fa-files-o"></i>
|
266 |
-
<?php _e("Files", 'duplicator'); ?>
|
267 |
-
<i class="fa fa-question-circle data-size-help"
|
268 |
-
data-tooltip-title="<?php _e("File Size:", 'duplicator'); ?>"
|
269 |
-
data-tooltip="<?php _e('The files size represents only the included files before compression is applied. It does not include the size of the database script and in most cases the package size once completed will be smaller than this number.', 'duplicator'); ?>"></i>
|
270 |
-
<div id="data-arc-size1"></div>
|
271 |
-
<div class="dup-scan-filter-status">
|
272 |
-
<?php
|
273 |
-
if ($Package->Archive->ExportOnlyDB) {
|
274 |
-
echo '<i class="fa fa-filter"></i> '; _e('Database Only', 'duplicator');
|
275 |
-
}elseif ($Package->Archive->FilterOn) {
|
276 |
-
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
277 |
-
}
|
278 |
-
?>
|
279 |
-
</div>
|
280 |
-
</div>
|
281 |
-
<div class="dup-panel-panel">
|
282 |
-
|
283 |
-
<!-- ============
|
284 |
-
TOTAL SIZE -->
|
285 |
-
<div>
|
286 |
-
<div class='dup-scan-title'>
|
287 |
-
<a><?php _e('Total Size', 'duplicator');?></a> <div id="data-arc-status-size"></div>
|
288 |
-
</div>
|
289 |
-
<div class='dup-scan-info dup-info-box'>
|
290 |
-
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-arc-size2"></span> |
|
291 |
-
<b><?php _e('File Count', 'duplicator');?>:</b> <span id="data-arc-files"></span> |
|
292 |
-
<b><?php _e('Directory Count', 'duplicator');?>:</b> <span id="data-arc-dirs"></span>
|
293 |
-
<small>
|
294 |
-
<?php
|
295 |
-
printf(__('Total size represents all files minus any filters that have been setup. The current thresholds that triggers a warning is %1$s for the total size. Some budget hosts limit the amount of time a PHP/Web request process can run. When working with larger sites this can cause timeout issues. Consider using a file filter in step 1 to shrink and filter the overall size of your package.', 'duplicator'),
|
296 |
-
DUP_Util::byteSize(DUPLICATOR_SCAN_SITE),
|
297 |
-
DUP_Util::byteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
298 |
-
|
299 |
-
if ($zip_check != null) {
|
300 |
-
echo '<br/><br/>';
|
301 |
-
echo '<span style="font-weight:bold">';
|
302 |
-
_e('Package support up to 2GB available in Duplicator Pro.', 'duplicator');
|
303 |
-
echo '</span>';
|
304 |
-
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_size_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
305 |
-
}
|
306 |
-
|
307 |
-
?>
|
308 |
-
</small>
|
309 |
-
</div>
|
310 |
-
</div>
|
311 |
-
|
312 |
-
<!-- ============
|
313 |
-
FILE NAME LENGTHS -->
|
314 |
-
<div>
|
315 |
-
<div class='dup-scan-title'>
|
316 |
-
<a><?php _e('Name Checks', 'duplicator');?></a> <div id="data-arc-status-names"></div>
|
317 |
-
</div>
|
318 |
-
<div class='dup-scan-info dup-info-box'>
|
319 |
-
<small>
|
320 |
-
<?php
|
321 |
-
_e('File or directory names may cause issues when working across different environments and servers. Names that are over 250 characters, contain special characters (such as * ? > < : / \ |) or are unicode might cause issues in a remote enviroment. It is recommended to remove or filter these files before building the archive if you have issues at install time.', 'duplicator');
|
322 |
-
?>
|
323 |
-
</small><br/>
|
324 |
-
<a href="javascript:void(0)" onclick="jQuery('#data-arc-names-data').toggle()">[<?php _e('Show Paths', 'duplicator');?>]</a>
|
325 |
-
<div id="data-arc-names-data"></div>
|
326 |
-
</div>
|
327 |
-
</div>
|
328 |
-
|
329 |
-
<!-- ============
|
330 |
-
LARGE FILES -->
|
331 |
-
<div>
|
332 |
-
<div class='dup-scan-title'>
|
333 |
-
<a><?php _e('Large Files', 'duplicator');?></a> <div id="data-arc-status-big"></div>
|
334 |
-
</div>
|
335 |
-
<div class='dup-scan-info dup-info-box'>
|
336 |
-
<small>
|
337 |
-
<?php
|
338 |
-
printf(__('Large files such as movies or other backuped data can cause issues with timeouts. The current check for large files is %1$s per file. If your having issues creating a package consider excluding these files with the files filter and manually moving them to your new location.', 'duplicator'),
|
339 |
-
DUP_Util::byteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
340 |
-
?>
|
341 |
-
</small><br/>
|
342 |
-
<a href="javascript:void(0)" onclick="jQuery('#data-arc-big-data').toggle()">[<?php _e('Show Paths', 'duplicator');?>]</a>
|
343 |
-
<div id="data-arc-big-data"></div>
|
344 |
-
</div>
|
345 |
-
</div>
|
346 |
-
|
347 |
-
<!-- ============
|
348 |
-
VIEW FILTERS -->
|
349 |
-
<?php if ($Package->Archive->FilterOn) : ?>
|
350 |
-
<div>
|
351 |
-
<div class='dup-scan-title'>
|
352 |
-
<a style='font-weight: normal'><?php _e('Archive Details', 'duplicator');?></a>
|
353 |
-
</div>
|
354 |
-
<div class='dup-scan-info dup-info-box'>
|
355 |
-
<b>[<?php _e('Root Directory', 'duplicator');?>]</b><br/>
|
356 |
-
<?php echo DUPLICATOR_WPROOTPATH;?>
|
357 |
-
<br/><br/>
|
358 |
-
|
359 |
-
<b>[<?php _e('Excluded Directories', 'duplicator');?>]</b><br/>
|
360 |
-
<?php
|
361 |
-
if (strlen( $Package->Archive->FilterDirs)) {
|
362 |
-
echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
|
363 |
-
} else {
|
364 |
-
_e('No directory filters have been set.', 'duplicator');
|
365 |
-
}
|
366 |
-
?>
|
367 |
-
<br/>
|
368 |
-
|
369 |
-
<b>[<?php _e('Excluded File Extensions', 'duplicator');?>]</b><br/>
|
370 |
-
<?php
|
371 |
-
if (strlen( $Package->Archive->FilterExts)) {
|
372 |
-
echo $Package->Archive->FilterExts;
|
373 |
-
} else {
|
374 |
-
_e('No file extension filters have been set.', 'duplicator');
|
375 |
-
}
|
376 |
-
?>
|
377 |
-
<small>
|
378 |
-
<?php
|
379 |
-
_e('The root directory is where Duplicator starts archiving files. The excluded sections will be skipped during the archive process. ', 'duplicator');
|
380 |
-
_e('All results are stored in a json file. ', 'duplicator');
|
381 |
-
?>
|
382 |
-
<a href="<?php echo DUPLICATOR_SITE_URL ?>/wp-admin/admin-ajax.php?action=duplicator_package_scan" target="dup_report"><?php _e('[view json report]', 'duplicator');?></a>
|
383 |
-
</small><br/>
|
384 |
-
</div>
|
385 |
-
</div>
|
386 |
-
<?php endif; ?>
|
387 |
-
</div><!-- end .dup-panel -->
|
388 |
-
|
389 |
-
<!-- ================================================================
|
390 |
-
DATABASE
|
391 |
-
================================================================ -->
|
392 |
-
<div class="dup-panel-title">
|
393 |
-
<i class="fa fa-table"></i>
|
394 |
-
<?php _e("Database", 'duplicator'); ?>
|
395 |
-
<i class="fa fa-question-circle data-size-help"
|
396 |
-
data-tooltip-title="<?php _e("Database Size:", 'duplicator'); ?>"
|
397 |
-
data-tooltip="<?php _e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
|
398 |
-
<div id="data-db-size1"></div>
|
399 |
-
<div class="dup-scan-filter-status">
|
400 |
-
<?php
|
401 |
-
if ($Package->Database->FilterOn) {
|
402 |
-
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
403 |
-
}
|
404 |
-
?>
|
405 |
-
</div>
|
406 |
-
</div>
|
407 |
-
<div class="dup-panel-panel" id="dup-scan-db">
|
408 |
-
|
409 |
-
<!-- ============
|
410 |
-
TOTAL SIZE -->
|
411 |
-
<div>
|
412 |
-
<div class='dup-scan-title'>
|
413 |
-
<a><?php _e('Total Size', 'duplicator');?></a>
|
414 |
-
<div id="data-db-status-size"></div>
|
415 |
-
</div>
|
416 |
-
<div class='dup-scan-info dup-info-box'>
|
417 |
-
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-db-size2"></span> |
|
418 |
-
<b><?php _e('Tables', 'duplicator');?>:</b> <span id="data-db-tablecount"></span> |
|
419 |
-
<b><?php _e('Records', 'duplicator');?>:</b> <span id="data-db-rows"></span>
|
420 |
-
<br/><br/>
|
421 |
-
<?php
|
422 |
-
//OVERVIEW
|
423 |
-
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
424 |
-
printf(__('Total size and row count for all database tables are approximate values. The thresholds that trigger warnings are %1$s OR %2$s records total for the entire database. The larger the databases the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
425 |
-
DUP_Util::byteSize(DUPLICATOR_SCAN_DB_ALL_SIZE),
|
426 |
-
number_format(DUPLICATOR_SCAN_DB_ALL_ROWS));
|
427 |
-
|
428 |
-
//OPTIONS
|
429 |
-
echo '<br/><br/>';
|
430 |
-
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
431 |
-
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and Optimization', 'duplicator') . '</a>';
|
432 |
-
printf(__('1. Running a %1$s on your database will help to improve the overall size, performance and efficiency of the database.', 'duplicator'), $lnk);
|
433 |
-
echo '<br/><br/>';
|
434 |
-
$lnk = '<a href="?page=duplicator-settings" target="_blank">' . __('Duplicator Settings', 'duplicator') . '</a>';
|
435 |
-
printf(__('2. If your server supports shell_exec and mysqldump it is recommended to enable this option from the %1$s menu.', 'duplicator'), $lnk);
|
436 |
-
echo '<br/><br/>';
|
437 |
-
_e('3. Consider removing data from tables that store logging, statistical or other non-critical information about your site.', 'duplicator');
|
438 |
-
?>
|
439 |
-
</div>
|
440 |
-
</div>
|
441 |
-
|
442 |
-
<!-- ============
|
443 |
-
TABLE DETAILS -->
|
444 |
-
<div>
|
445 |
-
<div class='dup-scan-title'>
|
446 |
-
<a><?php _e('Table Details', 'duplicator');?></a>
|
447 |
-
<div id="data-db-status-details"></div>
|
448 |
-
</div>
|
449 |
-
<div class='dup-scan-info dup-info-box'>
|
450 |
-
|
451 |
-
<?php
|
452 |
-
//OVERVIEW
|
453 |
-
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
454 |
-
printf(__('The thresholds that trigger warnings for individual tables are %1$s OR %2$s records OR tables names with upper-case characters. The larger the table the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
455 |
-
DUP_Util::byteSize(DUPLICATOR_SCAN_DB_TBL_SIZE),
|
456 |
-
number_format(DUPLICATOR_SCAN_DB_TBL_ROWS));
|
457 |
-
|
458 |
-
//OPTIONS
|
459 |
-
echo '<br/><br/>';
|
460 |
-
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
461 |
-
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and Optimization', 'duplicator') . '</a>';
|
462 |
-
printf(__('1. Run a %1$s on the table to improve the overall size and performance.', 'duplicator'), $lnk);
|
463 |
-
echo '<br/><br/>';
|
464 |
-
_e('2. Remove stale date from tables such as logging, statistical or other non-critical data.', 'duplicator');
|
465 |
-
echo '<br/><br/>';
|
466 |
-
$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>';
|
467 |
-
printf(__('3. 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);
|
468 |
-
echo '<br/><br/>';
|
469 |
-
|
470 |
-
echo '<b>' . __('Tables:', 'duplicator') . '</b><br/>';
|
471 |
-
?>
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
<div id="dup-scan-db-info">
|
476 |
-
<div id="data-db-tablelist"></div>
|
477 |
-
</div>
|
478 |
-
</div>
|
479 |
-
</div>
|
480 |
-
|
481 |
-
<table id="dup-scan-db-details">
|
482 |
-
<tr><td><b><?php _e('Name:', 'duplicator');?></b></td><td><?php echo DB_NAME ;?> </td></tr>
|
483 |
-
<tr><td><b><?php _e('Host:', 'duplicator');?></b></td><td><?php echo DB_HOST ;?> </td></tr>
|
484 |
-
<tr>
|
485 |
-
<td style="vertical-align: top"><b><?php _e('Build Mode:', 'duplicator');?></b></td>
|
486 |
-
<td style="line-height:18px">
|
487 |
-
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode ;?></a>
|
488 |
-
<?php if ($mysqlcompat_on) :?>
|
489 |
-
<br/>
|
490 |
-
<small style="font-style:italic; color:maroon">
|
491 |
-
<i class="fa fa-exclamation-circle"></i> <?php _e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
492 |
-
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
493 |
-
</small>
|
494 |
-
<?php endif;?>
|
495 |
-
</td>
|
496 |
-
</tr>
|
497 |
-
</table>
|
498 |
-
|
499 |
-
</div><!-- end .dup-panel -->
|
500 |
-
</div><!-- end .dup-panel-panel -->
|
501 |
-
|
502 |
-
<!-- WARNING CONTINUE -->
|
503 |
-
<div id="dup-scan-warning-continue">
|
504 |
-
<div class="msg1">
|
505 |
-
|
506 |
-
<label for="dup-scan-warning-continue-checkbox">
|
507 |
-
<?php _e('A warning status was detected, are you sure you want to continue?', 'duplicator');?>
|
508 |
-
</label>
|
509 |
-
<div style="padding:8px 0">
|
510 |
-
<input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.WarningContinue(this)"/>
|
511 |
-
<label for="dup-scan-warning-continue-checkbox"><?php _e('Yes. Continue with the build process!', 'duplicator');?></label>
|
512 |
-
</div>
|
513 |
-
</div>
|
514 |
-
<div class="msg2">
|
515 |
-
<label for="dup-scan-warning-continue-checkbox">
|
516 |
-
<?php
|
517 |
-
_e("Scan checks are not required to pass, however they could cause issues on some systems.", 'duplicator');
|
518 |
-
echo '<br/>';
|
519 |
-
_e("Please review the details for each warning by clicking on the detail link.", 'duplicator');
|
520 |
-
?>
|
521 |
-
</label>
|
522 |
-
</div>
|
523 |
-
</div>
|
524 |
-
|
525 |
-
</div>
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
<!-- ERROR MESSAGE -->
|
530 |
-
<div id="dup-msg-error" style="display:none">
|
531 |
-
<div class="dup-hdr-error"><i class="fa fa-exclamation-circle"></i> <?php _e('Scan Error', 'duplicator'); ?></div>
|
532 |
-
<i><?php _e('Please try again!', 'duplicator'); ?></i><br/>
|
533 |
-
<div class="dup-hdr-error-details">
|
534 |
-
<b><?php _e("Server Status:", 'duplicator'); ?></b>
|
535 |
-
<div id="dup-msg-error-response-status" style="display:inline-block"></div><br/>
|
536 |
-
|
537 |
-
<b><?php _e("Error Message:", 'duplicator'); ?></b>
|
538 |
-
<div id="dup-msg-error-response-text"></div>
|
539 |
-
</div>
|
540 |
-
</div>
|
541 |
-
</div> <!-- end #dup-progress-area -->
|
542 |
-
|
543 |
-
<div class="dup-button-footer" style="display:none">
|
544 |
-
<input type="button" value="◀ <?php _e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1')" class="button button-large" />
|
545 |
-
<input type="button" value="<?php _e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.Rescan()" class="button button-large" />
|
546 |
-
<input type="submit" value="<?php _e("Build", 'duplicator') ?> ▶" class="button button-primary button-large" id="dup-build-button" />
|
547 |
-
</div>
|
548 |
-
</form>
|
549 |
-
|
550 |
-
<script>
|
551 |
-
jQuery(document).ready(function($) {
|
552 |
-
|
553 |
-
/* Performs Ajax post to create check system */
|
554 |
-
Duplicator.Pack.Scan = function()
|
555 |
-
{
|
556 |
-
var data = {action : 'duplicator_package_scan'}
|
557 |
-
$.ajax({
|
558 |
-
type: "POST",
|
559 |
-
url: ajaxurl,
|
560 |
-
dataType: "json",
|
561 |
-
timeout: 10000000,
|
562 |
-
data: data,
|
563 |
-
complete: function() {$('.dup-button-footer').show()},
|
564 |
-
success: function(data) {
|
565 |
-
Duplicator.Pack.LoadScanData(data)
|
566 |
-
//Imacros testing required
|
567 |
-
$('#dup-automation-imacros').html('<input type="hidden" id="dup-finished" value="done" />');
|
568 |
-
},
|
569 |
-
error: function(data) {
|
570 |
-
$('#dup-progress-bar-area').hide();
|
571 |
-
var status = data.status + ' -' + data.statusText;
|
572 |
-
$('#dup-msg-error-response-status').html(status)
|
573 |
-
$('#dup-msg-error-response-text').html(data.responseText);
|
574 |
-
$('#dup-msg-error').show(200);
|
575 |
-
console.log(data);
|
576 |
-
}
|
577 |
-
});
|
578 |
-
}
|
579 |
-
|
580 |
-
Duplicator.Pack.Rescan = function()
|
581 |
-
{
|
582 |
-
$('#dup-msg-success,#dup-msg-error,.dup-button-footer').hide();
|
583 |
-
$('#dup-progress-bar-area').show();
|
584 |
-
Duplicator.Pack.Scan();
|
585 |
-
}
|
586 |
-
|
587 |
-
Duplicator.Pack.WarningContinue = function(checkbox)
|
588 |
-
{
|
589 |
-
($(checkbox).is(':checked'))
|
590 |
-
? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
|
591 |
-
: $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
|
592 |
-
}
|
593 |
-
|
594 |
-
Duplicator.Pack.LoadScanStatus = function(status)
|
595 |
-
{
|
596 |
-
var result;
|
597 |
-
switch (status) {
|
598 |
-
case false : result = '<div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
599 |
-
case 'Warn' : result = '<div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i> Warn</div>'; break;
|
600 |
-
case true : result = '<div class="dup-scan-good"><i class="fa fa-check"></i></div>'; break;
|
601 |
-
case 'Good' : result = '<div class="dup-scan-good"><i class="fa fa-check"></i> Good</div>'; break;
|
602 |
-
default :
|
603 |
-
result = 'unable to read';
|
604 |
-
}
|
605 |
-
return result;
|
606 |
-
}
|
607 |
-
|
608 |
-
/* Load Scan Data */
|
609 |
-
Duplicator.Pack.LoadScanData = function(data)
|
610 |
-
{
|
611 |
-
var errMsg = "unable to read";
|
612 |
-
$('#dup-progress-bar-area').hide();
|
613 |
-
|
614 |
-
//****************
|
615 |
-
//ERROR: Data object is corrupt or empty return error
|
616 |
-
if (data == undefined || data.RPT == undefined)
|
617 |
-
{
|
618 |
-
var html_msg;
|
619 |
-
html_msg = '<?php _e("Unable to perform a full scan, please try the following actions:", 'duplicator') ?><br/><br/>';
|
620 |
-
html_msg += '<?php _e("1. Go back and create a root path directory filter to validate the site is scan-able.", 'duplicator') ?><br/>';
|
621 |
-
html_msg += '<?php _e("2. Continue to add/remove filters to isolate which path is causing issues.", 'duplicator') ?><br/>';
|
622 |
-
html_msg += '<?php _e("3. This message will go away once the correct filters are applied.", 'duplicator') ?><br/><br/>';
|
623 |
-
|
624 |
-
html_msg += '<?php _e("Common Issues:", 'duplicator') ?><ul>';
|
625 |
-
html_msg += '<li><?php _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>';
|
626 |
-
html_msg += '<li><?php _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>';
|
627 |
-
html_msg += '</ul>';
|
628 |
-
$('#dup-msg-error-response-status').html('Scan Path Error [<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>]');
|
629 |
-
$('#dup-msg-error-response-text').html(html_msg);
|
630 |
-
$('#dup-msg-error').show(200);
|
631 |
-
console.log('JSON Report Data:');
|
632 |
-
console.log(data);
|
633 |
-
return;
|
634 |
-
}
|
635 |
-
|
636 |
-
//****************
|
637 |
-
//REPORT
|
638 |
-
var base = $('#data-rpt-scanfile').attr('href');
|
639 |
-
$('#data-rpt-scanfile').attr('href', base + '&scanfile=' + data.RPT.ScanFile);
|
640 |
-
$('#data-rpt-scantime').text(data.RPT.ScanTime || 0);
|
641 |
-
|
642 |
-
//****************
|
643 |
-
//SERVER
|
644 |
-
$('#data-srv-web-model').html(Duplicator.Pack.LoadScanStatus(data.SRV.WEB.model));
|
645 |
-
$('#data-srv-web-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.WEB.ALL));
|
646 |
-
|
647 |
-
$('#data-srv-php-openbase').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openbase));
|
648 |
-
$('#data-srv-php-maxtime').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.maxtime));
|
649 |
-
$('#data-srv-php-mysqli').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.mysqli));
|
650 |
-
$('#data-srv-php-version').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.version));
|
651 |
-
$('#data-srv-php-openssl').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openssl));
|
652 |
-
$('#data-srv-php-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.ALL));
|
653 |
-
|
654 |
-
$('#data-srv-wp-version').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.version));
|
655 |
-
$('#data-srv-wp-core').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.core));
|
656 |
-
$('#data-srv-wp-cache').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.cache));
|
657 |
-
$('#data-srv-wp-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.ALL));
|
658 |
-
|
659 |
-
//****************
|
660 |
-
//DATABASE
|
661 |
-
var html = "";
|
662 |
-
var DB_TotalSize = 'Good';
|
663 |
-
var DB_TableDetails = 'Good';
|
664 |
-
var DB_TableRowMax = <?php echo DUPLICATOR_SCAN_DB_TBL_ROWS; ?>;
|
665 |
-
var DB_TableSizeMax = <?php echo DUPLICATOR_SCAN_DB_TBL_SIZE; ?>;
|
666 |
-
if (data.DB.Status.Success)
|
667 |
-
{
|
668 |
-
DB_TotalSize = data.DB.Status.DB_Rows == 'Warn' || data.DB.Status.DB_Size == 'Warn' ? 'Warn' : 'Good';
|
669 |
-
DB_TableDetails = data.DB.Status.TBL_Rows == 'Warn' || data.DB.Status.TBL_Size == 'Warn' || data.DB.Status.TBL_Case == 'Warn' ? 'Warn' : 'Good';
|
670 |
-
|
671 |
-
$('#data-db-status-size').html(Duplicator.Pack.LoadScanStatus(DB_TotalSize));
|
672 |
-
$('#data-db-status-details').html(Duplicator.Pack.LoadScanStatus(DB_TableDetails));
|
673 |
-
$('#data-db-size1').text(data.DB.Size || errMsg);
|
674 |
-
$('#data-db-size2').text(data.DB.Size || errMsg);
|
675 |
-
$('#data-db-rows').text(data.DB.Rows || errMsg);
|
676 |
-
$('#data-db-tablecount').text(data.DB.TableCount || errMsg);
|
677 |
-
//Table Details
|
678 |
-
if (data.DB.TableList == undefined || data.DB.TableList.length == 0) {
|
679 |
-
html = '<?php _e("Unable to report on any tables", 'duplicator') ?>';
|
680 |
-
} else {
|
681 |
-
$.each(data.DB.TableList, function(i) {
|
682 |
-
html += '<b>' + i + '</b><br/>';
|
683 |
-
$.each(data.DB.TableList[i], function(key,val) {
|
684 |
-
html += (key == 'Case' && val == 1) || (key == 'Rows' && val > DB_TableRowMax) || (key == 'Size' && parseInt(val) > DB_TableSizeMax)
|
685 |
-
? '<div style="color:red"><span>' + key + ':</span>' + val + '</div>'
|
686 |
-
: '<div><span>' + key + ':</span>' + val + '</div>';
|
687 |
-
});
|
688 |
-
});
|
689 |
-
}
|
690 |
-
$('#data-db-tablelist').append(html);
|
691 |
-
} else {
|
692 |
-
html = '<?php _e("Unable to report on database stats", 'duplicator') ?>';
|
693 |
-
$('#dup-scan-db').html(html);
|
694 |
-
}
|
695 |
-
|
696 |
-
//****************
|
697 |
-
//ARCHIVE
|
698 |
-
$('#data-arc-status-size').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Size));
|
699 |
-
$('#data-arc-status-names').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Names));
|
700 |
-
$('#data-arc-status-big').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Big));
|
701 |
-
$('#data-arc-size1').text(data.ARC.Size || errMsg);
|
702 |
-
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
703 |
-
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
704 |
-
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
705 |
-
|
706 |
-
//Name Checks
|
707 |
-
html = '';
|
708 |
-
//Dirs
|
709 |
-
if (data.ARC.FilterInfo.Dirs.Warning !== undefined && data.ARC.FilterInfo.Dirs.Warning.length > 0) {
|
710 |
-
$.each(data.ARC.FilterInfo.Dirs.Warning, function (key, val) {
|
711 |
-
html += '<?php _e("DIR", 'duplicator') ?> ' + key + ':<br/>[' + val + ']<br/>';
|
712 |
-
});
|
713 |
-
}
|
714 |
-
//Files
|
715 |
-
if (data.ARC.FilterInfo.Files.Warning !== undefined && data.ARC.FilterInfo.Files.Warning.length > 0) {
|
716 |
-
$.each(data.ARC.FilterInfo.Files.Warning, function (key, val) {
|
717 |
-
html += '<?php _e("FILE", 'duplicator') ?> ' + key + ':<br/>[' + val + ']<br/>';
|
718 |
-
});
|
719 |
-
}
|
720 |
-
html = (html.length == 0) ? '<?php _e("No name warning issues found.", 'duplicator') ?>' : html;
|
721 |
-
|
722 |
-
|
723 |
-
$('#data-arc-names-data').html(html);
|
724 |
-
|
725 |
-
//Large Files
|
726 |
-
html = '<?php _e("No large files found.", 'duplicator') ?>';
|
727 |
-
if (data.ARC.FilterInfo.Files.Size !== undefined && data.ARC.FilterInfo.Files.Size.length > 0) {
|
728 |
-
html = '';
|
729 |
-
$.each(data.ARC.FilterInfo.Files.Size, function (key, val) {
|
730 |
-
html += '<?php _e("FILE", 'duplicator') ?> ' + key + ':<br/>' + val + '<br/>';
|
731 |
-
});
|
732 |
-
}
|
733 |
-
$('#data-arc-big-data').html(html);
|
734 |
-
$('#dup-msg-success').show();
|
735 |
-
|
736 |
-
//Waring Check
|
737 |
-
var warnCount = data.RPT.Warnings || 0;
|
738 |
-
if (warnCount > 0) {
|
739 |
-
$('#dup-scan-warning-continue').show();
|
740 |
-
$('#dup-build-button').prop("disabled",true).removeClass('button-primary');
|
741 |
-
} else {
|
742 |
-
$('#dup-scan-warning-continue').hide();
|
743 |
-
$('#dup-build-button').prop("disabled",false).addClass('button-primary');
|
744 |
-
}
|
745 |
-
|
746 |
-
}
|
747 |
-
|
748 |
-
//Page Init:
|
749 |
-
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
750 |
-
Duplicator.Pack.Scan();
|
751 |
-
|
752 |
-
//Init: Toogle for system requirment detial links
|
753 |
-
$('.dup-scan-title a').each(function()
|
754 |
-
{
|
755 |
-
$(this).attr('href', 'javascript:void(0)');
|
756 |
-
$(this).click({selector : '.dup-scan-info'}, Duplicator.Pack.ToggleSystemDetails);
|
757 |
-
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
758 |
-
});
|
759 |
-
|
760 |
-
});
|
761 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/packages/main/packages.php
CHANGED
@@ -61,8 +61,8 @@ TOOL-BAR -->
|
|
61 |
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
62 |
</td>
|
63 |
<td>
|
64 |
-
<span><i class="fa fa-archive"></i> <?php _e("
|
65 |
-
<a
|
66 |
</td>
|
67 |
</tr>
|
68 |
</table>
|
61 |
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
62 |
</td>
|
63 |
<td>
|
64 |
+
<span><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></span>
|
65 |
+
<a href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
66 |
</td>
|
67 |
</tr>
|
68 |
</table>
|
views/packages/main/{new1.setup.php → s1.setup1.php}
RENAMED
@@ -2,14 +2,14 @@
|
|
2 |
|
3 |
global $wpdb;
|
4 |
|
5 |
-
//POST BACK
|
6 |
-
$
|
7 |
-
if (isset($_POST['action']))
|
8 |
-
{
|
9 |
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
10 |
switch ($_POST['action'])
|
11 |
{
|
12 |
-
case 'duplicator_package_active' :
|
|
|
|
|
13 |
break;
|
14 |
}
|
15 |
}
|
@@ -26,17 +26,17 @@ $ctrl_ui = new DUP_CTRL_UI();
|
|
26 |
$ctrl_ui->setResponseType('PHP');
|
27 |
$data = $ctrl_ui->GetViewStateList();
|
28 |
|
29 |
-
$ui_css_storage
|
30 |
-
$ui_css_archive
|
31 |
-
$ui_css_installer
|
32 |
$dup_intaller_files = implode(", ", array_keys(DUP_Server::getInstallerFiles()));
|
33 |
-
$dbbuild_mode
|
|
|
34 |
|
35 |
?>
|
36 |
|
37 |
<style>
|
38 |
-
/*
|
39 |
-
REQUIREMENTS*/
|
40 |
div.dup-sys-section {margin:1px 0px 5px 0px}
|
41 |
div.dup-sys-title {display:inline-block; width:250px; padding:1px; }
|
42 |
div.dup-sys-title div {display:inline-block;float:right; }
|
@@ -48,6 +48,7 @@ $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpP
|
|
48 |
table.dup-sys-info-results td:first-child {width:200px}
|
49 |
</style>
|
50 |
|
|
|
51 |
<!-- ============================
|
52 |
TOOL BAR: STEPS -->
|
53 |
<table id="dup-toolbar">
|
@@ -65,7 +66,7 @@ TOOL BAR: STEPS -->
|
|
65 |
</div>
|
66 |
</td>
|
67 |
<td>
|
68 |
-
<a
|
69 |
<span> <?php _e("Create New", 'duplicator'); ?></span>
|
70 |
</td>
|
71 |
</tr>
|
@@ -218,20 +219,43 @@ SYSTEM REQUIREMENTS -->
|
|
218 |
<!-- ============================
|
219 |
FORM PACKAGE OPTIONS -->
|
220 |
<div style="padding:5px 5px 2px 5px">
|
221 |
-
<?php include('
|
222 |
</div>
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
<script>
|
225 |
jQuery(document).ready(function ($)
|
226 |
{
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
$('.dup-sys-title a').each(function () {
|
229 |
$(this).attr('href', 'javascript:void(0)');
|
230 |
$(this).click({selector: '.dup-sys-info'}, Duplicator.Pack.ToggleSystemDetails);
|
231 |
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
232 |
});
|
233 |
|
234 |
-
//
|
235 |
$('.dup-sys-title div').each(function () {
|
236 |
$(this).addClass(($(this).text() == 'Pass') ? 'dup-sys-pass' : 'dup-sys-fail');
|
237 |
});
|
2 |
|
3 |
global $wpdb;
|
4 |
|
5 |
+
//POST BACK: Rest Button
|
6 |
+
if (isset($_POST['action'])) {
|
|
|
|
|
7 |
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
8 |
switch ($_POST['action'])
|
9 |
{
|
10 |
+
case 'duplicator_package_active' :
|
11 |
+
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
12 |
+
$action_response = __('Package settings have been reset.', 'duplicator');
|
13 |
break;
|
14 |
}
|
15 |
}
|
26 |
$ctrl_ui->setResponseType('PHP');
|
27 |
$data = $ctrl_ui->GetViewStateList();
|
28 |
|
29 |
+
$ui_css_storage = (isset($data->payload['dup-pack-storage-panel']) && $data->payload['dup-pack-storage-panel']) ? 'display:block' : 'display:none';
|
30 |
+
$ui_css_archive = (isset($data->payload['dup-pack-archive-panel']) && $data->payload['dup-pack-archive-panel']) ? 'display:block' : 'display:none';
|
31 |
+
$ui_css_installer = (isset($data->payload['dup-pack-installer-panel']) && $data->payload['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
|
32 |
$dup_intaller_files = implode(", ", array_keys(DUP_Server::getInstallerFiles()));
|
33 |
+
$dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath()) ? 'mysqldump' : 'PHP';
|
34 |
+
$retry_enabled = isset($_GET['retry']) ? true : false;
|
35 |
|
36 |
?>
|
37 |
|
38 |
<style>
|
39 |
+
/* REQUIREMENTS*/
|
|
|
40 |
div.dup-sys-section {margin:1px 0px 5px 0px}
|
41 |
div.dup-sys-title {display:inline-block; width:250px; padding:1px; }
|
42 |
div.dup-sys-title div {display:inline-block;float:right; }
|
48 |
table.dup-sys-info-results td:first-child {width:200px}
|
49 |
</style>
|
50 |
|
51 |
+
|
52 |
<!-- ============================
|
53 |
TOOL BAR: STEPS -->
|
54 |
<table id="dup-toolbar">
|
66 |
</div>
|
67 |
</td>
|
68 |
<td>
|
69 |
+
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a>
|
70 |
<span> <?php _e("Create New", 'duplicator'); ?></span>
|
71 |
</td>
|
72 |
</tr>
|
219 |
<!-- ============================
|
220 |
FORM PACKAGE OPTIONS -->
|
221 |
<div style="padding:5px 5px 2px 5px">
|
222 |
+
<?php include('s1.setup2.php'); ?>
|
223 |
</div>
|
224 |
|
225 |
+
<!-- CACHE PROTECTION: If the back-button is used from the scanner page then we need to
|
226 |
+
refresh page in-case any filters where set while on the scanner page -->
|
227 |
+
<form id="cache_detection">
|
228 |
+
<input type="hidden" id="cache_state" name="cache_state" value="" />
|
229 |
+
</form>
|
230 |
+
|
231 |
<script>
|
232 |
jQuery(document).ready(function ($)
|
233 |
{
|
234 |
+
Duplicator.Pack.checkPageCache = function()
|
235 |
+
{
|
236 |
+
var $state = $('#cache_state');
|
237 |
+
if( $state.val() == "" ) {
|
238 |
+
$state.val("fresh-load");
|
239 |
+
} else {
|
240 |
+
$state.val("cached");
|
241 |
+
<?php
|
242 |
+
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
243 |
+
echo "window.location.href = '{$redirect}'";
|
244 |
+
?>
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
//INIT
|
249 |
+
Duplicator.Pack.checkPageCache();
|
250 |
+
|
251 |
+
//Toogle for system requirment detial links
|
252 |
$('.dup-sys-title a').each(function () {
|
253 |
$(this).attr('href', 'javascript:void(0)');
|
254 |
$(this).click({selector: '.dup-sys-info'}, Duplicator.Pack.ToggleSystemDetails);
|
255 |
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
256 |
});
|
257 |
|
258 |
+
//Color code Pass/Fail/Warn items
|
259 |
$('.dup-sys-title div').each(function () {
|
260 |
$(this).addClass(($(this).text() == 'Pass') ? 'dup-sys-pass' : 'dup-sys-fail');
|
261 |
});
|
views/packages/main/{new1.inc.form.php → s1.setup2.php}
RENAMED
@@ -6,7 +6,7 @@
|
|
6 |
form#dup-form-opts fieldset {border-radius:4px; border-top:1px solid #dfdfdf; line-height:20px}
|
7 |
form#dup-form-opts fieldset{padding:10px 15px 15px 15px; min-height:275px; margin:0 10px 10px 10px}
|
8 |
form#dup-form-opts textarea, input[type="text"] {width:100%}
|
9 |
-
form#dup-form-opts textarea#filter-dirs {height:
|
10 |
form#dup-form-opts textarea#filter-exts {height:27px}
|
11 |
textarea#package_notes {height:37px;}
|
12 |
div.dup-notes-add {float:right; margin:-4px 2px 4px 0;}
|
@@ -21,6 +21,7 @@
|
|
21 |
span#dup-archive-filter-db {color:#A62426; display:none}
|
22 |
div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
|
23 |
div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
|
|
|
24 |
div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
|
25 |
div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
|
26 |
table#dup-dbtables td {padding:1px 15px 1px 4px}
|
@@ -43,7 +44,7 @@
|
|
43 |
ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
|
44 |
</style>
|
45 |
|
46 |
-
<form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
|
47 |
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
48 |
<div>
|
49 |
<label for="package-name"><b><?php _e('Name', 'duplicator') ?>:</b> </label>
|
@@ -156,6 +157,7 @@ ARCHIVE -->
|
|
156 |
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'duplicator') ?></a>
|
157 |
</div>
|
158 |
<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/>
|
|
|
159 |
<label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("File extensions", 'duplicator') ?>:</label>
|
160 |
<div class='dup-quick-links'>
|
161 |
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'duplicator') ?>]</a>
|
@@ -164,19 +166,17 @@ ARCHIVE -->
|
|
164 |
</div>
|
165 |
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
<div class="dup-tabs-opts-help">
|
168 |
-
<?php _e("The directory
|
169 |
-
<?php _e("Use the full path for directories and semicolons to separate all
|
170 |
</div>
|
171 |
-
<br/>
|
172 |
-
<span class="dup-pro-text">
|
173 |
-
<?php echo sprintf(__('%1$s are available in', 'duplicator'), 'Individual file filters'); ?>
|
174 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_file_filters&utm_campaign=duplicator_pro" target="_blank"><?php _e('Professional', 'duplicator');?></a>
|
175 |
-
<i class="fa fa-lightbulb-o"
|
176 |
-
data-tooltip-title="<?php _e("File Filters:", 'duplicator'); ?>"
|
177 |
-
data-tooltip="<?php _e('File filters allows you to select individual files and add them to an exclusion list that will filter them from the package.', 'duplicator'); ?>">
|
178 |
-
</i>
|
179 |
-
</span>
|
180 |
</div>
|
181 |
</div>
|
182 |
|
@@ -446,11 +446,11 @@ jQuery(document).ready(function ($)
|
|
446 |
var $filterItems = $('#dup-file-filter-items');
|
447 |
if ($("#filter-on").is(':checked')) {
|
448 |
$filterItems.removeAttr('disabled').css({color:'#000'});
|
449 |
-
$('#filter-exts,#filter-dirs').removeAttr('readonly').css({color:'#000'});
|
450 |
$('#dup-archive-filter-file').show();
|
451 |
} else {
|
452 |
$filterItems.attr('disabled', 'disabled').css({color:'#999'});
|
453 |
-
$('#filter-dirs, #filter-exts').attr('readonly', 'readonly').css({color:'#999'});
|
454 |
$('#dup-archive-filter-file').hide();
|
455 |
}
|
456 |
};
|
@@ -484,6 +484,12 @@ jQuery(document).ready(function ($)
|
|
484 |
var text = $("#filter-exts").val() + path + ';';
|
485 |
$("#filter-exts").val(text);
|
486 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
|
488 |
Duplicator.Pack.ConfirmReset = function ()
|
489 |
{
|
6 |
form#dup-form-opts fieldset {border-radius:4px; border-top:1px solid #dfdfdf; line-height:20px}
|
7 |
form#dup-form-opts fieldset{padding:10px 15px 15px 15px; min-height:275px; margin:0 10px 10px 10px}
|
8 |
form#dup-form-opts textarea, input[type="text"] {width:100%}
|
9 |
+
form#dup-form-opts textarea#filter-dirs {height:95px;}
|
10 |
form#dup-form-opts textarea#filter-exts {height:27px}
|
11 |
textarea#package_notes {height:37px;}
|
12 |
div.dup-notes-add {float:right; margin:-4px 2px 4px 0;}
|
21 |
span#dup-archive-filter-db {color:#A62426; display:none}
|
22 |
div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
|
23 |
div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
|
24 |
+
form#dup-form-opts textarea#filter-files {height:85px}
|
25 |
div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
|
26 |
div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
|
27 |
table#dup-dbtables td {padding:1px 15px 1px 4px}
|
44 |
ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
|
45 |
</style>
|
46 |
|
47 |
+
<form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo $retry_enabled ? '&retry=1' : '';?>" data-validate="parsley">
|
48 |
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
49 |
<div>
|
50 |
<label for="package-name"><b><?php _e('Name', 'duplicator') ?>:</b> </label>
|
157 |
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'duplicator') ?></a>
|
158 |
</div>
|
159 |
<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/>
|
160 |
+
|
161 |
<label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("File extensions", 'duplicator') ?>:</label>
|
162 |
<div class='dup-quick-links'>
|
163 |
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'duplicator') ?>]</a>
|
166 |
</div>
|
167 |
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
168 |
|
169 |
+
<label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("Files", 'duplicator') ?>:</label>
|
170 |
+
<div class='dup-quick-links'>
|
171 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php _e("(file path)", 'duplicator') ?></a>
|
172 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php _e("(clear)", 'duplicator') ?></a>
|
173 |
+
</div>
|
174 |
+
<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>
|
175 |
+
|
176 |
<div class="dup-tabs-opts-help">
|
177 |
+
<?php _e("The directory, file and extensions paths above will be excluded from the archive file if enabled is checked.", 'duplicator'); ?> <br/>
|
178 |
+
<?php _e("Use the full path for directories and files with semicolons to separate all paths.", 'duplicator'); ?>
|
179 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
</div>
|
181 |
</div>
|
182 |
|
446 |
var $filterItems = $('#dup-file-filter-items');
|
447 |
if ($("#filter-on").is(':checked')) {
|
448 |
$filterItems.removeAttr('disabled').css({color:'#000'});
|
449 |
+
$('#filter-exts,#filter-dirs, #filter-files').removeAttr('readonly').css({color:'#000'});
|
450 |
$('#dup-archive-filter-file').show();
|
451 |
} else {
|
452 |
$filterItems.attr('disabled', 'disabled').css({color:'#999'});
|
453 |
+
$('#filter-dirs, #filter-exts, #filter-files').attr('readonly', 'readonly').css({color:'#999'});
|
454 |
$('#dup-archive-filter-file').hide();
|
455 |
}
|
456 |
};
|
484 |
var text = $("#filter-exts").val() + path + ';';
|
485 |
$("#filter-exts").val(text);
|
486 |
};
|
487 |
+
|
488 |
+
Duplicator.Pack.AddExcludeFilePath = function (path)
|
489 |
+
{
|
490 |
+
var text = $("#filter-files").val() + path + '/file.ext;\n';
|
491 |
+
$("#filter-files").val(text);
|
492 |
+
};
|
493 |
|
494 |
Duplicator.Pack.ConfirmReset = function ()
|
495 |
{
|
views/packages/main/s2.scan1.php
ADDED
@@ -0,0 +1,345 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $wp_version;
|
3 |
+
wp_enqueue_script('dup-handlebars');
|
4 |
+
|
5 |
+
if (empty($_POST)) {
|
6 |
+
//F5 Refresh Check
|
7 |
+
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
8 |
+
die("<script>window.location.href = '{$redirect}'</script>");
|
9 |
+
}
|
10 |
+
|
11 |
+
$Package = new DUP_Package();
|
12 |
+
$Package->saveActive($_POST);
|
13 |
+
$Package = DUP_Package::getActive();
|
14 |
+
|
15 |
+
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
16 |
+
$mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
|
17 |
+
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
18 |
+
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
19 |
+
$zip_check = DUP_Util::getZipPath();
|
20 |
+
?>
|
21 |
+
|
22 |
+
<style>
|
23 |
+
/*PROGRESS-BAR - RESULTS - ERROR */
|
24 |
+
form#form-duplicator {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
|
25 |
+
div.dup-progress-title {font-size:22px; padding:5px 0 20px 0; font-weight:bold}
|
26 |
+
div#dup-msg-success {padding:0 5px 5px 5px; text-align:left}
|
27 |
+
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; }
|
28 |
+
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}
|
29 |
+
div#dup-msg-success-subtitle {color:#999; margin:0; font-size:11px}
|
30 |
+
div.dup-scan-filter-status {display:inline; float:right; font-size:11px; margin-right:10px; color:#630f0f;}
|
31 |
+
div#dup-msg-error {color:#A62426; padding:5px; max-width:790px;}
|
32 |
+
div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
|
33 |
+
div.dup-hdr-error-details {text-align:left; margin:20px 0}
|
34 |
+
i[data-tooltip].fa-question-circle {color:#555}
|
35 |
+
|
36 |
+
/*SCAN ITEMS: Sections */
|
37 |
+
div.scan-header { font-size:16px; padding:7px 5px 5px 7px; font-weight:bold; background-color:#E0E0E0; border-bottom:0px solid #C0C0C0 }
|
38 |
+
div.scan-item {border:1px solid #E0E0E0; border-bottom:none;}
|
39 |
+
div.scan-item-first { border-top-right-radius:4px; border-top-left-radius:4px}
|
40 |
+
div.scan-item-last {border-bottom:1px solid #E0E0E0}
|
41 |
+
div.scan-item div.title {background-color:#F1F1F1; width:100%; padding:4px 0 4px 0; cursor:pointer; height:20px;}
|
42 |
+
div.scan-item div.title:hover {background-color:#ECECEC;}
|
43 |
+
div.scan-item div.text {font-weight:bold; font-size:14px; float:left; position:relative; left:10px}
|
44 |
+
div.scan-item div.badge-pass {float:right; background:green; border-radius:5px; color:#fff; min-width:40px; text-align:center; position:relative; right:10px; font-size:12px}
|
45 |
+
div.scan-item div.badge-warn {float:right; background:#630f0f; border-radius:5px; color:#fff; min-width:40px; text-align:center; position:relative; right:10px; font-size:12px}
|
46 |
+
div.scan-item div.info {display:none; padding:10px; background:#fff}
|
47 |
+
div.scan-good {display:inline-block; color:green;font-weight:bold;}
|
48 |
+
div.scan-warn {display:inline-block; color:#630f0f;font-weight:bold;}
|
49 |
+
div.dup-more-details {float:right; font-size:14px}
|
50 |
+
div.dup-more-details:hover {color:#777; cursor:pointer}
|
51 |
+
|
52 |
+
/*FILES */
|
53 |
+
div#data-arc-size1 {display:inline-block; float:right; font-size:11px; margin-right:5px;}
|
54 |
+
i.data-size-help { float:right; margin-right:5px; display:block; font-size:11px}
|
55 |
+
div.hb-files-style div.container {border:1px solid #E0E0E0; border-radius:4px; margin:5px 0 10px 0}
|
56 |
+
div.hb-files-style div.container b {font-weight:bold}
|
57 |
+
div.hb-files-style div.container div.divider {margin-bottom:2px; font-weight:bold}
|
58 |
+
div.hb-files-style div.data {padding:8px; line-height:21px; height:175px; overflow-y:scroll; }
|
59 |
+
div.hb-files-style div.hdrs {background:#efefef; padding:0 4px 4px 6px; border-bottom:1px solid #E0E0E0; font-weight:bold}
|
60 |
+
div.hb-files-style div.hdrs sup i.fa {font-size:11px}
|
61 |
+
div.hb-files-style div.hdrs-up-down {float:right; margin:2px 12px 0 0}
|
62 |
+
div.hb-files-style i.dup-nav-toggle:hover {cursor:pointer; color:#999}
|
63 |
+
div.hb-files-style div.directory {margin-left:12px}
|
64 |
+
div.hb-files-style div.directory i.size {font-size:11px; font-style:normal; display:inline-block; min-width:50px}
|
65 |
+
div.hb-files-style div.directory i.count {font-size:11px; font-style:normal; display:inline-block; min-width:20px}
|
66 |
+
div.hb-files-style div.directory i.empty {width:15px; display:inline-block}
|
67 |
+
div.hb-files-style div.directory i.dup-nav {cursor:pointer}
|
68 |
+
div.hb-files-style div.directory i.fa {width:8px}
|
69 |
+
div.hb-files-style div.directory i.chk-off {width:20px; color:#777; cursor: help; margin:0; font-size:1.25em}
|
70 |
+
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;}
|
71 |
+
div.hb-files-style div.directory label:hover {color:#025d02}
|
72 |
+
div.hb-files-style div.files {padding:2px 0 0 35px; font-size:12px; display:none; line-height:18px}
|
73 |
+
div.hb-files-style div.files i.size {font-style:normal; display:inline-block; min-width:50px}
|
74 |
+
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;}
|
75 |
+
div.hb-files-style div.files label:hover {color:#025d02; cursor: pointer}
|
76 |
+
div.hb-files-style div.apply-btn {text-align:right; margin: 1px 0 10px 0}
|
77 |
+
|
78 |
+
div#size-more-details {display:none; margin:5px 0 20px 0; border:1px solid #dfdfdf; padding:8px; border-radius: 4px; background-color: #F1F1F1}
|
79 |
+
div#size-more-details ul {list-style-type:circle; padding-left:20px; margin:0}
|
80 |
+
div#size-more-details li {margin:0}
|
81 |
+
|
82 |
+
/*DATABASE*/
|
83 |
+
div#dup-scan-db-info {margin:0px 0px 0px 10px}
|
84 |
+
div#data-db-tablelist {max-height:300px; overflow-y:scroll; border:1px dashed silver; padding:5px; margin-top:5px}
|
85 |
+
div#data-db-tablelist div{padding:0px 0px 0px 15px;}
|
86 |
+
div#data-db-tablelist span{display:inline-block; min-width:75px}
|
87 |
+
div#data-db-size1 {display:inline-block; float:right; font-size:11px; margin-right:5px;}
|
88 |
+
|
89 |
+
/*WARNING-CONTINUE*/
|
90 |
+
div#dup-scan-warning-continue {display:none; text-align:center; padding:0 0 15px 0}
|
91 |
+
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:#630f0f}
|
92 |
+
div#dup-scan-warning-continue div.msg2 {padding:2px; line-height:13px}
|
93 |
+
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
94 |
+
|
95 |
+
/*DIALOG WINDOWS*/
|
96 |
+
div#arc-details-dlg {font-size:12px}
|
97 |
+
div#arc-details-dlg h2 {margin:0; padding:0 0 5px 0; border-bottom:1px solid #dfdfdf;}
|
98 |
+
div#arc-details-dlg hr {margin:3px 0 10px 0}
|
99 |
+
div#arc-details-dlg table#db-area {margin:0; width:98%}
|
100 |
+
div#arc-details-dlg table#db-area td {padding:0;}
|
101 |
+
div#arc-details-dlg table#db-area td:first-child {font-weight:bold; white-space:nowrap; width:100px}
|
102 |
+
div#arc-details-dlg div.filter-area {height:265px; overflow-y:scroll; border:1px solid #dfdfdf; padding:8px; margin:2px 0}
|
103 |
+
div#arc-details-dlg div.file-info {padding:0 0 10px 15px; width:500px; white-space:nowrap;}
|
104 |
+
div#arc-details-dlg div.file-info i.fa-question-circle { margin-right: 5px; font-size: 11px;}
|
105 |
+
|
106 |
+
div#arc-paths-dlg textarea.path-dirs,
|
107 |
+
textarea.path-files {font-size:12px; border: 1px solid silver; padding: 10px; background: #fff; margin:5px; height:125px; width:100%; white-space:pre}
|
108 |
+
div#arc-paths-dlg div.copy-button {float:right;}
|
109 |
+
div#arc-paths-dlg div.copy-button button {font-size:12px}
|
110 |
+
|
111 |
+
/*FOOTER*/
|
112 |
+
div.dup-button-footer {text-align:center; margin:0}
|
113 |
+
button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
|
114 |
+
</style>
|
115 |
+
|
116 |
+
<!-- =========================================
|
117 |
+
TOOL BAR:STEPS -->
|
118 |
+
<table id="dup-toolbar">
|
119 |
+
<tr valign="top">
|
120 |
+
<td style="white-space:nowrap">
|
121 |
+
<div id="dup-wiz">
|
122 |
+
<div id="dup-wiz-steps">
|
123 |
+
<div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
|
124 |
+
<div class="active-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
|
125 |
+
<div><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
|
126 |
+
</div>
|
127 |
+
<div id="dup-wiz-title">
|
128 |
+
<?php _e('Step 2: System Scan', 'duplicator'); ?>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</td>
|
132 |
+
<td>
|
133 |
+
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('Packages', 'duplicator'); ?></a>
|
134 |
+
<span> <?php _e('Create New', 'duplicator'); ?></span>
|
135 |
+
</td>
|
136 |
+
</tr>
|
137 |
+
</table>
|
138 |
+
<hr class="dup-toolbar-line">
|
139 |
+
|
140 |
+
|
141 |
+
<form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
|
142 |
+
|
143 |
+
<!-- PROGRESS BAR -->
|
144 |
+
<div id="dup-progress-bar-area">
|
145 |
+
<div class="dup-progress-title"><i class="fa fa-circle-o-notch fa-spin"></i> <?php _e('Scanning Site', 'duplicator'); ?></div>
|
146 |
+
<div id="dup-progress-bar"></div>
|
147 |
+
<b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
148 |
+
<i><?php _e('Keep this window open during the scan process.', 'duplicator'); ?></i><br/>
|
149 |
+
<i><?php _e('This can take several minutes.', 'duplicator'); ?></i><br/>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<!-- ERROR MESSAGE -->
|
153 |
+
<div id="dup-msg-error" style="display:none">
|
154 |
+
<div class="dup-hdr-error"><i class="fa fa-exclamation-circle"></i> <?php _e('Scan Error', 'duplicator'); ?></div>
|
155 |
+
<i><?php _e('Please try again!', 'duplicator'); ?></i><br/>
|
156 |
+
<div class="dup-hdr-error-details">
|
157 |
+
<b><?php _e("Server Status:", 'duplicator'); ?></b>
|
158 |
+
<div id="dup-msg-error-response-status" style="display:inline-block"></div><br/>
|
159 |
+
|
160 |
+
<b><?php _e("Error Message:", 'duplicator'); ?></b>
|
161 |
+
<div id="dup-msg-error-response-text"></div>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<!-- SUCCESS MESSAGE -->
|
166 |
+
<div id="dup-msg-success" style="display:none">
|
167 |
+
|
168 |
+
<div style="text-align:center">
|
169 |
+
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php _e('Scan Complete', 'duplicator'); ?></div>
|
170 |
+
<div id="dup-msg-success-subtitle">
|
171 |
+
<?php _e('Process Time:', 'duplicator'); ?> <span id="data-rpt-scantime"></span>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<div class="details">
|
176 |
+
<?php
|
177 |
+
include ('s2.scan2.php');
|
178 |
+
echo '<br/><br/>';
|
179 |
+
include ('s2.scan3.php')
|
180 |
+
?>
|
181 |
+
</div>
|
182 |
+
|
183 |
+
<!-- WARNING CONTINUE -->
|
184 |
+
<div id="dup-scan-warning-continue">
|
185 |
+
<div class="msg1">
|
186 |
+
<label for="dup-scan-warning-continue-checkbox">
|
187 |
+
<?php _e('A warning status was detected, are you sure you want to continue?', 'duplicator');?>
|
188 |
+
</label>
|
189 |
+
<div style="padding:8px 0">
|
190 |
+
<input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.warningContinue(this)"/>
|
191 |
+
<label for="dup-scan-warning-continue-checkbox"><?php _e('Yes. Continue with the build process!', 'duplicator');?></label>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
<div class="msg2">
|
195 |
+
<label for="dup-scan-warning-continue-checkbox">
|
196 |
+
<?php
|
197 |
+
_e("Scan checks are not required to pass, however they could cause issues on some systems.", 'duplicator');
|
198 |
+
echo '<br/>';
|
199 |
+
_e("Please review the details for each section by clicking on the detail title.", 'duplicator');
|
200 |
+
?>
|
201 |
+
</label>
|
202 |
+
</div>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<div class="dup-button-footer" style="display:none">
|
206 |
+
<input type="button" value="◀ <?php _e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1')" class="button button-large" />
|
207 |
+
<input type="button" value="<?php _e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.rescan()" class="button button-large" />
|
208 |
+
<input type="submit" value="<?php _e("Build", 'duplicator') ?> ▶" class="button button-primary button-large" id="dup-build-button" />
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
</form>
|
213 |
+
|
214 |
+
<script>
|
215 |
+
jQuery(document).ready(function($)
|
216 |
+
{
|
217 |
+
// Performs ajax call to get scanner retults via JSON response
|
218 |
+
Duplicator.Pack.runScanner = function()
|
219 |
+
{
|
220 |
+
var data = {action : 'duplicator_package_scan'}
|
221 |
+
$.ajax({
|
222 |
+
type: "POST",
|
223 |
+
cache: false,
|
224 |
+
url: ajaxurl,
|
225 |
+
dataType: "json",
|
226 |
+
timeout: 10000000,
|
227 |
+
data: data,
|
228 |
+
complete: function() {$('.dup-button-footer').show()},
|
229 |
+
success: function(data) {
|
230 |
+
Duplicator.Pack.loadScanData(data);
|
231 |
+
},
|
232 |
+
error: function(data) {
|
233 |
+
$('#dup-progress-bar-area').hide();
|
234 |
+
var status = data.status + ' -' + data.statusText;
|
235 |
+
$('#dup-msg-error-response-status').html(status)
|
236 |
+
$('#dup-msg-error-response-text').html(data.responseText);
|
237 |
+
$('#dup-msg-error').show(200);
|
238 |
+
console.log(data);
|
239 |
+
}
|
240 |
+
});
|
241 |
+
}
|
242 |
+
|
243 |
+
//Loads the scanner data results into the various sections of the screen
|
244 |
+
Duplicator.Pack.loadScanData = function(data)
|
245 |
+
{
|
246 |
+
$('#dup-progress-bar-area').hide();
|
247 |
+
|
248 |
+
//ERROR: Data object is corrupt or empty return error
|
249 |
+
if (data == undefined || data.RPT == undefined) {
|
250 |
+
Duplicator.Pack.intErrorView();
|
251 |
+
console.log('JSON Report Data:');
|
252 |
+
console.log(data);
|
253 |
+
return;
|
254 |
+
}
|
255 |
+
|
256 |
+
$('#data-rpt-scantime').text(data.RPT.ScanTime || 0);
|
257 |
+
Duplicator.Pack.intServerData(data);
|
258 |
+
Duplicator.Pack.initArchiveFilesData(data);
|
259 |
+
Duplicator.Pack.initArchiveDBData(data);
|
260 |
+
|
261 |
+
$('#dup-msg-success').show();
|
262 |
+
|
263 |
+
//Waring Check
|
264 |
+
var warnCount = data.RPT.Warnings || 0;
|
265 |
+
if (warnCount > 0) {
|
266 |
+
$('#dup-scan-warning-continue').show();
|
267 |
+
$('#dup-build-button').prop("disabled",true).removeClass('button-primary');
|
268 |
+
if ($('#dup-scan-warning-continue-checkbox').is(':checked')) {
|
269 |
+
$('#dup-build-button').removeAttr('disabled').addClass('button-primary');
|
270 |
+
}
|
271 |
+
} else {
|
272 |
+
$('#dup-scan-warning-continue').hide();
|
273 |
+
$('#dup-build-button').prop("disabled",false).addClass('button-primary');
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
//Toggles each scan item to hide/show details
|
278 |
+
Duplicator.Pack.toggleScanItem = function(item)
|
279 |
+
{
|
280 |
+
var $info = $(item).parents('div.scan-item').children('div.info');
|
281 |
+
var $text = $(item).find('div.text i.fa');
|
282 |
+
if ($info.is(":hidden")) {
|
283 |
+
$text.addClass('fa-caret-down').removeClass('fa-caret-right');
|
284 |
+
$info.show();
|
285 |
+
} else {
|
286 |
+
$text.addClass('fa-caret-right').removeClass('fa-caret-down');
|
287 |
+
$info.hide(250);
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
//Returns the scanner without a page refresh
|
292 |
+
Duplicator.Pack.rescan = function()
|
293 |
+
{
|
294 |
+
$('#dup-msg-success,#dup-msg-error,.dup-button-footer').hide();
|
295 |
+
$('#dup-progress-bar-area').show();
|
296 |
+
Duplicator.Pack.runScanner();
|
297 |
+
}
|
298 |
+
|
299 |
+
//Allows user to continue with build if warnings found
|
300 |
+
Duplicator.Pack.warningContinue = function(checkbox)
|
301 |
+
{
|
302 |
+
($(checkbox).is(':checked'))
|
303 |
+
? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
|
304 |
+
: $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
|
305 |
+
}
|
306 |
+
|
307 |
+
//Show the error message if the JSON data is corrupted
|
308 |
+
Duplicator.Pack.intErrorView = function()
|
309 |
+
{
|
310 |
+
var html_msg;
|
311 |
+
html_msg = '<?php _e("Unable to perform a full scan, please try the following actions:", 'duplicator') ?><br/><br/>';
|
312 |
+
html_msg += '<?php _e("1. Go back and create a root path directory filter to validate the site is scan-able.", 'duplicator') ?><br/>';
|
313 |
+
html_msg += '<?php _e("2. Continue to add/remove filters to isolate which path is causing issues.", 'duplicator') ?><br/>';
|
314 |
+
html_msg += '<?php _e("3. This message will go away once the correct filters are applied.", 'duplicator') ?><br/><br/>';
|
315 |
+
|
316 |
+
html_msg += '<?php _e("Common Issues:", 'duplicator') ?><ul>';
|
317 |
+
html_msg += '<li><?php _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>';
|
318 |
+
html_msg += '<li><?php _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>';
|
319 |
+
html_msg += '</ul>';
|
320 |
+
$('#dup-msg-error-response-status').html('Scan Path Error [<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>]');
|
321 |
+
$('#dup-msg-error-response-text').html(html_msg);
|
322 |
+
$('#dup-msg-error').show(200);
|
323 |
+
}
|
324 |
+
|
325 |
+
//Sets various can statuses
|
326 |
+
Duplicator.Pack.setScanStatus = function(status)
|
327 |
+
{
|
328 |
+
var result;
|
329 |
+
switch (status) {
|
330 |
+
case false : result = '<div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
331 |
+
case 'Warn' : result = '<div class="badge-warn">Warn</div>'; break;
|
332 |
+
case true : result = '<div class="scan-good"><i class="fa fa-check"></i></div>'; break;
|
333 |
+
case 'Good' : result = '<div class="badge-pass">Good</div>'; break;
|
334 |
+
default :
|
335 |
+
result = 'unable to read';
|
336 |
+
}
|
337 |
+
return result;
|
338 |
+
}
|
339 |
+
|
340 |
+
//PAGE INIT:
|
341 |
+
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
342 |
+
Duplicator.Pack.runScanner();
|
343 |
+
|
344 |
+
});
|
345 |
+
</script>
|
views/packages/main/s2.scan2.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- ================================================================
|
2 |
+
SERVER -->
|
3 |
+
<div class="details-title">
|
4 |
+
<i class="fa fa-hdd-o"></i> <?php _e("Server", 'duplicator'); ?>
|
5 |
+
</div>
|
6 |
+
|
7 |
+
<!-- ============
|
8 |
+
PHP SETTINGS -->
|
9 |
+
<div class="scan-item">
|
10 |
+
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
11 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Setup', 'duplicator');?></div>
|
12 |
+
<div id="data-srv-php-all"></div>
|
13 |
+
</div>
|
14 |
+
<div class="info">
|
15 |
+
<?php
|
16 |
+
//WEB SERVER
|
17 |
+
$web_servers = implode(', ', $GLOBALS['DUPLICATOR_SERVER_LIST']);
|
18 |
+
echo '<span id="data-srv-php-websrv"></span> <b>' . __('Web Server', 'duplicator') . ":</b> '{$_SERVER['SERVER_SOFTWARE']}' <br/>";
|
19 |
+
_e("Supported web servers: ", 'duplicator');
|
20 |
+
echo "<i>{$web_servers}</i>";
|
21 |
+
|
22 |
+
//PHP VERSION
|
23 |
+
echo '<hr size="1" /><span id="data-srv-php-version"></span> <b>' . __('PHP Version', 'duplicator') . "</b> <br/>";
|
24 |
+
_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');
|
25 |
+
|
26 |
+
//OPEN_BASEDIR
|
27 |
+
$test = ini_get("open_basedir");
|
28 |
+
$test = ($test) ? 'ON' : 'OFF';
|
29 |
+
echo '<hr size="1" /><span id="data-srv-php-openbase"></span> <b>' . __('PHP Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
30 |
+
_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');
|
31 |
+
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
32 |
+
|
33 |
+
//MAX_EXECUTION_TIME
|
34 |
+
$test = (@set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
35 |
+
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('PHP Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
36 |
+
_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. '
|
37 |
+
. 'An attempt is made to override this value if the server allows it.', 'duplicator');
|
38 |
+
echo '<br/><br/>';
|
39 |
+
_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 interrupt messages, then your web server could be killing '
|
40 |
+
. '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. '
|
41 |
+
. 'However use caution as excluding the wrong resources can cause your install to not work properly.', 'duplicator');
|
42 |
+
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
43 |
+
|
44 |
+
if ($zip_check != null) {
|
45 |
+
echo '<br/><br/>';
|
46 |
+
echo '<span style="font-weight:bold">';
|
47 |
+
_e('Get faster builds with Duplicator Pro with access to shell_exec zip.', 'duplicator');
|
48 |
+
echo '</span>';
|
49 |
+
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>";
|
50 |
+
}
|
51 |
+
?>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<!-- ============
|
56 |
+
WP SETTINGS -->
|
57 |
+
<div class="scan-item scan-item-last">
|
58 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
59 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('WordPress', 'duplicator');?></div>
|
60 |
+
<div id="data-srv-wp-all"></div>
|
61 |
+
</div>
|
62 |
+
<div class="info">
|
63 |
+
<?php
|
64 |
+
//VERSION CHECK
|
65 |
+
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
66 |
+
printf(__('It is recommended to have a version of WordPress that is greater than %1$s', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
67 |
+
|
68 |
+
//CORE FILES
|
69 |
+
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
70 |
+
_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.", 'duplicator');
|
71 |
+
|
72 |
+
//CACHE DIR
|
73 |
+
$cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
|
74 |
+
$cache_size = DUP_Util::byteSize(DUP_Util::getDirectorySize($cache_path));
|
75 |
+
echo '<hr size="1" /><span id="data-srv-wp-cache"></span> <b>' . __('Cache Path', 'duplicator') . ":</b> '{$cache_path}' ({$cache_size}) <br/>";
|
76 |
+
_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 "
|
77 |
+
. "your cache plugins clear cache feature. Use caution if manually removing files the cache folder. The cache "
|
78 |
+
. "size minimum threshold that triggers this warning is currently set at ", 'duplicator');
|
79 |
+
echo DUP_Util::byteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
80 |
+
|
81 |
+
//MU SITE
|
82 |
+
if (is_multisite()) {
|
83 |
+
echo '<hr size="1" /><span><div class="scan-warn"><i class="fa fa-exclamation-triangle"></i></div></span> <b>' . __('Multisite: Unsupported', 'duplicator') . "</b> <br/>";
|
84 |
+
_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');
|
85 |
+
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>";
|
86 |
+
} else {
|
87 |
+
echo '<hr size="1" /><span><div class="scan-good"><i class="fa fa-check"></i></div></span> <b>' . __('Multisite: N/A', 'duplicator') . "</b> <br/>";
|
88 |
+
_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');
|
89 |
+
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>";
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<script>
|
96 |
+
(function($){
|
97 |
+
|
98 |
+
//Ints the various server data responses from the scan results
|
99 |
+
Duplicator.Pack.intServerData= function(data)
|
100 |
+
{
|
101 |
+
$('#data-srv-php-websrv').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.websrv));
|
102 |
+
$('#data-srv-php-openbase').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.openbase));
|
103 |
+
$('#data-srv-php-maxtime').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.maxtime));
|
104 |
+
$('#data-srv-php-version').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.version));
|
105 |
+
$('#data-srv-php-openssl').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.openssl));
|
106 |
+
$('#data-srv-php-all').html(Duplicator.Pack.setScanStatus(data.SRV.PHP.ALL));
|
107 |
+
|
108 |
+
$('#data-srv-wp-version').html(Duplicator.Pack.setScanStatus(data.SRV.WP.version));
|
109 |
+
$('#data-srv-wp-core').html(Duplicator.Pack.setScanStatus(data.SRV.WP.core));
|
110 |
+
$('#data-srv-wp-cache').html(Duplicator.Pack.setScanStatus(data.SRV.WP.cache));
|
111 |
+
$('#data-srv-wp-all').html(Duplicator.Pack.setScanStatus(data.SRV.WP.ALL));
|
112 |
+
}
|
113 |
+
|
114 |
+
})(jQuery);
|
115 |
+
</script>
|
views/packages/main/s2.scan3.php
ADDED
@@ -0,0 +1,657 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function _duplicatorGetRootPath() {
|
3 |
+
$txt = __('Root Path', 'duplicator');
|
4 |
+
$root = rtrim(DUPLICATOR_WPROOTPATH, '//');
|
5 |
+
$sroot = strlen($root) > 50 ? substr($root, 0, 50) . '...' : $root;
|
6 |
+
echo "<div title='{$root}' class='divider'><i class='fa fa-folder-open'></i> {$sroot}</div>";
|
7 |
+
}
|
8 |
+
?>
|
9 |
+
|
10 |
+
<!-- ================================================================
|
11 |
+
ARCHIVE -->
|
12 |
+
<div class="details-title">
|
13 |
+
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator');?>
|
14 |
+
<div class="dup-more-details" onclick="Duplicator.Pack.showDetailsDlg()" title="<?php _e('Show Scan Details', 'duplicator');?>"><i class="fa fa-window-maximize"></i></div>
|
15 |
+
</div>
|
16 |
+
|
17 |
+
<div class="scan-header scan-item-first">
|
18 |
+
<i class="fa fa-files-o"></i>
|
19 |
+
<?php _e("Files", 'duplicator'); ?>
|
20 |
+
<i class="fa fa-question-circle data-size-help"
|
21 |
+
data-tooltip-title="<?php _e('Archive Size', 'duplicator'); ?>"
|
22 |
+
data-tooltip="<?php _e('This size includes only files BEFORE compression is applied. It does not include the size of the '
|
23 |
+
. 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i>
|
24 |
+
<div id="data-arc-size1"></div>
|
25 |
+
<div class="dup-scan-filter-status">
|
26 |
+
<?php
|
27 |
+
if ($Package->Archive->ExportOnlyDB) {
|
28 |
+
echo '<i class="fa fa-filter"></i> '; _e('Database Only', 'duplicator');
|
29 |
+
} elseif ($Package->Archive->FilterOn) {
|
30 |
+
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
31 |
+
}
|
32 |
+
?>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<!-- ============
|
37 |
+
TOTAL SIZE -->
|
38 |
+
<div class="scan-item">
|
39 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
40 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Size Check', 'duplicator');?></div>
|
41 |
+
<div id="data-arc-status-size"></div>
|
42 |
+
</div>
|
43 |
+
<div class="info" id="scan-itme-file-size">
|
44 |
+
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-arc-size2"></span> |
|
45 |
+
<b><?php _e('File Count', 'duplicator');?>:</b> <span id="data-arc-files"></span> |
|
46 |
+
<b><?php _e('Directory Count', 'duplicator');?>:</b> <span id="data-arc-dirs"></span> <br/>
|
47 |
+
<?php
|
48 |
+
_e('Compressing larger sites on <i>some budget hosts</i> may cause timeouts. ' , 'duplicator');
|
49 |
+
echo "<i> <a href='javascipt:void(0)' onclick='jQuery(\"#size-more-details\").toggle(100)'>[" . __('more details...', 'duplicator') . "]</a></i>";
|
50 |
+
?>
|
51 |
+
<div id="size-more-details">
|
52 |
+
<?php
|
53 |
+
echo "<b>" . __('Overview', 'duplicator') . ":</b><br/>";
|
54 |
+
|
55 |
+
printf(__('This notice is triggered at <b>%s</b> and can be ignored on most hosts. If during the build process you see a "Host Build Interrupt" message then this '
|
56 |
+
. 'host has strict processing limits. Below are some options you can take to overcome constraints setup on this host.', 'duplicator'),
|
57 |
+
DUP_Util::byteSize(DUPLICATOR_SCAN_SIZE_DEFAULT));
|
58 |
+
|
59 |
+
echo '<br/><br/>';
|
60 |
+
|
61 |
+
echo "<b>" . __('Timeout Options', 'duplicator') . ":</b><br/>";
|
62 |
+
echo '<ul>';
|
63 |
+
echo '<li>' . __('Apply the "Quick Filters" below or click the back button to apply on previous page.', 'duplicator') . '</li>';
|
64 |
+
echo '<li>' . __('See the FAQ link to adjust this hosts timeout limits: ', 'duplicator') . " <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q' target='_blank'>" . __('What can I try for Timeout Issues?', 'duplicator') . '</a></li>';
|
65 |
+
echo '<li>' . __('Consider trying multi-threaded support in ', 'duplicator');
|
66 |
+
echo "<a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_size_warn&utm_campaign=duplicator_pro' target='_blank'>" . __('Duplicator Pro.', 'duplicator') . "</a>";
|
67 |
+
echo '</li>';
|
68 |
+
echo '</ul>';
|
69 |
+
|
70 |
+
$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 '
|
71 |
+
. 'issues creating a package try excluding the directory paths below or go back to Step 1 and add them.', 'duplicator'),
|
72 |
+
DUP_Util::byteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
73 |
+
?>
|
74 |
+
</div>
|
75 |
+
<script id="hb-files-large" type="text/x-handlebars-template">
|
76 |
+
<div class="container">
|
77 |
+
<div class="hdrs">
|
78 |
+
<span style="font-weight:bold">
|
79 |
+
<?php _e('Quick Filters', 'duplicator'); ?>
|
80 |
+
<sup><i class="fa fa-question-circle" data-tooltip-title="<?php _e("Large Files", 'duplicator'); ?>" data-tooltip="<?php echo $hlptxt; ?>"></i></sup>
|
81 |
+
</span>
|
82 |
+
<div class='hdrs-up-down'>
|
83 |
+
<i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php _e("Hide All", 'duplicator'); ?>"></i>
|
84 |
+
<i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php _e("Show All", 'duplicator'); ?>"></i>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
<div class="data">
|
88 |
+
<?php _duplicatorGetRootPath(); ?>
|
89 |
+
{{#if ARC.FilterInfo.Files.Size}}
|
90 |
+
{{#each ARC.FilterInfo.TreeSize as |directory|}}
|
91 |
+
<div class="directory">
|
92 |
+
<i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i>
|
93 |
+
{{#if directory.iscore}}
|
94 |
+
<i class="fa fa-window-close-o chk-off" title="<?php _e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i>
|
95 |
+
{{else}}
|
96 |
+
<input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="lf_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" />
|
97 |
+
{{/if}}
|
98 |
+
<label for="lf_dir_{{@index}}" title="{{directory.dir}}">
|
99 |
+
<i class="size">[{{directory.size}}]</i> /{{directory.sdir}}/
|
100 |
+
</label> <br/>
|
101 |
+
<div class="files">
|
102 |
+
{{#each directory.files as |file|}}
|
103 |
+
<input type="checkbox" name="file_paths[]" value="{{file.path}}" id="lf_file_{{directory.dir}}-{{@index}}" />
|
104 |
+
<label for="lf_file_{{directory.dir}}-{{@index}}" title="{{file.path}}">
|
105 |
+
<i class="size">[{{file.bytes}}]</i> {{file.name}}
|
106 |
+
</label> <br/>
|
107 |
+
{{/each}}
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
{{/each}}
|
111 |
+
{{else}}
|
112 |
+
<?php
|
113 |
+
if (! isset($_GET['retry'])) {
|
114 |
+
_e('No large files found during this scan.', 'duplicator');
|
115 |
+
} else {
|
116 |
+
echo "<div style='color:maroon'>";
|
117 |
+
_e('No large files found during this scan. If your having issues building a package click the back button and try '
|
118 |
+
. 'adding the following file filters to non-essential files paths like wp-conent/uploads. These filtered files can then '
|
119 |
+
. 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
|
120 |
+
echo "</div>";
|
121 |
+
}
|
122 |
+
?>
|
123 |
+
{{/if}}
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
<div class="apply-btn">
|
127 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'large')">
|
128 |
+
<i class="fa fa-filter"></i> <?php _e('Add Filters & Rescan', 'duplicator');?>
|
129 |
+
</button>
|
130 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('large')" title="<?php _e('Copy Paths to Clipboard', 'duplicator');?>">
|
131 |
+
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
132 |
+
</button>
|
133 |
+
</div>
|
134 |
+
</script>
|
135 |
+
<div id="hb-files-large-result" class="hb-files-style"></div>
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<!-- ============
|
140 |
+
FILE NAME CHECKS -->
|
141 |
+
<div class="scan-item scan-item-last">
|
142 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
143 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Name Check', 'duplicator');?></div>
|
144 |
+
<div id="data-arc-status-names"></div>
|
145 |
+
</div>
|
146 |
+
<div class="info">
|
147 |
+
<?php
|
148 |
+
_e('Unicode and special characters such as "*?><:/\|", can be problematic on some hosts.', 'duplicator');
|
149 |
+
_e('<b>');
|
150 |
+
_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');
|
151 |
+
_e('</b>');
|
152 |
+
$txt = __('If this environment/system and the system where it will be installed are setup to support Unicode and long paths then these filters can be ignored. '
|
153 |
+
. 'If you run into issues with creating or installing a package, then is recommended to filter these paths.', 'duplicator');
|
154 |
+
?>
|
155 |
+
<script id="hb-files-utf8" type="text/x-handlebars-template">
|
156 |
+
<div class="container">
|
157 |
+
<div class="hdrs">
|
158 |
+
<span style="font-weight:bold"><?php _e('Quick Filters', 'duplicator');?></span>
|
159 |
+
<sup><i class="fa fa-question-circle" data-tooltip-title="<?php _e("Name Checks", 'duplicator'); ?>" data-tooltip="<?php echo $txt; ?>"></i></sup>
|
160 |
+
<div class='hdrs-up-down'>
|
161 |
+
<i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php _e("Hide All", 'duplicator'); ?>"></i>
|
162 |
+
<i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php _e("Show All", 'duplicator'); ?>"></i>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
<div class="data">
|
166 |
+
<?php _duplicatorGetRootPath(); ?>
|
167 |
+
{{#if ARC.FilterInfo.TreeWarning}}
|
168 |
+
{{#each ARC.FilterInfo.TreeWarning as |directory|}}
|
169 |
+
<div class="directory">
|
170 |
+
{{#if directory.count}}
|
171 |
+
<i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i>
|
172 |
+
{{else}}
|
173 |
+
<i class="empty"></i>
|
174 |
+
{{/if}}
|
175 |
+
|
176 |
+
{{#if directory.iscore}}
|
177 |
+
<i class="fa fa-window-close-o chk-off" title="<?php _e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i>
|
178 |
+
{{else}}
|
179 |
+
<input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="nc1_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" />
|
180 |
+
{{/if}}
|
181 |
+
|
182 |
+
<label for="nc1_dir_{{@index}}" title="{{directory.dir}}">
|
183 |
+
<i class="count">({{directory.count}})</i>
|
184 |
+
/{{directory.sdir}}/
|
185 |
+
</label> <br/>
|
186 |
+
<div class="files">
|
187 |
+
{{#each directory.files}}
|
188 |
+
<input type="checkbox" name="file_paths[]" value="{{path}}" id="warn_file_{{directory.dir}}-{{@index}}" />
|
189 |
+
<label for="warn_file_{{directory.dir}}-{{@index}}" title="{{path}}">
|
190 |
+
{{name}}
|
191 |
+
</label> <br/>
|
192 |
+
{{/each}}
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
{{/each}}
|
196 |
+
{{else}}
|
197 |
+
<?php _e('No file/directory name warnings found.', 'duplicator');?>
|
198 |
+
{{/if}}
|
199 |
+
</div>
|
200 |
+
</div>
|
201 |
+
<div class="apply-btn">
|
202 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'utf8')">
|
203 |
+
<i class="fa fa-filter"></i> <?php _e('Add Filters & Rescan', 'duplicator');?>
|
204 |
+
</button>
|
205 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('utf8')" title="<?php _e('Copy Paths to Clipboard', 'duplicator');?>">
|
206 |
+
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
207 |
+
</button>
|
208 |
+
</div>
|
209 |
+
</script>
|
210 |
+
<div id="hb-files-utf8-result" class="hb-files-style"></div>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
<br/><br/>
|
214 |
+
|
215 |
+
|
216 |
+
<!-- ============
|
217 |
+
DATABASE -->
|
218 |
+
<div id="dup-scan-db">
|
219 |
+
<div class="scan-header scan-item-first">
|
220 |
+
<i class="fa fa-table"></i>
|
221 |
+
<?php _e("Database", 'duplicator'); ?>
|
222 |
+
<i class="fa fa-question-circle data-size-help"
|
223 |
+
data-tooltip-title="<?php _e("Database Size:", 'duplicator'); ?>"
|
224 |
+
data-tooltip="<?php _e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. '
|
225 |
+
. 'The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
|
226 |
+
<div id="data-db-size1"></div>
|
227 |
+
<div class="dup-scan-filter-status">
|
228 |
+
<?php
|
229 |
+
if ($Package->Database->FilterOn) {
|
230 |
+
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
231 |
+
}
|
232 |
+
?>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
|
236 |
+
<!-- ============
|
237 |
+
DB: TOTAL SIZE -->
|
238 |
+
<div class="scan-item">
|
239 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
240 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Total Size', 'duplicator');?></div>
|
241 |
+
<div id="data-db-status-size"></div>
|
242 |
+
</div>
|
243 |
+
<div class="info">
|
244 |
+
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-db-size2"></span> |
|
245 |
+
<b><?php _e('Tables', 'duplicator');?>:</b> <span id="data-db-tablecount"></span> |
|
246 |
+
<b><?php _e('Records', 'duplicator');?>:</b> <span id="data-db-rows"></span>
|
247 |
+
<br/><br/>
|
248 |
+
<?php
|
249 |
+
//OVERVIEW
|
250 |
+
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
251 |
+
printf(__('Total size and row counts are approximate values. The thresholds that trigger warnings are %1$s OR %2$s records total for the entire database. '
|
252 |
+
. 'The larger the databases the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
253 |
+
DUP_Util::byteSize(DUPLICATOR_SCAN_DB_ALL_SIZE),
|
254 |
+
number_format(DUPLICATOR_SCAN_DB_ALL_ROWS));
|
255 |
+
|
256 |
+
//OPTIONS
|
257 |
+
echo '<br/><br/>';
|
258 |
+
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
259 |
+
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and optimize', 'duplicator') . '</a>';
|
260 |
+
printf(__('1. %1$s the database to improve its size, performance and efficiency.', 'duplicator'), $lnk);
|
261 |
+
echo '<br/><br/>';
|
262 |
+
$lnk = '<a href="?page=duplicator-settings&tab=package" target="_blank">' . __('Enable mysqldump', 'duplicator') . '</a>';
|
263 |
+
printf(__('2. %1$s if this host supports the option.', 'duplicator'), $lnk);
|
264 |
+
echo '<br/><br/>';
|
265 |
+
_e('3. Consider removing data from tables that store logging, statistical or other non-critical information.', 'duplicator');
|
266 |
+
?>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
|
270 |
+
<!-- ============
|
271 |
+
DB: TABLE DETAILS -->
|
272 |
+
<div class="scan-item scan-item-last">
|
273 |
+
<div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
|
274 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Table Details', 'duplicator');?></div>
|
275 |
+
<div id="data-db-status-details"></div>
|
276 |
+
</div>
|
277 |
+
<div class="info">
|
278 |
+
<?php
|
279 |
+
//OVERVIEW
|
280 |
+
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
281 |
+
printf(__('The thresholds that trigger warnings for individual tables are %1$s OR %2$s records OR tables names with upper-case characters. The larger '
|
282 |
+
. 'the table the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
283 |
+
DUP_Util::byteSize(DUPLICATOR_SCAN_DB_TBL_SIZE),
|
284 |
+
number_format(DUPLICATOR_SCAN_DB_TBL_ROWS));
|
285 |
+
|
286 |
+
//OPTIONS
|
287 |
+
echo '<br/><br/>';
|
288 |
+
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
289 |
+
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and Optimization', 'duplicator') . '</a>';
|
290 |
+
printf(__('1. Run a %1$s on the table to improve the overall size and performance.', 'duplicator'), $lnk);
|
291 |
+
echo '<br/><br/>';
|
292 |
+
_e('2. Remove stale date from tables such as logging, statistical or other non-critical data.', 'duplicator');
|
293 |
+
echo '<br/><br/>';
|
294 |
+
$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>';
|
295 |
+
printf(__('3. 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);
|
296 |
+
echo '<br/><br/>';
|
297 |
+
|
298 |
+
echo '<b>' . __('Tables:', 'duplicator') . '</b><br/>';
|
299 |
+
?>
|
300 |
+
|
301 |
+
<div id="dup-scan-db-info">
|
302 |
+
<div id="data-db-tablelist"></div>
|
303 |
+
</div>
|
304 |
+
</div>
|
305 |
+
</div>
|
306 |
+
<br/>
|
307 |
+
|
308 |
+
</div><!-- end .dup-scan-db -->
|
309 |
+
|
310 |
+
|
311 |
+
<!-- ==========================================
|
312 |
+
DIALOGS:
|
313 |
+
========================================== -->
|
314 |
+
<?php
|
315 |
+
$alert1 = new DUP_UI_Dialog();
|
316 |
+
$alert1->height = 600;
|
317 |
+
$alert1->width = 600;
|
318 |
+
$alert1->title = __('Scan Details', 'duplicator');
|
319 |
+
$alert1->message = "<div id='arc-details-dlg'></div>";
|
320 |
+
$alert1->initAlert();
|
321 |
+
|
322 |
+
$alert2 = new DUP_UI_Dialog();
|
323 |
+
$alert2->height = 425;
|
324 |
+
$alert2->width = 650;
|
325 |
+
$alert2->title = __('Copy Quick Filter Paths', 'duplicator');
|
326 |
+
$alert2->message = "<div id='arc-paths-dlg'></div>";
|
327 |
+
$alert2->initAlert();
|
328 |
+
?>
|
329 |
+
|
330 |
+
<!-- =======================
|
331 |
+
DIALOG: Scan Results -->
|
332 |
+
<div id="dup-archive-details" style="display:none">
|
333 |
+
|
334 |
+
<!-- PACKAGE -->
|
335 |
+
<h2><i class="fa fa-archive"></i> <?php _e('Package', 'duplicator');?></h2>
|
336 |
+
<b><?php _e('Name', 'duplicator');?>:</b> <?php echo $_POST['package-name']; ?><br/>
|
337 |
+
<b><?php _e('Notes', 'duplicator');?>:</b> <?php echo strlen($_POST['package-notes']) ? $_POST['package-notes'] : __('- no notes -', 'duplicator') ; ?>
|
338 |
+
<br/><br/>
|
339 |
+
|
340 |
+
<!-- DATABASE -->
|
341 |
+
<h2><i class="fa fa-table"></i> <?php _e('Database', 'duplicator');?></h2>
|
342 |
+
<table id="db-area">
|
343 |
+
<tr><td><b><?php _e('Name:', 'duplicator');?></b></td><td><?php echo DB_NAME; ?> </td></tr>
|
344 |
+
<tr><td><b><?php _e('Host:', 'duplicator');?></b></td><td><?php echo DB_HOST; ?> </td></tr>
|
345 |
+
<tr>
|
346 |
+
<td style="vertical-align: top"><b><?php _e('Build Mode:', 'duplicator');?></b></td>
|
347 |
+
<td style="line-height:18px">
|
348 |
+
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode ;?></a>
|
349 |
+
<?php if ($mysqlcompat_on) :?>
|
350 |
+
<br/>
|
351 |
+
<small style="font-style:italic; color:maroon">
|
352 |
+
<i class="fa fa-exclamation-circle"></i> <?php _e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
353 |
+
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
354 |
+
</small>
|
355 |
+
<?php endif;?>
|
356 |
+
</td>
|
357 |
+
</tr>
|
358 |
+
</table><br/>
|
359 |
+
|
360 |
+
<!-- FILE FILTERS -->
|
361 |
+
<h2 style="border: none">
|
362 |
+
<i class="fa fa-filter"></i> <?php _e('File Filters', 'duplicator');?>:
|
363 |
+
<small><?php echo ($Package->Archive->FilterOn) ? __('Enabled', 'duplicator') : __('Disabled', 'duplicator') ;?></small>
|
364 |
+
</h2>
|
365 |
+
<div class="filter-area">
|
366 |
+
<b><i class="fa fa-folder-open"></i> <?php echo rtrim(DUPLICATOR_WPROOTPATH, "//");?></b>
|
367 |
+
|
368 |
+
<script id="hb-filter-file-list" type="text/x-handlebars-template">
|
369 |
+
<div class="file-info">
|
370 |
+
<b>[<?php _e('Directories', 'duplicator'); ?>]</b>
|
371 |
+
<div class="file-info">
|
372 |
+
{{#if ARC.FilterInfo.Dirs.Instance}}
|
373 |
+
{{#each ARC.FilterInfo.Dirs.Instance as |dir|}}
|
374 |
+
{{stripWPRoot dir}}/<br/>
|
375 |
+
{{/each}}
|
376 |
+
{{else}}
|
377 |
+
<?php _e('No custom directory filters set.', 'duplicator');?>
|
378 |
+
{{/if}}
|
379 |
+
</div>
|
380 |
+
|
381 |
+
<b>[<?php _e('Extensions', 'duplicator');?>]</b><br/>
|
382 |
+
<div class="file-info">
|
383 |
+
<?php
|
384 |
+
if (strlen( $Package->Archive->FilterExts)) {
|
385 |
+
echo $Package->Archive->FilterExts;
|
386 |
+
} else {
|
387 |
+
_e('No file extension filters have been set.', 'duplicator');
|
388 |
+
}
|
389 |
+
?>
|
390 |
+
</div>
|
391 |
+
|
392 |
+
<b>[<?php _e('Files', 'duplicator'); ?>]</b>
|
393 |
+
<div class="file-info">
|
394 |
+
{{#if ARC.FilterInfo.Files.Instance}}
|
395 |
+
{{#each ARC.FilterInfo.Files.Instance as |file|}}
|
396 |
+
{{stripWPRoot file}}<br/>
|
397 |
+
{{/each}}
|
398 |
+
{{else}}
|
399 |
+
<?php _e('No custom file filters set.', 'duplicator');?>
|
400 |
+
{{/if}}
|
401 |
+
</div>
|
402 |
+
|
403 |
+
<b>[<?php _e('Auto Filters', 'duplicator'); ?>]</b>
|
404 |
+
<div class="file-info">
|
405 |
+
{{#each ARC.FilterInfo.Dirs.Core as |dir|}}
|
406 |
+
{{stripWPRoot dir}}/<br/>
|
407 |
+
{{/each}}
|
408 |
+
</div>
|
409 |
+
|
410 |
+
</div>
|
411 |
+
</script>
|
412 |
+
<div class="hb-filter-file-list-result"></div>
|
413 |
+
|
414 |
+
|
415 |
+
</div>
|
416 |
+
|
417 |
+
<small>
|
418 |
+
<?php _e('Path filters will be skipped during the archive process when enabled.', 'duplicator'); ?>
|
419 |
+
<a href="<?php echo DUPLICATOR_SITE_URL ?>/wp-admin/admin-ajax.php?action=duplicator_package_scan" target="dup_report"><?php _e('[view json result report]', 'duplicator');?></a>
|
420 |
+
<br/>
|
421 |
+
<?php _e('Auto filters are applied to prevent archiving other backup sets.', 'duplicator'); ?>
|
422 |
+
</small><br/>
|
423 |
+
</div>
|
424 |
+
|
425 |
+
<!-- =======================
|
426 |
+
DIALOG: PATHS COPY & PASTE -->
|
427 |
+
<div id="dup-archive-paths" style="display:none">
|
428 |
+
|
429 |
+
<b><i class="fa fa-folder"></i> <?php _e('Directories', 'duplicator');?></b>
|
430 |
+
<div class="copy-button">
|
431 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-dirs')">
|
432 |
+
<i class="fa fa-clipboard"></i> <?php _e('Click to Copy', 'duplicator');?>
|
433 |
+
</button>
|
434 |
+
</div>
|
435 |
+
<textarea class="path-dirs"></textarea>
|
436 |
+
<br/><br/>
|
437 |
+
|
438 |
+
<b><i class="fa fa-files-o"></i> <?php _e('Files', 'duplicator');?></b>
|
439 |
+
<div class="copy-button">
|
440 |
+
<button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-files')">
|
441 |
+
<i class="fa fa-clipboard"></i> <?php _e('Click to Copy', 'duplicator');?>
|
442 |
+
</button>
|
443 |
+
</div>
|
444 |
+
<textarea class="path-files"></textarea>
|
445 |
+
<br/>
|
446 |
+
<small><?php _e('Copy the paths above and apply them as needed on Step 1 > Archive > Files section.', 'duplicator');?></small>
|
447 |
+
</div>
|
448 |
+
|
449 |
+
|
450 |
+
|
451 |
+
<script>
|
452 |
+
jQuery(document).ready(function($)
|
453 |
+
{
|
454 |
+
|
455 |
+
Handlebars.registerHelper('stripWPRoot', function(path) {
|
456 |
+
return path.replace('<?php echo rtrim(DUPLICATOR_WPROOTPATH, "//") ?>', '');
|
457 |
+
});
|
458 |
+
|
459 |
+
|
460 |
+
//Uncheck file names if directory is checked
|
461 |
+
Duplicator.Pack.filesOff = function (dir)
|
462 |
+
{
|
463 |
+
var $checks = $(dir).parent('div.directory').find('div.files input[type="checkbox"]');
|
464 |
+
$(dir).is(':checked')
|
465 |
+
? $.each($checks, function() {$(this).attr({disabled : true, checked : false, title : '<?php _e('Directory applied filter set.', 'duplicator');?>'});})
|
466 |
+
: $.each($checks, function() {$(this).removeAttr('disabled checked title');});
|
467 |
+
}
|
468 |
+
|
469 |
+
//Opens a dialog to show scan details
|
470 |
+
Duplicator.Pack.showDetailsDlg = function ()
|
471 |
+
{
|
472 |
+
$('#arc-details-dlg').html($('#dup-archive-details').html());
|
473 |
+
<?php $alert1->showAlert(); ?>
|
474 |
+
Duplicator.UI.loadQtip();
|
475 |
+
return;
|
476 |
+
}
|
477 |
+
|
478 |
+
//Opens a dialog to show scan details
|
479 |
+
Duplicator.Pack.showPathsDlg = function (type)
|
480 |
+
{
|
481 |
+
var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result'
|
482 |
+
var dirFilters = [];
|
483 |
+
var fileFilters = [];
|
484 |
+
$(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());});
|
485 |
+
$(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());});
|
486 |
+
|
487 |
+
var $dirs = $('#dup-archive-paths textarea.path-dirs');
|
488 |
+
var $files = $('#dup-archive-paths textarea.path-files');
|
489 |
+
(dirFilters.length > 0)
|
490 |
+
? $dirs.text(dirFilters.join(";\n"))
|
491 |
+
: $dirs.text("<?php _e('No directories have been selected!', 'duplicator');?>");
|
492 |
+
|
493 |
+
(fileFilters.length > 0)
|
494 |
+
? $files.text(fileFilters.join(";\n"))
|
495 |
+
: $files.text("<?php _e('No files have been selected!', 'duplicator');?>");
|
496 |
+
|
497 |
+
$('#arc-paths-dlg').html($('#dup-archive-paths').html());
|
498 |
+
<?php $alert2->showAlert(); ?>
|
499 |
+
|
500 |
+
return;
|
501 |
+
}
|
502 |
+
|
503 |
+
//Toggles a directory path to show files
|
504 |
+
Duplicator.Pack.toggleDirPath = function(item)
|
505 |
+
{
|
506 |
+
var $dir = $(item).parents('div.directory');
|
507 |
+
var $files = $dir.find('div.files');
|
508 |
+
var $arrow = $dir.find('i.dup-nav');
|
509 |
+
if ($files.is(":hidden")) {
|
510 |
+
$arrow.addClass('fa-caret-down').removeClass('fa-caret-right');
|
511 |
+
$files.show();
|
512 |
+
} else {
|
513 |
+
$arrow.addClass('fa-caret-right').removeClass('fa-caret-down');
|
514 |
+
$files.hide(250);
|
515 |
+
}
|
516 |
+
}
|
517 |
+
|
518 |
+
//Toggles a directory path to show files
|
519 |
+
Duplicator.Pack.toggleAllDirPath = function(item, toggle)
|
520 |
+
{
|
521 |
+
var $dirs = $(item).parents('div.container').find('div.data div.directory');
|
522 |
+
(toggle == 'hide')
|
523 |
+
? $.each($dirs, function() {$(this).find('div.files').show(); $(this).find('i.dup-nav').trigger('click');})
|
524 |
+
: $.each($dirs, function() {$(this).find('div.files').hide(); $(this).find('i.dup-nav').trigger('click');});
|
525 |
+
}
|
526 |
+
|
527 |
+
Duplicator.Pack.copyText = function(btn, query)
|
528 |
+
{
|
529 |
+
$(query).select();
|
530 |
+
try {
|
531 |
+
document.execCommand('copy');
|
532 |
+
$(btn).css({color: '#fff', backgroundColor: 'green'});
|
533 |
+
$(btn).text("<?php _e('Copied to Clipboard!', 'duplicator');?>");
|
534 |
+
} catch(err) {
|
535 |
+
alert("<?php _e('Manual copy of selected text required on this browser.', 'duplicator');?>")
|
536 |
+
}
|
537 |
+
}
|
538 |
+
|
539 |
+
Duplicator.Pack.applyFilters = function(btn, type)
|
540 |
+
{
|
541 |
+
var $btn = $(btn);
|
542 |
+
$btn.html('<i class="fa fa-circle-o-notch fa-spin"></i> <?php _e('Initializing Please Wait...', 'duplicator');?>');
|
543 |
+
$btn.attr('disabled', 'true');
|
544 |
+
|
545 |
+
var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result'
|
546 |
+
var dirFilters = [];
|
547 |
+
var fileFilters = [];
|
548 |
+
$(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());});
|
549 |
+
$(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());});
|
550 |
+
|
551 |
+
var data = {
|
552 |
+
action: 'DUP_CTRL_Package_addQuickFilters',
|
553 |
+
nonce: '<?php echo wp_create_nonce('DUP_CTRL_Package_addQuickFilters'); ?>',
|
554 |
+
dir_paths : dirFilters.join(";"),
|
555 |
+
file_paths : fileFilters.join(";"),
|
556 |
+
};
|
557 |
+
|
558 |
+
$.ajax({
|
559 |
+
type: "POST",
|
560 |
+
cache: false,
|
561 |
+
url: ajaxurl,
|
562 |
+
dataType: "json",
|
563 |
+
timeout: 100000,
|
564 |
+
data: data,
|
565 |
+
complete: function() { },
|
566 |
+
success: function() {Duplicator.Pack.rescan();},
|
567 |
+
error: function(data) {
|
568 |
+
console.log(data);
|
569 |
+
alert("<?php _e('Error applying filters. Please go back to Step 1 to add filter manually!', 'duplicator');?>");
|
570 |
+
}
|
571 |
+
});
|
572 |
+
}
|
573 |
+
|
574 |
+
Duplicator.Pack.initArchiveFilesData = function(data)
|
575 |
+
{
|
576 |
+
//TOTAL SIZE
|
577 |
+
//var sizeChecks = data.ARC.Status.Size == 'Warn' || data.ARC.Status.Big == 'Warn' ? 'Warn' : 'Good';
|
578 |
+
$('#data-arc-status-size').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Size));
|
579 |
+
$('#data-arc-status-names').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Names));
|
580 |
+
$('#data-arc-size1').text(data.ARC.Size || errMsg);
|
581 |
+
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
582 |
+
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
583 |
+
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
584 |
+
|
585 |
+
//LARGE FILES
|
586 |
+
var template = $('#hb-files-large').html();
|
587 |
+
var templateScript = Handlebars.compile(template);
|
588 |
+
var html = templateScript(data);
|
589 |
+
$('#hb-files-large-result').html(html);
|
590 |
+
|
591 |
+
//NAME CHECKS
|
592 |
+
var template = $('#hb-files-utf8').html();
|
593 |
+
var templateScript = Handlebars.compile(template);
|
594 |
+
var html = templateScript(data);
|
595 |
+
$('#hb-files-utf8-result').html(html);
|
596 |
+
|
597 |
+
//SCANNER DETAILS: Dirs
|
598 |
+
var template = $('#hb-filter-file-list').html();
|
599 |
+
var templateScript = Handlebars.compile(template);
|
600 |
+
var html = templateScript(data);
|
601 |
+
$('div.hb-filter-file-list-result').html(html);
|
602 |
+
|
603 |
+
Duplicator.UI.loadQtip();
|
604 |
+
|
605 |
+
//Auto check the large quick filters directories
|
606 |
+
//var $dirChecks = $("#hb-files-large-result div.directory input[name='dir_paths[]']");
|
607 |
+
//$.each($dirChecks, function() {$(this).trigger('click');})
|
608 |
+
}
|
609 |
+
|
610 |
+
|
611 |
+
Duplicator.Pack.initArchiveDBData = function(data)
|
612 |
+
{
|
613 |
+
var errMsg = "unable to read";
|
614 |
+
var html = "";
|
615 |
+
var DB_TotalSize = 'Good';
|
616 |
+
var DB_TableDetails = 'Good';
|
617 |
+
var DB_TableRowMax = <?php echo DUPLICATOR_SCAN_DB_TBL_ROWS; ?>;
|
618 |
+
var DB_TableSizeMax = <?php echo DUPLICATOR_SCAN_DB_TBL_SIZE; ?>;
|
619 |
+
if (data.DB.Status.Success)
|
620 |
+
{
|
621 |
+
DB_TotalSize = data.DB.Status.DB_Rows == 'Warn' || data.DB.Status.DB_Size == 'Warn' ? 'Warn' : 'Good';
|
622 |
+
DB_TableDetails = data.DB.Status.TBL_Rows == 'Warn' || data.DB.Status.TBL_Size == 'Warn' || data.DB.Status.TBL_Case == 'Warn' ? 'Warn' : 'Good';
|
623 |
+
|
624 |
+
$('#data-db-status-size').html(Duplicator.Pack.setScanStatus(DB_TotalSize));
|
625 |
+
$('#data-db-status-details').html(Duplicator.Pack.setScanStatus(DB_TableDetails));
|
626 |
+
$('#data-db-size1').text(data.DB.Size || errMsg);
|
627 |
+
$('#data-db-size2').text(data.DB.Size || errMsg);
|
628 |
+
$('#data-db-rows').text(data.DB.Rows || errMsg);
|
629 |
+
$('#data-db-tablecount').text(data.DB.TableCount || errMsg);
|
630 |
+
//Table Details
|
631 |
+
if (data.DB.TableList == undefined || data.DB.TableList.length == 0) {
|
632 |
+
html = '<?php _e("Unable to report on any tables", 'duplicator') ?>';
|
633 |
+
} else {
|
634 |
+
$.each(data.DB.TableList, function(i) {
|
635 |
+
html += '<b>' + i + '</b><br/>';
|
636 |
+
$.each(data.DB.TableList[i], function(key,val) {
|
637 |
+
html += (key == 'Case' && val == 1) || (key == 'Rows' && val > DB_TableRowMax) || (key == 'Size' && parseInt(val) > DB_TableSizeMax)
|
638 |
+
? '<div style="color:red"><span>' + key + ':</span>' + val + '</div>'
|
639 |
+
: '<div><span>' + key + ':</span>' + val + '</div>';
|
640 |
+
});
|
641 |
+
});
|
642 |
+
}
|
643 |
+
$('#data-db-tablelist').append(html);
|
644 |
+
} else {
|
645 |
+
html = '<?php _e("Unable to report on database stats", 'duplicator') ?>';
|
646 |
+
$('#dup-scan-db').html(html);
|
647 |
+
}
|
648 |
+
}
|
649 |
+
|
650 |
+
<?php
|
651 |
+
if (isset($_GET['retry'])) {
|
652 |
+
echo "$('#scan-itme-file-size').show(300)";
|
653 |
+
}
|
654 |
+
?>
|
655 |
+
|
656 |
+
});
|
657 |
+
</script>
|
views/packages/main/{new3.build.php → s3.build.php}
RENAMED
@@ -16,7 +16,7 @@
|
|
16 |
div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 5px 15px; max-height:150px; max-width: 700px}
|
17 |
div.dup-msg-success-stats{color:#999;margin:10px 0px 0px 0px}
|
18 |
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 14px; font-weight: bold}
|
19 |
-
div#dup-msg-error {color
|
20 |
div#dup-progress-area div.done-title {font-size:22px; font-weight:bold; margin:0px 0px 10px 0px}
|
21 |
div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
|
22 |
div#dup-logs a {font-size:15px; text-decoration:none !important; display:inline-block; margin:20px 0px 5px 0px}
|
@@ -42,7 +42,7 @@ TOOL BAR: STEPS -->
|
|
42 |
</div>
|
43 |
</td>
|
44 |
<td>
|
45 |
-
<a
|
46 |
<span> <?php _e("Create New", 'duplicator'); ?></span>
|
47 |
</td>
|
48 |
</tr>
|
@@ -90,26 +90,29 @@ TOOL BAR: STEPS -->
|
|
90 |
</div>
|
91 |
<div class="dup-msg-success-links">
|
92 |
<?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
|
93 |
-
<?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
|
94 |
</div><br/>
|
95 |
|
96 |
-
<!-- Used for iMacros testing do not remove -->
|
97 |
-
<div id="dup-automation-imacros"></div>
|
98 |
</div>
|
99 |
|
100 |
<!-- =========================
|
101 |
ERROR MESSAGE -->
|
102 |
<div id="dup-msg-error" style="display:none">
|
103 |
-
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Build Interrupt', 'duplicator'); ?></div>
|
104 |
-
<b><?php _e('
|
105 |
|
106 |
-
<i><?php _e(
|
107 |
-
|
|
|
108 |
<input type="button" style="margin-right:10px;" class="button" value="<?php _e('Diagnose', 'duplicator'); ?>" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q', '_blank');return false;" />
|
109 |
-
|
110 |
<fieldset>
|
111 |
-
<legend><b
|
112 |
<div class="dup-msg-error-area">
|
|
|
|
|
|
|
|
|
113 |
<div id="dup-msg-error-response-status">
|
114 |
<span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
|
115 |
<span class="data"></span>
|
@@ -127,7 +130,8 @@ TOOL BAR: STEPS -->
|
|
127 |
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
128 |
__('Build Folder:'),
|
129 |
DUPLICATOR_SSDIR_PATH_TMP,
|
130 |
-
__("Some servers close connections quickly; yet the build can continue to run in the background. To validate if a build is still running; open the 'tmp'
|
|
|
131 |
);
|
132 |
?> <br/>
|
133 |
</div>
|
@@ -136,7 +140,7 @@ TOOL BAR: STEPS -->
|
|
136 |
<!-- LOGS -->
|
137 |
<div id="dup-logs">
|
138 |
<div style="font-weight:bold">
|
139 |
-
<i class="fa fa-list-alt"></i> <a href='javascript:void(0)' style="color
|
140 |
</div>
|
141 |
<br/>
|
142 |
</div>
|
@@ -153,7 +157,10 @@ jQuery(document).ready(function($) {
|
|
153 |
* METHOD: Performs Ajax post to create a new package
|
154 |
* Timeout (10000000 = 166 minutes) */
|
155 |
Duplicator.Pack.Create = function() {
|
156 |
-
|
|
|
|
|
|
|
157 |
var data = {action : 'duplicator_package_build', nonce: '<?php echo $ajax_nonce; ?>'}
|
158 |
|
159 |
$.ajax({
|
@@ -162,8 +169,15 @@ jQuery(document).ready(function($) {
|
|
162 |
dataType: "json",
|
163 |
timeout: 10000000,
|
164 |
data: data,
|
165 |
-
beforeSend: function() {},
|
166 |
-
complete: function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
success: function(data) {
|
168 |
$('#dup-progress-bar-area').hide();
|
169 |
$('#dup-progress-area, #dup-msg-success').show(300);
|
@@ -179,15 +193,13 @@ jQuery(document).ready(function($) {
|
|
179 |
//Wire Up Downloads
|
180 |
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
181 |
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
182 |
-
//Imacros testing required
|
183 |
-
$('#dup-automation-imacros').html('<input type="hidden" id="dup-finished" value="done" />');
|
184 |
|
185 |
},
|
186 |
error: function(data) {
|
187 |
$('#dup-progress-bar-area').hide();
|
188 |
$('#dup-progress-area, #dup-msg-error').show(200);
|
189 |
var status = data.status + ' -' + data.statusText;
|
190 |
-
var response = (data.responseText != undefined && data.responseText.length > 1) ? data.responseText : '
|
191 |
$('#dup-msg-error-response-status span.data').html(status)
|
192 |
$('#dup-msg-error-response-text span.data').html(response);
|
193 |
console.log(data);
|
16 |
div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 5px 15px; max-height:150px; max-width: 700px}
|
17 |
div.dup-msg-success-stats{color:#999;margin:10px 0px 0px 0px}
|
18 |
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 14px; font-weight: bold}
|
19 |
+
div#dup-msg-error {color:maroon; padding:5px;}
|
20 |
div#dup-progress-area div.done-title {font-size:22px; font-weight:bold; margin:0px 0px 10px 0px}
|
21 |
div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
|
22 |
div#dup-logs a {font-size:15px; text-decoration:none !important; display:inline-block; margin:20px 0px 5px 0px}
|
42 |
</div>
|
43 |
</td>
|
44 |
<td>
|
45 |
+
<a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a>
|
46 |
<span> <?php _e("Create New", 'duplicator'); ?></span>
|
47 |
</td>
|
48 |
</tr>
|
90 |
</div>
|
91 |
<div class="dup-msg-success-links">
|
92 |
<?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
|
93 |
+
<?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
|
94 |
</div><br/>
|
95 |
|
|
|
|
|
96 |
</div>
|
97 |
|
98 |
<!-- =========================
|
99 |
ERROR MESSAGE -->
|
100 |
<div id="dup-msg-error" style="display:none">
|
101 |
+
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Host Build Interrupt', 'duplicator'); ?></div>
|
102 |
+
<b><?php _e('This host has generated an exception.', 'duplicator'); ?></b><br/>
|
103 |
|
104 |
+
<i><?php _e("Please click the 'Try Again' button.", 'duplicator'); ?></i><br/><br/>
|
105 |
+
|
106 |
+
<input type="button" class="button" value="<?php _e('Try Again', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1'" />
|
107 |
<input type="button" style="margin-right:10px;" class="button" value="<?php _e('Diagnose', 'duplicator'); ?>" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q', '_blank');return false;" />
|
108 |
+
|
109 |
<fieldset>
|
110 |
+
<legend><b><?php _e('Details', 'duplicator'); ?></b></legend>
|
111 |
<div class="dup-msg-error-area">
|
112 |
+
<div id="dup-msg-error-response-time">
|
113 |
+
<span class="label"><?php _e("Allowed Runtime:", 'duplicator'); ?></span>
|
114 |
+
<span class="data"></span>
|
115 |
+
</div>
|
116 |
<div id="dup-msg-error-response-status">
|
117 |
<span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
|
118 |
<span class="data"></span>
|
130 |
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
131 |
__('Build Folder:'),
|
132 |
DUPLICATOR_SSDIR_PATH_TMP,
|
133 |
+
__("Some servers close connections quickly; yet the build can continue to run in the background. To validate if a build is still running; open the 'tmp' "
|
134 |
+
. "folder above and see if the archive file is growing in size. If it is not then your server has strict timeout constraints.", 'duplicator')
|
135 |
);
|
136 |
?> <br/>
|
137 |
</div>
|
140 |
<!-- LOGS -->
|
141 |
<div id="dup-logs">
|
142 |
<div style="font-weight:bold">
|
143 |
+
<i class="fa fa-list-alt"></i> <a href='javascript:void(0)' style="color:maroon" onclick='Duplicator.OpenLogWindow(true)'> <?php _e('Package Log', 'duplicator');?> </a>
|
144 |
</div>
|
145 |
<br/>
|
146 |
</div>
|
157 |
* METHOD: Performs Ajax post to create a new package
|
158 |
* Timeout (10000000 = 166 minutes) */
|
159 |
Duplicator.Pack.Create = function() {
|
160 |
+
|
161 |
+
var startTime;
|
162 |
+
var endTime;
|
163 |
+
|
164 |
var data = {action : 'duplicator_package_build', nonce: '<?php echo $ajax_nonce; ?>'}
|
165 |
|
166 |
$.ajax({
|
169 |
dataType: "json",
|
170 |
timeout: 10000000,
|
171 |
data: data,
|
172 |
+
beforeSend: function() {startTime = new Date().getTime();},
|
173 |
+
complete: function() {
|
174 |
+
endTime = new Date().getTime();
|
175 |
+
var millis = (endTime - startTime);
|
176 |
+
var minutes = Math.floor(millis / 60000);
|
177 |
+
var seconds = ((millis % 60000) / 1000).toFixed(0);
|
178 |
+
var status = minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
|
179 |
+
$('#dup-msg-error-response-time span.data').html(status)
|
180 |
+
},
|
181 |
success: function(data) {
|
182 |
$('#dup-progress-bar-area').hide();
|
183 |
$('#dup-progress-area, #dup-msg-success').show(300);
|
193 |
//Wire Up Downloads
|
194 |
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
195 |
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
|
|
|
|
196 |
|
197 |
},
|
198 |
error: function(data) {
|
199 |
$('#dup-progress-bar-area').hide();
|
200 |
$('#dup-progress-area, #dup-msg-error').show(200);
|
201 |
var status = data.status + ' -' + data.statusText;
|
202 |
+
var response = (data.responseText != undefined && data.responseText.trim().length > 1) ? data.responseText.trim() : 'No client side error - see package log file';
|
203 |
$('#dup-msg-error-response-status span.data').html(status)
|
204 |
$('#dup-msg-error-response-text span.data').html(response);
|
205 |
console.log(data);
|
views/settings/packages.php
CHANGED
@@ -101,7 +101,7 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
101 |
<label><?php _e("Use mysqldump", 'duplicator'); ?></label>
|
102 |
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
103 |
<?php
|
104 |
-
_e("This server does not support the PHP shell_exec function which is
|
105 |
_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
106 |
?>
|
107 |
<br/>
|
@@ -134,7 +134,8 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
134 |
<?php else : ?>
|
135 |
<div class="dup-feature-notfound">
|
136 |
<?php
|
137 |
-
_e('Mysqldump was not found at its default location or the location provided. Please enter a path to a valid location where mysqldump can run.
|
|
|
138 |
?>
|
139 |
|
140 |
<?php
|
@@ -149,9 +150,9 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
149 |
|
150 |
<i class="fa fa-question-circle"
|
151 |
data-tooltip-title="<?php _e("mysqldump", 'duplicator'); ?>"
|
152 |
-
data-tooltip="<?php _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>
|
153 |
<label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
|
154 |
-
<input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?> " />
|
155 |
<br/><br/>
|
156 |
</div>
|
157 |
|
101 |
<label><?php _e("Use mysqldump", 'duplicator'); ?></label>
|
102 |
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
103 |
<?php
|
104 |
+
_e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
|
105 |
_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
106 |
?>
|
107 |
<br/>
|
134 |
<?php else : ?>
|
135 |
<div class="dup-feature-notfound">
|
136 |
<?php
|
137 |
+
_e('Mysqldump was not found at its default location or the location provided. Please enter a path to a valid location where mysqldump can run. '
|
138 |
+
. 'If the problem persist contact your server administrator.', 'duplicator');
|
139 |
?>
|
140 |
|
141 |
<?php
|
150 |
|
151 |
<i class="fa fa-question-circle"
|
152 |
data-tooltip-title="<?php _e("mysqldump", 'duplicator'); ?>"
|
153 |
+
data-tooltip="<?php _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. For all paths including Windows use a forward slash.', 'duplicator'); ?>"></i>
|
154 |
<label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
|
155 |
+
<input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?>" placeholder="<?php _e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
|
156 |
<br/><br/>
|
157 |
</div>
|
158 |
|
views/tools/diagnostics/inc.settings.php
CHANGED
@@ -131,7 +131,18 @@ SERVER SETTINGS -->
|
|
131 |
</tr>
|
132 |
<tr>
|
133 |
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'duplicator'); ?></a></td>
|
134 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
</tr>
|
136 |
<tr>
|
137 |
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'duplicator'); ?></a></td>
|
131 |
</tr>
|
132 |
<tr>
|
133 |
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'duplicator'); ?></a></td>
|
134 |
+
<td>
|
135 |
+
<?php
|
136 |
+
echo @ini_get('max_execution_time');
|
137 |
+
$try_update = set_time_limit(0);
|
138 |
+
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
|
139 |
+
echo " (default) - {$try_update}";
|
140 |
+
?>
|
141 |
+
<i class="fa fa-question-circle data-size-help"
|
142 |
+
data-tooltip-title="<?php _e("Max Execution Time", 'duplicator'); ?>"
|
143 |
+
data-tooltip="<?php _e('If the value shows dynamic then this means its possible for PHP to run longer than the defailt. '
|
144 |
+
. 'If the value is fixed then PHP will not be allowed to run longer than the default.', 'duplicator'); ?>"></i>
|
145 |
+
</td>
|
146 |
</tr>
|
147 |
<tr>
|
148 |
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'duplicator'); ?></a></td>
|
views/tools/diagnostics/inc.validator.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
?>
|
5 |
|
6 |
<style>
|
7 |
-
div#hb-result {padding: 10px 5px 0 5px; line-height:
|
8 |
</style>
|
9 |
|
10 |
<!-- ==========================================
|
@@ -29,9 +29,10 @@ SCAN VALIDATOR -->
|
|
29 |
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
|
30 |
<?php
|
31 |
_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 |
-
_e("The utility
|
33 |
_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 |
-
_e("A message will show indicated that that a scan depth has been reached.
|
|
|
35 |
?>
|
36 |
<br/><br/>
|
37 |
|
@@ -46,32 +47,55 @@ SCAN VALIDATOR -->
|
|
46 |
<table>
|
47 |
<tr>
|
48 |
<td><b>Files:</b></td>
|
49 |
-
<td>{{
|
50 |
-
|
51 |
-
<tr>
|
52 |
<td><b>Dirs:</b></td>
|
53 |
-
<td>{{
|
54 |
</tr>
|
55 |
</table>
|
|
|
56 |
|
57 |
-
<b>Unreadable Files:</b> <br/>
|
58 |
-
{{#if
|
59 |
-
{{#each
|
60 |
{{@index}} : {{this}}<br/>
|
61 |
{{/each}}
|
62 |
{{else}}
|
63 |
<i>No Unreadable items found</i> <br/>
|
64 |
{{/if}}
|
|
|
65 |
|
66 |
<b>Symbolic Links:</b> <br/>
|
67 |
-
{{#if
|
68 |
-
{{#each
|
69 |
{{@index}} : {{this}}<br/>
|
70 |
{{/each}}
|
71 |
{{else}}
|
72 |
<i>No Sym-links found</i> <br/>
|
|
|
73 |
{{/if}}
|
74 |
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</script>
|
76 |
<div id="hb-result"></div>
|
77 |
|
@@ -94,7 +118,7 @@ jQuery(document).ready(function($)
|
|
94 |
tb_remove();
|
95 |
var data = {action : 'DUP_CTRL_Tools_runScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
|
96 |
|
97 |
-
$('#hb-result').html('<?php _e("Scanning
|
98 |
$('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
99 |
|
100 |
$.ajax({
|
4 |
?>
|
5 |
|
6 |
<style>
|
7 |
+
div#hb-result {padding: 10px 5px 0 5px; line-height:20px; font-size: 12px}
|
8 |
</style>
|
9 |
|
10 |
<!-- ==========================================
|
29 |
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
|
30 |
<?php
|
31 |
_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 |
+
_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 |
_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 |
+
_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 |
|
47 |
<table>
|
48 |
<tr>
|
49 |
<td><b>Files:</b></td>
|
50 |
+
<td>{{payload.fileCount}} </td>
|
51 |
+
<td> </td>
|
|
|
52 |
<td><b>Dirs:</b></td>
|
53 |
+
<td>{{payload.dirCount}} </td>
|
54 |
</tr>
|
55 |
</table>
|
56 |
+
<br/>
|
57 |
|
58 |
+
<b>Unreadable Dirs/Files:</b> <br/>
|
59 |
+
{{#if payload.unreadable}}
|
60 |
+
{{#each payload.unreadable}}
|
61 |
{{@index}} : {{this}}<br/>
|
62 |
{{/each}}
|
63 |
{{else}}
|
64 |
<i>No Unreadable items found</i> <br/>
|
65 |
{{/if}}
|
66 |
+
<br/>
|
67 |
|
68 |
<b>Symbolic Links:</b> <br/>
|
69 |
+
{{#if payload.symLinks}}
|
70 |
+
{{#each payload.symLinks}}
|
71 |
{{@index}} : {{this}}<br/>
|
72 |
{{/each}}
|
73 |
{{else}}
|
74 |
<i>No Sym-links found</i> <br/>
|
75 |
+
<small> <?php _e("Note: Symlinks are not discoverable on Windows OS with PHP", "duplicator"); ?></small> <br/>
|
76 |
{{/if}}
|
77 |
<br/>
|
78 |
+
|
79 |
+
<b>Directory Name Checks:</b> <br/>
|
80 |
+
{{#if payload.nameTestDirs}}
|
81 |
+
{{#each payload.nameTestDirs}}
|
82 |
+
{{@index}} : {{this}}<br/>
|
83 |
+
{{/each}}
|
84 |
+
{{else}}
|
85 |
+
<i>No name check warnings located for directory paths</i> <br/>
|
86 |
+
{{/if}}
|
87 |
+
<br/>
|
88 |
+
|
89 |
+
<b>File Name Checks:</b> <br/>
|
90 |
+
{{#if payload.nameTestFiles}}
|
91 |
+
{{#each payload.nameTestFiles}}
|
92 |
+
{{@index}} : {{this}}<br/>
|
93 |
+
{{/each}}
|
94 |
+
{{else}}
|
95 |
+
<i>No name check warnings located for directory paths</i> <br/>
|
96 |
+
{{/if}}
|
97 |
+
|
98 |
+
<br/>
|
99 |
</script>
|
100 |
<div id="hb-result"></div>
|
101 |
|
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 _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({
|
views/tools/logging.php
CHANGED
@@ -161,7 +161,7 @@ jQuery(document).ready(function($)
|
|
161 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
162 |
__("Consider our recommended", 'duplicator'),
|
163 |
__("host list", 'duplicator'),
|
164 |
-
__("if
|
165 |
?>
|
166 |
</i>
|
167 |
</div>
|
161 |
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
162 |
__("Consider our recommended", 'duplicator'),
|
163 |
__("host list", 'duplicator'),
|
164 |
+
__("if you’re unhappy with your current provider", 'duplicator'));
|
165 |
?>
|
166 |
</i>
|
167 |
</div>
|