diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index e32d94cd3..c18d1340c 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -2044,6 +2044,69 @@ $output = $outputHeader.$output; return $__textoEval; } + /** + * Replace Grid Values + * The tag @>GRID-NAME to open the grid and @])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/', $strContentAux, $arrayMatch1, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE); + + if ($iOcurrences) { + $arrayGrid = array(); + for ($i = 0; $i <= $iOcurrences - 1; $i++) { + $arrayGrid[] = $arrayMatch1[2][$i][0]; + } + + $arrayGrid = array_unique($arrayGrid); + + foreach ($arrayGrid as $index => $value) { + $grdName = $value; + $strContentAux1 = $strContentAux; + $strContentAux = null; + $ereg = "/^(.*)@>" . $grdName . "(.*)@<" . $grdName . "(.*)$/"; + + while (preg_match($ereg, $strContentAux1, $arrayMatch2)) { + $strData = null; + + if (isset($aFields[$grdName]) && is_array($aFields[$grdName])) { + foreach ($aFields[$grdName] as $aRow) { + foreach ($aRow as $sKey => $vValue) { + if (!is_array($vValue)) { + $aRow[$sKey] = nl2br($aRow[$sKey]); + } + } + $strData = $strData . G::replaceDataField($arrayMatch2[2], $aRow); + } + } + $strContentAux1 = $arrayMatch2[1]; + $strContentAux = $strData . $arrayMatch2[3] . $strContentAux; + } + $strContentAux = $strContentAux1 . $strContentAux; + } + } + $strContentAux = str_replace($nrthtml, $nrt, $strContentAux); + $sContent = $strContentAux; + + foreach ($aFields as $sKey => $vValue) { + if (!is_array($vValue)) { + $aFields[$sKey] = nl2br($aFields[$sKey]); + } + } + $sContent = G::replaceDataField($sContent, $aFields); + + return $sContent; + } + + /* Load strings from a XMLFile. * @author David Callizaya * @parameter $languageFile An xml language file. diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php index 42c128e1d..0d24ad85d 100755 --- a/gulliver/system/class.rbac.php +++ b/gulliver/system/class.rbac.php @@ -143,6 +143,37 @@ class RBAC } } + /** + * gets the Role and their permissions for Administrator Processmaker + * + * @access public + * @return $this->permissionsAdmin[ $permissionsAdmin ] + */ + function loadPermissionAdmin() { + $permissionsAdmin =array( + array("PER_UID"=>"00000000000000000000000000000001","PER_CODE"=>"PM_LOGIN"), + array("PER_UID"=>"00000000000000000000000000000002","PER_CODE"=>"PM_SETUP"), + array("PER_UID"=>"00000000000000000000000000000003","PER_CODE"=>"PM_USERS"), + array("PER_UID"=>"00000000000000000000000000000004","PER_CODE"=>"PM_FACTORY"), + array("PER_UID"=>"00000000000000000000000000000005","PER_CODE"=>"PM_CASES"), + array("PER_UID"=>"00000000000000000000000000000006","PER_CODE"=>"PM_ALLCASES"), + array("PER_UID"=>"00000000000000000000000000000007","PER_CODE"=>"PM_REASSIGNCASE"), + array("PER_UID"=>"00000000000000000000000000000008","PER_CODE"=>"PM_REPORTS"), + array("PER_UID"=>"00000000000000000000000000000009","PER_CODE"=>"PM_SUPERVISOR"), + array("PER_UID"=>"00000000000000000000000000000010","PER_CODE"=>"PM_SETUP_ADVANCE"), + array("PER_UID"=>"00000000000000000000000000000011","PER_CODE"=>"PM_DASHBOARD"), + array("PER_UID"=>"00000000000000000000000000000012","PER_CODE"=>"PM_WEBDAV"), + array("PER_UID"=>"00000000000000000000000000000013","PER_CODE"=>"PM_DELETECASE"), + array("PER_UID"=>"00000000000000000000000000000014","PER_CODE"=>"PM_EDITPERSONALINFO"), + array("PER_UID"=>"00000000000000000000000000000015","PER_CODE"=>"PM_FOLDERS_VIEW"), + array("PER_UID"=>"00000000000000000000000000000016","PER_CODE"=>"PM_FOLDERS_ADD_FOLDER"), + array("PER_UID"=>"00000000000000000000000000000017","PER_CODE"=>"PM_FOLDERS_ADD_FILE"), + array("PER_UID"=>"00000000000000000000000000000018","PER_CODE"=>"PM_CANCELCASE"), + array("PER_UID"=>"00000000000000000000000000000019","PER_CODE"=>"PM_FOLDER_DELETE") + ); + return $permissionsAdmin; + } + /** * Gets the roles and permission for one RBAC_user * diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php index 2dfa55a0b..be3323cc4 100755 --- a/workflow/engine/classes/class.case.php +++ b/workflow/engine/classes/class.case.php @@ -4585,9 +4585,9 @@ class Cases throw (new Exception("Template file \"$fileTemplate\" does not exist.")); } - $sBody = G::replaceDataField(file_get_contents($fileTemplate), $aFields); + $sBody = G::replaceDataGridField(file_get_contents($fileTemplate), $aFields); } else { - $sBody = nl2br(G::replaceDataField($aTaskInfo["TAS_DEF_MESSAGE"], $aFields)); + $sBody = nl2br(G::replaceDataGridField($aTaskInfo["TAS_DEF_MESSAGE"], $aFields)); } G::LoadClass("tasks"); diff --git a/workflow/engine/classes/model/Content.php b/workflow/engine/classes/model/Content.php index f997ac050..43ed87c76 100755 --- a/workflow/engine/classes/model/Content.php +++ b/workflow/engine/classes/model/Content.php @@ -276,7 +276,7 @@ class Content extends BaseContent { * * @param array $langs */ - function regenerateContent($langId) + function regenerateContent($langs) { //Search the language $key = array_search('en',$langs); @@ -382,6 +382,17 @@ class Content extends BaseContent { } } + function fastInsertContent ($ConCategory, $ConParent, $ConId, $ConLang, $ConValue) { + $con = new Content ( ); + $con->setConCategory ( $ConCategory ); + $con->setConParent ( $ConParent ); + $con->setConId ( $ConId ); + $con->setConLang ( $ConLang ); + $con->setConValue ( $ConValue ); + $res = $con->save (); + return $res; + } + function removeLanguageContent($lanId) { try { $c = new Criteria ( ); diff --git a/workflow/engine/methods/login/sysLogin.php b/workflow/engine/methods/login/sysLogin.php index 869e75272..bdac765c2 100755 --- a/workflow/engine/methods/login/sysLogin.php +++ b/workflow/engine/methods/login/sysLogin.php @@ -30,6 +30,10 @@ if (isset ($_POST['form']['USER_ENV'])) { die (); } +@session_destroy(); +session_start(); +session_regenerate_id(); + //Required classes for dbArray work require_once ("propel/Propel.php"); require_once ("creole/Creole.php"); diff --git a/workflow/engine/methods/roles/rolesUsersPermission.php b/workflow/engine/methods/roles/rolesUsersPermission.php index 168d8e626..46385144a 100755 --- a/workflow/engine/methods/roles/rolesUsersPermission.php +++ b/workflow/engine/methods/roles/rolesUsersPermission.php @@ -61,8 +61,8 @@ $roles['ROL_UID'] = $_GET['rUID']; $roles['ROL_CODE'] = $RBAC->getRoleCode($_GET['rUID']); $roles['CURRENT_TAB'] = ($_GET['tab']=='permissions') ? 1 : 0; - $oHeadPublisher->assign('ROLES', $roles); +$oHeadPublisher->assign('permissionsAdmin', $RBAC->loadPermissionAdmin()); G::RenderPage('publish', 'extJs'); ?> \ No newline at end of file diff --git a/workflow/engine/methods/services/Rest/CRUD.java b/workflow/engine/methods/services/Rest/CRUD.java new file mode 100644 index 000000000..d26b07971 --- /dev/null +++ b/workflow/engine/methods/services/Rest/CRUD.java @@ -0,0 +1,203 @@ +// Main class to sent differen kind of messages to the http server +import org.apache.http.impl.client.DefaultHttpClient; + +// Enter CRUD memebers +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpDelete; + +// Used to set JSON or XML messages request +import org.apache.http.entity.StringEntity; + +// Needed for response fetch goal +import org.apache.http.HttpResponse; +import org.apache.http.HttpEntity; +import org.apache.http.util.EntityUtils; + +/** +* Single class containing functions to show how to use GET,POST,PUT,DELETE methods. +*/ +public class CRUD +{ + private static String m_user = "workflow"; // This member variable must be changed to its own dev workspace + + private static void PostSample() + { + System.out.println("POST: Enter login params\n"); + + String loginParamsXML = "\n" + +"\n" + +"admin\n" + +"admin\n" + +""; + String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/login/"; + + System.out.println( "Request: "+URI + "\n"+ loginParamsXML + "\n"); + + DefaultHttpClient httpClient = new DefaultHttpClient(); + HttpPost postRequest = new HttpPost(URI); + try + { + StringEntity input = new StringEntity( loginParamsXML); + input.setContentType("application/xml"); + postRequest.setEntity(input); + HttpResponse httpResponse = httpClient.execute(postRequest); + + HttpEntity responseEntity = httpResponse.getEntity(); + if( responseEntity != null) + { + String response = new String(); + response = EntityUtils.toString( responseEntity); + System.out.println( "Response: " + response + "\n"); + } + } + catch( java.io.IOException x) + { + throw new RuntimeException("I/O error: " + x.toString()); + } + } + + private static void GetSample() + { + System.out.println("GET: Display TRANSLATION table row\n"); + + String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/LABEL/LOGIN/en/"; + System.out.println( "Request: " + URI + "\n"); + + DefaultHttpClient httpClient = new DefaultHttpClient(); + HttpGet getRequest = new HttpGet(URI); + try + { + HttpResponse httpResponse = httpClient.execute(getRequest); + + HttpEntity responseEntity = httpResponse.getEntity(); + if( responseEntity != null) + { + String response = new String(); + response = EntityUtils.toString( responseEntity); + System.out.println( "Response: " + response + "\n"); + } + } + catch( java.io.IOException x) + { + throw new RuntimeException("I/O error: " + x.toString()); + } + } + + private static void AnotherPostSample() + { + System.out.println("POST: Insert new row in TRANLATION\n"); + + String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; + String newRow = "BUTTON/ESCAPE/en/sample/2012-05-05/"; + System.out.println( "Request: " + URI + " new row: " + newRow + "\n"); + URI = URI + newRow; + + DefaultHttpClient httpClient = new DefaultHttpClient(); + HttpPost postRequest = new HttpPost(URI); + try + { + HttpResponse httpResponse = httpClient.execute(postRequest); + + HttpEntity responseEntity = httpResponse.getEntity(); + if( responseEntity != null) + { + String response = new String(); + if(response.isEmpty()) + { + System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); + return; + } + response = EntityUtils.toString( responseEntity); + System.out.println( "Response: " + response + "\n"); + } + } + catch( java.io.IOException x) + { + throw new RuntimeException("I/O error: " + x.toString()); + } + } + + private static void PutSample() + { + System.out.println("POST: Update a row in TRANLATION\n"); + + String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; + String index = "BUTTON/ESCAPE/en/"; + String updateData = "changesample/2011-07-06/"; + + System.out.println( "Request: " + URI + " index: " + index + " updateData: " + updateData + "\n"); + URI = URI + index + updateData; + + DefaultHttpClient httpClient = new DefaultHttpClient(); + HttpPut putRequest = new HttpPut(URI); + try + { + HttpResponse httpResponse = httpClient.execute(putRequest); + + HttpEntity responseEntity = httpResponse.getEntity(); + if( responseEntity != null) + { + String response = new String(); + if(response.isEmpty()) + { + System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); + return; + } + response = EntityUtils.toString( responseEntity); + System.out.println( "Response: " + response + "\n"); + } + } + catch( java.io.IOException x) + { + throw new RuntimeException("I/O error: " + x.toString()); + } + } + + private static void DeleteSample() + { + System.out.println("DELETE: Remove a row in TRANLATION\n"); + + String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; + String index = "BUTTON/ESCAPE/en/"; + + System.out.println( "Request: " + URI + "index:" + index + "\n"); + URI = URI + index; + + DefaultHttpClient httpClient = new DefaultHttpClient(); + HttpDelete deleteRequest = new HttpDelete(URI); + try + { + HttpResponse httpResponse = httpClient.execute(deleteRequest); + + HttpEntity responseEntity = httpResponse.getEntity(); + if( responseEntity != null) + { + String response = new String(); + if(response.isEmpty()) + { + System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); + return; + } + response = EntityUtils.toString( responseEntity); + System.out.println( "Response: " + response + "\n"); + } + } + catch( java.io.IOException x) + { + throw new RuntimeException("I/O error: " + x.toString()); + } + } + + public static void main(String args[]) + { + System.out.println("CRUD samples."); + PostSample(); + GetSample(); + AnotherPostSample(); + PutSample(); + DeleteSample(); + + } +} \ No newline at end of file diff --git a/workflow/engine/methods/services/Rest/CURLMessage.php b/workflow/engine/methods/services/Rest/CURLMessage.php new file mode 100644 index 000000000..ae2ed0dbe --- /dev/null +++ b/workflow/engine/methods/services/Rest/CURLMessage.php @@ -0,0 +1,149 @@ +restServer = PROTOCOL_HTTP . COLON.PATH_SEP . PATH_SEP; + $this->restServer .= $_SERVER['SERVER_NAME'] . PATH_SEP; + $this->restServer .= $this->serviceTechnic . PATH_SEP . $workspace . PATH_SEP; + + $this->ch = curl_init(); + curl_setopt($this->ch,CURLOPT_TIMEOUT, 2); + curl_setopt($this->ch,CURLOPT_POST, 1); + curl_setopt($this->ch,CURLOPT_RETURNTRANSFER, 1); + } + /** + * set the message in order to follow the message format + */ + abstract protected function format(array $message); + /** + * Set properties used in a simpleMessage Class like a set in a URI, or formatted as a JSon msg. + */ + abstract protected function setMoreProperties($messageFormated); + /** + * Attach the method to the restServer path, set the type of the message, and the message itself. + */ + protected function setMessageProperties($method,array $message) + { + $messageFormated = $this->format($message); + $this->server_method = $this->restServer . $method; + $this->setMoreProperties($messageFormated); + } + /** + * Send or execute(curl notation) the message using a rest method + **/ + public function send($method,array $message) + { + self::setMessageProperties($method,$message); + $this->output = curl_exec($this->ch); + return $this->output; + } + /** + * Set the message to GET method type + */ + public function sendGET($method,array $message) + { + curl_setopt($this->ch, CURLOPT_HTTPGET,true); + return $this->send($method,$message); + } + /** + * Set the message to POST method type + */ + public function sendPOST($method,array $message) + { + curl_setopt($this->ch,CURLOPT_POST,true); + return $this->send($method,$message); + } + /** + * Set the message to PUT method type + */ + public function sendPUT($method,array $message) + { + curl_setopt($this->ch,CURLOPT_PUT,true); + return $this->send($method,$message); + } + /** + * Set the message to DELETE method type + */ + public function sendDELETE($method,array $message) + { + curl_setopt($this->ch,CURLOPT_CUSTOMREQUEST,"DELETE"); + return $this->send($method,$message); + } + /** + * Display all the data that the response could got. + */ + public function displayResponse() + { + $error = curl_error($this->ch); + $result = array( 'header' => '', + 'body' => '', + 'curl_error' => '', + 'http_code' => '', + 'last_url' => ''); + if ($error != ""){ + $result['curl_error'] = $error; + return $result; + } + $response = $this->output; + $header_size = curl_getinfo($this->ch,CURLINFO_HEADER_SIZE); + $result['header'] = substr($response,0,$header_size); + $result['body'] = substr($response,$header_size); + $result['http_code'] = curl_getinfo($this -> ch,CURLINFO_HTTP_CODE); + $result['last_url'] = curl_getinfo($this -> ch,CURLINFO_EFFECTIVE_URL); + + echo $this->type." Response: ".$response."
"; + foreach($result as $index => $data) + { + if($data != ""){ + echo $index . "=" . $data . "
"; + } + } + echo "
"; + } + /** + * Close the Curl session using the Curl Handle set by curl_init() function. + */ + public function close() + { + curl_close($this->ch); + } +} + +?> diff --git a/workflow/engine/methods/services/Rest/FormatedMessage.php b/workflow/engine/methods/services/Rest/FormatedMessage.php new file mode 100644 index 000000000..191a693fe --- /dev/null +++ b/workflow/engine/methods/services/Rest/FormatedMessage.php @@ -0,0 +1,46 @@ +server_method . PATH_SEP . $messageFormated . "
"; + // + curl_setopt($this->ch,CURLOPT_URL,$this->server_method); + $contentSelected = $this->content . $this->type; + curl_setopt($this->ch,CURLOPT_HTTPHEADER,array($contentSelected)); + curl_setopt($this->ch,CURLOPT_POSTFIELDS,$messageFormated); + } +} +?> \ No newline at end of file diff --git a/workflow/engine/methods/services/Rest/JsonMessage.php b/workflow/engine/methods/services/Rest/JsonMessage.php new file mode 100644 index 000000000..2a8d8f332 --- /dev/null +++ b/workflow/engine/methods/services/Rest/JsonMessage.php @@ -0,0 +1,43 @@ +type = "json"; + } + /** + * Format the array parameter to a json format. + */ + protected function format(array $message) + { + if (empty($message)){ + return ; + } + if (is_array($message)){ + $jsonMessage = json_encode( $message); + } + return $jsonMessage; + } +} + +?> \ No newline at end of file diff --git a/workflow/engine/methods/services/Rest/RestMessage.php b/workflow/engine/methods/services/Rest/RestMessage.php new file mode 100644 index 000000000..f6c7488b6 --- /dev/null +++ b/workflow/engine/methods/services/Rest/RestMessage.php @@ -0,0 +1,47 @@ +type = "rest"; + } + /** + * Format the array parameter to a single rest line format separed by '/'. + */ + protected function format(array $message) + { + $rest = ""; + if (!empty($message)){ + if (is_array($message)){ + foreach($message as $index => $data) + { + $rest .= "/" . $data; + } + $rest .= "/"; + } + } + return $rest; + } +} + +?> diff --git a/workflow/engine/methods/services/Rest/SimpleMessage.php b/workflow/engine/methods/services/Rest/SimpleMessage.php new file mode 100644 index 000000000..94cfd3ec1 --- /dev/null +++ b/workflow/engine/methods/services/Rest/SimpleMessage.php @@ -0,0 +1,43 @@ +server_method . PATH_SEP . $messageFormated . "
"; + // + curl_setopt($this->ch,CURLOPT_URL,$this->server_method.$messageFormated); + } +} +?> \ No newline at end of file diff --git a/workflow/engine/methods/services/Rest/XmlMessage.php b/workflow/engine/methods/services/Rest/XmlMessage.php new file mode 100644 index 000000000..9d33db4fd --- /dev/null +++ b/workflow/engine/methods/services/Rest/XmlMessage.php @@ -0,0 +1,48 @@ +type = "xml"; + } + /** + * Format the array parameter to a xml valid format. TODO: Need to find out a better way to do it. + */ + protected function format(array $message) + { + if (empty($message)){ + return ; + } + if (is_array($message)){ + $xml = ""; + foreach($message as $index => $data) + { + $xml .= "<" . $index . ">" . $data . ""; + } + $xml .= ""; + } + return $xml; + } +} + +?> diff --git a/workflow/engine/methods/services/Rest/testing.php b/workflow/engine/methods/services/Rest/testing.php new file mode 100644 index 000000000..3b93426e0 --- /dev/null +++ b/workflow/engine/methods/services/Rest/testing.php @@ -0,0 +1,37 @@ +'admin' , 'password'=>'admin'); +$method = "login"; + +$jsonm = new JsonMessage(); +$jsonm->send($method,$msg); +$jsonm->displayResponse(); + +$xmlm = new XmlMessage(); +$xmlm->send($method, $msg); +$xmlm->displayResponse(); + +$msg = array( "LABEL", "LOGIN", "en"); +$table = "TRANSLATION"; + +$rest = new RestMessage(); +$rest->sendGET($table,$msg); +$rest->displayResponse(); + +$msg = array( "HOUSE", "PUSHIN", "en", "sample", "2012-06-06" ); +$rest->sendPOST($table,$msg); +$rest->displayResponse(); + +$msg = array( "HOUSE", "PUSHIN", "en", "samplemod", "2012-07-06" ); +$rest->sendPUT($table,$msg); +$rest->displayResponse(); + +$msg = array( "HOUSE", "PUSHIN", "en"); +$rest->sendDELETE($table,$msg); +$rest->displayResponse(); + +?> diff --git a/workflow/engine/methods/setup/languages_Import.php b/workflow/engine/methods/setup/languages_Import.php index 97b3e0630..17547f7c9 100755 --- a/workflow/engine/methods/setup/languages_Import.php +++ b/workflow/engine/methods/setup/languages_Import.php @@ -72,9 +72,9 @@ try { $importResults = $language->import($languageFile); G::LoadClass("wsTools"); - $renegerateContent = new workspaceTools(); + $renegerateContent = new workspaceTools(SYS_SYS); $renegerateContent->upgradeContent(); - + $result->msg = G::LoadTranslation('IMPORT_LANGUAGE_SUCCESS') . "\n"; $result->msg .= "PO File num. records: " . $importResults->recordsCount . "\n"; $result->msg .= "Success Records: " . $importResults->recordsCountSuccess . "\n"; diff --git a/workflow/engine/methods/users/users_Ajax.php b/workflow/engine/methods/users/users_Ajax.php index 5d7affa5d..aed416375 100755 --- a/workflow/engine/methods/users/users_Ajax.php +++ b/workflow/engine/methods/users/users_Ajax.php @@ -373,7 +373,8 @@ try { if ($filter != ''){ $cc = $oCriteria->getNewCriterion(UsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( $oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( - $oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE))); + $oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( + $oCriteria->getNewCriterion(UsersPeer::USR_EMAIL,'%'.$filter.'%',Criteria::LIKE)))); $oCriteria->add($cc); } $oCriteria->add(UsersPeer::USR_STATUS, array('CLOSED'), Criteria::NOT_IN); @@ -406,7 +407,8 @@ try { if ($filter != ''){ $cc = $oCriteria->getNewCriterion(UsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( $oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( - $oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE))); + $oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr( + $oCriteria->getNewCriterion(UsersPeer::USR_EMAIL,'%'.$filter.'%',Criteria::LIKE)))); $oCriteria->add($cc); } // $sw_add = false; diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index 6e07d23a1..992c52aa2 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -240,22 +240,22 @@ class SkinEngine $templateFile = $this->layoutFile['dirname'] . PATH_SEP . $this->layoutFileExtjs['basename']; } - + $template = new TemplatePower($templateFile); $template->prepare(); $template->assign('header', $header); $template->assign('styles', $styles); $template->assign('bodyTemplate', $body); - + // verify is RTL $oServerConf =& serverConf::getSingleton(); if ($oServerConf->isRtl(SYS_LANG)) { - $template->assign('dirBody', 'dir="RTL"'); + $template->assign('dirBody', 'dir="RTL"'); } // end verify // verify is IE - $doctype = ''; + $doctype = ''; $meta = ''; $iexplores = array( 'IE=10' => '(MSIE 10\.[0-9]+)', @@ -264,16 +264,16 @@ class SkinEngine 'IE=7' => '(MSIE 7\.[0-9]+)', 'IE=6' => '(MSIE 6\.[0-9]+)' ); - - foreach ($iexplores as $browser => $pattern) { + + foreach ($iexplores as $browser => $pattern) { if (preg_match('/'.$pattern.'/', $_SERVER['HTTP_USER_AGENT'])) { $doctype = ''; - $meta = ''; - } + $meta = ''; + } } // end verify - - $template->assign('meta', $meta); + + $template->assign('meta', $meta); $template->assign('doctype', $doctype); echo $template->getOutputContent(); } @@ -598,7 +598,9 @@ class SkinEngine $header = ''; if (isset($oHeadPublisher)) { - $oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : ''; + if (defined('SYS_SYS')) { + $oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : ''; + } $header = $oHeadPublisher->printHeader(); $header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName); } diff --git a/workflow/engine/skinEngine/uxmodern/css/xtheme-gray.css b/workflow/engine/skinEngine/uxmodern/css/xtheme-gray.css index 0071bb68c..963600dd2 100644 --- a/workflow/engine/skinEngine/uxmodern/css/xtheme-gray.css +++ b/workflow/engine/skinEngine/uxmodern/css/xtheme-gray.css @@ -1478,15 +1478,15 @@ body.x-body-masked .x-window-plain .x-window-mc { body.x-pm-login-body{ width: 100%; } -body.x-pm-login-body div.x-window{ +body.x-pm-login-body div.x-window-login{ /*!important needed to change position, not appearance. Not allows JavaScrpit change Position.*/ - left: 50% !important; + left: 50% !important; margin-left: -185px !important; /*Left Location for Login Box. Must be a half from the width of login Box.*/ margin-top: -120px !important; /*Top Location for Login Box. Must be a half from height of login Box.*/ overflow: auto !important; position: absolute !important; top: 50% !important; -} +} body.x-pm-login-body div.x-ie-shadow, body.x-pm-login-body div.x-shadow{ /*Disappears the shadow Login Box.*/ display: none !important; diff --git a/workflow/engine/skinEngine/uxmodern/layout.html b/workflow/engine/skinEngine/uxmodern/layout.html index 42b2faf43..c937d8bf9 100644 --- a/workflow/engine/skinEngine/uxmodern/layout.html +++ b/workflow/engine/skinEngine/uxmodern/layout.html @@ -19,7 +19,7 @@ {if $user_logged neq ''} {$msgVer} {if $switch_interface} - + {/if} {$logout}