Index: trunk/kernel/include/error.php =================================================================== diff -u -N -r3282 -r8436 --- trunk/kernel/include/error.php (.../error.php) (revision 3282) +++ trunk/kernel/include/error.php (.../error.php) (revision 8436) @@ -4,7 +4,7 @@ { var $m_Message; var $m_Field; - + function clsError($message,$field) { $this->SetMessage($message); @@ -15,25 +15,25 @@ { return $this->m_Message; } - - function SetMessage($value) + + function SetMessage($value) { $this->m_Message = $value; } - - function GetField() + + function GetField() { return $this->m_Field; } - - function SetField($value) + + function SetField($value) { $this->m_Field = $value; } - + } -class clsErrorManager +class clsErrorManager { var $m_errorsMap = array(); @@ -61,7 +61,7 @@ { return $this->config[$property]; } - + function Set($property, $value) { $varname = "m_".$property; @@ -70,7 +70,7 @@ function ClearErrors() - { + { unset($this->m_Errors); $this->m_CurrentError = 0; $this->m_UserErrors = array(); @@ -80,26 +80,26 @@ { $this->m_Language=$lang; } - + function AddAdminUserError($errorLang) { $this->m_UserErrors[] = $errorLang; } - + function GetAdminUserErrors() { return $this->m_UserErrors; - } + } function AddError($errorPhrase, $errorField=NULL,$arg1 = NULL,$arg2 = NULL,$arg3 = NULL,$arg4 = NULL,$fatal=FALSE) { - global $g_DebugMode, $objLanguageCache, $g_ErrorLog; - - + global $g_DebugMode, $g_ErrorLog; + + $errorText = ""; //$arg3::$arg4\t$errorPhrase\t$arg1 #arg2 - $errorText = "%s::%s\t%s\t%s %s\n"; + $errorText = "%s::%s\t%s\t%s %s\n"; $errorMessage = sprintf($errorText,$arg3,$arg4,$errorPhrase,$arg1,$arg2); $error = new clsError($errorMessage, $errorField); @@ -130,7 +130,7 @@ else { return ""; - } + } } function GetNextError() @@ -143,7 +143,7 @@ return FALSE; } - + function HandleErrors($postBackUrl) { @@ -191,9 +191,9 @@ function Permission_Error($message) -{ +{ global $PermissionError; - + $PermissionError = $message; /* here we can do some logging or other cool stuff */ }