Merge remote branch 'upstream/master'
This commit is contained in:
@@ -913,7 +913,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
}
|
||||
|
||||
G::verifyPath(PATH_DATA . "log" . PATH_SEP, true);
|
||||
G::log(date("Y-m-d H:i:s") . " | $sObject | " . $sSource . " | $sType | " . $sDescription . "\n", PATH_DATA);
|
||||
G::log("| $sObject | " . $sSource . " | $sType | " . $sDescription . "\n", PATH_DATA);
|
||||
} catch (Exception $e) {
|
||||
//CONTINUE
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
|
||||
|
||||
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
|
||||
$message = date ('Y-m-d H:i:s') . '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
$message = '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
if ($sType == 'action') {
|
||||
G::log($message, PATH_DATA);
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
|
||||
|
||||
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
|
||||
$message = date ('Y-m-d H:i:s') . '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
$message = '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
if ($sType == 'action') {
|
||||
G::log($message, PATH_DATA);
|
||||
}
|
||||
|
||||
@@ -3970,7 +3970,7 @@ class Cases
|
||||
if (SubApplicationPeer::doCount($oCriteria2) > 0) {
|
||||
G::LoadClass('derivation');
|
||||
$oDerivation = new Derivation();
|
||||
$oDerivation->verifyIsCaseChild($sApplicationUID);
|
||||
$oDerivation->verifyIsCaseChild($sApplicationUID, $iIndex);
|
||||
}
|
||||
|
||||
//update searchindex
|
||||
|
||||
@@ -638,7 +638,7 @@ class Derivation
|
||||
//Close case
|
||||
$appFields["APP_STATUS"] = "COMPLETED";
|
||||
$appFields["APP_FINISH_DATE"] = "now";
|
||||
$this->verifyIsCaseChild( $currentDelegation["APP_UID"] );
|
||||
$this->verifyIsCaseChild($currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"]);
|
||||
|
||||
$sw = 1;
|
||||
}
|
||||
@@ -793,7 +793,7 @@ class Derivation
|
||||
* @param string $sApplicationUID
|
||||
* @return void
|
||||
*/
|
||||
function verifyIsCaseChild ($sApplicationUID)
|
||||
function verifyIsCaseChild ($sApplicationUID, $delIndex = 0)
|
||||
{
|
||||
//Obtain the related row in the table SUB_APPLICATION
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -814,7 +814,7 @@ class Derivation
|
||||
$oDataset->next();
|
||||
$aSP = $oDataset->getRow();
|
||||
if ($aSP['SP_SYNCHRONOUS'] == 1) {
|
||||
$appFields = $oCase->loadCase( $sApplicationUID );
|
||||
$appFields = $oCase->loadCase($sApplicationUID, $delIndex);
|
||||
//Copy case variables to parent case
|
||||
$aFields = unserialize( $aSP['SP_VARIABLES_IN'] );
|
||||
$aNewFields = array ();
|
||||
@@ -853,6 +853,27 @@ class Derivation
|
||||
$currentDelegation2 = array ('APP_UID' => $aSA['APP_PARENT'],'DEL_INDEX' => $aSA['DEL_INDEX_PARENT'],'APP_STATUS' => 'TO_DO','TAS_UID' => $aParentCase['TAS_UID'],'ROU_TYPE' => $aDeriveTasks[1]['ROU_TYPE']
|
||||
);
|
||||
$this->derivate( $currentDelegation2, $nextDelegations2 );
|
||||
|
||||
if($delIndex > 0 ) {
|
||||
// Send notifications - Start
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load($appFields["CURRENT_USER_UID"]);
|
||||
|
||||
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
|
||||
|
||||
try {
|
||||
$oCase->sendNotifications($appFields["TAS_UID"],
|
||||
$nextDelegations2,
|
||||
$appFields["APP_DATA"],
|
||||
$sApplicationUID,
|
||||
$delIndex,
|
||||
$sFromName);
|
||||
|
||||
} catch (Exception $e) {
|
||||
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
|
||||
}
|
||||
// Send notifications - End
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,20 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
//LOG Filed authentications
|
||||
$filedTimes = (defined(PPP_FAILED_LOGINS)) ? PPP_FAILED_LOGINS : 3;
|
||||
|
||||
if($_SESSION['FAILED_LOGINS'] > $filedTimes){
|
||||
$ip = G::getIpAddress();
|
||||
$browser = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
$path = PATH_DATA;
|
||||
$message = "| Many failed authentication attempts for USER: " . $usr . " | IP: " . $ip . " | WS: " . SYS_SYS . " | BROWSER: " .$browser ." | \n" ;
|
||||
$file = "loginFailed.log";
|
||||
|
||||
G::log($message, $path, $file);
|
||||
}
|
||||
|
||||
G::header("location: $loginUrl");
|
||||
die;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user