Subversion Repositories oidplus

Rev

Rev 1221 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1221 Rev 1365
Line 69... Line 69...
69
                        $reason = _L('To use %1, please enable the lines "extension=%2" and "extension_dir=ext" in the configuration file %3.',get_class(),'com_dotnet',php_ini_loaded_file() ? php_ini_loaded_file() : 'PHP.ini');
69
                        $reason = _L('To use %1, please enable the lines "extension=%2" and "extension_dir=ext" in the configuration file %3.',get_class(),'com_dotnet',php_ini_loaded_file() ? php_ini_loaded_file() : 'PHP.ini');
70
                        return false;
70
                        return false;
71
                }
71
                }
72
 
72
 
73
                try {
73
                try {
74
                        $x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog);
74
                        $x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog, NULL, 65001/*CP_UTF8*/);
75
                        $reason = '?'; // LogSimulate() must actively clear it if everything is OK
75
                        $reason = '?'; // LogSimulate() must actively clear it if everything is OK
76
                        $x->LogSimulate(self::LOGPROVIDER, self::LOGEVENT_MSG_SUCCESS, 'TEST', $reason);/** @phpstan-ignore-line */
76
                        $x->LogSimulate(self::LOGPROVIDER, self::LOGEVENT_MSG_SUCCESS, 'TEST', $reason);/** @phpstan-ignore-line */
77
                        return $reason != '';
77
                        return $reason != '';
78
                } catch (\Exception $e) {
78
                } catch (\Exception $e) {
79
                        $reason = $e->getMessage();
79
                        $reason = $e->getMessage();
Line 116... Line 116...
116
                if (!class_exists('COM')) {
116
                if (!class_exists('COM')) {
117
                        return false;
117
                        return false;
118
                }
118
                }
119
 
119
 
120
                try {
120
                try {
121
                        $x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog);
121
                        $x = new \COM(self::CLASS_ViaThinkSoftSimpleEventLog, NULL, 65001/*CP_UTF8*/);
122
 
122
 
123
                        $admin_severity = 0;
123
                        $admin_severity = 0;
124
                        foreach ($event->getTargets() as $target) {
124
                        foreach ($event->getTargets() as $target) {
125
                                if ($target instanceof OIDplusLogTargetUser) {
125
                                if ($target instanceof OIDplusLogTargetUser) {
126
                                        // Since the Windows Event Log is mostly for admins, we use the severity an admin would expect
126
                                        // Since the Windows Event Log is mostly for admins, we use the severity an admin would expect