return $messages;
}
+ /**
+ * Check that the resource URL points to the correct location.
+ * @return array
+ */
+ public function checkResourceUrl() {
+ $messages = array();
+ // Does arrow.png exist where we expect it?
+ $arrowUrl = CRM_Core_Config::singleton()->userFrameworkResourceURL . 'packages/jquery/css/images/arrow.png';
+ $headers = get_headers($arrowUrl);
+ $fileExists = stripos($headers[0], "200 OK") ? 1 : 0;
+ if (!$fileExists) {
+ $messages[] = new CRM_Utils_Check_Message(
+ __FUNCTION__,
+ ts('The Resource URL is not set correctly. Please set the <a href="%1">CiviCRM Resource URL</a>.',
+ array(1 => CRM_Utils_System::url('civicrm/admin/setting/url', 'reset=1'))),
+ ts('Incorrect Resource URL'),
+ \Psr\Log\LogLevel::ERROR,
+ 'fa-server'
+ );
+ }
+ return $messages;
+ }
+
}