diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 696856081..e4e853dc0 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -444,7 +444,6 @@ class WebApplication define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP); define("PATH_SERVICES_REST", PATH_CORE . "services" . PATH_SEP . "rest" . PATH_SEP); - \Bootstrap::registerSystemClasses(); $arraySystemConfiguration = \System::getSystemConfiguration(); @@ -497,8 +496,6 @@ class WebApplication $arraySystemConfiguration = \System::getSystemConfiguration('', '', SYS_SYS); - $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1; - //Do not change any of these settings directly, use env.ini instead ini_set('display_errors', $arraySystemConfiguration['display_errors']); ini_set('error_reporting', $arraySystemConfiguration['error_reporting']); @@ -506,14 +503,12 @@ class WebApplication ini_set('default_charset', 'UTF-8'); //?? ini_set('memory_limit', $arraySystemConfiguration['memory_limit']); ini_set('soap.wsdl_cache_enabled', $arraySystemConfiguration['wsdl_cache']); - ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $arraySystemConfiguration['time_zone']); //Set Time Zone define('DEBUG_SQL_LOG', $arraySystemConfiguration['debug_sql']); define('DEBUG_TIME_LOG', $arraySystemConfiguration['debug_time']); define('DEBUG_CALENDAR_LOG', $arraySystemConfiguration['debug_calendar']); define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']); define('MEMCACHED_SERVER', $arraySystemConfiguration['memcached_server']); - define('TIME_ZONE', ini_get('date.timezone')); define('SYS_SKIN', $arraySystemConfiguration['default_skin']); require_once (PATH_DB . SYS_SYS . "/db.php"); @@ -573,6 +568,18 @@ class WebApplication \Propel::init(PATH_CONFIG . "databases.php"); + //Set Time Zone + /*----------------------------------********---------------------------------*/ + if (\PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) { + $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1; + } + /*----------------------------------********---------------------------------*/ + + ini_set('date.timezone', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 'UTC' : $arraySystemConfiguration['time_zone']); //Set Time Zone + + define('TIME_ZONE', ini_get('date.timezone')); + + //Return return true; } diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js index 0e2e3c1fb..0af994d4d 100755 --- a/gulliver/js/common/core/common.js +++ b/gulliver/js/common/core/common.js @@ -2259,9 +2259,6 @@ function inputDocumentVerifySize(inpDocMaxFileSize, file) function getBrowserTimeZoneOffset() { - var d = new Date(); - var tzOffset = d.getTimezoneOffset(); - - return ((tzOffset > 0)? "-" : "") + (tzOffset * 60); + return -1 * ((new Date()).getTimezoneOffset() * 60); } diff --git a/gulliver/js/ext/min/ext-all.js b/gulliver/js/ext/min/ext-all.js index ec8515ba9..25af08e02 100644 --- a/gulliver/js/ext/min/ext-all.js +++ b/gulliver/js/ext/min/ext-all.js @@ -68,7 +68,7 @@ String.prototype.nl2br=function(){return this.replace(/\n/g,'
');} function stringReplace(strSearch,strReplace,str) {var expression=eval("/"+strSearch+"/g");return str.replace(expression,strReplace);} function getBrowserTimeZoneOffset() -{var d=new Date();var tzOffset=d.getTimezoneOffset();return((tzOffset>0)?"-":"")+(tzOffset*60);} +{return-1*((new Date()).getTimezoneOffset()*60);} Ext.namespace("Ext.ux.plugin");Ext.onReady(function(){var a=Ext.util.CSS;if(a){a.getRule(".x-hide-nosize")||a.createStyleSheet(".x-hide-nosize{height:0px!important;width:0px!important;border:none!important;zoom:1;}.x-hide-nosize * {height:0px!important;width:0px!important;border:none!important;zoom:1;}");a.refreshCache()}});(function(){var g=Ext.Element,b=Ext.lib.Anim,a=g.prototype;var f="visibility",d="display",c="hidden",i="none";var e={};e.El={setDisplayed:function(k){var j=this;j.visibilityCls?(j[k!==false?"removeClass":"addClass"](j.visibilityCls)):a.setDisplayed.call(j,k);return j},isDisplayed:function(){return!(this.hasClass(this.visibilityCls)||this.isStyle(d,i))},fixDisplay:function(){var j=this;a.fixDisplay.call(j);j.visibilityCls&&j.removeClass(j.visibilityCls)},isVisible:function(k){var l=this.visible||(!this.isStyle(f,c)&&(this.visibilityCls?!this.hasClass(this.visibilityCls):!this.isStyle(d,i)));if(k!==true||!l){return l}var m=this.dom.parentNode,j=/^body/i;while(m&&!j.test(m.tagName)){if(!Ext.fly(m,"_isVisible").isVisible()){return false}m=m.parentNode}return true},isStyle:a.isStyle||function(j,k){return this.getStyle(j)==k}};Ext.override(g.Flyweight,e.El);Ext.ux.plugin.VisibilityMode=function(k){Ext.apply(this,k||{});var j=Ext.util.CSS;if(j&&!Ext.isIE&&this.fixMaximizedWindow!==false&&!Ext.ux.plugin.VisibilityMode.MaxWinFixed){j.updateRule(".x-window-maximized-ct","overflow","");Ext.ux.plugin.VisibilityMode.MaxWinFixed=true}};Ext.extend(Ext.ux.plugin.VisibilityMode,Object,{bubble:true,fixMaximizedWindow:true,elements:null,visibilityCls:"x-hide-nosize",hideMode:"nosize",ptype:"uxvismode",init:function(n){var k=this.hideMode||n.hideMode,m=this,j=Ext.Container.prototype.bubble,l=function(){var q=[this.collapseEl,this.actionMode].concat(m.elements||[]);Ext.each(q,function(r){m.extend(this[r]||r)},this);var p={visFixed:true,animCollapse:false,animFloat:false,hideMode:k,defaults:this.defaults||{}};p.defaults.hideMode=k;Ext.apply(this,p);Ext.apply(this.initialConfig||{},p)};n.on("render",function(){if(m.bubble!==false&&this.ownerCt){j.call(this.ownerCt,function(){this.visFixed||this.on("afterlayout",l,this,{single:true})})}l.call(this)},n,{single:true})},extend:function(j,k){j&&Ext.each([].concat(j),function(l){if(l&&l.dom){if("visibilityCls"in l){return}Ext.apply(l,e.El);l.visibilityCls=k||this.visibilityCls}},this);return this}});Ext.preg&&Ext.preg("uxvismode",Ext.ux.plugin.VisibilityMode);Ext.provide&&Ext.provide("uxvismode")})();(function(){var J=Ext.Element,n,u=Ext.lib.Dom,al=Ext.lib.Anim,m=Ext.EventManager,aj=Ext.lib.Event,an=document,t=function(){},ap=Object.prototype,aA=ap.toString,B=/^body/i,q="[object HTMLDocument]";if(!Ext.elCache||parseInt(Ext.version.replace(/\./g,""),10)<311){alert("Ext Release "+Ext.version+" is not supported")}Ext._documents={};Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var T=u.resolveDocumentCache=function(E,aF){Ext._documents[Ext.id(document,"_doc")]=Ext.elCache;var aE=e(E),aG=Ext.isDocument(aE)?Ext.id(aE):aF,A=Ext._documents[aG]||null;return A||(aG?Ext._documents[aG]={}:null)},aD=u.clearDocumentCache=function(A){delete Ext._documents[A]};J.addMethods||(J.addMethods=function(A){Ext.apply(J.prototype,A||{})});Ext.removeNode=function(aH){var aG=aH?aH.dom||aH:null,aE,aF,A=T(aG),E;if(aG&&(aF=A[aG.id])&&(aE=aF.el)){if(aE.dom){Ext.enableNestedListenerRemoval?m.purgeElement(aE.dom,true):m.removeAll(aE.dom)}delete A[aG.id];delete aE.dom;delete aE._context;aE=null}if(aG&&!aG.navigator&&!Ext.isDocument(aG)&&!B.test(aG.tagName)){(E=aG.parentElement||aG.parentNode)&&E.removeChild(aG)}aG=E=null};var f=function(aI,aG){var aH=typeof aI==="function"?aI:function aF(){};var aE=aH._ovl;if(!aE){aE={base:aH};aE[aH.length||0]=aH;aH=function aF(){var aL=arguments.callee._ovl;var aK=aL[arguments.length]||aL.base;return aK&&aK!=arguments.callee?aK.apply(this,arguments):undefined}}var aJ=[].concat(aG);for(var E=0,A=aJ.length;EA||aQaI){aN.scrollTop=aO-A}}aN.scrollTop=aN.scrollTop;if(aH!==false){if(aG.offsetWidth>aN.clientWidth||aJaL){aN.scrollLeft=E-aN.clientWidth}}aN.scrollLeft=aN.scrollLeft}return this},contains:function(A){try{return!A?false:u.isAncestor(this.dom,A.dom?A.dom:A)}catch(E){return false}},getScroll:function(){var aI=this.dom,aH=this.getDocument(),A=aH.body,aE=aH.documentElement,E,aG,aF;if(Ext.isDocument(aI)||aI==A){if(Ext.isIE&&u.docIsStrict(aH)){E=aE.scrollLeft;aG=aE.scrollTop}else{E=window.pageXOffset;aG=window.pageYOffset}aF={left:E||(A?A.scrollLeft:0),top:aG||(A?A.scrollTop:0)}}else{aF={left:aI.scrollLeft,top:aI.scrollTop}}return aF},getStyle:function(){var A=at&&at.getComputedStyle?function E(aL){var aI=!this._isDoc?this.dom:null,aE,aH,aF,aJ,aK=Ext.isWebKit,aJ,aG;if(!aI||!aI.style){return null}aG=aI.style;aL=aq(aL);aH=at.getComputedStyle(aI,null);aF=(aH)?aH[aL]:null;if(aK){if(aF&&ay.test(aL)&&aG.position!="absolute"&&aF!="0px"){aJ=aG.display;aG.display="inline-block";aF=at.getComputedStyle(aI,null)[aL];aG.display=aJ}else{if(aF=="rgba(0, 0, 0, 0)"){aF="transparent"}}}return aF||aG[aL]}:function E(aJ){var aH=!this._isDoc?this.dom:null,aE,aG,aF;if(!aH||!aH.style){return null}aF=aH.style;if(aJ==Y){if(aF.filter.match){if(aE=aF.filter.match(i)){var aI=parseFloat(aE[1]);if(!isNaN(aI)){return aI?aI/100:0}}}return 1}aJ=aq(aJ);return((aG=aH.currentStyle)?aG[aJ]:null)||aH.style[aJ]};var E=null;return A}(),setStyle:function(aF,aE){if(this._isDoc||Ext.isDocument(this.dom)){return this}var A,E;if(typeof aF!="object"){A={};A[aF]=aE;aF=A}for(E in aF){if(aF.hasOwnProperty(E)){aE=aF[E];E==Y?this.setOpacity(aE):this.dom.style[aq(E)]=aE}}return this},center:function(A){return this.alignTo(A||this.getDocument(),"c-c")},mask:function(E,aH){var aJ=this,aF=aJ.dom,aI=Ext.DomHelper,aG="ext-el-mask-msg",A,aK;if(aJ.getStyle("position")=="static"){aJ.addClass(F)}if((A=I(aF,"maskMsg"))){A.remove()}if((A=I(aF,"mask"))){A.remove()}aK=aI.append(aF,{cls:"ext-el-mask"},true);I(aF,"mask",aK);aJ.addClass(O);aK.setDisplayed(true);if(typeof E=="string"){var aE=aI.append(aF,{cls:aG,cn:{tag:"div"}},true);I(aF,"maskMsg",aE);aE.dom.className=aH?aG+" "+aH:aG;aE.dom.firstChild.innerHTML=E;aE.setDisplayed(true);aE.center(aJ)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&aJ.getStyle("height")=="auto"){aK.setSize(undefined,aJ.getHeight())}return aK},unmask:function(){var aE=this,aF=aE.dom,A=I(aF,"mask"),E=I(aF,"maskMsg");if(A){if(E){E.remove();I(aF,"maskMsg",undefined)}A.remove();I(aF,"mask",undefined)}aE.removeClass([O,F])},isMasked:function(){var A=I(this.dom,"mask");return A&&A.isVisible()},getCenterXY:function(){return this.getAlignToXY(this.getDocument(),"c-c")},getAnchorXY:function(aG,aL,aQ){aG=(aG||"tl").toLowerCase();aQ=aQ||{};var aK=this,aN=this.getDocument(),E=aK.dom==aN.body||aK.dom==aN,aO=aQ.width||E?u.getViewWidth(false,aN):aK.getWidth(),aI=aQ.height||E?u.getViewHeight(false,aN):aK.getHeight(),aP,A=Math.round,aE=aK.getXY(),aM=aK.getScroll(),aJ=E?aM.left:!aL?aE[0]:0,aH=E?aM.top:!aL?aE[1]:0,aF={c:[A(aO*0.5),A(aI*0.5)],t:[A(aO*0.5),0],l:[0,A(aI*0.5)],r:[aO,A(aI*0.5)],b:[A(aO*0.5),aI],tl:[0,0],bl:[0,aI],br:[aO,aI],tr:[aO,0]};aP=aF[aG];return[aP[0]+aJ,aP[1]+aH]},anchorTo:function(E,aH,aE,A,aJ,aK){var aI=this,aG=aI.dom;function aF(){ai(aG).alignTo(E,aH,aE,A);Ext.callback(aK,ai(aG))}Ext.EventManager.onWindowResize(aF,aI);if(!Ext.isEmpty(aJ)){Ext.EventManager.on(window,"scroll",aF,aI,{buffer:!isNaN(aJ)?aJ:50})}aF.call(aI);return aI},getScroll:function(){var aI=this.dom,aH=this.getDocument(),A=aH.body,aE=aH.documentElement,E,aG,aF;if(aI==aH||aI==A){if(Ext.isIE&&u.docIsStrict(aH)){E=aE.scrollLeft;aG=aE.scrollTop}else{E=window.pageXOffset;aG=window.pageYOffset}aF={left:E||(A?A.scrollLeft:0),top:aG||(A?A.scrollTop:0)}}else{aF={left:aI.scrollLeft,top:aI.scrollTop}}return aF},getAlignToXY:function(aF,aR,aS){var a6;aF=Ext.get(aF,a6=this.getDocument());if(!aF||!aF.dom){throw"Element.getAlignToXY with an element that doesn't exist"}aS=aS||[0,0];aR=(aR=="?"?"tl-bl?":(!/-/.test(aR)&&aR!=""?"tl-"+aR:aR||"tl-bl")).toLowerCase();var a3=this,aY=a3.dom,a5,a4,aK,aJ,aM,aW,aP,aN=u.getViewWidth(false,a6)-10,aX=u.getViewHeight(false,a6)-10,E,aG,aH,aI,aO,aQ,a0=a6.documentElement,aL=a6.body,aV=(a0.scrollLeft||aL.scrollLeft||0)+5,aU=(a0.scrollTop||aL.scrollTop||0)+5,aZ=false,aE="",A="",aT=aR.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!aT){throw"Element.getAlignToXY with an invalid alignment "+aR}aE=aT[1];A=aT[2];aZ=!!aT[3];a5=a3.getAnchorXY(aE,true);a4=aF.getAnchorXY(A,false);aK=a4[0]-a5[0]+aS[0];aJ=a4[1]-a5[1]+aS[1];if(aZ){aM=a3.getWidth();aW=a3.getHeight();aP=aF.getRegion();E=aE.charAt(0);aG=aE.charAt(aE.length-1);aH=A.charAt(0);aI=A.charAt(A.length-1);aO=((E=="t"&&aH=="b")||(E=="b"&&aH=="t"));aQ=((aG=="r"&&aI=="l")||(aG=="l"&&aI=="r"));if(aK+aM>aN+aV){aK=aQ?aP.left-aM:aN+aV-aM}if(aKaX+aU){aJ=aO?aP.top-aW:aX+aU-aW}if(aJaU){x=aU-w;aO=true}if((y+h)>aM){y=aM-h;aO=true}if(x)((\n|\r|.)*?)(?:<\/script>)/gi,update:function(content,loadScripts,callback,scope){loadScripts=loadScripts||this.getUpdater().loadScripts||false;content=Ext.DomHelper.markup(content||"");content=loadScripts===true?content:content.replace(this.scriptRE,"");var doc;if((doc=this.getFrameDocument())&&!!content.length){this._unHook();this.src=null;this.showMask();Ext.isFunction(callback)&&this._observable.addListener("_docload",callback,scope||this,{single:true});this._targetURI=location.href;doc.open();this._frameAction=true;doc.write(content);doc.close();this.checkDOM()}else{this.hideMask(true);Ext.isFunction(callback)&&callback.call(scope,this)}return this},execCommand:function(command,userInterface,value,validate){var doc,assert;if((doc=this.getFrameDocument())&&!!command){try{Ext.isIE&&this.getWindow().focus();assert=validate&&Ext.isFunction(doc.queryCommandEnabled)?doc.queryCommandEnabled(command):true;return assert&&doc.execCommand(command,!!userInterface,value)}catch(eex){return false}}return false},setDesignMode:function(active){var doc;(doc=this.getFrameDocument())&&(doc.designMode=(/on|true/i).test(String(active))?"on":"off")},getUpdater:function(){return this.updateManager||(this.updateManager=new MIF.Updater(this))},getHistory:function(){var h=null;try{h=this.getWindow().history}catch(eh){}return h},get:function(el){var doc=this.getFrameDocument();return doc?Ext.get(el,doc):doc=null},fly:function(el,named){var doc=this.getFrameDocument();return doc?Ext.fly(el,named,doc):null},getDom:function(el){var d;if(!el||!(d=this.getFrameDocument())){return(d=null)}return Ext.getDom(el,d)},select:function(selector,unique){var d;return(d=this.getFrameDocument())?Ext.Element.select(selector,unique,d):d=null},query:function(selector){var d;return(d=this.getFrameDocument())?Ext.DomQuery.select(selector,d):null},removeNode:Ext.removeNode,_renderHook:function(){this._windowContext=null;this.CSS=this.CSS?this.CSS.destroy():null;this._hooked=false;try{if(this.writeScript('(function(){(window.hostMIF = parent.document.getElementById("'+this.id+'").ownerCt)._windowContext='+(Ext.isIE?"window":'{eval:function(s){return new Function("return ("+s+")")();}}')+";})()")){var w,p=this._frameProxy,D=this.getFrameDocument();if(w=this.getWindow()){p||(p=this._frameProxy=this._eventProxy.createDelegate(this));addListener(w,"focus",p);addListener(w,"blur",p);addListener(w,"resize",p);addListener(w,"unload",p);D&&addListener(Ext.isIE?w:D,"scroll",p)}D&&(this.CSS=new Ext.ux.ManagedIFrame.CSS(D))}}catch(ex){}return this.domWritable()},_unHook:function(){if(this._hooked){this._windowContext&&(this._windowContext.hostMIF=null);this._windowContext=null;var w,p=this._frameProxy;if(p&&this.domWritable()&&(w=this.getWindow())){removeListener(w,"focus",p);removeListener(w,"blur",p);removeListener(w,"resize",p);removeListener(w,"unload",p);removeListener(Ext.isIE?w:this.getFrameDocument(),"scroll",p)}}ELD.clearDocumentCache&&ELD.clearDocumentCache(this.id);this.CSS=this.CSS?this.CSS.destroy():null;this.domFired=this._frameAction=this.domReady=this._hooked=false},_windowContext:null,getFrameDocument:function(){var win=this.getWindow(),doc=null;try{doc=(Ext.isIE&&win?win.document:null)||this.dom.contentDocument||window.frames[this.dom.name].document||null}catch(gdEx){ELD.clearDocumentCache&&ELD.clearDocumentCache(this.id);return false}doc=(doc&&Ext.isFunction(ELD.getDocument))?ELD.getDocument(doc,true):doc;return doc},getDoc:function(){var D=this.getFrameDocument();return Ext.get(D,D)},getBody:function(){var d;return(d=this.getFrameDocument())?this.get(d.body||d.documentElement):null},getDocumentURI:function(){var URI,d;try{URI=this.src&&(d=this.getFrameDocument())?d.location.href:null}catch(ex){}return URI||(Ext.isFunction(this.src)?this.src():this.src)},getWindowURI:function(){var URI,w;try{URI=(w=this.getWindow())?w.location.href:null}catch(ex){}return URI||(Ext.isFunction(this.src)?this.src():this.src)},getWindow:function(){var dom=this.dom,win=null;try{win=dom.contentWindow||window.frames[dom.name]||null}catch(gwEx){}return win},scrollChildIntoView:function(child,container,hscroll){this.fly(child,"_scrollChildIntoView").scrollIntoView(this.getDom(container)||this.getBody().dom,hscroll);return this},print:function(){try{var win;if(win=this.getWindow()){Ext.isIE&&win.focus();win.print()}}catch(ex){throw new MIF.Error("printexception",ex.description||ex.message||ex)}return this},domWritable:function(){return!!Ext.isDocument(this.getFrameDocument(),true)&&!!this._windowContext},execScript:function(block,useDOM){try{if(this.domWritable()){if(useDOM){this.writeScript(block)}else{return this._windowContext.eval(block)}}else{throw new MIF.Error("execscript-secure-context")}}catch(ex){this._observable.fireEvent.call(this._observable,"exception",this,ex);return false}return true},writeScript:function(block,attributes){attributes=Ext.apply({},attributes||{},{type:"text/javascript",text:block});try{var head,script,doc=this.getFrameDocument();if(doc&&typeof doc.getElementsByTagName!="undefined"){if(!(head=doc.getElementsByTagName("head")[0])){head=doc.createElement("head");doc.getElementsByTagName("html")[0].appendChild(head)}if(head&&(script=doc.createElement("script"))){for(var attrib in attributes){if(attributes.hasOwnProperty(attrib)&&attrib in script){script[attrib]=attributes[attrib]}}return!!head.appendChild(script)}}}catch(ex){this._observable.fireEvent.call(this._observable,"exception",this,ex)}finally{script=head=null}return false},loadFunction:function(fn,useDOM,invokeIt){var name=fn.name||fn;var fnSrc=fn.fn||window[fn];name&&fnSrc&&this.execScript(name+"="+fnSrc,useDOM);invokeIt&&this.execScript(name+"()")},loadHandler:function(e,target){var rstatus=(this.dom||{}).readyState||(e||{}).type;if(this.eventsFollowFrameLinks||this._frameAction||this.isReset){switch(rstatus){case"domready":case"DOMFrameContentLoaded":case"domfail":this._onDocReady(rstatus);break;case"load":case"complete":var frame=this;frame._onDocLoaded(rstatus);this._frameAction=false;break;case"error":this._observable.fireEvent.apply(this._observable,["exception",this].concat(arguments));break;default:}this.frameState=rstatus}},_onDocReady:function(eventName){var w,obv=this._observable,D;try{if(!this.isReset&&this.focusOnLoad&&(w=this.getWindow())){w.focus()}(D=this.getDoc())&&(D.isReady=true)}catch(ex){}obv.fireEvent("_docready",this);if(!this.domFired&&(this._hooked=this._renderHook())){this.domFired=true;this.isReset||obv.fireEvent.call(obv,"domready",this)}this.domReady=true;this.hideMask()},_onDocLoaded:function(eventName){var obv=this._observable,w;this.domReady||this._onDocReady("domready");obv.fireEvent("_docload",this);this.isReset||obv.fireEvent("documentloaded",this);this.hideMask(true);this._frameAction=this.isReset=false},checkDOM:function(win){if(Ext.isGecko){return}var n=0,frame=this,domReady=false,b,l,d,max=this.domReadyRetries||2500,polling=false,startLocation=(this.getFrameDocument()||{location:{}}).location.href;(function(){d=frame.getFrameDocument()||{location:{}};polling=(d.location.href!==startLocation||d.location.href===frame._targetURI);if(frame.domReady){return}domReady=polling&&((b=frame.getBody())&&!!(b.dom.innerHTML||"").length)||false;if(d.location.href&&!domReady&&(++n'},onRender:function(ct,position){Ext.ux.LocationBar.superclass.onRender.call(this,ct,position);this.repaint();},onClick:function(node){if(this.selectHandler){this.selectHandler(node);}else{if(node.parentNode){node.parentNode.expand(false,true);node.ensureVisible();} diff --git a/gulliver/js/ext/pmos-common.js b/gulliver/js/ext/pmos-common.js index 93762f66b..45679ca82 100755 --- a/gulliver/js/ext/pmos-common.js +++ b/gulliver/js/ext/pmos-common.js @@ -554,9 +554,6 @@ function stringReplace(strSearch, strReplace, str) function getBrowserTimeZoneOffset() { - var d = new Date(); - var tzOffset = d.getTimezoneOffset(); - - return ((tzOffset > 0)? "-" : "") + (tzOffset * 60); + return -1 * ((new Date()).getTimezoneOffset() * 60); } diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index d3ddf2f9a..86ded837f 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -807,7 +807,7 @@ return len;};var stripNonNumeric=function(str){str+='';var rgx=/^\d|\.|-$/;var o return out;};function inputDocumentVerifySize(inpDocMaxFileSize,file) {try{return(file.files[0].size<=inpDocMaxFileSize)?1:0;}catch(e){return 1;}} function getBrowserTimeZoneOffset() -{var d=new Date();var tzOffset=d.getTimezoneOffset();return((tzOffset>0)?"-":"")+(tzOffset*60);} +{return-1*((new Date()).getTimezoneOffset()*60);} var TimeToFade=1000.0;function fade(eid,inOut){inOut=(typeof(inOut)!='undefined')?true:false;var element=document.getElementById(eid);if(element==null) return;if(element.FadeState==null) {if(element.style.opacity==null||element.style.opacity==''||element.style.opacity=='1') diff --git a/gulliver/thirdparty/creole/contrib/DebugConnection.php b/gulliver/thirdparty/creole/contrib/DebugConnection.php index 0e830b31a..17e14969f 100755 --- a/gulliver/thirdparty/creole/contrib/DebugConnection.php +++ b/gulliver/thirdparty/creole/contrib/DebugConnection.php @@ -158,7 +158,11 @@ class DebugConnection implements Connection { $res = $this->childConnection->executeQuery($sql, $fetchmode); $endTime = microtime(true); $time = $endTime - $startTime; - $this->log("executeQuery|$time|$sql"); + if(is_string($sql)){ + $this->log("executeQuery|$time|$sql"); + }else{ + $this->log("executeQuery|$time|Sql empty"); + } return $res; } diff --git a/workflow/engine/classes/class.Installer.php b/workflow/engine/classes/class.Installer.php index 02f852488..57aff08ed 100755 --- a/workflow/engine/classes/class.Installer.php +++ b/workflow/engine/classes/class.Installer.php @@ -234,6 +234,7 @@ class Installer $this->log("Write: " . $db_file . " => " . ((!$ff) ? $ff : "OK") . "\n", $ff === false); fclose($fp); + /*----------------------------------********---------------------------------*/ //Generate the env.ini file $envIniFile = $path_site . 'env.ini'; $content = 'system_utc_time_zone = 1' . "\n"; @@ -243,6 +244,7 @@ class Installer $ff = @fputs($fp, $content, strlen($content)); $this->log('Write: ' . $envIniFile . ' => ' . ((!$ff)? $ff : 'OK') . "\n", $ff === false); fclose($fp); + /*----------------------------------********---------------------------------*/ //Set data $this->setPartner(); diff --git a/workflow/engine/classes/class.actionsByEmailCore.php b/workflow/engine/classes/class.actionsByEmailCore.php index d236468c4..46e62b5c6 100644 --- a/workflow/engine/classes/class.actionsByEmailCore.php +++ b/workflow/engine/classes/class.actionsByEmailCore.php @@ -186,6 +186,7 @@ class actionsByEmailCoreClass extends PMPlugin $field->label = 'Test'; $field->type = 'dropdown'; $field->options = array(); + $field->value = ''; $actionField = str_replace(array('@@','@#','@=','@%','@?','@$'), '', $configuration['ABE_ACTION_FIELD']); $dynaform = $configuration['DYN_UID']; $variables = G::json_decode($configuration['DYN_CONTENT'], true); @@ -237,12 +238,12 @@ class actionsByEmailCoreClass extends PMPlugin $__ABE__.=''; break; case 'yesno': - $__ABE__ .= '' . G::LoadTranslation('ID_YES_VALUE') . ''; - $__ABE__ .= '' . G::LoadTranslation('ID_NO_VALUE') . ''; + $__ABE__ .= '' . G::LoadTranslation('ID_YES_VALUE') . ''; + $__ABE__ .= '' . G::LoadTranslation('ID_NO_VALUE') . ''; break; case 'checkbox': - $__ABE__ .= 'Check'; - $__ABE__ .= 'Uncheck'; + $__ABE__ .= 'Check'; + $__ABE__ .= 'Uncheck'; break; } $__ABE__ .= ''; diff --git a/workflow/engine/classes/class.applications.php b/workflow/engine/classes/class.applications.php index 90f4a1d82..46f814a31 100755 --- a/workflow/engine/classes/class.applications.php +++ b/workflow/engine/classes/class.applications.php @@ -512,20 +512,20 @@ class Applications $oCriteria->addAscendingOrderByColumn(FieldsPeer::FLD_INDEX); $oDataset = FieldsPeer::doSelectRS($oCriteria); - $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); - $oDataset->next(); - $row = $oDataset->getRow(); - if (is_array($row)) { + + if ($oDataset->next()) { $sort = $tableNameAux . "." . $sortTable[1]; } } - if ($sort == "") { - $sort = $sortBk; - } + $arraySelectColumn = $Criteria->getSelectColumns(); - if (!in_array($sort, $Criteria->getSelectColumns())) { - $sort = AppCacheViewPeer::APP_NUMBER; //DEFAULT VALUE + if (!in_array($sort, $arraySelectColumn)) { + $sort = $sortBk; + + if (!in_array($sort, $arraySelectColumn)) { + $sort = AppCacheViewPeer::APP_NUMBER; //DEFAULT VALUE + } } if ($dir == "DESC") { diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php index 70c3b7c66..192241e7c 100755 --- a/workflow/engine/classes/class.case.php +++ b/workflow/engine/classes/class.case.php @@ -2003,6 +2003,13 @@ class Cases $users = new Users(); $users->refreshTotal($sUserUid, "remove", "inbox"); } + }else{ + //When start a case with SCRIPT-TASK WEBENTRYEVENT and the status is DRAFT + if($oApplication->getAppStatus() == "DRAFT"){ + $sUserUid = $appDel->getUsrUid(); + $users = new Users(); + $users->refreshTotal($sUserUid, "remove", "draft"); + } } } /*----------------------------------********---------------------------------*/ @@ -4342,7 +4349,10 @@ class Cases $oCriteria = new Criteria('workflow'); $oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID); $oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL); - if (AppDelegationPeer::doCount($oCriteria) == 1) { + $resAppDel = AppDelegationPeer::doCount($oCriteria); + + $this->CloseCurrentDelegation($sApplicationUID, $iIndex); + if ($resAppDel == 1) { $aFields['APP_STATUS'] = 'CANCELLED'; $oApplication->update($aFields); @@ -4353,7 +4363,6 @@ class Cases $oReportTables->updateTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA']); $addtionalTables->updateReportTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA'], $aFields['APP_STATUS']); } - $this->CloseCurrentDelegation($sApplicationUID, $iIndex); $oAppDel = new AppDelegation(); $oAppDel->Load($sApplicationUID, $iIndex); $aAppDel = $oAppDel->toArray(BasePeer::TYPE_FIELDNAME); @@ -5503,6 +5512,29 @@ class Cases $sCc = $cc; } break; + case "MULTIPLE_INSTANCE": + $to = null; + $cc = null; + $sw = 1; + $oDerivation = new Derivation(); + $userFields = $oDerivation->getUsersFullNameFromArray($oDerivation->getAllUsersFromAnyTask($aTask["TAS_UID"])); + if(isset($userFields)){ + foreach($userFields as $row){ + $toAux = ( + (($row["USR_FIRSTNAME"] != "") || ($row["USR_LASTNAME"] != "")) ? + $row["USR_FIRSTNAME"] . " " . $row["USR_LASTNAME"] . " " : "" + ) . "<" . $row["USR_EMAIL"] . ">"; + if ($sw == 1) { + $to = $toAux; + $sw = 0; + } else { + $cc = $cc . (($cc != null) ? "," : null) . $toAux; + } + } + $sTo = $to; + $sCc = $cc; + } + break; default: if (isset($aTask["USR_UID"]) && !empty($aTask["USR_UID"])) { $aUser = $oUser->load($aTask["USR_UID"]); diff --git a/workflow/engine/classes/class.configuration.php b/workflow/engine/classes/class.configuration.php index 2b3ab3c07..0bfae0d5e 100755 --- a/workflow/engine/classes/class.configuration.php +++ b/workflow/engine/classes/class.configuration.php @@ -330,7 +330,7 @@ class Configurations // extends Configuration $aux = str_replace('@userName', trim($username), $theFormat); $aux = str_replace('@firstName', $oUser->getUsrFirstname(), $aux); - $aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux); + $aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux); } return $aux; } @@ -583,7 +583,7 @@ class Configurations // extends Configuration require_once 'model/Language.php'; $language = new language(); $lanLocation = $language->findLocationByLanId(SYS_LANG); - $location = isset($lanLocation['LAN_LOCATION']) ? $lanLocation['LAN_LOCATION'] : ''; + $location = isset($lanLocation['LAN_LOCATION']) ? $lanLocation['LAN_LOCATION'] : ''; if (G::toLower(PHP_OS) == 'linux' || G::toLower(PHP_OS) == 'darwin') { if (SYS_LANG == 'es') { @@ -612,7 +612,7 @@ class Configurations // extends Configuration break; } } - + if (defined('PARTNER_FLAG')) { setlocale(LC_TIME, $langLocate); $dateTime = utf8_encode(strftime($newCreation, mktime($h, $i, $s, $m, $d, $y))); @@ -698,7 +698,6 @@ class Configurations // extends Configuration $caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE"); $caseReaderFields[] = array("name" => "APP_UPDATE_DATE"); $caseReaderFields[] = array("name" => "DEL_PRIORITY"); - $caseReaderFields[] = array("name" => "APP_STATUS_LABEL"); $caseReaderFields[] = array("name" => "APP_FINISH_DATE"); $caseReaderFields[] = array("name" => "CASE_SUMMARY"); $caseReaderFields[] = array("name" => "CASE_NOTES_COUNT"); @@ -733,7 +732,6 @@ class Configurations // extends Configuration $caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE"); $caseReaderFields[] = array("name" => "APP_UPDATE_DATE"); $caseReaderFields[] = array("name" => "DEL_PRIORITY"); - $caseReaderFields[] = array("name" => "APP_STATUS_LABEL"); $caseReaderFields[] = array("name" => "APP_FINISH_DATE"); $caseReaderFields[] = array("name" => "APP_THREAD_INDEX"); $caseReaderFields[] = array("name" => "CASE_SUMMARY"); @@ -770,7 +768,6 @@ class Configurations // extends Configuration $caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE"); $caseReaderFields[] = array("name" => "APP_UPDATE_DATE"); $caseReaderFields[] = array("name" => "DEL_PRIORITY"); - $caseReaderFields[] = array("name" => "APP_STATUS_LABEL"); $caseReaderFields[] = array("name" => "APP_FINISH_DATE"); $caseReaderFields[] = array("name" => "CASE_SUMMARY"); $caseReaderFields[] = array("name" => "CASE_NOTES_COUNT"); @@ -843,7 +840,6 @@ class Configurations // extends Configuration $caseReaderFields[] = array("name" => "APP_UPDATE_DATE"); $caseReaderFields[] = array("name" => "DEL_DELEGATE_DATE"); $caseReaderFields[] = array("name" => "DEL_PRIORITY"); - $caseReaderFields[] = array("name" => "APP_STATUS_LABEL"); $caseReaderFields[] = array("name" => "APP_FINISH_DATE"); $caseReaderFields[] = array("name" => "CASE_SUMMARY"); $caseReaderFields[] = array("name" => "CASE_NOTES_COUNT"); diff --git a/workflow/engine/classes/class.derivation.php b/workflow/engine/classes/class.derivation.php index cc9806e35..9341cd27b 100755 --- a/workflow/engine/classes/class.derivation.php +++ b/workflow/engine/classes/class.derivation.php @@ -1027,8 +1027,19 @@ class Derivation $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->next(); $aSP = $oDataset->getRow(); - $aSP['USR_UID'] = $nextDel['USR_UID']; $oTask = new Task(); + $aTaskNext = $oTask->load( $nextDel['TAS_UID'] ); + //When is MULTIPLE_INSTANCE catch the first user + if($aTaskNext["TAS_ASSIGN_TYPE"] == "MULTIPLE_INSTANCE"){ + $spUserUid = $this->getAllUsersFromAnyTask($nextDel["TAS_UID"]); + foreach($spUserUid as $row){ + $firstUserUid = $row; + continue; + } + $aSP['USR_UID'] = $firstUserUid; + }else{ + $aSP['USR_UID'] = $nextDel['USR_UID']; + } $aTask = $oTask->load( $nextDel['TAS_PARENT'] ); $nextDel = array ('TAS_UID' => $aTask['TAS_UID'],'USR_UID' => $aSP['USR_UID'],'TAS_ASSIGN_TYPE' => $aTask['TAS_ASSIGN_TYPE'],'TAS_DEF_PROC_CODE' => $aTask['TAS_DEF_PROC_CODE'],'DEL_PRIORITY' => 3,'TAS_PARENT' => '' ); diff --git a/workflow/engine/classes/class.licensedFeatures.php b/workflow/engine/classes/class.licensedFeatures.php index 5235bda86..3bc51eb8c 100644 --- a/workflow/engine/classes/class.licensedFeatures.php +++ b/workflow/engine/classes/class.licensedFeatures.php @@ -231,6 +231,57 @@ class PMLicensedFeatures "type" => "features", "url" => "", "version" => "" + ), + 12 => array( + "description" => "Integration with Gmail.", + "enabled" => false, + "id" => "pmGmail", + "latest_version" => "", + "log" => null, + "name" => "pmGmail", + "nick" => "pmGmail", + "progress" => 0, + "publisher" => "Colosa", + "release_type" => "localRegistry", + "status" => "ready", + "store" => "00000000000000000000000000010012", + "type" => "features", + "url" => "", + "version" => "" + ), + 13 => array( + "description" => "User-based Language Management.", + "enabled" => false, + "id" => "userBasedLanguage", + "latest_version" => "", + "log" => null, + "name" => "userBasedLanguage", + "nick" => "userBasedLanguage", + "progress" => 0, + "publisher" => "Colosa", + "release_type" => "localRegistry", + "status" => "ready", + "store" => "00000000000000000000000000010013", + "type" => "features", + "url" => "", + "version" => "" + ), + 14 => array( + "description" => "User-based Time Zone Management.", + "enabled" => false, + "id" => "userBasedTimeZone", + "latest_version" => "", + "log" => null, + "name" => "userBasedTimeZone", + "nick" => "userBasedTimeZone", + "progress" => 0, + "publisher" => "Colosa", + "release_type" => "localRegistry", + "status" => "ready", + "store" => "00000000000000000000000000010014", + "type" => "features", + "url" => "", + "version" => "" ) ); diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index 3bab49666..df8b8a3c9 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -24,6 +24,7 @@ class pmDynaform $this->fields = $fields; $this->getDynaform(); $this->getDynaforms(); + $this->synchronizeSubDynaform(); $this->getCredentials(); if (!isset($this->fields["APP_UID"])) { $this->fields["APP_UID"] = null; @@ -292,7 +293,16 @@ class pmDynaform $json->data->label = ""; if (isset($this->fields["APP_DATA"][$json->name])) { $json->data->value = $this->fields["APP_DATA"][$json->name]; - $json->data->label = $this->fields["APP_DATA"][$json->name]; + foreach ($json->options as $os) { + if (($json->data->value === true || $json->data->value === 1 || $json->data->value === "1") && + ($os->value === true || $os->value === 1 || $os->value === "1")) { + $json->data->label = $os->label; + } + if (($json->data->value === false || $json->data->value === 0 || $json->data->value === "0") && + ($os->value === false || $os->value === 0 || $os->value === "0")) { + $json->data->label = $os->label; + } + } } } if ($key === "type" && ($value === "checkgroup")) { @@ -350,17 +360,21 @@ class pmDynaform /*----------------------------------********---------------------------------*/ $oCriteria = new Criteria("workflow"); $oCriteria->addSelectColumn(AppDocumentPeer::APP_DOC_UID); - $oCriteria->addSelectColumn(AppDocumentPeer::DOC_VERSION); + $oCriteria->addSelectColumn(AppDocumentPeer::DOC_VERSION); + $oCriteria->addSelectColumn(ContentPeer::CON_VALUE); /*----------------------------------********---------------------------------*/ if ($enablePMGmail) { $oCriteria->addSelectColumn(AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD); } - /*----------------------------------********---------------------------------*/ + /*----------------------------------********---------------------------------*/ + $oCriteria->addJoin(AppDocumentPeer::APP_DOC_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN); $oCriteria->add(AppDocumentPeer::APP_UID, $this->fields["APP_DATA"]["APPLICATION"]); $oCriteria->add(AppDocumentPeer::APP_DOC_FIELDNAME, $json->name); + $oCriteria->add(ContentPeer::CON_CATEGORY, 'APP_DOC_FILENAME'); $rs = AppDocumentPeer::doSelectRS($oCriteria); $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); $links = array(); + $labelsFromDb = array(); while ($rs->next()) { $row = $rs->getRow(); $linkDownload = "../cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"]; @@ -374,10 +388,16 @@ class pmDynaform } /*----------------------------------********---------------------------------*/ array_push($links, $linkDownload); + array_push($labelsFromDb, $row["CON_VALUE"]); } $json->data = new stdClass(); - $json->data->value = $links; - $json->data->label = isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : "[]"; + $json->data->value = $links; + + if(sizeof($labelsFromDb)) { + $json->data->label = G::json_encode($labelsFromDb); + } else { + $json->data->label = isset($this->fields["APP_DATA"][$json->name . "_label"]) ? $this->fields["APP_DATA"][$json->name . "_label"] : (isset($this->fields["APP_DATA"][$json->name]) ? $this->fields["APP_DATA"][$json->name] : "[]"); + } } if ($key === "type" && ($value === "file") && isset($json->variable)) { //todo @@ -494,7 +514,7 @@ class pmDynaform if ($key === "type" && ($value === "form") && $this->records != null) { foreach ($this->records as $ri) { if ($json->id === $ri["DYN_UID"] && !isset($json->jsonUpdate)) { - $jsonUpdate = json_decode($ri["DYN_CONTENT"]); + $jsonUpdate = G::json_decode($ri["DYN_CONTENT"]); $jsonUpdate = $jsonUpdate->items[0]; $jsonUpdate->colSpan = $json->colSpan; $jsonUpdate->jsonUpdate = true; @@ -544,7 +564,7 @@ class pmDynaform $data[$json->variable === "" ? $json->id : $json->variable] = $json->options[0]->value; } if (isset($json->placeholder) && $json->placeholder !== "") { - $data[$json->variable === "" ? $json->id : $json->variable] = $json->placeholder; + $data[$json->variable === "" ? $json->id : $json->variable] = ""; } if (isset($json->defaultValue) && $json->defaultValue !== "") { $data[$json->variable === "" ? $json->id : $json->variable] = $json->defaultValue; @@ -878,11 +898,12 @@ class pmDynaform $this->record = $record; $json = G::json_decode($this->record["DYN_CONTENT"]); $this->jsonr($json); + $currentDynaform = (isset($this->fields['CURRENT_DYNAFORM']) && $this->fields['CURRENT_DYNAFORM'] != '')? $this->fields['CURRENT_DYNAFORM'] : ''; $javascrip = "" . " +
+

{php}echo G::LoadTranslation('ID_TIME_ZONE_LOGIN_TITLE');{/php}

+
+