From: Eileen McNaughton Date: Sun, 22 Jun 2014 23:43:45 +0000 (+1200) Subject: CRM-14850 add code comments to clarify that checking the CMS is not the recommended... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4caaa69694482b8a33648f5f9312039e438dcaf2;p=civicrm-core.git CRM-14850 add code comments to clarify that checking the CMS is not the recommended approach --- diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index c64d11173b..a92882a41d 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -4,8 +4,28 @@ * Base class for UF system integrations */ abstract class CRM_Utils_System_Base { + /** + * deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ var $is_drupal = FALSE; + + /** + * deprecated property to check if this is a joomla install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ var $is_joomla = FALSE; + + /** + * deprecated property to check if this is a wordpress install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ var $is_wordpress = FALSE; /** diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index cc05a46f42..7452ab8c7b 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -48,6 +48,12 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { * */ function __construct() { + /** + * deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ $this->is_drupal = TRUE; $this->supports_form_extensions = TRUE; } diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 3c56456e1e..3951f52b8d 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -41,6 +41,12 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * */ function __construct() { + /** + * deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ $this->is_drupal = FALSE; } diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 78ad9f0d92..a3aecc0184 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -41,6 +41,12 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * */ function __construct() { + /** + * deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific + * functions and leave the codebase oblivious to the type of CMS + * @deprecated + * @var bool + */ $this->is_drupal = FALSE; }