CRM add missing comment blocks
[civicrm-core.git] / CRM / Event / Info.php
index 7de7b7621a6c00a8e1d0f97453017ce3e995b4d4..ac38639c02ffccd30003c72a2615ad435cf351f8 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -31,7 +31,7 @@
  * abstract class.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -52,7 +52,7 @@ class CRM_Event_Info extends CRM_Core_Component_Info {
   }
 
   // docs inherited from interface
-  public function getPermissions() {
+  public function getPermissions($getAllUnconditionally = FALSE) {
     return array(
       'access CiviEvent',
       'edit event participants',
@@ -64,6 +64,12 @@ class CRM_Event_Info extends CRM_Core_Component_Info {
     );
   }
 
+  public function getAnonymousPermissionWarnings() {
+    return array(
+      'access CiviEvent',
+    );
+  }
+
   // docs inherited from interface
   public function getUserDashboardElement() {
     return array('name' => ts('Events'),
@@ -103,21 +109,22 @@ class CRM_Event_Info extends CRM_Core_Component_Info {
     if (CRM_Core_Permission::check('access CiviEvent') &&
       CRM_Core_Permission::check('edit event participants')
     ) {
-      $shortCuts = array_merge($shortCuts, array(
-        array('path' => 'civicrm/participant/add',
-            'query' => "reset=1&action=add&context=standalone",
-            'ref' => 'new-participant',
-            'title' => ts('Event Registration'),
-          )));
+      $shortCut[] = array(
+        'path' => 'civicrm/participant/add',
+        'query' => "reset=1&action=add&context=standalone",
+        'ref' => 'new-participant',
+        'title' => ts('Event Registration'),
+      );
       if ($newCredit) {
         $title = ts('Event Registration') . '<br />&nbsp;&nbsp;(' . ts('credit card') . ')';
-        $shortCuts = array_merge($shortCuts, array(
-          array('path' => 'civicrm/participant/add',
-              'query' => "reset=1&action=add&context=standalone&mode=live",
-              'ref' => 'new-participant-cc',
-              'title' => $title,
-            )));
+        $shortCut[0]['shortCuts'][] = array(
+          'path' => 'civicrm/participant/add',
+          'query' => "reset=1&action=add&context=standalone&mode=live",
+          'ref' => 'new-participant-cc',
+          'title' => $title,
+        );
       }
+      $shortCuts = array_merge($shortCuts, $shortCut);
     }
   }
 }