Merge pull request #5038 from civicrm/CRM-15877
[civicrm-core.git] / CRM / Utils / System / Drupal6.php
index 35472c9d420accc20803555866be970dff94c92b..78727b27baeb3f2fa7dde308c5386d6d7e6f57fd 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -121,15 +121,11 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
     return $form_state['user']->uid;
   }
 
-  /*
-   *  Change user name in host CMS
-   *
-   *  @param int $ufID User ID in CMS
-   *  @param string $ufName User name
-   */
   /**
-   * @param int $ufID
-   * @param string $ufName
+   * Change user name in host CMS
+   *
+   * @param int $ufID User ID in CMS
+   * @param string $ufName User name
    */
   public function updateCMSName($ufID, $ufName) {
     // CRM-5555
@@ -405,10 +401,6 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
 
   /**
    * Rewrite various system urls to https
-   *
-   * @param null
-   *
-   * @return void
    */
   public function mapConfigToSSL() {
     global $base_url;
@@ -477,7 +469,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
       if (!$contactID) {
         return FALSE;
       }
-      else { //success
+      else {
+        //success
         if ($loadCMSBootstrap) {
           $bootStrapParams = array();
           if ($name && $password) {
@@ -519,7 +512,7 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
    * e.g. for drupal : records a watchdog message about the new session,
    * saves the login timestamp, calls hook_user op 'login' and generates a new session.
    *
-   * @param array params
+   * @param array $params
    *
    * FIXME: Document values accepted/required by $params
    */
@@ -767,7 +760,7 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
   /**
    * Check is user logged in.
    *
-   * @return boolean
+   * @return bool
    */
   public function isUserLoggedIn() {
     $isloggedIn = FALSE;
@@ -806,7 +799,6 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
    *
    * @return string
    *   , formatted url.
-   * @static
    */
   public function languageNegotiationURL($url, $addLanguagePart = TRUE, $removeLanguagePart = FALSE) {
     if (empty($url)) {
@@ -886,12 +878,13 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
       $perms = $perms + drupal_map_assoc($newPerms);
       $permList = implode(', ', $perms);
       db_query('UPDATE {permission} SET perm = "%s" WHERE rid = %d', $permList, $rid);
-      /*
+      /* @codingStandardsIgnoreStart
         if ( ! empty( $roles ) ) {
             $rids = implode(',', array_keys($roles));
             db_query( 'UPDATE {permission} SET perm = CONCAT( perm, \', edit all events\') WHERE rid IN (' . implode(',', array_keys($roles)) . ')' );
             db_query( "UPDATE {permission} SET perm = REPLACE( perm, '%s', '%s' ) WHERE rid IN ($rids)",
-                $oldPerm, implode(', ', $newPerms) );*/
+                $oldPerm, implode(', ', $newPerms) );
+      @codingStandardsIgnoreEnd */
     }
   }
 
@@ -918,7 +911,6 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
    *
    * @return string
    *   loginURL for the current CMS
-   * @static
    */
   public function getLoginURL($destination = '') {
     $config = CRM_Core_Config::singleton();
@@ -982,4 +974,5 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
   public function flush() {
     drupal_flush_all_caches();
   }
+
 }