From 2d832ff5ea7757bbf84274b9f992721ffc0525dd Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 21 Nov 2022 09:01:59 +0100 Subject: [PATCH] Fix selectbox issue with domain connection type #689 --- snappymail/v/0.0.0/app/domains/default.json | 6 +++--- .../app/libraries/MailSo/Net/ConnectSettings.php | 4 ++-- .../build/output/knockout-latest.debug.js | 2 +- vendors/knockout/build/output/knockout-latest.js | 16 ++++++++-------- .../src/binding/defaultBindings/options.js | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/snappymail/v/0.0.0/app/domains/default.json b/snappymail/v/0.0.0/app/domains/default.json index 18f8e8102..49a9cba54 100644 --- a/snappymail/v/0.0.0/app/domains/default.json +++ b/snappymail/v/0.0.0/app/domains/default.json @@ -3,7 +3,7 @@ "IMAP": { "host": "localhost", "port": 143, - "secure": 0, + "type": 0, "shortLogin": false, "ssl": { "verify_peer": false, @@ -17,7 +17,7 @@ "SMTP": { "host": "localhost", "port": 25, - "secure": 0, + "type": 0, "shortLogin": false, "ssl": { "verify_peer": false, @@ -34,7 +34,7 @@ "Sieve": { "host": "localhost", "port": 4190, - "secure": 0, + "type": 0, "shortLogin": false, "ssl": { "verify_peer": false, diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Net/ConnectSettings.php b/snappymail/v/0.0.0/app/libraries/MailSo/Net/ConnectSettings.php index 548828d3f..101e14a11 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Net/ConnectSettings.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Net/ConnectSettings.php @@ -50,7 +50,7 @@ class ConnectSettings implements \JsonSerializable $object = new static; $object->host = $aSettings['host']; $object->port = $aSettings['port']; - $object->type = $aSettings['secure']; + $object->type = isset($aSettings['type']) ? $aSettings['type'] : $aSettings['secure']; $object->shortLogin = !empty($aSettings['shortLogin']); $object->ssl = SSLContext::fromArray($aSettings['ssl'] ?? []); return $object; @@ -63,7 +63,7 @@ class ConnectSettings implements \JsonSerializable // '@Object' => 'Object/ConnectSettings', 'host' => $this->host, 'port' => $this->port, - 'secure' => $this->type, + 'type' => $this->type, 'shortLogin' => $this->shortLogin, 'ssl' => $this->ssl ); diff --git a/vendors/knockout/build/output/knockout-latest.debug.js b/vendors/knockout/build/output/knockout-latest.debug.js index 70cd7b60f..3a5ee51e5 100644 --- a/vendors/knockout/build/output/knockout-latest.debug.js +++ b/vendors/knockout/build/output/knockout-latest.debug.js @@ -2698,7 +2698,7 @@ ko.bindingHandlers['options'] = { if (allBindings['has']('optionsCaption')) { captionValue = ko.utils.unwrapObservable(allBindings.get('optionsCaption')); // If caption value is null or undefined, don't show a caption - if (captionValue !== null && captionValue !== undefined) { + if (captionValue != null) { filteredArray.unshift(captionPlaceholder); } } diff --git a/vendors/knockout/build/output/knockout-latest.js b/vendors/knockout/build/output/knockout-latest.js index 23dc8d166..11b5a0120 100644 --- a/vendors/knockout/build/output/knockout-latest.js +++ b/vendors/knockout/build/output/knockout-latest.js @@ -52,14 +52,14 @@ typeof k&&a.addEventListener(k,(...e)=>{var g=b()[k];if(g)try{f=l.$data;var h=g. k=>{a.__ko_hasfocusUpdating=!0;k=a.ownerDocument.activeElement===a;c.I.ob(b(),d,"hasfocus",k,!0);a.__ko_hasfocusLastValue=k;a.__ko_hasfocusUpdating=!1},l=f.bind(null,!0);f=f.bind(null,!1);a.addEventListener("focus",l);a.addEventListener("focusin",l);a.addEventListener("blur",f);a.addEventListener("focusout",f);a.__ko_hasfocusLastValue=!1},update:(a,b)=>{b=!!c.g.j(b());a.__ko_hasfocusUpdating||a.__ko_hasfocusLastValue===b||(b?a.focus():a.blur())}};c.I.mb.add("hasfocus");c.h.html={init:()=>({controlsDescendantBindings:!0}), update:(a,b)=>{c.g.$a(a);b=c.g.j(b());if(null!=b){const d=M.createElement("template");d.innerHTML="string"!=typeof b?b.toString():b;a.appendChild(d.content)}}};(()=>{function a(b,d,f){c.h[b]={init:(l,k,e,g,h)=>{var n,p={};d&&(p={as:e.get("as"),exportDependencies:!0});var m=e.has(c.l.ga);c.s(()=>{var r=c.g.j(k()),q=!f!==!r,t=!n;m&&(h=c.l.kb(l,h));if(q){p.dataDependency=c.u.s();var u=d?h.createChildContext("function"==typeof r?r:k,p):c.u.Ba()?h.extend(null,p):h}t&&c.u.Ba()&&(n=c.g.xa(c.m.childNodes(l), !0));q?(t||c.m.ta(l,c.g.xa(n)),c.yb(u,l)):(c.m.pa(l),c.l.notify(l,c.l.G))},{o:l});return{controlsDescendantBindings:!0}}};c.I.Sa[b]=!1;c.m.ca[b]=!0}a("if");a("ifnot",!1,!0);a("with",!0)})();var U={};c.h.options={init:a=>{if(!a.matches("SELECT"))throw Error("options binding applies only to SELECT elements");let b=a.length;for(;b--;)a.remove(b);return{controlsDescendantBindings:!0}},update:(a,b,d)=>{var f=a.multiple,l=0!=a.length&&f?a.scrollTop:null,k=c.g.j(b()),e=d.get("valueAllowUnset")&&d.has("value"), -g={},h=[];b=()=>Array.from(a.options).filter(q=>q.selected);var n=(q,t,u)=>{var w=typeof t;return"function"==w?t(q):"string"==w?q[t]:u},p=(q,t)=>{r&&e?c.l.notify(a,c.l.G):h.length&&(q=h.includes(c.F.R(t[0])),t[0].selected=q,r&&!q&&c.u.S(c.g.Sb,null,[a,"change"]))};e||(f?h=b().map(c.F.R):0<=a.selectedIndex&&h.push(c.F.R(a.options[a.selectedIndex])));if(k){"undefined"==typeof k.length&&(k=[k]);var m=k.filter(q=>q||null==q);d.has("optionsCaption")&&(k=c.g.j(d.get("optionsCaption")),null!==k&&void 0!== -k&&m.unshift(U))}var r=!1;g.beforeRemove=q=>a.removeChild(q);k=p;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(k=(q,t)=>{p(q,t);c.u.S(d.get("optionsAfterRender"),null,[t[0],q!==U?q:void 0])});c.g.Pb(a,m,(q,t,u)=>{u.length&&(h=!e&&u[0].selected?[c.F.R(u[0])]:[],r=!0);t=a.ownerDocument.createElement("option");q===U?(c.g.jb(t,d.get("optionsCaption")),c.F.Na(t,void 0)):(u=n(q,d.get("optionsValue"),q),c.F.Na(t,c.g.j(u)),q=n(q,d.get("optionsText"),u),c.g.jb(t,q));return[t]}, -g,k);e||(m=h.length,(f?m&&b().length{c.g.O(c.g.j(b()||{}),(d,f)=>{f=c.g.j(f);if(null==f||!1===f)f="";if(/^--/.test(d))a.style.setProperty(d,f);else{d=d.replace(/-(\w)/g,(k,e)=>e.toUpperCase());var l=a.style[d];a.style[d]=f;f===l||a.style[d]!=l|| -isNaN(f)||(a.style[d]=f+"px")}})}};c.h.submit={init:(a,b,d,f,l)=>{if("function"!=typeof b())throw Error("The value for a submit binding must be a function");a.addEventListener("submit",k=>{var e=b();try{var g=e.call(l.$data,a)}finally{!0!==g&&k.preventDefault()}})}};c.h.text={init:()=>({controlsDescendantBindings:!0}),update:(a,b)=>{8===a.nodeType&&(a.text||a.after(a.text=M.createTextNode("")),a=a.text);c.g.jb(a,b())}};c.m.ca.text=!0;c.h.textInput={init:(a,b,d)=>{var f=a.value,l,k,e=()=>{clearTimeout(l); -k=l=void 0;var h=a.value;f!==h&&(f=h,c.I.ob(b(),d,"textInput",h))},g=()=>{var h=c.g.j(b());null==h&&(h="");void 0!==k&&h===k?setTimeout(g,4):a.value!==h&&(a.value=h,f=a.value)};a.addEventListener("input",e);a.addEventListener("change",e);a.addEventListener("blur",e);c.s(g,{o:a})}};c.I.mb.add("textInput");c.h.textinput={preprocess:(a,b,d)=>d("textInput",a)};c.h.value={init:(a,b,d)=>{var f=a.matches("SELECT"),l=a.matches("INPUT");if(!l||"checkbox"!=a.type&&"radio"!=a.type){var k=new Set,e=d.get("valueUpdate"), -g=null,h=()=>{g=null;var m=b(),r=c.F.R(a);c.I.ob(m,d,"value",r)};e&&("string"==typeof e?k.add(e):e.forEach(m=>k.add(m)),k.delete("change"));k.forEach(m=>{var r=h;(m||"").startsWith("after")&&(r=()=>{g=c.F.R(a);setTimeout(h,0)},m=m.slice(5));a.addEventListener(m,r)});var n=l&&"file"==a.type?()=>{var m=c.g.j(b());null==m||""===m?a.value="":c.u.S(h)}:()=>{var m=c.g.j(b()),r=c.F.R(a);if(null!==g&&m===g)setTimeout(n,0);else if(m!==r||void 0===r)f?(r=d.get("valueAllowUnset"),c.F.Na(a,m,r),r||m===c.F.R(a)|| -c.u.S(h)):c.F.Na(a,m)};if(f){var p;c.l.subscribe(a,c.l.G,()=>{p?d.get("valueAllowUnset")?n():h():(a.addEventListener("change",h),p=c.s(n,{o:a}))},null,{notifyImmediately:!0})}else a.addEventListener("change",h),c.s(n,{o:a})}else c.wb(a,{checkedValue:b})},update:()=>{}};c.I.mb.add("value");c.h.visible={update:(a,b)=>{b=c.g.j(b());var d="none"!=a.style.display;b&&!d?a.style.display="":d&&!b&&(a.style.display="none")}};c.h.hidden={update:(a,b)=>a.hidden=!!c.g.j(b())};(function(a){c.h[a]={init:function(b, -d,f,l,k){return c.h.event.init.call(this,b,()=>({[a]:d()}),f,l,k)}}})("click");(()=>{let a=c.g.i.Z();class b{constructor(f){this.Xa=f}Ja(...f){let l=this.Xa;if(!f.length)return c.g.i.get(l,a)||(11===this.L?l.content:1===this.L?l:void 0);c.g.i.set(l,a,f[0])}}class d extends b{constructor(f){super(f);f&&(this.L=f.matches("TEMPLATE")&&f.content?f.content.nodeType:1)}}c.Ka={Xa:d,Qa:b}})();(()=>{var a=(e,g,h)=>{var n;for(g=c.m.nextSibling(g);e&&(n=e)!==g;)e=c.m.nextSibling(n),h(n,e)},b=(e,g)=>{if(e.length){var h= +g={},h=[];b=()=>Array.from(a.options).filter(q=>q.selected);var n=(q,t,u)=>{var w=typeof t;return"function"==w?t(q):"string"==w?q[t]:u},p=(q,t)=>{r&&e?c.l.notify(a,c.l.G):h.length&&(q=h.includes(c.F.R(t[0])),t[0].selected=q,r&&!q&&c.u.S(c.g.Sb,null,[a,"change"]))};e||(f?h=b().map(c.F.R):0<=a.selectedIndex&&h.push(c.F.R(a.options[a.selectedIndex])));if(k){"undefined"==typeof k.length&&(k=[k]);var m=k.filter(q=>q||null==q);d.has("optionsCaption")&&(k=c.g.j(d.get("optionsCaption")),null!=k&&m.unshift(U))}var r= +!1;g.beforeRemove=q=>a.removeChild(q);k=p;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(k=(q,t)=>{p(q,t);c.u.S(d.get("optionsAfterRender"),null,[t[0],q!==U?q:void 0])});c.g.Pb(a,m,(q,t,u)=>{u.length&&(h=!e&&u[0].selected?[c.F.R(u[0])]:[],r=!0);t=a.ownerDocument.createElement("option");q===U?(c.g.jb(t,d.get("optionsCaption")),c.F.Na(t,void 0)):(u=n(q,d.get("optionsValue"),q),c.F.Na(t,c.g.j(u)),q=n(q,d.get("optionsText"),u),c.g.jb(t,q));return[t]},g,k);e||(m=h.length, +(f?m&&b().length{c.g.O(c.g.j(b()||{}),(d,f)=>{f=c.g.j(f);if(null==f||!1===f)f="";if(/^--/.test(d))a.style.setProperty(d,f);else{d=d.replace(/-(\w)/g,(k,e)=>e.toUpperCase());var l=a.style[d];a.style[d]=f;f===l||a.style[d]!=l||isNaN(f)||(a.style[d]= +f+"px")}})}};c.h.submit={init:(a,b,d,f,l)=>{if("function"!=typeof b())throw Error("The value for a submit binding must be a function");a.addEventListener("submit",k=>{var e=b();try{var g=e.call(l.$data,a)}finally{!0!==g&&k.preventDefault()}})}};c.h.text={init:()=>({controlsDescendantBindings:!0}),update:(a,b)=>{8===a.nodeType&&(a.text||a.after(a.text=M.createTextNode("")),a=a.text);c.g.jb(a,b())}};c.m.ca.text=!0;c.h.textInput={init:(a,b,d)=>{var f=a.value,l,k,e=()=>{clearTimeout(l);k=l=void 0;var h= +a.value;f!==h&&(f=h,c.I.ob(b(),d,"textInput",h))},g=()=>{var h=c.g.j(b());null==h&&(h="");void 0!==k&&h===k?setTimeout(g,4):a.value!==h&&(a.value=h,f=a.value)};a.addEventListener("input",e);a.addEventListener("change",e);a.addEventListener("blur",e);c.s(g,{o:a})}};c.I.mb.add("textInput");c.h.textinput={preprocess:(a,b,d)=>d("textInput",a)};c.h.value={init:(a,b,d)=>{var f=a.matches("SELECT"),l=a.matches("INPUT");if(!l||"checkbox"!=a.type&&"radio"!=a.type){var k=new Set,e=d.get("valueUpdate"),g=null, +h=()=>{g=null;var m=b(),r=c.F.R(a);c.I.ob(m,d,"value",r)};e&&("string"==typeof e?k.add(e):e.forEach(m=>k.add(m)),k.delete("change"));k.forEach(m=>{var r=h;(m||"").startsWith("after")&&(r=()=>{g=c.F.R(a);setTimeout(h,0)},m=m.slice(5));a.addEventListener(m,r)});var n=l&&"file"==a.type?()=>{var m=c.g.j(b());null==m||""===m?a.value="":c.u.S(h)}:()=>{var m=c.g.j(b()),r=c.F.R(a);if(null!==g&&m===g)setTimeout(n,0);else if(m!==r||void 0===r)f?(r=d.get("valueAllowUnset"),c.F.Na(a,m,r),r||m===c.F.R(a)||c.u.S(h)): +c.F.Na(a,m)};if(f){var p;c.l.subscribe(a,c.l.G,()=>{p?d.get("valueAllowUnset")?n():h():(a.addEventListener("change",h),p=c.s(n,{o:a}))},null,{notifyImmediately:!0})}else a.addEventListener("change",h),c.s(n,{o:a})}else c.wb(a,{checkedValue:b})},update:()=>{}};c.I.mb.add("value");c.h.visible={update:(a,b)=>{b=c.g.j(b());var d="none"!=a.style.display;b&&!d?a.style.display="":d&&!b&&(a.style.display="none")}};c.h.hidden={update:(a,b)=>a.hidden=!!c.g.j(b())};(function(a){c.h[a]={init:function(b,d,f,l, +k){return c.h.event.init.call(this,b,()=>({[a]:d()}),f,l,k)}}})("click");(()=>{let a=c.g.i.Z();class b{constructor(f){this.Xa=f}Ja(...f){let l=this.Xa;if(!f.length)return c.g.i.get(l,a)||(11===this.L?l.content:1===this.L?l:void 0);c.g.i.set(l,a,f[0])}}class d extends b{constructor(f){super(f);f&&(this.L=f.matches("TEMPLATE")&&f.content?f.content.nodeType:1)}}c.Ka={Xa:d,Qa:b}})();(()=>{var a=(e,g,h)=>{var n;for(g=c.m.nextSibling(g);e&&(n=e)!==g;)e=c.m.nextSibling(n),h(n,e)},b=(e,g)=>{if(e.length){var h= e[0],n=h.parentNode;a(h,e[e.length-1],p=>{1!==p.nodeType&&8!==p.nodeType||c.xb(g,p)});c.g.Aa(e,n)}},d=(e,g,h,n)=>{var p=(e&&(e.nodeType?e:0c.T(e)?e():"function"===typeof e?e(g,h):e;c.rc=function(e,g,h,n){h=h||{};var p=p||"replaceChildren";if(n){var m=n.nodeType?n:0{var r=g instanceof c.ea?g:new c.ea(g, null,null,null,{exportDependencies:!0}),q=f(e,r.$data,r);d(n,p,q,r,h)},{oa:()=>!m||!c.g.Za(m),o:m})}console.log("no targetNodeOrNodeArray")};c.sc=(e,g,h,n,p)=>{function m(v,z){c.u.S(c.g.Pb,null,[n,v,t,h,u,z]);c.l.notify(n,c.l.G)}var r,q=h.as,t=(v,z)=>{r=p.createChildContext(v,{as:q,extend:C=>{C.$index=z;q&&(C[q+"Index"]=z)}});v=f(e,v,r);return d(n,"ignoreTargetNode",v,r,h)},u=(v,z)=>{b(z,r);r=null};if(!h.beforeRemove&&c.Jb(g)){m(g.P());var w=g.subscribe(v=>{m(g(),v)},null,"arrayChange");w.o(n);return w}return c.s(()=> diff --git a/vendors/knockout/src/binding/defaultBindings/options.js b/vendors/knockout/src/binding/defaultBindings/options.js index c3ba4f733..d4d478b73 100644 --- a/vendors/knockout/src/binding/defaultBindings/options.js +++ b/vendors/knockout/src/binding/defaultBindings/options.js @@ -73,7 +73,7 @@ ko.bindingHandlers['options'] = { if (allBindings['has']('optionsCaption')) { captionValue = ko.utils.unwrapObservable(allBindings.get('optionsCaption')); // If caption value is null or undefined, don't show a caption - if (captionValue !== null && captionValue !== undefined) { + if (captionValue != null) { filteredArray.unshift(captionPlaceholder); } }