@@ -106,13 +106,13 @@ public function checkScheduled()
106106 {
107107 $ errorMsg = self ::EMAIL_MESSAGE_START . $ this ->getErroneousCheckEntriesAsString ();
108108 $ this ->log ($ errorMsg , __METHOD__ , TL_ERROR );
109- if ($ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringMailingActive '] && $ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringAdminEmail '] != '' )
109+ if (\Config:: get ( ' monitoringMailingActive ') && \Config:: get ( ' monitoringAdminEmail ') != '' )
110110 {
111111 $ objEmail = new \Email ();
112112 $ objEmail ->subject = self ::EMAIL_SUBJECT ;
113113 $ objEmail ->text = $ errorMsg . sprintf (self ::EMAIL_MESSAGE_END , \Environment::get ('base ' ) . "contao " );
114- $ objEmail ->sendTo ($ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringAdminEmail '] );
115- $ this ->logDebugMsg ("Scheduled monitoring check ended with errors. Monitoring admin informed via email ( " . $ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringAdminEmail '] . "). " , __METHOD__ );
114+ $ objEmail ->sendTo (\Config:: get ( ' monitoringAdminEmail ') );
115+ $ this ->logDebugMsg ("Scheduled monitoring check ended with errors. Monitoring admin informed via email ( " . \Config:: get ( ' monitoringAdminEmail ') . "). " , __METHOD__ );
116116 }
117117 else
118118 {
@@ -136,13 +136,13 @@ private function checkSingle($id, $checkType)
136136 $ testString = $ this ->valString ($ objMonitoringEntry ->test_string , true );
137137
138138 $ repitition = 0 ;
139- $ maxRepititions = $ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringTestCirculation '] ;
139+ $ maxRepititions = \Config:: get ( ' monitoringTestCirculation ') ;
140140 if (!is_int ($ maxRepititions ) || $ maxRepititions < 1 )
141141 {
142142 $ maxRepititions = 1 ;
143143 }
144144
145- $ delay = $ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringTestCirculationDelay '] ;
145+ $ delay = \Config:: get ( ' monitoringTestCirculationDelay ') ;
146146 if (!is_int ($ delay ) || $ delay < 1 || $ delay > 99 )
147147 {
148148 $ delay = 10 ;
@@ -293,7 +293,7 @@ private function loadSite($url)
293293 (
294294 'http ' =>array
295295 (
296- 'user_agent ' => " ContaoMonitoringClient "
296+ 'user_agent ' => \Config:: get ( ' MONITORING_AGENT_NAME ' )
297297 )
298298 );
299299 $ context = stream_context_create ($ opts );
@@ -355,7 +355,7 @@ private function returnToList($act)
355355 */
356356 private function logDebugMsg ($ msg , $ origin )
357357 {
358- if ($ GLOBALS [ ' TL_CONFIG ' ][ ' monitoringDebugMode '] === TRUE )
358+ if (\Config:: get ( ' monitoringDebugMode ') === TRUE )
359359 {
360360 $ this ->log ($ msg , $ origin , TL_INFO );
361361 }
0 commit comments