Merge pull request #8415 from monishdeb/CRM-18159
[civicrm-core.git] / CRM / ACL / API.php
index cd2deab2e4a6b0581d3fa18a6ce65ddac2abc4e2..3d0c090dc9ddc39df4e258e48bafe1e98457bc32 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,9 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 class CRM_ACL_API {
 
@@ -138,7 +136,7 @@ class CRM_ACL_API {
     if ($contactID && (CRM_Core_Permission::check('edit my contact') ||
       $type == self::VIEW && CRM_Core_Permission::check('view my contact'))
     ) {
-      $where = "contact_a.id = $contactID OR ($where)";
+      $where = "(contact_a.id = $contactID OR ($where))";
     }
     return $where;
   }