Merge pull request #4696 from colemanw/CRM-15669
[civicrm-core.git] / CRM / Event / Page / ManageEvent.php
index 7461f36700d496ea8d5897ddd87f3e567bebc6a0..6273688e5670a29f4c58c63c1cd287b0525eadce 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -61,7 +61,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
    *
    * @return array (reference) of action links
    */
-  function &links() {
+  public function &links() {
     if (!(self::$_actionLinks)) {
       // helper variable for nicer formatting
       $copyExtra = ts('Are you sure you want to make a copy of this Event?');
@@ -104,7 +104,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
    *
    * @return array (reference) of tab links
    */
-  static function &tabs($enableCart) {
+  public static function &tabs($enableCart) {
     $cacheKey = $enableCart ? 1 : 0;
     if (!(self::$_tabLinks)) {
       self::$_tabLinks = array();
@@ -186,10 +186,9 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
    * Finally it calls the parent's run method.
    *
    * @return void
-   * @access public
    *
    */
-  function run() {
+  public function run() {
     // get the requested action
     $action = CRM_Utils_Request::retrieve('action', 'String',
       // default to 'browse'
@@ -241,11 +240,11 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
   }
 
   /**
-   * browse all events
+   * Browse all events
    *
    * @return void
    */
-  function browse() {
+  public function browse() {
     $this->assign('includeWysiwygEditor', TRUE);
     $this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
       'String',
@@ -317,14 +316,14 @@ ORDER BY start_date desc
     while ($dao->fetch()) {
       if (in_array($dao->id, $permissions[CRM_Core_Permission::VIEW])) {
         $manageEvent[$dao->id] = array();
-        $isRepeatingEvent = CRM_Core_BAO_RecurringEntity::getParentFor($dao->id, 'civicrm_event');
+        $isRecurringEvent = CRM_Core_BAO_RecurringEntity::getParentFor($dao->id, 'civicrm_event');
         $manageEvent[$dao->id]['repeat'] = '';
-        if ($isRepeatingEvent) {
-          if ($dao->id == $isRepeatingEvent) {
-            $manageEvent[$dao->id]['repeat'] = 'Repeating Event - (Parent)';
+        if ($isRecurringEvent) {
+          if ($dao->id == $isRecurringEvent) {
+            $manageEvent[$dao->id]['repeat'] = 'Recurring Event - (Parent)';
           }
           else {
-            $manageEvent[$dao->id]['repeat'] = 'Repeating Event - (Child)';
+            $manageEvent[$dao->id]['repeat'] = 'Recurring Event - (Child)';
           }
         }
         CRM_Core_DAO::storeValues($dao, $manageEvent[$dao->id]);
@@ -399,9 +398,8 @@ ORDER BY start_date desc
    * all the fields in the event wizard
    *
    * @return void
-   * @access public
    */
-  function copy() {
+  public function copy() {
     $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE, 0, 'GET');
 
     $urlString = 'civicrm/event/manage';
@@ -416,7 +414,7 @@ ORDER BY start_date desc
     return CRM_Utils_System::redirect(CRM_Utils_System::url($urlString, $urlParams));
   }
 
-  function search() {
+  public function search() {
     if (isset($this->_action) &
       (CRM_Core_Action::ADD |
         CRM_Core_Action::UPDATE |
@@ -434,13 +432,13 @@ ORDER BY start_date desc
   }
 
   /**
-   * @param $params
+   * @param array $params
    * @param bool $sortBy
    * @param $force
    *
    * @return string
    */
-  function whereClause(&$params, $sortBy = TRUE, $force) {
+  public function whereClause(&$params, $sortBy = TRUE, $force) {
     $values    = array();
     $clauses   = array();
     $title     = $this->get('title');
@@ -530,9 +528,9 @@ ORDER BY start_date desc
 
   /**
    * @param $whereClause
-   * @param $whereParams
+   * @param array $whereParams
    */
-  function pager($whereClause, $whereParams) {
+  public function pager($whereClause, $whereParams) {
 
     $params['status'] = ts('Event %%StatusMessage%%');
     $params['csvString'] = NULL;
@@ -556,9 +554,9 @@ SELECT count(id)
 
   /**
    * @param $whereClause
-   * @param $whereParams
+   * @param array $whereParams
    */
-  function pagerAtoZ($whereClause, $whereParams) {
+  public function pagerAtoZ($whereClause, $whereParams) {
 
     $query = "
    SELECT DISTINCT UPPER(LEFT(title, 1)) as sort_name
@@ -572,4 +570,3 @@ SELECT count(id)
     $this->assign('aToZ', $aToZBar);
   }
 }
-