* @method static int getLoggedInUfID() Get current logged in user id.
* @method static setHttpHeader(string $name, string $value) Set http header.
* @method static array synchronizeUsers() Create CRM contacts for all existing CMS users.
+ * @method static appendCoreResources(\Civi\Core\Event\GenericHookEvent $e) Callback for hook_civicrm_coreResourceList.
+ * @method static alterAssetUrl(\Civi\Core\Event\GenericHookEvent $e) Callback for hook_civicrm_getAssetUrl.
*/
class CRM_Utils_System {
- static $_callbacks = NULL;
+ public static $_callbacks = NULL;
/**
* @var string
* Page title
*/
- static $title = '';
+ public static $title = '';
/**
* Access methods in the appropriate CMS class
}
}
- return
- self::url(
+ return self::url(
$path,
CRM_Utils_System::getLinksUrl($urlVar, $includeReset, $includeForce),
$absolute
$print = FALSE,
$maintenance = FALSE
) {
- $config = &CRM_Core_Config::singleton();
- return $config->userSystem->theme($content, $print, $maintenance);
+ return CRM_Core_Config::singleton()->userSystem->theme($content, $print, $maintenance);
}
/**
return $config->userSystem->setMessage($message);
}
-
/**
* Determine whether a value is null-ish.
*
* this function, please go and change the code in the install script as well.
*/
public static function isSSL() {
- return
- (isset($_SERVER['HTTPS']) &&
+ return (isset($_SERVER['HTTPS']) &&
!empty($_SERVER['HTTPS']) &&
strtolower($_SERVER['HTTPS']) != 'off') ? TRUE : FALSE;
}
* @return mixed
*/
public static function formatDocUrl($url) {
- return preg_replace('#^user/#', 'user/en/stable/', $url);
+ return preg_replace('#^(user|sysadmin|dev)/#', '\1/en/stable/', $url);
}
/**
$addLanguagePart = TRUE,
$removeLanguagePart = FALSE
) {
- $config = &CRM_Core_Config::singleton();
- return $config->userSystem->languageNegotiationURL($url, $addLanguagePart, $removeLanguagePart);
+ return CRM_Core_Config::singleton()->userSystem->languageNegotiationURL($url, $addLanguagePart, $removeLanguagePart);
}
/**