Merge pull request #5038 from civicrm/CRM-15877
[civicrm-core.git] / CRM / Utils / System / Drupal6.php
index 1d2cf0fdd79047972183b912cecaedf459b3dd5f..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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -401,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;
@@ -473,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) {
@@ -515,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
    */
@@ -763,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;
@@ -802,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)) {
@@ -882,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 */
     }
   }
 
@@ -914,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();
@@ -978,4 +974,5 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
   public function flush() {
     drupal_flush_all_caches();
   }
+
 }