Avoid CiviCRM running full drupal cache flush, as this results in CiviCRM clobbering...
[civicrm-core.git] / CRM / Profile / Page / Router.php
index 181d217db1ef3d886a94d6ac67521ac2bb3a8621..511aee992bc51f8f2b2502784bf579615178e08d 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -41,15 +41,14 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
   /**
    * This is some kind of special-purpose router/front-controller for the various profile URLs.
    *
-   * @param $args array this array contains the arguments of the url
+   * @param array $args
+   *   this array contains the arguments of the url.
    *
    * @return string|void
-   * @static
-   * @access public
    */
-  function run($args = NULL) {
+  public function run($args = NULL) {
     if ($args[1] !== 'profile') {
-      return;
+      return NULL;
     }
 
     $secondArg = CRM_Utils_Array::value(2, $args, '');
@@ -74,11 +73,9 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
         $profileGID = CRM_Utils_Request::retrieve('gid', 'Integer', $controller, TRUE);
       }
 
-
       // make sure that this profile enables mapping
       // CRM-8609
-      $isMap =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $profileGID, 'is_map');
+      $isMap = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $profileGID, 'is_map');
       if (!$isMap) {
         CRM_Core_Error::statusBounce(ts('This profile does not have the map feature turned on.'));
       }
@@ -128,7 +125,6 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
     }
 
     CRM_Utils_System::permissionDenied();
-    return;
   }
 
 }