Merge pull request #14127 from civicrm/5.13
[civicrm-core.git] / CRM / Utils / System.php
index 64c035bde618824d1c9853e2f52e0a09d5246953..0aa8fe3e67d54ed0ed5714d9cda3291d120f33e9 100644 (file)
  */
 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
@@ -103,8 +103,7 @@ class CRM_Utils_System {
       }
     }
 
-    return
-      self::url(
+    return self::url(
         $path,
         CRM_Utils_System::getLinksUrl($urlVar, $includeReset, $includeForce),
         $absolute
@@ -688,7 +687,6 @@ class CRM_Utils_System {
     return $config->userSystem->setMessage($message);
   }
 
-
   /**
    * Determine whether a value is null-ish.
    *
@@ -1168,8 +1166,7 @@ class CRM_Utils_System {
    * 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;
   }
@@ -1388,7 +1385,7 @@ class CRM_Utils_System {
    * @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);
   }
 
   /**